Skip to content

iooojik/tg-auto-response

Repository files navigation

Telegram Autoresponse Bot

This bot is designed to automatically send a message whenever a user's message matches predefined messages from a configuration file. Note that this bot is available exclusively for Telegram Premium users.

Features

  • Automated Messages: Sends a message when a user's message matches the predefined messages in the configuration.
  • Configuration-Based: Easily customizable messages and trigger messages through a configuration file.
  • Premium Only: Ensures that the bot interacts only with Telegram Premium users.

Getting Started

Prerequisites

  • Docker and docker-compose installed
  • Telegram Bot API Token (you can get this by creating a bot on BotFather)
  • Premium Telegram account for testing and usage

Configuration

  1. Create a configs/config.yaml file in the root directory with the structure from configs/config.yaml.

  2. Replace all values with your desired values.

Running the Bot

Run the bot:

docker compose build && docker compose up -d

Usage

Once the bot is running, it will automatically monitor messages from users. If a message matches any of the trigger messages specified in the configuration file, the bot will send the predefined message.

Example

If your config.yaml contains:

bot:
  token: ""
  debug: true
  conditions:
    - reply: "Привет 👋"
      income_messages:
        - привет
        - hello
        - здарова
        - добрый день
        - добрый вечер
        - хай
        - прив
        - алло
        - приветствую
        - hi
        - хаю хай
        - здравия желаю
  ignore_messages_from:
    - 11

When a user sends a message saying "hello", the bot will respond with "Привет 👋".


Enjoy 🎉

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published