-
Notifications
You must be signed in to change notification settings - Fork 14
Added Dice and Coin flip #87
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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(): | ||
Comment on lines
+43
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We require all functions to have proper docstrings as these are what will be displayed in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually, @ItsDrike we shouldn't worry about the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @e-xe even with it replaced docstrings will still be used as a command descriptions even with it being paginated |
||
coin_filp = randint(0, 1) | ||
if coin_filp == 0: | ||
return "Heads!" | ||
else: | ||
return "Tails" | ||
|
||
await ctx.send(coin_filp()) | ||
from random import randint | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All import should be on top and properly sorted (accordingly to flake8) |
||
|
||
@command() | ||
async def dice(): | ||
dice_roll = randint(1,6) | ||
await ctx.send(dice_roll) | ||
Comment on lines
+55
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Give a default values for the range, and customizable range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to configure an alias for faster usage, instead of keeping just this long name