Telegram Guardian Bot
ربات نگهبان تلگرام

The fastest and best telegram group management bot. Ever.
سریعترین و بهترین ربات مدیریتی گروه های تلگرام

Best telegram anti-spam and group management bot ever

:books: Available in languages: English / فارسی (Farsi)

TelegramGuardian was created as a bot to support Telegram group administrators efforts while fighting with antisocial behaviour and various attacks on the groups or group members. It’s current, and the fifth version has been rewritten from scratch using Google Go language and various third party API’s. The bot itself runs on Kubernetes cluster in Google Cloud to ensure its 24/7 availability, speed and uptime.

You can follow updates on new functions and issues on official channel @littleGuardianBotAnnouncements. Updates are posted as soon as new function or change goes live.

You can become a Patron of LittleGuardian and help us with developing and supporting the bot.

Become a Patron!

Table of contents

How to start

Warning If you’ll decide to mute bot or not make in an admin - bot will automatically leave the group after displaying few warnings. This has been applied to ensure high quality level of service and limit consumption of resources.

What does it do?

Project TelegramGuardian can ( and it does it blazingly fast! ):

Some features and are not available to general public. They can be enabled for your group after contacting the bot creator.

Available commands

User commands

  Command Options Description
  /link   Return link to the group
  /admins   Notifies group administrators
  /lastseen   Information on last time user was seen

Admins notification can be useful in case of “emergency” when administrators attention is required immediately.

Administrator commands

Every administrator of the group can issue following commands and change the bot settings.

  Command Options Description
  /commands   List of available commands
  /version   Version of the bot and link to statistics
  /settings   Current settings for the group
  /logs number Display last bot actions
  /set languages on off Filter other languages than set
  /set otherbots on off Ban other bots from entering group
:star2: /set voicetotext on off Transcription of voice messages
:star2: /set chatbot on off Entertainment chat bot feature
:star2: /set profanity on off Set profanity filter
  /set noinvites on off Checks for invitation links
  /set greetings on off Greet new members
  /set greeting_text text Set greeting for your group to custom one
:star2: /set pornfilter on off Check images for 18+
:star2: /set pornfilter_strict on off Even more strict checks on images
:star2: /set violencefilter on off Check images for violence, gore etc.
  /set invitedspammer on off Ban people inviting spammers and spambots
  /set anonymoususers on off Delete message from anonymous users
:star2: /set disablelink on off Disables the global /link command
:star2: /set disableadmins on off Disables the global /admins command
  /set noforward on off Delete messages forwarded from other groups
  /set notext on off Remove all text messages. Allow voice only
  /set nomedia on off Removes all media but text posted to the group
  /set novoice on off Removes all voice messages sent to group
  /set stayquiet on off Limits messages sent by bot to minimum
  /set mutenew on off Mutes new members ( default: 24 hours )
  /set mutenewtime minutes Default: 24 hours. You can adjust this to your needs
  /set antiflood on off Remove flood with messages ( more than 2/s )
  /set link group link Set group link
  /set use_language language Set bot language for the group
  /set limit_* minutes Set specific limit value
  /payment   Available only in private chat with bot

Features marked with :star2: are premium.

Available limits:

Commands examples

Enable kicking other bots from the group as soon as they enter.

/set otherbots on

Set group link to specified. This link will be treated as the only allowed group link in the chat, assuming that /set noinvites is set to on.

/set link http://t.me/joinchat/abc

Set limit ‘very_short’ to 5 minutes - this limit is used by the bot to determine minor offences.

/set limit_very_short 5

Frequently Asked Questions

How to set custom greeting for my group?

You can set custom greeting for your group using following example.

Available variables:

/set greeting_text "Hey %%NAME%%, welcome to %%GROUPNAME%% group! We have %%USERS%% users!"

To reset greeting to the default one use command: /set greeting_text default

How bot treats rules violation?

When the violation of group rules is detected spammer receives a warning and is “limited” in the group for a certain amount of time, for example - when the spammer uses Farsi language in the group - he will be limited for 1 minute. This approach doesn’t work well with bot spammers, apparently, hence the incremental limits. Bot always checks last “cool down period” for the user and adds a limit on top of that. While creating the bot I’ve made an additional assumption - anyone who enters the group and starts from violation should be banned instantly as in most of the cases he’s just a spammer. That’s why bot calculates the ratio of messages sent by the user and compares it to the total warnings obtained by the user in that period.

Following formula should help you understand when user will be banned automatically:

