Skip to content

ceccillia/scheduled_tg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Bot with Task Scheduler

This project is a simple Telegram bot that sends scheduled messages to a specified chat.

Features

  • Sends scheduled messages at specified times.
  • Supports loading configuration from an external YAML file.

Requirements

  • Python 3.9+
  • Docker (optional)

Installation

  1. Clone the repository:

    git clone https://github.com/koidula/scheduled_tg_bot.git
  2. Install the required dependencies:

    pip install -r requirements.txt
  3. or if you are using Docker:

    docker build -t telegram_bot .
    

Configuration

  1. Create a config.yml file in the root directory of the project.

  2. Add your Telegram bot token, chat ID, and the scheduled message. Example:

    TOKEN: "your_bot_token_here"
    CHAT_ID: "your_chat_id_here"
    SCHEDULED_MESSAGE: "Your scheduled message here"

Usage

Via Python

Run:

python telegram_bot.py

Via Docker

If you've already built the Docker image, run the container:

docker run -e TZ=Europe/Moscow -d telegram_bot

Now your bot will send scheduled messages at specified times to the specified chat.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published