Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @client.command(pass_context=True)
- async def badminton(ctx):
- badmintonplayers = random.choice([x for x in ctx.message.server.members if not x.bot])
- await client.say("You are now competing with {}.".format(badmintonplayers))
- await client.say("It's your turn to serve. Serve high or low?")
- def check(m):
- return 'High','Low'
- message = await client.wait_for_message()
- if 'High' in message.content:
- await client.say("You served a high ball!")
- elif 'Low' in message.content:
- await client.say("You served a low ball!")
- else:
- await client.say("You randomly served the ball, and the referee gives you a foul! Match ended!")
- playerserve = random.choice(["The player sucessfully hit the ball!","The player missed the ball!"])
- playerstatus = await client.say(playerserve)
- playerhit = random.choice(["The player hits a high ball!","The player hits a low ball!"])
- if 'The player sucessfully hit the ball!' in playerserve:
- await client.say("{} Where should you be? Behind or Front?".format(playerhit))
- elif 'The player missed the ball!' in playerserve:
- await client.say("Congratulations! You won!")
- def check(m):
- return 'Behind','Front'
- message2 = await client.wait_for_message()
- if 'Behind' in message.content:
- await client.say("You went backwards!")
- elif 'Front' in message.content:
- await client.say("You went forward!")
- else:
- await client.say("You rushed off and people thought you raged quit! Match ended!")
- shuttercock = random.choice(["The ball lands an in! You lost!","However, the ball lands an out! You won!"])
- if 'The player hits a low ball!' in playerhit:
- if 'Front' in message.content:
- await client.say("You feel like you can hit the ball! High or low?")
- elif 'Behind' in message.content:
- await client.say("Oh no! You are unable to hit the ball!")
- await client.say("It's an in! You lost!")
- elif 'The player hits a high ball!' in playerhit:
- if 'Behind' in message.content:
- await client.say("You feel like you can hit the ball! High or low?")
- elif 'Front' in message.content:
- await client.say("Oh no! You are unable to hit the ball!")
- await client.say(shuttercock)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement