From be1cc61443ca87e170348ae55e40758f977b3059 Mon Sep 17 00:00:00 2001
From: "Edgar P. Burkhart" <git@edgarpierre.fr>
Date: Sat, 22 Mar 2025 16:11:12 +0100
Subject: [PATCH] Refactor message edit reaction logic for improved readability

---
 botbotbot/__main__.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/botbotbot/__main__.py b/botbotbot/__main__.py
index 42ae8f6..15b8308 100644
--- a/botbotbot/__main__.py
+++ b/botbotbot/__main__.py
@@ -113,7 +113,11 @@ async def add_more_reaction(reaction, user):
 
 @bot.listen("on_message_edit")
 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:
+    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("👀")