1
0
Fork 0
mirror of synced 2024-05-18 19:42:28 +12:00

Add a coinflip command

This commit is contained in:
phxntxm 2017-12-02 16:21:39 -06:00
parent 4065f63e70
commit 0ff6704206

View file

@ -109,6 +109,18 @@ class Miscallaneous:
await ctx.send(embed=embed)
@commands.command(aliases=["coin"])
@utils.custom_perms(send_messages=True)
@utils.check_restricted()
async def coinflip(self, ctx):
"""Flips a coin and responds with either heads or tails
EXAMPLE: !coinflip
RESULT: Heads!"""
result = "Heads!" if random.SystemRandom().randint(0, 1) else "Tails!"
await ctx.send(result)
@commands.command()
@utils.custom_perms(send_messages=True)
@utils.check_restricted()