szres / tg-inline-limit-bot

A telegram bot to limit the use of inline bots to a reasonable amount.
MIT License
1 stars 0 forks source link
inline-messages telegram telegram-bot telegram-bots
tg-inline-limit-bot

Chat on Telegram GitHub Repo stars Software License Docker

This bot can limit the number of inline messages sent by members in a group to avoid inline message storms.

https://github.com/szres/tg-inline-limit-bot/assets/1407471/b1db7707-a364-4459-9630-8a6dcea1a7b7

Usage

Just add this bot to the group and give it the permission to manage and delete messages.

Setup

The default configuration of the bot is that a burnout is triggered when a user sends more than 4 inline messages in 240 minutes.
And the burnout is cleared 240 minutes after the user sends the first inline message.

The admins in the group could change the configuration by command /setup

You could get more info by command /help

Selfhost

  1. Set TZ in .env to your group`s timezone. You can access tz database there.
  2. Set BOT_TOKEN in .env with your telegram bot token.
  3. Run make.
  4. Your bot should be online now.