
From time to time, owners of Telegram groups and channels are faced with the fact that malicious citizens begin to behave in an uncultured manner and pour thousands of bots into them.
For groups, this leads to the paralysis of any communication in the group due to spam messages «So-and-so joined the group” and messages from the poured bots themselves. Also, this could end quite sadly if the bots «trained» leave the group by clicking the “Complain” button. If there are enough complaints, you may lose your telegram chat! For channels, this situation spoils the attractiveness for advertisers and blurs ER. Cheating is visible in any statistics service and others may think that you yourself have intentionally increased your subscribers!
So what should you do if one “fine” day you see that strange users are being added to you in batches?
Our group defense tactics will consist of three things:
- Add to groupadmin bot, which will automatically ban all new users
- Clearing all those who had already joined until the moment when the admin bot was added
- Making it difficult to carry out repeated attacks
For channels, look at the end of the post for a list of available bots that allow you to clean up the cheated audience, as well as AUTOMATICALLY detect the beginning of the cheat.
Let’s go!
Adding an administrator bot
If you have a fairly large telegram chat and still don’t have a bot with which you can administer it and moderate users, then this is a big mistake!
There are a dozen solutions to this problem on the market, I personally chose for myselfChatKeeper bot. The bot is quite convenient, there are a lot of settings, there is a web interface, in short — I recommend it.
Once you add it to your group and make it an administrator, you can send commands to the bot. Just write them in the chat, the bot will respond to them. With a complete list youyou can find it here, we are currently interested in only one:/kickall. Are we looking at the description?

So, after turning on “attack mode”, your newly minted admin will ban all the bots that continue to be added to your group. Great, we have stopped the influx of new bots, but what to do with those that have already joined us?
Cleaning incoming bots
First things first, note the time when you transferredadmin botinto attack mode. Let’s say it was 12:15. Next, you scroll through your group and look for the moment when vague users began to be added to it. Let’s say it was 10:42.
You need to delete all new users added between 10:42 and 12:15. How to get a list of such users?
To solve this problem, Telegram provides us with a complete log of actions that occurred on the channel. It’s called «Recent Actions» and is available in the group menu.

If you go to this log, there will be a button at the top right that allows you to filter the log by different types of actions. We are interested in the action «New members«.

After applying the filter, we will see a log of adding all new users to our group. But what if several thousand bots have already visited you? We won’t look for them all in the log ourselves and delete them manually?
Of course not. Especially for this task, I had to write a small console application that works both under Windows and MacOS/Linux. It does exactly what I wrote about above: it reads the group’s activity log for a given period of time and deletes new users.
ATTENTION:The group log is stored on Telegram servers for 48 hours before being deleted, so start cleaning it up as early as possible!
The application lives hereand here’s how to work with it:
- Download fromReleases sectionarchive for the platform you need
- Unzip to any folder
- Open a terminal in this folder and run the program
The program will request all the necessary data:
- Your phone number — everything is quite obvious here.
- The name of your chat/channel in Telegram. Without a dog!
- The start date from which the software will clean users. Its format is as follows: year, month, day, hours, minutes, seconds. ATTENTION: the time zone here is UTC+0!!! Therefore, if you have, for example, +3, then you need to subtract 3 hours to get the desired date.
- End date, same format as start date
- app Id and app Hash — number and hash for accessing the Telegram API on your behalf. They are neededtake it from here.
- If your account is protected with a 2FA password, then enter it at the appropriate step, otherwise just press Enter.
After you have entered everything, the program will ask you for an access code, which will be sent to you in Telegram. Enter it in the console.

Next, the software will receive all the users of your channel/chat and start cleaning everyone who joined in a given period of time, it all looks something like this:

The cleaning speed is 300 users in 13 minutes, i.e. approximately one and a half thousand per hour. Unfortunately, it won’t be faster; Telegram limits duplicate API requests. So just run the program in the background and let it work.
Note: if you are a programmer, then you can speed up the program by adding a few more admins to the group, then get the apiId and apiHash for them, and then clean the group multi-threaded, using all the admin accounts that are available.
After the software finishes deleting bots, we move on to the third part of the Marlezon ballet.
Making it more difficult for subsequent attacks on your group
Unless professionals are acting against you, then the most effective way to limit the influx of bots into your group is to install some kind of check for new users.
Checks can be varied: clicking on the “Login” button, solving a simple mathematical problem, captcha, etc. We will look at the simplest option — the “Login” button.
To implement it we will need the sameChatKeeper admin bot. Go to the bot web interface, select"Settings" - "Welcome"and put everything approximately as in the screenshot below:

Then we save the settings. That’s it, now all users who do not pass the verification (i.e. do not click on the button) will be deleted!
Other bots to protect groups and channels
If you want even more difficult protection for bots to pass, this will help youAiLadin bot. It launches a separate MiniApp in which it displays a standard Yandex captcha.

Other bots tested by the author that help with protecting and cleaning Telegram channels/groups:
- NakrutkaGuard — FREEbot for active protection of both chats and channels from Yellow. Requires installation on your server.
- Defensy — currently one of the best paid solutions for protection.
- GladOSis a direct competitor to Defensy and ChatKeeper.
- Delation — a free bot that cleans spam in chats, works on the basis of AI, VERY good!
- Keep— will help clear the channel of ALREADY filled bots, although not for free.
- Crosser— similar to Keep, only more expensive.
Conclusion
Congratulations! You have just done everything necessary to protect your Telegram group, I wish it prosperity and health, success!
Bonus: we cope with boosting VIEWS
If, in addition to fakes, you also get views on posts in the channel (what prevents you from looking at accurate statistics), that is, one method that is worth trying to cut off the possibility of simple cheating.
It’s calledRestrict Saving Content and is located in the channel’s publicity settings.

Turn on this restriction and the increase in views USUALLY disappears. I explain the mechanics. This checkbox disables the ability to forward posts from your channel anywhere. And the cheapest cheat works like this: a post from your channel is sent to a private channel, which is watched daily by tens and hundreds of thousands of bots. Once the forwarding option is disabled, this mechanic stops working. BUT!
Don’t think this is a panacea. Because there is still a way to cheat, which costs more: force bots to “come” to your channel and watch your posts. Will attackers switch to this method? Only your tests will show this. Good luck!


