What is Name Regex and how do I filter user names and nicknames?

 

What is Regex?

Regex (or regular expression) is a sequence of characters that define a search pattern.
It can be used to search incoming messages for certain patterns that are unfavourable in your server, for example, Discord invites, Email addresses or some words you don't want to be used.

How do I create Regex to my liking?

Unfortunately, if you've never heard of Regex before, you'll have to research on your own, however, if you want to test the Regex out, you have some knowledge, but don't remember everything, you can create regex and test it here: Regex 101 Website The example, I will show will delete any messages, that include Discord invites (this regex can be bypassed, feel free to improve it):

Regex example

How do I enable Name Regex on my server?

  • While adding name regex to your server, keep in mind 2 parameters: regex itself, and roles that will not be affected by it.
    If you want a simple name regex that will work for everyone you can simply type:
    x.nameregex YOURREGEX
  • If you want certain roles to not be affected by it, you can list them in the certain way:
    x.nameregex YOURREGEX||Role1,Role2
    You can add as many roles, as you like.

How do I list or disable Name Regex on my server?

  • If you want to show the Name Regex currently set on your server, simply type:
    x.nameregex list
    Name Regex will be displayed in the form of NAMEREGEX // ROLES_UNAFFECTED
  • Unlike the x.regex command you don't need to specify anything if you want to delete Name Regex. Simply type:
    x.nameregex remove