Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.
Open
Show file tree
Hide file tree
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
18 changes: 14 additions & 4 deletions santabot/cogs/give.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def give(
ctx: discord.ext.commands.Context,
recipient: typing.Union[discord.Member, str],
*,
present_name: str
present_name: str = ""
):
"""Command to request a present for oneself or another User

Expand Down Expand Up @@ -83,7 +83,7 @@ async def please(
give: str, # give
recipient: typing.Union[discord.Member, str], # @user or 'me'
*,
present_name: str
present_name: str = ""
):
"""Command for pleasantly asking for a present.

Expand Down Expand Up @@ -129,7 +129,7 @@ async def gimme(
self,
ctx: discord.ext.commands.Context,
*,
present_name: str
present_name: str = ""
):
"""Command to request a present for oneself

Expand Down Expand Up @@ -161,7 +161,7 @@ async def __do_gifting(
self,
ctx: discord.ext.commands.Context,
recipient: typing.Union[discord.Member, str],
present_name: str,
present_name: str = "",
*,
please=False
):
Expand Down Expand Up @@ -254,6 +254,16 @@ async def __do_gifting(

return

if present_name.isspace() or not present_name:

await ctx.send(
"Ho ho ho! {0}, it looks like you forgot to tell "
"me what present you wanted!"
.format(ctx.author.mention)
)

return

# Cache the user's present count because it might get reset by
# __give_present
tmp_present_count = invoking_user.owned_present_count
Expand Down
4 changes: 2 additions & 2 deletions santabot/cogs/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, bot):
async def stats(
self,
ctx: discord.ext.commands.Context,
subject: typing.Union[discord.Member, str]
subject: typing.Union[discord.Member, str] = ""
):
"""Command to get stats for a player or the server

Expand All @@ -51,7 +51,7 @@ async def stats(
async def __make_stats(
self,
ctx: discord.ext.commands.Context,
subject: typing.Union[discord.Member, str]
subject: typing.Union[discord.Member, str] = ""
):
"""Underlying logic for `@santa stats`

Expand Down