now remove useless arrows when an update button appears

This commit is contained in:
Mylloon 2021-08-19 09:55:23 +02:00
parent 646a3932eb
commit 82a682f03a

View file

@ -151,11 +151,15 @@ async def listReaction(client, payload):
return False, False
if refresh == True:
await message.add_reaction("🔄")
await removeReactions(message, ["⬅️", "➡️"])
else:
for reaction in message.reactions:
if str(reaction) == "🔄":
users = await reaction.users().flatten()
for user in users:
await message.remove_reaction("🔄", user)
await removeReactions(message, ["🔄"])
return message, embed
return False, False
async def removeReactions(message, reactions):
for reaction in message.reactions:
if str(reaction) in reactions:
users = await reaction.users().flatten()
for user in users:
await message.remove_reaction(reaction, user)