HandbookAnti-spam

Blocklists

9 commandsAnti-spamOpen in Telegram

Where locks block whole kinds of content, blocklists are precise. Block a word, a phrase, a link pattern, a file type, a sticker pack or a forward source, and Marina deletes every match, with an optional punishment.

Writing items#

  • Plain words match whole words in any case: bad catches "Bad!" but not "badge".
  • ? is one character, * any run inside a word, ** anything at all: "bit.ly/*" catches every short link.
  • exact:hi and prefix:hi match the whole message, or its start.
  • lookalike:bot also catches letters from other scripts and fancy fonts.
  • file:*.zip, inline:@gif and forward:@channel catch file names, inline bots and forward sources.
  • Reply to a sticker with /addblocklist to block its whole pack.

Bad names#

name: and username: items check who people are, not what they say. "name:*airdrop*" catches scam accounts when they join or post, and name:{admins} catches anyone copying an admin's name.

Actions#

Deleting is the default. Set /blocklistmode for everyone (warn, mute, kick, ban, tmute 6h, tban 3d), or put an action in one item's reason to override it: {tmute 6h}.

Commands#

Admins

/addblocklist <item> [reason]
Blocks an item. Quote phrases; put several in brackets. Also /addblacklist.
/rmblocklist <item>
Unblocks one or more items. Also /unblocklist.
/blocklist
Lists the items. Also /blacklist.
/blocklistmode [action] [time]
The action for senders. Default nothing: just delete.
/blocklistdelete [on/off]
Whether matches are deleted. On by default. Also /blocklistdel.
/setblocklistreason [reason]
The default reason. {trigger} is the matched item.
/resetblocklistreason
Back to the built-in reason.
/blocklistcheck <user or name>
Tests a member or name against the name items. Nobody is punished.

Chat owner

/unblocklistall
Removes every item, after you confirm.

Examples#

/addblocklist "buy followers" No ads
A phrase.
/addblocklist (hi, hey, "hi there") Please don't
Several items at once.
/addblocklist boo Don't scare the ghosts! {tmute 6h}
An item with its own action.
/addblocklist "name:*airdrop*" Scam account {ban}
Keep scam names out.

Good to know#

  • Admins, approved members and bots are never affected. Edited messages are checked too.
  • When several items match, the longest one decides.
  • Silent actions (sban, smute 12h) need a log channel and silent actions turned on.
  • A group can hold up to 200 items.