Sample of Telegram Quiz in Python
Find here the source code of the Creating a Telegram Chatbot Quiz with Python article.
Table of contents generated with markdown-toc
Clone the repository
git clone https://github.com/lydnguyen/StudyBuddy.git
Create and .env file in the same folder as StudyBuddy. Install the packages in requirement.txt
pip install -r requirements.txt
The .env file defines the environment variables. To set environment variable via windows commandline:
set TELEGRAM_TOKEN={your Telegram token}
Run the application
cd telegram_bot
python studybuddyapp.py
Access the bot via the deeplink https://t.me/{bot_username}
and start chatting
Note: the chatbot runs in Polling mode
https://abhinand05.medium.com/run-any-executable-as-systemd-service-in-linux-21298674f66f https://snehalchaure.medium.com/running-an-application-as-a-service-with-systemctl-63a51dece4c5