Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coinflip command done #183

Closed
wants to merge 7 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
resolved issues
akulb-15 committed Feb 22, 2022

Verified

This commit was signed with the committer’s verified signature.
gabmontes Gabriel Montes
commit 7f7bc6c9cbada6e7a94c54a521c54c9c56bd623e
8 changes: 4 additions & 4 deletions bot/exts/fun/coinflip.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import random

import disnake
@@ -8,6 +7,8 @@
from bot.bot import Bot
from bot.constants import Colours

COIN_CHOICE = ("Heads", "Tails")


class CoinFlip(commands.Cog):
"""Flip a coin."""
@@ -24,10 +25,9 @@ async def coin_flip(
ctx: Context,
) -> None:
"""Flips a coin and sends an embed with the outcome."""
coin_choice = ["Heads", "Tails"]
embed = disnake.Embed(
title="**Coin toss outcome 🪙**",
description=random.choice(coin_choice),
title="**Coin toss outcome \N{coin}**",
description=random.choice(COIN_CHOICE),
color=Colours.green,
)
await ctx.send(embed=embed)