Home > Back-end >  discord.py how to run command only if some reaction added
discord.py how to run command only if some reaction added

Time:01-08

I'm trying to make like a shop command, It's looks like this: https://i.postimg.cc/2jcJT3r6/so.jpg So i need to make like: If ctx.author clicked on :island: reaction, buy the island.

CodePudding user response:

You can use wait_for function:

@bot.command()
async def shop(ctx):
    message = await ctx.send("Test shop message")  # send a message
    emojis = ("           
  •  Tags:  
  • Related