A template for my future bots.
-
Create a bot on Discord Developer Portal — My Applications
-
You would need MESSAGE CONTENT INTENT in your bot page set as
ON
While most other stuff can be left disabled, way too many functions (mentions, DMs, etc) rely on this. My advice: just leave it enabled.
-
I think I don't need to write this but stillgit clone cd discord-bot-2-template # python -m venv venv
-
Create a
.env
file in the root directory,.env.example
is provided as a template.cp .env.example .env # modify .env as needed
-
Install dependencies and run:
pip install -r requirements.txt python ./main.py
-
If you want to, check this tutorial
- message sending queue for slow mode
- maybe check
kafka
...maybe.
- maybe check
- background loop that runs timed stuff (e.g. countdowns)
- tbc
- discord.py
- discord.py official examples
- Random GPT bot that I used as my 1st bot template
- python - How do i make a working slash command in discord.py - Stack Overflow
probably will have even more copy-pasta from other bot templates/tutorials in the future