Hotfix clearreactsbyuser()

This commit is contained in:
TSRBerry 2023-05-05 18:11:32 +02:00 committed by GitHub
parent 52d7c08324
commit df2f3b7ac5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,10 +29,10 @@ class ModReact(Cog):
count = 0 count = 0
async for msg in channel.history(limit=limit): async for msg in channel.history(limit=limit):
for react in msg.reactions: for react in msg.reactions:
if await react.users().find(lambda u: u == user): async for react_user in react.users():
count += 1 if react_user == user:
async for u in react.users(): count += 1
await msg.remove_reaction(react, u) await react.remove(user)
msg = ( msg = (
f"✏️ **Cleared reacts**: {ctx.author.mention} cleared " f"✏️ **Cleared reacts**: {ctx.author.mention} cleared "
f"{user.mention}'s reacts from the last {limit} messages " f"{user.mention}'s reacts from the last {limit} messages "