A discord bot to store and call quotes from a guild.
It can react to things happening on the guild, and has specific commands.
Guild member sent exaclty the message "99!":
Responds with a random quote from Brooklyn 99
An error happened in response to a command:
Responds with the error message
Quotes:
!feed Store the message to later use it for the serve command: '!feed quote' or '!feed' as a reply to the quote
!menu Gets all stored custom quotes
!serve quote_number Responds with the custom quote corresponding to the number
!priory Responds with a random quote from the Priory of the Orange Tree
!random Responds with a random quote from the custom quotes
Utils:
!roll number_of_dice number_of_sides Simulates rolling dice
No Category:
!help Shows this message
Type !help command for more info on a command.
You can also type !help category for more info on a category.
This bot must have access to message content.
Inside this directory, create a .env
file containing:
DISCORD_TOKEN=your-bot-token
DISCORD_GUILD=your-guild-name
For more info on how to get those variables: how to make a discord bot in the developer portal.
To install dependencies:
pip install -r requirements.txt
To run the code:
python bot.py
When successfully launched, it should return:
out-of-context has connected to Discord!
guild_name(id: guild_id)
You can either use a text file or a Google Doc.
Create a out_of_context.txt
file (it can be empty). The main drawback is that if the bot is launched on multiple server, the text file must be transfered each time.
Add a credentials.json from Google For Developers (ID client OAuth 2.0).
Must also add GOOGLE_DOCUMENT_ID=your-document-id
to the .env
file.
More details for the setup on Google Docs - Python: quickstart.
- Host the discord bot