Prevent use of formats in guild name and prefix
Context
I think it's important because using format code in the name or prefix makes chat a mess.
Codes: &m &l &n &o &r
Possible Implementation
Through ReGex or config?
guild:
requirements:
# With the default RegEx currently set, the minimum length of the prefix is 1 and the maximum is 64.
# To change this, adjust the number and you can refer to the link below on how to modify RegEx.
# RegEx (https://en.wikipedia.org/wiki/Regular_expression) used to only allow certain characters (default only allows alphanumeric characters).
# To turn off the ability to use colors, remove the & from the RegEx.
# Trying to use symbols such as Chinese ones? Try this Regex: [\u4E00-\u9FA5_a-zA-Z0-9&_\一-龥]{1,6}
name: '[a-zA-Z0-9&]{1,64}'
# Similar to the name, just refer above.
prefix: '[a-zA-Z0-9&]{3,3}'
# Would you like to include color codes signs (&b &l, etc) in the length check?
include-color-codes: false
allow-format-codes: false
One way to decide which format code type would be a good choice.
Regex doesn't exactly work that way, but...
~~Glare could probably create a blacklist and people can blacklist the &m &l &n &o &r codes. That might be a good solution.~~
Wait doesn't a blacklist already exist...
blacklist:
# Do we want to enable the blacklist?
enabled: true
# Do we want the blacklist to be case sensitive?
case-sensitive: true
# What words would you like to blacklist from being used?
words:
- &m
- &l
- &n
- &o
- &r
@SrBedrock would you mind testing adding the &m &l &n &o &r codes to the blacklist and see if that prevents them from using formatting codes?
I thought about this option, I will try and warn you here!
Did not work @wolfebersahd .
@SrBedrock, would you mind testing with
include-color-codes: true
just a random thought.
I think it would work but it would disrupt the current system, as seen in config.yml