Fix reaction logic in TextBot to ensure proper handling of message edits
This commit is contained in:
parent
4ab0faab7e
commit
2027e02cf4
1 changed files with 1 additions and 5 deletions
|
@ -172,11 +172,7 @@ class TextBot:
|
||||||
async def react_message_edit(
|
async def react_message_edit(
|
||||||
self, before: discord.Message, after: discord.Message
|
self, before: discord.Message, after: discord.Message
|
||||||
) -> None:
|
) -> None:
|
||||||
if (
|
if after.author != self.bot.user and before.content != after.content:
|
||||||
before.content != after.content
|
|
||||||
and after.author != self.bot.user
|
|
||||||
and random.random() < 20 / 100
|
|
||||||
):
|
|
||||||
logger.info(f"React to edit from {after.author}.")
|
logger.info(f"React to edit from {after.author}.")
|
||||||
await after.add_reaction("👀")
|
await after.add_reaction("👀")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue