A template for bots written using discord.py. As much I'd like to release this on PyPI, it seems more logical for this git repository to be forked and worked off of. This project is very much still work in progress.
You may read the documentation for discord.py here. You can join the Discord server for support using this template.
- Python 3.7 and above
-
Fork this repository.
-
Run this command in your command line:
git clone https://github.com/{YOUR_USERNAME}/Botto.git cd Botto pip install pipenv pipenv install # prepend "python3 -m" as necessary
If your machine does not have git, you may download it here.
-
Start hacking.
- Copy
config-example.yml
toconfig.yml
in the same directory. - Fill up all necessary configuration values.
- Run this command in your command line:
Your bot should be online now.
pipenv run python -m botto # prepend "python3 -m" as necessary
Discord now has Gateway Intents which help (or force) you to limit events received. Privileged intents require verification for bots in over 100 guilds. No intents are necessary to function but *_MESSAGES
intents should be enabled to receive messages.
Configuration name | Actual intent name |
---|---|
GUILDS |
same |
MEMBERS |
GUILD_MEMBERS (Privileged) |
BANS |
GUILD_BANS |
EMOJIS |
GUILD_EMOJIS |
INTEGRATIONS |
GUILD_INTEGRATIONS |
WEBHOOKS |
GUILD_WEBHOOKS |
INVITES |
GUILD_INVITES |
VOICE_STATES |
GUILD_VOICE_STATES |
PRESENCES |
GUILD_PRESENCES (Privileged) |
GUILD_MESSAGES |
same |
GUILD_REACTIONS |
GUILD_MESSAGE_REACTIONS |
GUILD_TYPING |
GUILD_MESSAGE_TYPING |
DM_MESSAGES |
DIRECT_MESSAGES |
DM_REACTIONS |
DIRECT_MESSAGE_REACTIONS |
DM_TYPING |
DIRECT_MESSAGE_TYPING |
If enabled, statistics embeds from on_ready
events and the botstats
command will show the number of guilds, text channels and voice channels the bot is in.
If enabled, statistics embeds from on_ready
events and the botstats
command will show the number of guild members and unique users the bot can see. If the PRESENCES
privileged intent is disabled, they will also show the number of bots it can see.
If enabled together with the MEMBERS
privileged intent, statistics embeds from on_ready
events and the botstats
command will show the number of guild members, unique users and online users the bot can see.
If enabled, the bot can read sent messages and therefore execute commands in guild text channels and DM channels respectively.
If enabled, the bot will send a 🗑️ :wastebasket:
reaction when the shell
and eval
commands create a gist. It will listen to it for gist deletion.
Contributions are always welcome. You may also open issues on the issue tracker.
Please see CONTRIBUTING.md for further details.