This project is made for convenient way to check schedule of group in telegram instead of visiting web-site.
- Configurable for any group
- There is an opportunity to easily edit messages
- You can config it with deleting trash messages (commands)
- You can customize command to call bot function
- Python
- Aiogram (Telegram Bot API Wrapper)
- BeautifulSoup (HTML Parser)
- Requests (HTTP Client)
- You need to use some hosting that allows to use Python
[IMPORTNANT]This repository is ready for use in Heroku
- Fork this repository
- Connect forked repository in Heroku Application
- Set Environment Variables
TOKEN,COURSEandGROUP, whereTOKENis given by Bot Father. - Invite created bot in your group or use it in private messages
- Fork this repository and clone it on your device
- Check out
requirements.txtwith deps. - Change
.dev.env.exampleto.dev.envand passTOKEN,COURSEandGROUPvars. - Now bot is ready for local development
- Run
python bot.pyto run bot instance.
Project offer a lot of opportunities to customize it for your needs.
DELETE_COMMANDS - if true bot will delete commands after execution (of course if bot has permissions to do it)
WRITE_LOGS - if true bot will write logs in terminal.
CURRENT_LANGUAGE - check Localization section for more info.
TOKEN - token of your bot, given by Bot Father.
COURSE - course of your group.
GROUP - number of your group.
UPDATE_ON_EVERY_SHOW - if true bot will update schedule on every show command.
SCHEDULE_COMMANDS - commands to call schedule module.
COURSE - course of your group.
GROUP - number of your group.
EXAMS_COMMANDS - commands to call exams module.
COURSE - course of your group.
GROUP - number of your group.
CURRENT_LANGUAGE - current language of bot.
Messages, exceptions and keyboard texts can be changed in shared/localization folder.
messages.py- messagesexceptions.py- exceptionskeyboards.py- keyboard texts
For example, localization for exceptions
ExceptionsLocalization = TypedDict('ExceptionsLocalization', {
'INCORRECT_CHAT_TYPE': str,
"ONLY_CURRENT_WEEK": str,
"QUERY_ERROR": str,
})
'en': {
'INCORRECT_CHAT_TYPE': 'This command cannot be used in this chat.',
"ONLY_CURRENT_WEEK": "⚠️ Only current week lessons are shown.\n",
"QUERY_ERROR": "Query error. Please, try again later."
}