Add the functionality to recognize RGB colors similar to "normal" colors in prefix
LaurenceBarnes opened this issue · 4 comments
Hey, we use prefix names for the role names that transfer to discord, and it works perfectly fine. For our custom needs this is a better solution than using the group name. When we have the prefix like
prefix.300.&r[&BTest&r]
The color code is ignored properly and there is just "[Test]" in the discord chat. However, when I want to use RGB colors which are supported by LuckPerms, like
prefix.300.&r[JC8F5Test&r]
it displays [JC8F5Test] in the chat while working perfectly in-game. It would be really great if DiscordSRV could recognize RGB colors as well, probably the "#" in combination with the "&" could be the "key" sign to ignore the following six digits :D
Thanks!
PS.: if I should add any info to this, tell me of course xD
RGB colors which are supported by LuckPerms
This isn't actually true, LuckPerms doesn't handle color codes at all; it merely stores them as prefixes/suffixes for chat plugins to handle.
You can use DiscordChatChannelGameFilters
to ignore these, eg. "&#[a-fA-F0-9]{6}": ""
- though support for stripping this format by default may be added in the future as well
yeah I see, but you got what I meant xD
How exactly would I add to those filters in this case?
DiscordChatChannelGameFilters: {}
DiscordChatChannelDiscordFilters: {".*Online players\\(.*": "", ".*\\*\\*No online players\\*\\*.*": ""}
is there by default