I keep this repo for the Telegram bot that answers common questions about the AbzumsAI Educational Institute. The bot works from a fixed question list, so people can ask by number, full text, or a small part of a question.
It also forwards two kinds of messages:
- New bot feature ideas go to the bot admin.
- Institute suggestions go to the institute chat.
Clone the repo and install the packages:
git clone https://github.com/AbzumsAI/QA-Bot.git
cd QA-Bot
pip install -r requirements.txtCreate a .env file:
TELEGRAM_API_TOKEN=telegram_api_token_here
ADMIN_CHAT_ID=admin_chat_id_here
INSTITUTE_CHAT_ID=institute_chat_id_hereOptional settings:
TELEGRAM_REQUEST_TIMEOUTsets the normal request timeout in seconds. The default is10.TELEGRAM_POLL_TIMEOUTsets the Telegram long poll timeout in seconds. The default is20.
Run the bot:
python main.py/startshows the welcome text./helpshows the command guide./questionslists all saved questions./randomsends one random question with its answer./search mathsearches the questions for a word./newfeature my ideaforwards a bot idea to the admin./newsuggestion my ideaforwards an institute idea to the institute chat.
The bot also accepts command mentions such as /help@YourBotName, which Telegram may send in group chats.
The tests cover command parsing and text matching. Run them before changing the bot flow:
python -m unittest discover -s testsFor the full local check set:
python scripts/run_checks.pyExtra notes live in docs, and .env.example shows the environment names without real values.