HandbookAnti-spam

Locks

10 commandsAnti-spamOpen in Telegram

Locks are the blunt instrument: lock url and every link from a regular member disappears. Lock sticker, forward, invitelink, reaction and so on, 51 types in all. Admins and approved members are never affected.

A punishment per lock#

On its own, a lock just deletes. Add a reason and an action after ### to punish the sender too, per type:

/lock invitelink ### No promoting other chats {ban} /lock url ### No links please, {first} {rules} {warn}

Actions are {warn}, {mute}, {kick}, {ban}, the timed {tmute 6h} and {tban 3d}, and silent versions like {sban}.

The allowlist#

Lock links but still allow your own website? Add it to the allowlist. It takes sites, @usernames and chat ids, commands, cashtags, sticker packs and custom emoji packs.

Lock types#

TypeWhat it covers
allEvery message (service notices aside)
albumPhotos, videos or files sent together as an album
anonchannelMessages posted on behalf of a channel allowlist
audioMusic and other audio files
botAdding bots: bots added by non-admins are removed again
botlinkLinks to bots allowlist
buttonMessages that carry inline buttons
cashtagCashtags such as $BTC allowlist
checklistTelegram checklists
cjkChinese, Japanese or Korean characters
collageRich messages containing a photo collage
commandMessages that start with a /command allowlist
commentComments on channel posts from people who haven't joined the group
contactShared contacts
cyrillicCyrillic letters (Russian, Ukrainian, Serbian...)
documentFiles, including photos and videos sent uncompressed
emailEmail addresses
emojiAny emoji, custom ones included
emojicustomCustom (premium) emoji allowlist
emojigameDice, darts, bowling and the other emoji games
emojionlyMessages made of nothing but emoji
externalreplyReplies that quote a message from another chat allowlist
forwardAnything forwarded, from anywhere allowlist
forwardbotMessages forwarded from bots allowlist
forwardchannelMessages forwarded from channels allowlist
forwardstoryForwarded stories allowlist
forwarduserMessages forwarded from people allowlist
gameBot games
gifGIFs and other animations
guestbotMessages from guest bots that someone called into the chat allowlist
inlineMessages sent through an inline bot (like @gif) allowlist
invitelinkLinks to groups and channels allowlist
locationLocations and venues
outsidereactionReactions from people who aren't members of the group
phonePhone numbers
photoPhotos
pollPolls and quizzes
reactionReactions to messages
richmessageRich messages with tables, slideshows and similar layouts
rtlRight-to-left text (Arabic, Persian, Hebrew...)
slideshowRich messages containing a slideshow
spoilerSpoiler text and media hidden behind a spoiler
stickerStickers of any kind allowlist
stickeranimatedAnimated and video stickers, premium ones included allowlist
stickerpremiumStickers with premium effects allowlist
textAny text, media captions included
urlWeb links allowlist
videoVideos
videonoteRound video messages
voiceVoice messages
zalgoText piled up with combining marks (zalgo)

Commands#

Admins

/lock <types>
Locks one or more types.
/lock <types> ### [reason] [{action}]
Locks with a custom reason and action.
/unlock <types>
Unlocks them. /unlock all unlocks everything.
/locks
What's locked, with custom reasons and actions. /locks list shows every type.
/locktypes
Every lock type with a short explanation.
/lockwarns [on/off]
Also warn members who send locked content. Off by default.
/antichannelmode <on/off>
Delete messages sent as a channel and ban the channel. Also /antichannel.
/allowlist [items]
Lets specific things past the locks. Alone, shows the list. Also /whitelist.
/rmallowlist <items>
Takes items off the allowlist. Also /unallowlist.

Chat owner

/rmallowlistall
Clears the whole allowlist, after you confirm.

Examples#

/lock sticker gif url
Three types at once.
/lock invitelink ### no promoting other chats {ban}
Ban for invite links.
/allowlist example.com @GoodChannel
Let these through anyway.
/lockwarns on
Warnings that count towards the warn limit.

Good to know#

  • Edited messages and rich messages (tables, collages) are checked too.
  • Locking photo, video, audio, document, voice, videonote, poll, reaction or all also switches it off in the group's own permissions.
  • The command lock also silences commands sent to Marina. Allowlisted commands still work.
  • Marina needs Delete messages, plus Ban users for actions and the bot lock.