From 4fef1d0d14c7400f80f5f036918e71985215861f Mon Sep 17 00:00:00 2001 From: Paillat Date: Wed, 1 Feb 2023 13:54:45 +0100 Subject: [PATCH] Update makeprompt.py --- code/makeprompt.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/makeprompt.py b/code/makeprompt.py index 501366f..108ff94 100644 --- a/code/makeprompt.py +++ b/code/makeprompt.py @@ -56,11 +56,6 @@ async def process(self, message): return if message.content.startswith("-") or message.content.startswith("//"): return - if str(message.author.id) == "646739625661956128": - #a random int between 0 and 1 to decide if the bot should respond or not - if random.randint(0, 1) == 0: - await message.channel.send(message.content) # this is a prank done by me, the developer of the bot. It's not a bug, it's a feature. - return #check if the message is in the right channel by comparing the channel id of the message with the list of channels "channels" try : original_message = await message.channel.fetch_message(message.reference.message_id) except : original_message = None @@ -68,6 +63,11 @@ async def process(self, message): original_message = None if not str(message.channel.id) in channels and message.content.find("<@"+str(self.bot.user.id)+">") == -1 and original_message == None and str(message.channel.id) != str(channel_id): return + if str(message.author.id) == "646739625661956128": + #a random int between 0 and 1 to decide if the bot should respond or not + if random.randint(0, 2) == 0: + await message.channel.send(message.content) # this is a prank done by me, the developer of the bot. It's not a bug, it's a feature. + return await message.channel.trigger_typing() if message.guild.id != 1021872219888033903: c.execute("UPDATE data SET uses_count_today = uses_count_today + 1 WHERE guild_id = ?", (message.guild.id,))