Skip to content

Repository files navigation

Telegram live timer bot

What is it

This is a telegram bot that allows the user to have a "live" countdown on the event that they want to have.

Prerequisites

  1. Python
    • You have to download python from the installation.

Quick start

  1. Download this repository
  2. Install the dependencies using python -m pip install -r requirements.txt (see Dependencies)
  3. Create a .env file with the template here
  4. Start the application by running python . at the root directory.

Dependencies

The requirements.txt file lists the packages the bot needs:

python-telegram-bot[job-queue]
python-dotenv
  • python-telegram-bot — the Telegram Bot API library (the [job-queue] extra pulls in APScheduler for scheduling the countdown end message)
  • python-dotenv — loads the .env file

Install them with:

python -m pip install -r requirements.txt

To add a new dependency, add its name to requirements.txt, then run the install command again.

Creating your .env file

BOT_TOKEN=<Your Bot Token>
  1. Copy the template above (Note that there is no space between the = and the token itself)
  2. Get your BOT_TOKEN from @botfather here

Note:

  1. Note that once you turn off the bot, all the event information is lost. (This might be a feature to be added in the future)

Contributing to the Project

Feel free to send in a pull request. Ensure that all the unit tests are passing before sending in a pull request.

Using the project

To Use this project, please add this line into your readme.

Referenced from [Jh123x Timer bot](https://jh123x.com/blog/2023/a-live-countdown-telegram-bot/)

Tech Stack

About

A telegram live timer bot

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages