Skip to content

Commit

Permalink
docs: ✍️ add docstrings for campaign command functions
Browse files Browse the repository at this point in the history
  • Loading branch information
TheManchineel committed Nov 30, 2024
1 parent 2cf847d commit 54dd72a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions super_secret_santa/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def setup():

@santa_command_group.command()
async def create(ctx: discord.ext.commands.Context, campaign_name: str):
"""Create a new Secret Santa campaign"""
if not ctx.guild:
await ctx.respond(
"This command can only be used in a server!",
Expand Down Expand Up @@ -64,6 +65,7 @@ async def create(ctx: discord.ext.commands.Context, campaign_name: str):

@santa_command_group.command()
async def delete(ctx: discord.ext.commands.Context):
"""Delete the current Secret Santa campaign on the server"""
if not ctx.guild:
await ctx.respond(
"This command can only be used in a server!",
Expand Down Expand Up @@ -101,6 +103,7 @@ async def delete(ctx: discord.ext.commands.Context):

@santa_command_group.command()
async def message(ctx: discord.ext.commands.Context, message: str):
"""Send a message to your giftee, whom you must get a gift for (NOT your Secret Santa)"""
# we need to find out all started campaigns the Member is part of, where `giftee` is not NULL
async with get_connection() as conn:
cur = conn.cursor()
Expand Down Expand Up @@ -162,6 +165,7 @@ async def message(ctx: discord.ext.commands.Context, message: str):
# TODO: merge message and messagex
@santa_command_group.command()
async def messagex(ctx: discord.ext.commands.Context, number: int, message: str):
"""Send a message to your giftee, whom you must get a gift for (NOT your Secret Santa)"""
# we need to find out all started campaigns the Member is part of, where `giftee` is not NULL
async with get_connection() as conn:
cur = conn.cursor()
Expand Down

0 comments on commit 54dd72a

Please sign in to comment.