Blocklists¶
Info
This page is generated from the bot's built-in help (/help).
Blocklists catch messages (and senders) by content: words, phrases, file names, forwards, inline bots, names, usernames and sticker packs. Admins and approved users are never affected. Locks are checked first.
Commands¶
/addblocklist<trigger> [reason] []: add a trigger. The reason is shown with the action; the optional{action}overrides the chat-wide mode for this trigger. Examples:/addblocklist spam,/addblocklist "buy now" No advertising {tban 1d},/addblocklist (crypto, "free money", forex) No scams``./rmblocklist<trigger>: remove triggers (same syntax: word, "phrase" or a (list))./rmblocklistall: remove every trigger (owner only, asks for confirmation)./blocklist: show every trigger with its reason and action, plus the current settings./blocklistmode<nothing|warn|kick|ban|tban 1d|mute|tmute 2h>: chat-wide action for matches (default: nothing, meaning the message is just deleted). Prefix withs(e.g.sban) for a silent action; silent actions need/silentsettingson./blocklistdelete<on/off>: whether matching messages are deleted (default on)./setblocklistreason<reason>: default reason for triggers without one./resetblocklistreason: go back to the automatic reason.
Trigger kinds¶
wordor"a phrase": matched on whole words, ignoring case and accents, in text, captions and file names.himatches "Hî there" but not "this".- Globs:
?is one character,*any characters within a word,**anything including spaces.bit?matches "bits" but not "bit";0x**matches any word starting with 0x. Use\**and\?for literal characters. prefix:<text>: only at the start of the message.exact:<text>: the whole message must match.lookalike:<text>: also catches look-alike spellings such as "b0t", "вот" or "$pam".file:<glob>: file names, e.g.file:**.exeorfile:**.apk.forward:<id or @username>: forwards from that user, bot or channel.inline:<id or @username>: results from that inline bot.name:<glob>: the sender's display name, e.g.name:**casino**. Also checked when someone joins (the action is applied, nothing to delete).username:<glob>: the sender's @username, e.g.username:*_bot. Also checked on join.stickerpack:<name>: stickers from that pack. Reply to a sticker with/addblocklist stickerpack:<>to fill in the name automatically.
Commands¶
| Commands | Required right | |
|---|---|---|
/addblocklist (/blocklistadd) |
Add a blocklist trigger | change group info |
/rmblocklist (/unblocklist, /blocklistrm) |
Remove a blocklist trigger | change group info |
/rmblocklistall (/unblocklistall) |
Remove every blocklist trigger (owner) | group owner |
/blocklist (/blocklists) |
Show the blocklist and its settings | any admin |
/blocklistmode (/setblocklistmode) |
Set the action for blocklist matches | change group info |
/blocklistdelete (/blocklistdel) |
Delete messages that match the blocklist | change group info |
/setblocklistreason (/blocklistreason) |
Set the default reason for blocklist actions | change group info |
/resetblocklistreason |
Reset the default blocklist reason | change group info |