Skip to content
All articles
Moderation7 min read

Telegram Anti-Spam Setup Guide: How to Stop Spam in Your Telegram Group

A concrete, layer-by-layer configuration guide for a Telegram anti-spam bot: captcha, known-spammer blocking, newcomer limits, link and word filters, AI moderation and raid protection.

Every growing Telegram group hits the same wall: one morning the chat is full of crypto “opportunities”, adult links and accounts named after your admins. A good Telegram anti-spam bot fixes this, but only if it is configured in layers — no single filter stops everything. This guide shows how to stop spam in a Telegram group with a concrete setup you can copy, test and tune, without turning the chat into a fortress that also blocks your real members.

Know your enemy: the five kinds of Telegram spam

Different spam needs different defences. Most of what hits groups falls into five buckets:

  • Spam bots: automated accounts that join, wait a little and post the same message in hundreds of groups.
  • Link drops: real-looking accounts that post a single link to a channel, a bot or a phishing site and leave.
  • Lookalike words: spammers swap Latin letters for Cyrillic or Greek ones (or add dots and spaces) so “free crypto” slips past simple word filters.
  • Raids: dozens or hundreds of accounts joining within minutes, often followed by a flood of messages.
  • Crypto and investment scams: fake admins offering “support” in DMs, airdrop claims, wallet-connect links and “guaranteed returns”.

The general principles of running a healthy community are covered in our Telegram channel moderation guide. This post focuses on the anti-spam configuration itself.

How to stop spam in a Telegram group: the layered setup

Think of anti-spam as a series of gates. Each one catches what the previous one missed. In GramMaker all of these live on the group's Moderation page in the dashboard (and in the Mini App panel), and run through your own bot from @BotFather. Here is each layer, in the order a spammer meets it.

Layer 1: captcha for newcomers

A captcha makes every new member prove they are human before they can post. It is the single most effective defence against spam bots, because most of them never press the button. Pair it with a short welcome message that states your rules. The bot needs the right to restrict members for captcha to work; GramMaker checks this before enabling it.

Layer 2: block known spammers with CAS

CAS (Combot Anti-Spam) is a public database of accounts already caught spamming elsewhere on Telegram. With “Known spammers (CAS)” blocking on, GramMaker checks joiners and message senders against it and can ban, kick or mute a match, optionally deleting their messages. Admins and trusted users are never checked. It costs nothing to turn on and stops repeat offenders before they say a word.

Layer 3: newcomer restrictions

Most link drops happen in the first minutes after joining. “Restrict new members” stops newcomers from posting links or forwards for a window you choose. Real people barely notice; link droppers lose their whole business model.

Layer 4: link allowlist

Instead of trying to block every bad domain, block links by default and allow the ones you trust: your website, your channel, documentation sites, specific t.me/username links. Everything else is removed. This one setting kills most phishing and promo spam.

Layer 5: banned words, patterns and lookalikes

Add the phrases spammers in your niche actually use — “airdrop”, “DM me for signals”, “investment manager”. GramMaker's banned words are homoglyph-resistant: lookalike letters are detected automatically, so “ѕрам” written with Cyrillic or Greek characters still counts as “spam”. For variations, use wildcard patterns: * matches any text and ? matches one character, so “*free*usdt*” catches many rewrites at once.

Layer 6: flood control

Anti-flood limits how many messages one member can send in a short time. It stops copy-paste bursts and the message storm that usually follows a raid. Keep the limit generous enough for normal conversation — a lively discussion can easily produce several messages a minute from one person.

Layer 7: AI auto-moderation and the “likely spam” queue

Rules catch known patterns; AI catches new wording. With AI auto-moderation on, each message gets a verdict and the bot acts when its confidence passes the sensitivity you choose (low, medium or high). Borderline cases don't get deleted: messages the AI flags with some confidence but below your threshold are left up and land in the moderation queue as “likely spam”, next to /report reports and join requests. From there you or a moderator can approve, delete, warn, mute, ban or dismiss.

Layer 8: the escalation ladder

Not every violation deserves a ban. The escalation ladder lets you define up to five steps — for example: first violation, warning; second, 1-hour mute; third, 1-day mute; fourth, ban. First-time offenders get a nudge, persistent spammers are removed automatically. Add regular helpers and partner accounts to trusted users so they bypass moderation entirely.

