This bot is used to display the menu of the Crous in a discord channel and to send the menu at a specific time of the day.
This bot now work with the API Menu Crous : you need to use it to make this bot work.
Many libraries are needed to make this bot work :
pip install -r requirements.txt
If you have some troubles with the installation of the
pycurl
library, make sure to have installed thelibcurl4-openssl-dev
and thelibssl-dev
packages :sudo apt install libcurl4-openssl-dev libssl-dev
To configure the bot, you need to create configuration file name .env
(you can use the .env.example
file as a template) :
# URL of the API with the 5000 port
URL_API="http://<URL_API>:5000"
# Token of the bot
TOKEN=""
# ID of the channel where the bot will send the menu and ID of the owner of the bot to use /echo
CHANNEL_ID=""
OWNER_ID=
# Hour of the day when the bot will send the daily message (24h format):
HOUR=
MINUTE=
To launch the bot, you need to run the main.py
file :
python3 main.py
The bot use the slash commands to interact with the user.
Command | Description |
---|---|
/menu |
Get the list of all the available menus for the day and the menus for tomorrow passed 14:00. |
/menu illkirch |
Get the menu of the Illkirch restaurant. |
/menu cronenbourg |
Get the menu of the Cronenbourg restaurant. |
/menu paul appell |
Get the menu of the Paul Appell restaurant. |
/menu esplanade |
Get the menu of the Esplanade restaurant. |
/menu gallia |
Get the menu of the Gallia restaurant. |
/echo <message> |
Send a message in the channel choosed by CHANNEL_ID (only for the owner of the bot using the OWNER_ID). |
In adition, the bot send a message at a specific time mentioned in the .env
file with the menu of the day and the menu of tomorrow passed 14:00.
- Add the possibility to choose the day of the menu to display