I am writing a rock, paper and scissors bot for a school project. I keep getting the error in the title (TypeError: randint() takes 3 positional arguments but 4 were given
) and I don't know why. My code is below.
if userInput : 'rock'
choice = random.randint(1,2,3)
if choice == 1:
await client.send_message(message.channel, embed=RockEmbed)
elif choice == 2:
await client.send_message(message.channel, embed=PaperEmbed)
elif choice == 3:
await client.send_message(message.channel, embed=ScissorsEmbed)
if userInput : 'scissors'
choice2 = random.randint(1,2,3)
if choice2 == 1:
await client.send_message(message.channel, embed=RockEmbed)
elif choice2 == 2:
await client.send_message(message.channel, embed=PaperEmbed)
elif choice2 == 3:
await client.send_message(message.channel, embed=ScissorsEmbed)
if userInput : 'paper'
choice3 = random.randint(1,2,3)
if choice3 == 1:
await client.send_message(message.channel, embed=RockEmbed)
elif choice3 == 2:
await client.send_message(message.channel, embed=PaperEmbed)
elif choice3 == 3:
await client.send_message(message.channel, embed=ScissorsEmbed)
I've said random.randint(1,2,3)
, which is clearly 3 arguments, not 4. I'm, pretty sure my syntax is correct, but not 100%.