MensaBot is a simple Python application designed to interact with a canteen's menu API and a Telegram bot. It fetches the daily menu from the canteen, checks for favorite dishes, and can send this information along with a custom poll to a specified Telegram chat.
- Fetch daily menu from a specified API.
- Check for specified favorite dishes in the menu.
- Send the menu and favorite dishes information to a Telegram chat.
- Send a custom poll to a Telegram chat.
- Python 3
requests
library
-
Ensure Python 3 is installed on your system. If not, you can download it from python.org.
-
Install packages using pip:
pip install -r requirements.txt
-
lone the repository or download the mensa_bot.py script.
-
Run the script from the command line, providing the Telegram Bot API token and the chat ID as arguments:
python mensa_bot.py <token> <chat_id>
Replace <TELEGRAM_BOT_TOKEN> with your Telegram Bot's API token and <TELEGRAM_CHAT_ID> with the ID of the chat where you want to send messages and polls.
To customize the list of favorite dishes, modify the FAVORITE_DISHES list in the MensaBot class:
FAVORITE_DISHES = ['Burger', 'Nuggets', 'Schnitzel', 'schnitzel', "burger"]
Contributions to MensaBot are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
This project is licensed under the MIT License - see the LICENSE file for details.