Add a better structure for slash commands and add/remove functionality.

This commit is contained in:
Ben Rog-Wilhelm 2023-08-27 06:42:49 -05:00
parent fb2f0c9390
commit bdeda313cf
2 changed files with 77 additions and 10 deletions

View file

@ -41,7 +41,7 @@ whitespace_regex = re.compile('\\s+')
strikethrough_regex = re.compile('''~{1,2}([^~]+)~{1,2}''', flags=re.A)
mute_regex = re.compile("/mute @([a-z0-9_\\-]{3,25}) ([0-9])+", flags=re.A)
chat_command_regex = re.compile(r"^/(\w+)\s?(.*)", flags=re.A)
emoji_regex = re.compile(f"[^a]>\\s*(:[!#@]{{0,3}}[{valid_username_chars}]+:\\s*)+<\\/", flags=re.A)
emoji_regex2 = re.compile(f"(?<!\"):([!#@{valid_username_chars}]{{1,31}}?):", flags=re.A)