From b219f9b65c3b7865b9c5ebb9d049491a36f16f4d Mon Sep 17 00:00:00 2001 From: Aadi Desai <21363892+supleed2@users.noreply.github.com> Date: Fri, 26 Nov 2021 17:34:15 +0000 Subject: [PATCH] Add unconditional reply and counter init message to log --- app.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app.py b/app.py index 261993b..32b660d 100644 --- a/app.py +++ b/app.py @@ -16,6 +16,7 @@ async def on_ready(): print("Logged in as") print(bot.user.name + "#" + bot.user.discriminator) print(bot.user.id) + print("Init Counter: " + str(counter)) await bot.change_presence( status=discord.Status.online, activity=discord.Game(name="with Godlina") ) @@ -25,6 +26,21 @@ async def on_ready(): 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) + if len(reply) > 1: + print("Message from " + message.author.name + ": " + message.content) + print( + "Reply: Length:" + + str(len(reply)) + + ", Final Contents: {" + + reply[-1] + + "}" + ) + await message.reply("Hi " + reply[-1] + ", I'm Dad") + print( + "Replied unconditionally to " + message.author.name + " with Dad Joke" + ) else: global counter # TODO: Add detection for "genshin" and replace with "g*nshin"