Skip to content
This repository was archived by the owner on Feb 6, 2021. It is now read-only.
Open
Changes from all commits
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
16 changes: 16 additions & 0 deletions bot/cogs/games/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Copy link
Contributor

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

Suggested change
@command()
@command(aliases=["cflip"])

async def flip_coin():
def coin_filp():
Comment on lines +43 to +44
Copy link
Contributor

@ItsDrike ItsDrike Jul 18, 2020

Choose a reason for hiding this comment

The 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 >>help even though this command is pretty self-descriptive, it should still have a docstring, same goes for dice command

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, @ItsDrike we shouldn't worry about the >>help command since it will be replaced by the paginator once it is released.

Copy link
Contributor

@ItsDrike ItsDrike Jul 19, 2020

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give a default values for the range, and customizable range