Discord AutoMod Will Soon Support RegEx Patterns

Discord Sep 12, 2022

Discord AutoMod, a powerful tool necessary for every Discord server big or small, is getting even more powerful with the support for RegEx patterns.

Server owners and admins will soon be able to set more efficient and effective bad word filters that control bypasses. One of the best ways to strengthen your text chat filters is by using RegEx patterns instead of typing out the exact word. In this article we'll discuss what RegEx support actually means for Discord AutoMod and what else is to come with it.

What is RegEx?

RegEx or Regular Expression is a sequence of characters that specifies a search pattern in text. RegEx are mostly used in algorithms to find strings of words or phrases that match some basic rules. RegEx are helpful to fight against filter bypassers and are often a better alternative than basic word filters.

For example, a word filter will capture "Gray" or "Grey" as is. It has to be written exactly as that to be recognized by the algorithm – capitalization is an exception for some systems. It takes two of those slots to capture a word that basically means the same but has to be referred like this for alternate spellings.

However, in a RegEx you can simply put gr[ae]y which will capture any text that contains either gray or grey.

RegEx Support in AutoMod

AutoMod is a fairly new Discord tool for server admins to help battle against spam content, scams, and set up filters for offensive words with the support to add custom word filters.

However, from a trusted source we can see Discord is planning to bring RegEx support to AutoMod to filter words better and stop people from bypassing the punishments.

Image showing how the RegEx setting may look | Image from DiscordPreviews

According to this image posted by Discord Previews on Twitter, Discord will allow you to set 10 RegEx patterns in one set of 'Custom Keywords'.

RegEx are superior to word filters as they allow more flexible filters to almost anything. However, getting started with them may take a little time.

To show you how powerful RegEx patterns can be, here is an useful practical example.

<(?::\w+:|@!&|#)[0-9]+> simple RegEx will capture all mentions in Discord. Channel mentions, role mentions, user mentions, and even an Emoji will be captured with this simple pattern. If you put this in to your filters when you unlock RegEx, it will block every message that mentions a user, role, or channel.

This can be used to your advantage. There may be servers or scenarios where you would want to block Emojis so that no one can send emojis in that channel, well you can simply set up a AutoMod custom filter with all channels blacklisted except the one you want it to work in and using <:\w+:[0-9]+> as a RegEx keyword. It will capture and block every type of emoji being sent into the channel. What happens after is for you to decide in your AutoMod custom rule settings.

Anyways, that's all for today, hope you enjoyed today's article. Make sure to join our official Discord server to discuss further on this topic or suggest new articles!

Are you excited for RegEx support?

How are you planning to use RegEx in AutoMod? If you are at all. Let's discuss!

Join Discord

Tags

Roonie

Hi - I'm Roonie. I am the lead-editor and manager at Netcord Publications. I make videos on YouTube, and I run a community server on Discord. I love music and graphic designing.