SampleTelegramQuiz icon indicating copy to clipboard operation
SampleTelegramQuiz copied to clipboard

Sample of Telegram Quiz in Python

SampleTelegramQuiz

Sample of Telegram Quiz in Python

Find here the source code of the Creating a Telegram Chatbot Quiz with Python article.

Alt text

Table of Contents

  • Setup
  • Run on Local

Table of contents generated with markdown-toc

Setup

Clone the repository

git clone https://github.com/gcatanese/SampleTelegramQuiz.git

Create and .env file in the same folder as app.py. The .env file defines the environment variables.

  • TELEGRAM_TOKEN={your Telegram token} [here]

Run on Local

Run the application

cd telegram_bot
python telegram_bot.py

Access the bot via the deeplink https://t.me/{bot_username} and start chatting

Note: the chatbot runs in Polling mode