From 6ec9714e2b2b06e2698dae029030cb3b78cc121b Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Sun, 28 Nov 2021 00:52:36 +0000 Subject: [PATCH] Add full caps variant to regex --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index 32b660d..e6a2f28 100644 --- a/app.py +++ b/app.py @@ -27,7 +27,7 @@ async def on_message(message): if message.author == bot.user: return elif message.author.id == 581890740360052764: - reply = re.split("(^| )(I'm|Im|i'm|im|I am|i am)( )", message.content, 1) + reply = re.split("(^| )(I'M|IM|I AM|I'm|Im|I am|i'm|im|i am)( )", message.content, 1) if len(reply) > 1: print("Message from " + message.author.name + ": " + message.content) print( @@ -44,7 +44,7 @@ async def on_message(message): else: global counter # TODO: Add detection for "genshin" and replace with "g*nshin" - reply = re.split("(^| )(I'm|Im|i'm|im|I am|i am)( )", message.content, 1) + reply = re.split("(^| )(I'M|IM|I AM|I'm|Im|I am|i'm|im|i am)( )", message.content, 1) if len(reply) > 1: print("Message from " + message.author.name + ": " + message.content) print(