Skip to content

174n/telegram-comments-antibot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

✋ Telegram Comments Antibot

last commit GitHub issues Visits license

This is a bot for filtering telegram comments.

Installation

git clone https://github.com/174n/telegram-comments-antibot.git
cd telegram-comments-antibot
npm i

Now you need to get BOT_TOKEN from BotFather. Create .env file and put it in there like that (and also add a list of chat ids where the bot allowed to run):

BOT_TOKEN=<your token here>
CHAT_WHITELIST=777777777,-1000000000000

Configuration

There are two kinds of reputation. There is reputation for a user sending the message, which will be saved and updated with each message. The single message also has its own reputation. If the reputation goes bellow 0, the message will be deleted. Everything is configurable in the .env file. Channel reputation will not be saved.

Usage Example

ONLY_WORK_IN_COMMENTS=false
START_REPUTATION=999

Envirenment Variables

ONLY_WORK_IN_COMMENTS

  • If true, the bot will only filter comments and will keep the group chat untouched
  • Default: true

DISABLE_USER_REP

  • If true, the bot will not take user's reputation into account (it will still be recorded though)
  • Default: false

START_REPUTATION

  • The start reputation of a user
  • Default: 1000

CHANNEL_START_REPUTATION

  • The start reputation of a channel
  • Default: 100

EMOJI_REPUTATION

  • How many reputation will be added for each emoji in the message
  • Default: -10

FORMATTINGS_REPUTATION

  • How many reputation will be added for each formatting block in the message
  • Default: -10

URLS_REPUTATION

  • How many reputation will be added for each url in the message
  • Default: -10

NEW_MESSAGE_REPUTATION

  • How many reputation will be added for each new message user sends
  • Default: 5

START_MSG_REPUTATION

  • Start reputation of a single message
  • Default: 100

FORMATTINGS_MSG_REPUTATION

  • How many reputation will be added for each formatting block in the message
  • Default: -5

EMOJI_MSG_REPUTATION

  • How many reputation will be added for each emoji in the message
  • Default: -5

URLS_MSG_REPUTATION

  • How many reputation will be added for each url in the message
  • Default: -80

CHANNEL_MSG_REPUTATION

  • How many reputation will be added to the message if the person sending it is a channel
  • Default: -100

About

A bot for filtering comments in telegram

Topics

Resources

License

Stars

Watchers

Forks