The bot fetches the meal plan from Mensaar for the UdS and provides inline queries and commands for listing and showing the available meals.
If you host your own bot, you have to replace mensa_sbot
with the name of your bot.
By typing @mensa_sbot
, you will see the days in the meal plan. If you
select a day, the bot replies with the meals for this day.
When the bot receives one of the commands /days
, /d
, /m
,
/mealplans
, /meals
or /menus
, it sends a list of inline buttons
for all days in the meal plan. It sends you the meals for the
respective day when you click on one of the buttons.
The bot sends the meals for tomorrow for the commands /t
and /tomorrow
.
The bot replies with the meals for today if you send a message to it directly.
Follow the guide in grammY documentation for Deno Deploy. It is free.
In the settings of your project, you have to define the environment variable TELEGRAM_BOT_PROD_TOKEN
to provide the Telegram Bot API token to the bot.
You have to enable the inline mode for the bot. How to do this is described in the grammY documentation.
If you need help, feel free to reach out, for example by opening an issue.
Feel free to open an issue if you have ideas for the bot. Before you make a PR introducing new features, I would appreciate it if we could discuss your ideas in an issue.
Currently, I do not have new features for the bot in mind. If the project grows more, it could make sense to
- add type checking and maybe migrate to TypeScript
- replace the linter from Deno with ESLint
- my gut feeling is that the results from ESLint are better
- maybe with
- replace the usages of the Deno runtime in
dev.js
andmain.js
with dotenv and for example express - add more unit tests and maybe property based tests
- use a spell-checker like typos
I wanted to try out plain JavaScript because I have only worked in TypeScript projects so far.