From db0457b7bef175699153c8ad0018d08cbf28675b Mon Sep 17 00:00:00 2001
From: "Edgar P. Burkhart" <git@edgarpierre.fr>
Date: Sat, 22 Mar 2025 16:10:49 +0100
Subject: [PATCH] Enhance message edit reaction logic to check for content
 changes

---
 botbotbot/__main__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/botbotbot/__main__.py b/botbotbot/__main__.py
index 7d075c6..42ae8f6 100644
--- a/botbotbot/__main__.py
+++ b/botbotbot/__main__.py
@@ -112,8 +112,8 @@ async def add_more_reaction(reaction, user):
 
 
 @bot.listen("on_message_edit")
-async def react_message_edit(before, after):
-    if after.author != bot.user and random.random() < 50 / 100:
+async def react_message_edit(before: discord.Message, after: discord.Message) -> None:
+    if before.content != after.content and after.author != bot.user and random.random() < 50 / 100:
         logger.info(f"React to edit from {after.author}")
         await after.add_reaction("👀")