I've been trying to make a command that will display some information and then, when i react to an emote, its supposed to display another set of information.
I tried to use parts of this, specifically the parts in line 335 to 393 to get it to work. However, it just does nothing. Not even an error message.
This is the code I use right now.
def check_react(reaction, user):
if reaction.message.id != msg.id:
return False
if user != ctx.message.author:
return False
return True
res, user = await bot.wait_for('reaction_add', check=check_react, timeout=None,)
if user != ctx.message.author:
print('if user != ctx.message.author:')
elif '⬅️' in str(res.emoji):
page -=1
print(page)
embed = discord.Embed(title='generic title', description='generic description', color=0x52fffc)
await msg.edit(embed=embed)
elif '➡️' in str(res.emoji):
page +=1
print(page)
embed = discord.Embed(title='generic title 2', description='generic description 2', color=0x52fffc)
await msg.edit(embed=embed)
It seems to stop at
await bot.wait_for('reaction_add', ..)
why is that? and how can i make the code work? Thats in a cog btw. I'll happily provide more code if needed.