Yet another Discord bot template written in Python using the Disnake API wrapper. For kick-starting future projects and commissions. 🍽️
This template serves as a basic, barebones template for Discord bot development. You should have some knowledge of Python, asynchronous programming and the Disnake syntax.
For more information on Disnake, check out the docs.
Slash commands can take some time to register on guilds (usually an hour or two.) If you'd like to test a slash command beforehand, use guild_ids
in the command decorator to register them instantly.
@commands.slash_command(
name="command",
description="description",
guild_ids=[GUILD_ID1, GUILD_ID2] # The ID(s) of the guild(s) you wish to test.
)
Alternatively, you can define the guild_id
globally in main.py
.
bot = commands.Bot(
test_guilds=[GUILD_ID1, GUILD_ID2],
)
-
Update the values in
.env.EXAMPLE
and rename to.env
.DISCORD_TOKEN = YOUR_BOT_TOKEN DISCORD_ADMIN = YOUR_USER_ID
-
Optional: Update the values in
config.json
.{ "activity": "Bot", "prefix": "!" }
If you have any questions about this template, please submit an issue here.
This project is licensed under the MIT License - see the LICENSE
file for details.
- Disnake Docs https://docs.disnake.dev/en/latest/index.html
- Discord Developer Applications https://discord.com/developers/applications