Skip to content

Locks

As fun as stickers, gifs, and voice messages can be, they can also cause problems in groups. For example, if your group chat is like the official Rose Support group, users are there for a specific purpose; to get help. Having users sending irrelevant gifs and stickers can make it very difficult to get help. Or perhaps you have issues with group join spammers, and want to block any messages with Telegram invitelinks.

Whatever your need, locks are here to help!

Note

Locks take precedence over blocklists! If a message ends up being covered by both locks and blocklists, locks will take effect, not blocklists.

Checking Your Group's Lock Status

By default, Rose should have nothing locked, meaning your group members can send any type of message.

As an admin, you can check which locks are currently active using the following command:

/locks

Rose will respond with the list of currently locked items.

If you wanted to see the full set of locks, and their current status, you can use the following command:

/locks list

Locktypes

If you want to view a list of all the content types that are available to be locked, you can issue the below command:

/locktypes

For your convenience, the list is included below for your reference, with a short description for each.

Type of Lock Description
all Locks everything in this list
album Media albums (eg, groups of photos or documets)
anonchannel Messages sent by users as anonymous channels
audio Messages containing audio files
bot Users adding new bots to the group
button Blocks users and inline bots from sending button links
cjk Messages containing chinese/japanese/korean characters
command Bot commands, starting with /
comment Comments on the linked channel from a user that isnt a group member
contact Shared contacts (vCards, etc.)
cyrillic Messages containing cyrillic characters
document Shared files
email Email addresses (eg, [email protected])
emoji All messages containing emoji
emojicustom Messages containing custom Telegram emoji
emojigame Emoji games such as dice, football, darts, etc
emojionly Messages which consist of just emoji
externalreply Replies to messages in other chats (sometimes used for advertising)
forward Any forwarded messages
forwarduser Forwarded messages where the original sender was a user
forwardbot Forwarded messages where the original sender was a bot
forwardchannel Forwarded messages where the original sender was a channel
game Telegram games
gif GIF images
inline Inline bots (eg @pic, @vid, @gif, etc)
invitelink Messages containing links to other Telegram groups
location Shared locations
phone Phone numbers (as determined by Telegram; may be innacurate)
photo Images
poll Voting polls
rtl Any messages containing RTL characters (Arabic, Hebrew, etc.)
spoiler Messages containing spoiler formatting
sticker All stickers
stickeranimated Animated stickers
stickerpremium Premium stickers
story Forwarded Telegram stores
text All text messages
url Messages containing URLs or links
video Videos
videonote Telegram video messages (Similar to voice messages)
voice Telegram voice messages

Configuring Locked Content Types

As we now have the above list of content available for us to lock, we can now get started with actually locking our unwanted content.

Locking Content

To lock a certain type of content, simply issue the below command:

/lock <locktype>

Example

If you wanted to prevent users from sending GIFs, you would issue the below command:

/lock gif

You may also lock multiple locktypes in the same command. To do this, you would simply separate each locktype with a space. So, if you wanted to lock gifs, videos, and stickers, you would issue the below:

/lock gif video sticker

Note

Keep in mind that locks do not affect your admins.

Unlocking Content

Of course, any content type that you lock can be unlocked just as easily as you locked it. To unlock a content type, issue the below command:

/unlock <locktype>

Example

Let's refer to our example above where we wanted to lock gifs, videos, and stickers. If you wanted to unlock videos, but still keep gifs and stickers locked, you would issue the below command:

/unlock video

Just like locking content, you can also unlock multiple content types in the same way. So if you wanted to unlock gifs and stickers, you would issue the following:

/unlock gif sticker

Note

Be careful when using the "all" locktype, as it will lock/unlock all items (depending on whether you're locking or unlocking). For example, if you were to accidentally use the "all" locktype while unlocking, everything would be unlocked. There's no way to quickly undo this action, you will need to manually reset all of your previously configured locktypes, so use this with caution!

Lock Warnings

While locks will prevent a user from posting the specified content types, you may want to go a step further. This is where lock warnings come in handy. Lock warnings will issue a warning to a user whenever they try to send a content type that is locked. This setting lets users know you mean business when it comes to locks.

To enable lock warnings, issue either of the following commands:

/lockwarns on

To disable lock warnings, either of the below can be issued:

/lockwarns off

Note

This will enable lockwarns for ALL lock types. If you only want to use lock warnings for certain lock types, see custom lock modes below.

Custom lock modes

You may also decide that some locks are serious enough to justify an immediate automated action against the user. In that case, one can use custom lock modes; which sets specific modes for individual locks.

To set a custom lock mode, you would use the below syntax:

/lock <types> ### <reason> {mode}

Where mode is the mode you want to use, from the below table:

Action Description
kick Kick the user. They can rejoin if they need to.
ban Ban the user. They won't be able to rejoin until unbanned.
tban TIME Temporarily ban the user for TIME duration.
mute Mute the user. They won't be able to speak until unmuted.
tmute TIME Temporarily mute the user for TIME duration.

You may notice that the above mentions TIME variables. These are described below:

Option Description
Xm X minutes
Xh X hours
Xd X days
Xw X weeks

Example

To ban any user sending invitelinks, one would use:

/lock invitelink ### No invitelinks here. {ban}

Allowlisting certain locktypes

You've configured your locks, and things are going well in your group. But then you decide that actually, some of the locked items can be ok, and you want to relax one of your locks. For example, you might want to stop people sending URLs, unless they're from wikipedia.

This is where allowlists come in!

Allowlists can be used for the following locktypes:

Locktype Item(s) to allowlist
url domain or subdomain (path optional)
button domain or subdomain (path optional)
invitelink exact invitelink, chat id, or username
inline inline bot ID or username
anonchannel channel ID or username
command command name (including the /)
sticker sticker pack link, or stickerpack:<name>
forward forwarded user/channel/bot ID or username

Viewing The Current Allowlist

To view allowlisted items, you can issue the below command:

/allowlist

Adding an Allowlist item

To add an item to the allowlist, simply issue the following command:

/allowlist <item>

Example

Let's say we wanted to allowlist the URL to the Miss Rose website. To do this, we would issue the command like shown below:

/allowlist missrose.xyz

Like adding and removing locktypes, you can also specify multiple URLs, separated by a space. Let's say we wanted to allowlist both the Miss Rose site, and the Telegram site. We would issue the below:

/allowlist missrose.xyz telegram.org

Alternatively, let's say we wanted to allowlist the use of the @pic inline bot. One would use:

/allowlist @pic

Removing an Allowlist Entry

To remove an item from the allowlist, issue the following command:

/rmallowlist <item>

Example

If we wanted to remove the Telegram site from the allowlist, we would issue the command like shown:

/rmallowlist telegram.org

Multiple URLs can be specified, just like when adding an entry. If you wanted to remove both the Miss Rose site and the Telegram site, you would issue the following command:

/rmallowlist missrose.xyz telegram.org

Clearing the entire allowlist

The group owner can remove all allowlists in a group by using the following command:

/rmallowlistall