now remove useless arrows when an update button appears
This commit is contained in:
parent
646a3932eb
commit
82a682f03a
1 changed files with 9 additions and 5 deletions
|
@ -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)
|
Reference in a new issue