Layer 9: raid protection and under-attack mode

Raid protection watches the join rate. When joins exceed your threshold within a time window, every new joiner is captcha-gated. If you are actively being raided, type /attack in the chat (or toggle it from the dashboard): under-attack mode captcha-gates every joiner and stops members who joined in the last 24 hours from posting links, media or forwards. Strict mode removes new joiners immediately; they can rejoin later. Under-attack can also switch on automatically when the raid detector fires, and it expires on its own.

Layer 10: silent mode

Moderation notices — replies to admin commands, report acknowledgements — can clutter a chat and even tell spammers which tricks failed. Silent mode stops the bot from posting moderation notices in the group. Captcha prompts and the welcome message still appear, because members need them.

A recommended starting setup

For a typical public group of a few thousand members — say, a 3,000-member regional crypto chat — this is a sensible first configuration:

  1. 1Make the bot an admin with rights to delete messages, restrict members and ban users.
  2. 2Apply the Balanced preset as your baseline.
  3. 3Turn on captcha for newcomers and write a three-line welcome message with your rules.
  4. 4Enable CAS with the ban action and message deletion.
  5. 5Restrict new members from posting links and forwards for their first hours.
  6. 6Set a link allowlist: your site, your channel and the few domains your members genuinely share.
  7. 7Add 10–20 banned words or patterns from spam you have actually seen in the group.
  8. 8Turn on AI auto-moderation at medium sensitivity and check the “likely spam” queue daily for the first week.
  9. 9Configure an escalation ladder: warn, mute 1 hour, mute 1 day, ban.
  10. 10Enable raid protection, and consider automatic under-attack mode on raids.
  11. 11Add your moderators and partner bots to trusted users.

Test before you trust: the test-a-message tool

Before going live, paste sample messages into the test-a-message tool on the Moderation page. It shows whether your saved rules would block the message and which rule fired — banned word, banned pattern or link. Try a real spam example from your group, a lookalike variant of it, and a normal message that mentions a similar word (“I lost money on an airdrop scam last year”). If the normal message gets blocked, loosen the rule before your members find out the hard way.

Common pitfalls

  • Missing bot rights. Without delete, restrict and ban rights, rules match but nothing happens. Check the bot's admin permissions first.
  • Overly broad banned words. A filter on “bet” also matches “better” if you write it as a pattern; prefer full phrases.
  • High AI sensitivity on day one. Start at medium, watch the queue and raise it only if spam gets through.
  • Forgetting trusted users, so your own moderators get muted by the flood limit during an event.
  • No allowlist exceptions for the links your community legitimately shares, which frustrates real members.
  • Treating anti-spam as set-and-forget. Spammers adapt, so revisit your words, patterns and queue every few weeks.

If you also need to clean up accounts that slipped in before your defences were ready, see our guide on how to remove inactive members from a Telegram group.

Wrap-up

Stopping spam in Telegram is about layers, not a magic filter: captcha and CAS at the door, newcomer limits and a link allowlist for the first minutes, word filters and AI for what gets through, an escalation ladder for repeat offenders, and raid protection for the bad days. Start from a preset, test with real examples, review the queue, and adjust. You can set all of it up in Telegram moderation with your own bot in an afternoon.

Try it in GramMaker

Telegram Moderation

Telegram anti-spam: FAQ

Combine several layers: a captcha for newcomers, known-spammer blocking, limits on links for new members, word filters and AI moderation. No single filter catches every type of spam.

It should be a group admin with rights to delete messages, restrict members and ban users. Without them it can detect spam but cannot act on it.

CAS (Combot Anti-Spam) is a public database of accounts known to spam on Telegram. Moderation bots can check joiners and senders against it and remove matches automatically.

They can if rules are too broad. Use full phrases instead of short words, start AI moderation at medium sensitivity, add trusted users, and test rules with sample messages before relying on them.

Turn on under-attack mode so every new joiner must pass a captcha and recent joiners cannot post links or media. Afterwards, bulk-remove the accounts that joined during the raid.

Set up anti-spam in your group today

Connect your own bot, apply a preset, and layer captcha, CAS, link and word filters, AI moderation and raid protection. Free to start.