From a7f6e5272f2c7a9a99e7160474445b601e3f3253 Mon Sep 17 00:00:00 2001 From: Rohith04MVK <67266075+Rohith04MVK@users.noreply.github.com> Date: Sat, 18 Jul 2020 15:31:27 +0530 Subject: [PATCH] Added Dice and Coin flip --- bot/cogs/games/games.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bot/cogs/games/games.py b/bot/cogs/games/games.py index 1d001b28..b022e5ea 100644 --- a/bot/cogs/games/games.py +++ b/bot/cogs/games/games.py @@ -39,3 +39,19 @@ async def ball8(self, ctx: Context, *, question: str) -> None: embed.add_field(name="Answer", value=answer) await ctx.send(embed=embed) + @command() + async def flip_coin(): + def coin_filp(): + coin_filp = randint(0, 1) + if coin_filp == 0: + return "Heads!" + else: + return "Tails" + + await ctx.send(coin_filp()) + from random import randint + + @command() + async def dice(): + dice_roll = randint(1,6) + await ctx.send(dice_roll)