Adapt to extra characters on Streamlabs Chatbot messages

master
Nikola Forró 6 years ago
parent fd26e33907
commit 1cfecb666e

@ -10,7 +10,7 @@ from commands import CommandError
# $username --> Sweet! Thanks for the quote! #$id: $response
QUOTE_ADDED_PATTERN = re.compile(r'''^
QUOTE_ADDED_PATTERN = re.compile(r'''^(.\s)?
(?P<user>.+)\s+-->\s+
Sweet!\s+Thanks\s+for\s+the\s+quote!\s+
\#(?P<id>\d+):\s+
@ -19,7 +19,7 @@ QUOTE_ADDED_PATTERN = re.compile(r'''^
\[(?P<date>.+)\]$''', re.VERBOSE)
# $username --> Successfully edited Quote #$id: $response
QUOTE_EDITED_PATTERN = re.compile(r'''^
QUOTE_EDITED_PATTERN = re.compile(r'''^(.\s)?
(?P<user>.+)\s+-->\s+
Successfully\s+edited\s+Quote\s+
\#(?P<id>\d+):\s+
@ -28,19 +28,19 @@ QUOTE_EDITED_PATTERN = re.compile(r'''^
\[(?P<date>.+)\]$''', re.VERBOSE)
# $username --> Successfully deleted Quote #$id.
QUOTE_REMOVED_PATTERN = re.compile(r'''^
QUOTE_REMOVED_PATTERN = re.compile(r'''^(.\s)?
(?P<user>.+)\s+-->\s+
Successfully\s+deleted\s+Quote\s+
\#(?P<id>\d+)\.$''', re.VERBOSE)
# $user has joined the Cheese Horde! CHEESE HYPE!!! ♥♥
SUB_PATTERN = re.compile(r'''^
SUB_PATTERN = re.compile(r'''^(.\s)?
(?P<user>.+)\s+
has\s+joined\s+the\s+Cheese\s+Horde!\s+
CHEESE\s+HYPE!!!\s+$''', re.VERBOSE)
# $user, Thank you for the $rank months of cheesy support! ♥♥♥♥ CHEESE HYPE!!!
RESUB_PATTERN = re.compile(r'''^
RESUB_PATTERN = re.compile(r'''^(.\s)?
(?P<user>.+),\s+
Thank\s+you\s+for\s+the\s+
(?P<rank>\d+)\s+
@ -48,30 +48,30 @@ RESUB_PATTERN = re.compile(r'''^
\s+CHEESE\s+HYPE!!!$''', re.VERBOSE)
# $giver, Thank you for gifting a sub to $receiver! So kind <3 !
SUB_GIFTED_PATTERN = re.compile(r'''^
SUB_GIFTED_PATTERN = re.compile(r'''^(.\s)?
(?P<giver>.+),\s+
Thank\s+you\s+for\s+gifting\s+a\s+sub\s+to\s+
(?P<receiver>.+)!\s+
So\s+kind\s+<3\s+!$''', re.VERBOSE)
# A giveaway for: $prize has started! $entitled can join!
GIVEAWAY_STARTED_PATTERN = re.compile(r'''^
GIVEAWAY_STARTED_PATTERN = re.compile(r'''^(.\s)?
A\s+giveaway\s+for:\s+
(?P<prize>.+)\s+has\s+started!\s+
(?P<entitled>.+)\s+can\s+[jJ]oin!?$''', re.VERBOSE)
# Entries are allowed once again for $prize $entitled can join!
GIVEAWAY_RESTARTED_PATTERN = re.compile(r'''^
GIVEAWAY_RESTARTED_PATTERN = re.compile(r'''^(.\s)?
Entries\s+are\s+allowed\s+once\s+again\s+
for\s+(?P<prize>.+)\s+
(?P<entitled>.+)\s+can\s+[jJ]oin!?$''', re.VERBOSE)
# Type $command to join!
GIVEAWAY_COMMAND_PATTERN = re.compile(r'''^
GIVEAWAY_COMMAND_PATTERN = re.compile(r'''^(.\s)?
Type\s+(?P<command>.+)\s+to\s+join!$''', re.VERBOSE)
# Entries have stopped for the giveaway! You can no longer enter!
GIVEAWAY_ENDED_PATTERN = re.compile(r'''^
GIVEAWAY_ENDED_PATTERN = re.compile(r'''^(.\s)?
Entries\s+have\s+stopped\s+for\s+the\s+giveaway!\s+
You\s+can\s+no\s+longer\s+enter!$''', re.VERBOSE)

Loading…
Cancel
Save