0

I have made a bot which automatically authenticates users for me

It goes to my autobuy API url and then gets the response.

This is my code

if response['productId'] == "b936596e-8cdf-4090-78b7-08d7a3ec0911":
   await message.author.add_roles(onetap)

elif response['productId'] == "d66e3b18-4b14-4396-d9a6-08d7cb20b1e4":
    await message.author.add_roles(otc)

elif response['productId'] == "69f4b63b-b0cd-4ef1-7872-08d7a3ec0911":
    await message.author.add_roles(aimware)

elif response['productId'] == "f1c36a82-d8dd-422d-135b-08d7ca2ec9fd":
    await message.author.add_roles(personal)

await message.author.send('Your key has been validated. {0.author.mention}, please look at the #read-this channel to see how to download your config.'.format(message))
await message.author.remove_roles(auth)
await message.delete()

The problem here is that when the first if statement is true so the productID = f1c36a82-d8dd-422d-135b-08d7ca2ec9fd then everything goes as I want. However, if this is not the case and the productID is the second, third or fourth strings then nothing happens. I am not getting any errors but the program just doesn't do what I want it to

Amin Guermazi
  • 1,632
  • 9
  • 19
popsmoke
  • 75
  • 1
  • 1
  • 6

0 Answers0