Skip to content

Advanced Blocklist Features

How blocklists are matched

Blocklists use word-based matching; which means that a blocklist item will only match on full words, rather than letters inside of words. For example, if you blocklist hi, the word this won't be matched. Because although this contains hi, it is not used as a word in itself. However, the messages hi, hi there, hi, how are you would all be matched.

Rose defines a "word" as any set of characters which might be used in regular conversation. Spaces or punctuation would therefore not be "word characters". Given this definition, we can explain that hi would match hi, how are you, since , is not a word character.

Another thing to note is that blocklists will automatically try to normalise incoming messages if necessary. For example, if you blocklist hi there, and a user sends hî thérê, Rose will normalise that message to remove any accents or letter modifiers - thus matching the blocklist. This isn't 100% accurate, as some letters that look similar in different scripts are still considered to be different, but this is something that we are constantly improving.

Similarly, if you blocklist hi there and a user chooses to send hi   there, rose will also normalise the spaces and ensure that the message gets deleted.

Still looking for more? Check how to use blocklist modifiers!

Using blocklist modifiers

Rose supports two blocklist matching modifiers, ? and *, which allow for more dynamic blocklist rules.

?: The ? modifier can be used to match exactly one non-space character. For example, "bit?" would match "bits" as well as "bite", but would NOT match "bit". It also would NOT match "bit of luck", as ? does not match spaces.

*: The * modifier is also known as the wildcard; it matches 0 or more of any non-space character. For example, "bit*" would match "bit" (match length 0), "bite" (match length 1, on "e"), or even "bites" (match length 2, on "es"). This means that if you wanted to, you could blocklist "*hi*", which would then trigger on "this"; as the "t" and "s" would each get caught by a blocklist item.

If you want to blocklist exactly those characters, so you stop users using the * character completely, then you can do so by escaping it with a . For example, blocklisting \* will stop users from sending a * character.

Some example usages of blocklist modifiers could be:

  • Stop users from sending bitcoin addresses: 0x* (bitcoin addresses are prefixed with 0x)
  • Stop common misspellings of words: f?ck
  • Stop anyone from asking any questions: *\? (using to make sure the question mark is interpreted literally)

Setting a custom default blocklist mode

If a reason isn't specified when creating a blocklist entry, Rose will generate her own. This looks something like this:

Automated blocklist action, due to a match on: <trigger>

If you would like to customise the default reason, you can use:

/setblocklistreason <reason>

Or, to reset it to Rose's generated default, use:

/resetblocklistreason

Custom blocklist modes for individual blocklists

You might have set the default blocklist mode using the /blocklistmode command, but decided that some things are just too serious for the default mode. In those cases, it's possible to set custom blocklistmodes for invidiual blocklist items.

To do so, mark the desired custom action within curly braces, {}.

For example, to ban any user that says "magic":

/addblocklist "magic" No magicians here! {ban}

Or, for a temporary ban of 2 weeks:

/addblocklist "magic" No magicians here! {tban 2w}

Silent blocklists

To use silent blocklists, you first need to enable silent actions.

Once enabled, you'll be able to use silent custom modes for your blocklists entries. This will make it so that Rose won't send a message when banning a user from that blocklist.

Example

This adds a silent kick blocklist entry. Users saying the word "yarrr" will get kicked, without any notification in the chat.

/addblocklist "yarrr" We dont want any pirates here! {skick}

Note

Silent actions can only be set on individual blocklist entries; they cannot be set as the default blocklist mode.

Blocking non-text content

Blocklists can also be used to block items which aren't necessarily text.

Blocklisting stickerpacks

To blocklist a stickerpack, reply to the sticker with the /addblocklist command.

This will add a new entry to your blocklist, called stickerpack:<set-name>, which will block any stickerpacks with that name.

Blocklisting files or file extentions

Files

To blocklist a file, use the following command:

/addblocklist file:<filename>

Example

Block all files called "docs.pdf" by blocklisting it:

/addblocklist file:docs.pdf

Extensions

You can combine the file blocklist with wildcards to blocklist entire extensions. For example, to block PDF files, you could use:

/addblocklist file:*.pdf

Or, for zip files, use:

/addblocklist file:*.zip

Blocklisting forwards

You can blocklist forwards from specific channels or users by using:

/addblocklist forward:<id/@username>

Example

To block forwards from a user with ID 1234, use:

/addblocklist forward:1234

Or, to block forwards from a channel with username "test", use:

/addblocklist forward:@test

Blocklisting inline bots

You can blocklist inline bot messages by using:

/addblocklist inline:<id/@username>

Example

To block inline messages from a bot with ID 1234, use:

/addblocklist inline:1234

Or, to block the inlinebot with username "test", use:

/addblocklist inline:@test

Blocklisting by message prefixes

You can set up a blocklist to only match when your trigger is at the start of a message by setting up "prefix" entry. This blocklist will only match when it is found at the start of your message.

To set one, use the following syntax:

/blocklist prefix:<trigger> <reason>

For example, you might set:

/blocklist "prefix:earn" Messages that start with "earn" tend to be scams!

Blocklisting entire messages

Similarly to the prefix blocklist, you can set "exact" entries which will only match if the entire message matches the entry. This could be useful to tell users not to send common messages which don't add anything to the conversation.

To set one, use the following syntax:

/blocklist exact:<trigger> <reason>

Example

To warn users not to send lone 'hi' messages:

/blocklist "exact:hi" Please don't just send lone 'hi' messages - if you have a question, just ask! {warn}

If you want the match to consist of multiple words, simply quote the whole trigger, as usual:

/blocklist "exact:hi there" Avoid unnecessary messages {warn}

Blocklisting names Custom Clones

You can blocklist names of users in your groups by using:

/addblocklist name:<pattern>

This will delete their messages when they join or speak. Note that if a user changes their name and then doesn't speak, the bot won't be able to now theyve changed their name, so won't be able to act on them!

Example

To ban any user with "hamster" in the name, you might use:

/addblocklist name:*hamster* {ban} No hamsters here!

Blocklisting usernames Custom Clones

You can blocklist inline bot messages by using:

/addblocklist username:<pattern>

Example

To ban any user with "coin" in their username, you might use:

/addblocklist username:*coin* {ban} No coin promotions here!