mercredi 31 mars 2021

Bot doesn't read the second reaction when user reacts to 2 reaction.. discord.py

I have a code which the bot needed to read the both reactions of the user on a message but with this code, the bot doesn't print the "second check" which is meant by like bot not reading the second reaction and stopping after the first one come true

reacttn = True
def check(reaction, user):
  return user == members.users[members.leader].user and reaction.message.id == ttreact.id
while reacttn == True:
  reaction, user = await client.wait_for("reaction_add", check=check)

  if len(members.users) == 2:
    if str(reaction.emoji) == "1️⃣":
      print("first check")
    if str(reaction.emoji) == "2️⃣":
      print("second check")
    await asyncio.sleep(5)
    reacttn = False

Aucun commentaire:

Enregistrer un commentaire