Each command is a .py file that will be loaded dynamically when the bot starts. the command function must have the same file name.
Example: hello.py
# simple command example
async def hello(ctx):
username = ctx.message.author.name
await ctx.send(f'Hello {username}!')
The setting.py
file defines the list of COMMAND
directories, the bot will look for commands in those folders
DESCRIPTION = 'Mi primer bot de discord'
COMMANDS = ['bot/command/basics/']
- clone project
git clone https://github.com/luisbarrasandoval/discord_bot
cd discord_bot
- install pipenv
pip3 install pipenv
pipenv shell
- install dependencies
pipenv install
- change token in
src/config.py
TOKEN = 'YOUR TOKEN'
- Run
cd src && python3 main.py