File size: 1,393 Bytes
209c46a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# Discord Bot Boilerplate for HF ##### by S. Volkan Kücükbudak This is a simple boilerplate to set up a Discord bot that runs on Hugging Face Spaces, using Flask and the Discord Interaction API. It includes the basic setup for handling interactions, verifying requests, and running health checks in the background. #### Demo ##### Huggingface spaces [HF Demo Space](https://alibrown-playstore.hf.space/) (running public) ##### Demo Boilerplate bot on Discord: ###### Single & Guild install: Link for install the bot on Discord https://discord.com/oauth2/authorize?client_id=1303131091279810593 #### HF-Spaces Demo Space: https://huggingface.co./spaces/Alibrown/playstore/ #### Github (dev) https://github.com/VolkanSah/HF-Discord-Bot/ ## Features - Flask-based backend for handling Discord interactions - Ed25519 request verification - Health check endpoint - Slash command integration (soon) Settings on HF: - PUBLIC_KEY: Your Discord public key. (public) - APPLICATION_ID: Your Discord application ID. (secret) - BOT_TOKEN: Your BOT Token (secret) needed. ### License You can use this bot for free, both for private and commercial projects. However, do not sell the script, only your own work! ## Disclaimer This is a boilerplate code, and it may require further modification for production use. Always ensure your environment is secure, especially when deploying publicly. |