Answer the question
In order to leave comments, you need to log in
How to make the bot reply with a certain message as many times as the number of users click on the emoji?
Good day! Please help me fix the code so that the bot can respond to each user, and not just to the one who called this command
Code:
@bot.command()
async def alive(ctx):
msg = await ctx.channel.send('are you all right?')
await msg.add_reaction('✝️')
await msg.add_reaction('')
try:
reaction, user = await bot.wait_for('reaction_add',
check=lambda reaction, user: user == ctx.author and reaction.emoji in ['✝️',
''],
timeout=5.0)
except asyncio.TimeoutError:
await ctx.channel.send('too late')
else:
if reaction.emoji == '✝️':
await ctx.channel.send(f'{ctx.author.mention}, 1')
else:
await ctx.channel.send(
f'{ctx.author.mention}, 2')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question