have bot remove reactions to page flipping

This commit is contained in:
Sakimori 2020-12-27 03:00:29 -05:00
parent 15f7adb916
commit 7858e92852

View File

@ -641,8 +641,10 @@ async def team_pages(msg, all_teams, search_term=None):
react, user = await client.wait_for('reaction_add', timeout=60.0, check=react_check) react, user = await client.wait_for('reaction_add', timeout=60.0, check=react_check)
if react.emoji == "" and current_page > 0: if react.emoji == "" and current_page > 0:
current_page -= 1 current_page -= 1
react.remove(user)
elif react.emoji == "" and current_page < (page_max-1): elif react.emoji == "" and current_page < (page_max-1):
current_page += 1 current_page += 1
react.remove(user)
await teams_list.edit(embed=pages[current_page]) await teams_list.edit(embed=pages[current_page])
except asyncio.TimeoutError: except asyncio.TimeoutError:
return return