I have already written a command. When you execute this command, the bot sends a message to a specific channel. He adds a reaction to this message (an embed by the way). That goes so far. But now, when someone clicks on this reaction, I wanted the bot to respond. In this case, he should send a message to a specific channel. But that doesn't work. There is also no error code, which is supposed to mean that it works, only he doesn't send a message.
@bot.command()
async def buy(ctx, choice):
channel = bot.get_channel(705836078082424914)
user = ctx.message.author
vcrole1 = get(user.guild.roles, id=703562188224331777)
messagechannel = ctx.message.channel.id
if ctx.message.channel.id == 705146663135871106:
if choice == '1':
if any(role.id == 703562188224331777 for role in ctx.message.author.roles):
await user.remove_roles(vcrole1)
await ctx.send(
"not important message")
messtag1 = await channel.send('not important')
await messtag1.delete(delay=None)
embed = discord.Embed(color=0xe02522, title='not important title', description=
'not important description')
embed.set_footer(text='not important text')
embed.timestamp = datetime.datetime.utcnow()
mess1 = await channel.send(embed=embed)
await mess1.add_reaction('<a:check:674039577882918931>')
def check(reaction, user):
return reaction.message == mess1 and str(reaction.emoji) == '<a:check:674039577882918931>'
await bot.wait_for('reaction_add', check=check)
channeldone = bot.get_channel(705836078082424914)
await channeldone.send('test')
There isn't an error message.