I'm looking to make a command where if the message.author tags a user, the bot will react twice to the message then will wait for the user who was tagged to select either one or the other reaction to choose. Right now everything works except when the user reacts to one or the other emoji, it doesn't do anything. When they react to both emojis, it sends the message for reaction
.
if message.content.lower().startswith('!marry'):
user = message.mentions[0]
if message.author == user:
await client.send_message(message.channel, "{} you can't marry yourself dummy ????".format(message.author.mention))
else:
if get_spouse(message.author) != "No One":
await client.send_message(message.channel, "{}, you're already married to {} ????".format(message.author.mention, get_spouse(message.author)))
else:
if (get_spouse(user)) != "No One":
await client.send_message(message.channel, "{} is already married. Get your own spouse. ????".format(user.mention))
else:
marriagemsg = await client.send_message(message.channel, "{} *has proposed to* {} ????".format(message.author.mention, user.mention))
await client.add_reaction(marriagemsg, "✅")
await client.add_reaction(marriagemsg, "❌")
while True:
reaction = await client.wait_for_reaction(emoji="✅", message=marriagemsg,
check=lambda reaction, user: user == message.mentions[0])
reaction2 = await client.wait_for_reaction(emoji="❌", message=marriagemsg,
check=lambda reaction, user: user == message.mentions[0])
if reaction:
await client.send_message(message.channel, "{} **is now married to** {} ????????".format(message.author.mention, reaction.user.mention))
add_spouse(message.author, user.name)
add_spouse(reaction.user, message.author.name)
else:
if reaction2:
await client.send_message(message.channel, "{} **rejects** {}**'s proposal** ✋????".format(reaction2.user.mention, message.author.mention))