(( $sent_messages < 3 ) OR
( $total_limit / $sent_messages > 3.0 ))
AND $currently_applied_limit > 1 minute )

OR $sent_messages > 5 AND
( $total_limit / $sent_messages ) >= 1.0)

From quick calculations, it is visible that user must meet one of following:

How to check when user was online

Find last message sent by user, reply to it with /lastseen. Bot will pick it up and reply to you with the time. How to check when user was online

Why does bot not kick out spammers instantly?

There is no point. We had seen groups decimated by rogue bot when users wanted to have a little bit of fun or needed to share something ‘significant’. In general - it’s better to warn and limit than kick out instantly. Update 30/08/2018: This behaviour has been changed for the notorious spammers.

How does the community filter work?

Our bot is present on dozens of different groups it allows us to compare and combine their users behaviour in regards to spam detection. How does it work? Spammer joined group #1 - got punished by bot for spamming there, then spammer joins another group #2 and sooner or later gets punished for sending spam on that group as well. Now @littleGuardianBot knows that he needs to deal with spammer presence accordingly - so if that account appears on any other groups guarded by LittleGuardian the will be banned immediately and without any warnings on either joining or sending messages.

How does pornfilter work?

Bot checks every picture uploaded to the group with Google algorithms. Think about it as switching ‘Safe Search’ for Google on. If you think that you won’t see that picture in results - it shouldn’t be in the group. Your group will have a limit of 100 images and gifs checked a month in a free version. To remove limit please read How can I get premium features section. Additional option for the filter to be even more strict - /set pornfilter_strict on eliminates pictures which have potential sexual context.

How does anonymoususers work?

Bot checks user telegram profile setup. If the user does not have profile picture and username set - he/she will receive warnings. After three warnings further messages from the user will be deleted automatically unless he/she will set the required information up. How to set up user picture and username

How does antivirus filter work?

Bot uploads files sent to the groups ( pretty often documents or Android APK files ) against over 60 different virus detection engines, using VirusTotal. It’s quick, it’s efficient and most importantly - it works. Upon virus detection in the file uploaded to the group - bot displays additional information asking users who could have downloaded it to delete it. When the file is “clean” - it displays information that it should be safe to download.

How to set bot language?

Bot can communicate out with users using different languages. List of currently accepted and supported languages are:

You can set the language bot talks in with /set use_language en. If language option is not set bot will use English as default. If you’d like to see bot being able to use your language please contact the bot author.

How to use profanity filter?

To make profanity filter work use /set use_language en ( for English ) or any other language of your choice. Enable profanity filter with /set profanity on. Users won’t be punished for swearing but bot will highlight their messages for admins to consider further steps.

How to check bot logs?

Newly added command /logs displays 20 lines of logs by default. You can increase or decrease the size of log shown on your own. For example: /logs 5 will display last 5 actions taken by bot. /logs 50 will display last 50 actions. Maximum limit of actions to see is 100.

Why some features are marked as premium?

Premium features require either additional processing power or paid third party API’s. In both of the cases expense is paid by the bot creator, so naturally, they can’t be made free for the general public. If you need any of the premium features to be enabled for your group, please contact bot author or read the next paragraph.

How can I get premium features?

Due to high popularity of the LittleGuardianBot and multimedia & gifs processing cost while searching for porn and inappropriate content we have enabled that filter as one of the premium features. Payment enables ALL premium features for whole month. You can then enable and disable them at will. Cost of enabling premium features is just $5/month.

How does it affect you?

How does the payment process look like?

Customers using custom version of LittleGuardian are not affected and they have all the premium features enabled by default.

How can I run customised version of the bot?

Telegram Guardian requires specialised infrastructure therefore you can’t run it on your own. Don’t worry - for between $25 and $50/month we can run it for you on existing and constantly growing infrastructure together with frequent updates to the latest available version. And only thing you need to provide is the telegram API key. Please contact bot author to discuss further.

I want new bot function

I am really happy with making the bot better by adding new functions. I tend to divide them into two categories - functions which can be used globally by all the bot users and custom functions designed only for you or your business. Functions and ideas which can be used globally will cost you absolutely nothing - just message bot author and ask. Any custom functions designed for you or your business are paid to implement ( on top of the customised bot hosting cost ).

Live statistics

Support

Message bot author on telegram with a clear description of your issue.

Technologies used

Google Cloud, Golang, Kubernetes, plenty of APIs and Redbull.