A simple template for a Discord bot using discord.py, providing the essential tooling and basic building blocks for writing your own custom Discord bot in minutes, with minimal bells and whistles attached.
The template includes two "hello world"-style commands as a demonstration. Use these as a basis for adding new commands for your own special bot.
Further, the documentation serves as a guide for newcomers to understand all the inner workings of a Discord bot, some best-practice patterns to follow, and links to pertinent documentation on discord.py itself.
🚀 Happy botting!
Note
Consider copying this template repository to your own account first. That way, you can work on your own version of the bot, make changes to it, and commit those changes to your own repo.
Refer to the Getting Started page for details on starting up the demo bot defined in this template.
The high-level steps include:
- Installing essential tools and dependencies.
- Setting up your Discord app in the Discord Developer portal, then obtaining your bot token and your Guild/Server ID.
- Adding your token and Guild/Server ID to a
.envfile within the project. - Starting the bot with
uv run thebot.
See CONTRIBUTING.md.