PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@client.command()
async def rps(playerChoice):
outcomes = ["rock", "paper", "scissor"]
botChoice = random.choice(outcomes)
playerChoice = playerChoice.lower()
if botChoice == playerChoice:
await client.say("You said " + playerChoice + " and the Bot said " + botChoice + "\n" + "Its a tie!")
elif botChoice == "rock" and playerChoice == "paper":
await client.say("You said paper and the Bot said rock." + "\n" + "You won! the Bot lost!")
elif botChoice == "rock" and playerChoice == "scissor":
await client.say("You said scissor and the Bot said rock." + "\n" + "the Bot won! You lost! haha")
elif botChoice == "paper" and playerChoice == "rock":
await client.say("You said rock and the Bot said paper." + "\n" + "the Bot won! You lost! haha")
elif botChoice == "paper" and playerChoice == "scissor":
await client.say("You said scissor and the Bot said paper." + "\n" + "You won! the Bot lost!")
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run