Telegram bot server for RC Dining Bot to replace @rcmealbot which became dysfunctional after change of data format in end of 2019.
It now comes with a Graphic User Interface design.
- Check daily meal menus:
/breakfast
and/dinner
- Note: command with payload display menu of the day specified.
- e.g.
/breakfast tomorrow
or/dinner yesterday
- Check settings:
/settings
- Menu of customizable settings available
- Hide menu items:
/hidden
orToggle Menu Visibility
button- Hide certain cuisines and menu items you no long wish to see in the menu.
- e.g. vegetarians can choose to hide non-vegetarian options
- Turn on menu notification:
/subscribe_breakfast
and/subscribe_dinner
- Alternatively,
Toggle Notification Settings
button - Breakfast will be broadcast at 12 AM daily
- Dinner will be broadcast at 3 PM daily
- TODO: customizable broadcast timings
- Alternatively,
- Help menu:
/help
- (For COVID-19 period) Check RVRC dining hall occupancy: /rvcount
- We have only acquired the access to RVRC dining hall data so far.
- Set up PostgreSQL database locally/online
- Configure
.env
file with template.env.example
pipenv install
pipenv run python src/bot.py
- Download and install PostgreSQL
- Create user for the bot to access the database with.
createuser --interactive --pwprompt
- Create database for the bot.
createdb -0 name_of_user name_of_db;
- Launch psql in database mode.
- Create tables using queries in db_setup.txt.
- Grant permissions if necessary for every table.
- Configure
.env
file accordingly.