Template

Telegram Group Moderation Assistant

Keeps your Telegram group tidy without a moderator watching all day. The bot reads each message, then lets it pass, warns, deletes it, mutes or bans the sender. Messages that are fine are left alone.

Who it's for: For admins of groups and supergroups tired of deleting spam and banning trolls by hand. Humans step in only for real judgment calls. The bot needs admin rights in the group.

  1. AnnaDoes anyone know when the next meetup is?
  2. MarkYou are all idiots, this group is garbage
  3. Group Moderator⚠️ Mark, please keep the chat respectful. Repeated insults can lead to a mute or a ban.
A rule-breaker gets a public warning

How it works

  • Someone posts a message in your group or supergroup
  • The bot checks it currently has the permissions it needs to act (delete, mute, ban) before doing anything
  • AI reads the message against your moderation policy and decides on exactly one outcome: allow, warn, delete, mute, or ban
  • For a warning, the bot posts a public reminder in the chat; for delete, mute or ban it acts directly through Telegram — no manual step in between
  • Nothing happens for messages that are fine — they're allowed through without any trace that the bot even looked at them

Setup requirements

  • Add the bot to your group or supergroup.
  • Promote it to administrator and grant "Delete messages" plus "Ban/restrict members" — without these, warnings still work but delete, mute and ban actions will fail.
  • Disable Privacy Mode for the bot in BotFather so it actually sees every message, not just ones that mention it.
  • Before turning it loose on a live community, review the moderation policy and the AI prompt, and run it in observe-only mode for a while to see what it would have done.
  • Once you trust the calls it's making, switch from observe-only to delete-and-warn or full auto-enforcement.

Details

Good to know

  • The bot needs to be a group administrator with "Delete messages" and "Restrict/ban members" permissions before enforcement can actually happen — it checks its own permissions before every decision, but a missing permission means the delete/mute/ban step will fail rather than silently succeed.
  • It ships watching every message by default, which means you also need to disable Privacy Mode for the bot in BotFather — otherwise Telegram only forwards messages that mention it, and most spam and abuse won't be visible at all.
  • The moderation policy and the AI's instructions are both editable in the visual editor, so you can tune exactly what counts as spam, abuse or off-topic for your community.
  • This is a starter kit built for the observe-and-enforce basics. It judges each message on its own rather than keeping a running strike count per person across repeated violations — if you need "three strikes and you're out" behavior, that's a worthwhile addition on top of this template.

Common questions

  • Should it start in observe-only mode, warn-and-delete, or full auto-enforcement (mutes and bans)?
  • What exactly should it be moderating: spam links, scams, abuse, adult content, off-topic posts, or your own rules?
  • Should admins and moderators be exempt from its decisions?

Keep in mind

  • Don't expect enforcement to work until the bot is an admin with delete and ban/restrict permissions granted — until then it can only warn.
  • Don't switch straight to full auto-enforcement on a live, active group — run it in observe-only mode first and check its calls before trusting it with mutes and bans.
  • If you need repeat offenders to face escalating consequences, know that this starter doesn't track a running strike count per person yet — that's something to add before relying on it for that.

The flow behind this bot

This is the whole flow you get. Once you add the template, you can change any message, button or step.

Ready to build on this?

Clone the template into your workspace and edit every message, button and action — nothing is locked.