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
|
return False, False
|
||||||
if refresh == True:
|
if refresh == True:
|
||||||
await message.add_reaction("🔄")
|
await message.add_reaction("🔄")
|
||||||
|
await removeReactions(message, ["⬅️", "➡️"])
|
||||||
else:
|
else:
|
||||||
for reaction in message.reactions:
|
await removeReactions(message, ["🔄"])
|
||||||
if str(reaction) == "🔄":
|
|
||||||
users = await reaction.users().flatten()
|
|
||||||
for user in users:
|
|
||||||
await message.remove_reaction("🔄", user)
|
|
||||||
return message, embed
|
return message, embed
|
||||||
return False, False
|
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