Enhance message edit reaction logic to check for content changes
This commit is contained in:
parent
11d3355eb8
commit
db0457b7be
1 changed files with 2 additions and 2 deletions
|
@ -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("👀")
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue