Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 1.94 KB

README.md

File metadata and controls

58 lines (45 loc) · 1.94 KB

disnake-boilerplate

disnake-boilerplate-banner

Yet another Discord bot template written in Python using the Disnake API wrapper. For kick-starting future projects and commissions. 🍽️

Prerequisites

  • Python 3.8 +
  • Poetry (or the pip package management tool.)

Features

Disclaimer

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

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],
)

Configuration

  1. Update the values in .env.EXAMPLE and rename to .env.

    DISCORD_TOKEN = YOUR_BOT_TOKEN
    DISCORD_ADMIN = YOUR_USER_ID
  2. Optional: Update the values in config.json.

    {
       "activity": "Bot",
       "prefix": "!"
    }

Support

If you have any questions about this template, please submit an issue here.

License

This project is licensed under the MIT License - see the LICENSE file for details.

References & Resources