Telegram Guardian Bot
ربات نگهبان تلگرام
The fastest and best telegram group management bot. Ever.
سریعترین و بهترین ربات مدیریتی گروه های تلگرام
Best telegram anti-spam and group management bot ever
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
- What does it do
- Available commands
- Commands examples
- Frequently asked questions
- Live statistics
How to start
- Make sure your group is a SUPERGROUP. Bot will not work on regular groups.
- Invite @littleGuardianBot and make it a group admin.
- Adjust settings to your preferences. Bot will use default settings right after joining.
- Don’t forget to set the group link - it may be useful.
- TIP: To prevent mass spam sent by other bots change your groups settings to ‘only admins can invite’ so spammers can’t add their bots. Your users can still share the link to get you new NORMAL USERS as members!
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! ):
- Check context of messages for the non-English messages
- Chat with other group members for entertainment purposes
- Greets new members
- Bans other bots from entering the group
- Provides group members with the invitation link
- Gives ‘emergency’ trigger for notifying admins
- Community spam filter
- Provides transcription of the voice messages
- Controls anonymous users behaviour
- Ban people inviting spammers and spambots
- Deletes all the text messages for voice-only groups
- Filters obscene / nude content
- Filters content which contains violence and gore
- Filters invitation links to other groups
- Filters out profanities in different languages
- Filters and scans attachments sent to the group for viruses
- Uses incremental limits when violation occurs
- Communicates with users using different languages
- Displays information on last time user was seen
- Displays logs on bot actions
Some features and are not available to general public. They can be enabled for your group after contacting the bot creator.
||Return link to the group|
||Notifies group administrators|
||Information on last time user was seen|
Admins notification can be useful in case of “emergency” when administrators attention is required immediately.
Every administrator of the group can issue following commands and change the bot settings.
||List of available commands|
||Version of the bot and link to statistics|
||Current settings for the group|
||number||Display last bot actions|
||on off||Filter other languages than set|
||on off||Ban other bots from entering group|
||on off||Transcription of voice messages|
||on off||Entertainment chat bot feature|
||on off||Set profanity filter|
||on off||Checks for invitation links|
||on off||Greet new members|
||text||Set greeting for your group to custom one|
||on off||Check images for 18+|
||on off||Even more strict checks on images|
||on off||Check images for violence, gore etc.|
||on off||Ban people inviting spammers and spambots|
||on off||Delete message from anonymous users|
||on off||Disables the global /link command|
||on off||Disables the global /admins command|
||on off||Delete messages forwarded from other groups|
||on off||Remove all text messages. Allow voice only|
||on off||Removes all media but text posted to the group|
||on off||Removes all voice messages sent to group|
||on off||Limits messages sent by bot to minimum|
||on off||Mutes new members ( default: 24 hours )|
||minutes||Default: 24 hours. You can adjust this to your needs|
||on off||Remove flood with messages ( more than 2/s )|
||group link||Set group link|
||language||Set bot language for the group|
||minutes||Set specific limit value|
||Available only in private chat with bot|
Features marked with are premium.
limit_very_short- used by filters: languages, invites, pictures of gifs containing violence
limit_short- used by filters: potentially sexual content detection
limit_medium- used by filters: antivirus protection
limit_long- used by filter: pornography
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.
%%NAME%%- username and clickable link to user profile
%%USERS%%- number of current members of the group
%%GROUPNAME%%- name of the group
/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:
- start violating group rules from the moment of entering it
- the only type of messages sent by the user are violations In this case, we can establish that user is not going to cooperate with group rules and there’s no need to keep him there.
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.
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 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:
fafor Farsi / Persian
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?
- Every group have limit of 100 NEW pictures / gifs scanned per month for free.
- When limit is reached bot will stop processing multimedia messages until the counter for last month will decrease below 100 level.
- Images already known by bot and uploaded to other groups do not count so most of the spammers posting pictures on multiple groups will still be caught.
How does the payment process look like?
- To pay for the premium features message @littleGuardianBot privately with /payment command.
- Payments are processed by Stripe.com and Telegram payments ( https://telegram.org/blog/payments ). We do not store any of the payment information.
- After successful payment you will receive unique code together with command you need to paste in your group. That will activate the premium feature for the whole month.
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 ).
Message bot author on telegram with a clear description of your issue.
Google Cloud, Golang, Kubernetes, plenty of APIs and Redbull.