This is a dirty example on how one can use the interactions.py
library to handle Slash commands in a Discord server.
interactions.py
- see Referencesdotenv
json
- Make sure that your bot has the
application.commands
scope
- After making sure you have the above requirements in place, create a
.env
file with the format of the.env.example
and fill in with your values - Run
python mock.py
, which will register the commands incommands.json
in your specified server and then it will spawn your bot. - If you just want to spawn the bot, run
python bot.py
- interactions.py library