From 2027e02cf4e97f280d5db7ad7e45bf283e9b2779 Mon Sep 17 00:00:00 2001 From: "Edgar P. Burkhart" <git@edgarpierre.fr> Date: Sun, 23 Mar 2025 10:29:05 +0100 Subject: [PATCH] Fix reaction logic in TextBot to ensure proper handling of message edits --- botbotbot/text.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/botbotbot/text.py b/botbotbot/text.py index 2342378..164d10e 100644 --- a/botbotbot/text.py +++ b/botbotbot/text.py @@ -172,11 +172,7 @@ class TextBot: async def react_message_edit( self, before: discord.Message, after: discord.Message ) -> None: - if ( - before.content != after.content - and after.author != self.bot.user - and random.random() < 20 / 100 - ): + if after.author != self.bot.user and before.content != after.content: logger.info(f"React to edit from {after.author}.") await after.add_reaction("👀")