Merge pull request #146 from stijndcl/fix-school-date-args

Fix school date args
pull/147/head
Stijn De Clercq 2022-10-26 08:55:17 +02:00 committed by GitHub
commit 78bb9ee66d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -38,7 +38,9 @@ class School(commands.Cog):
@commands.hybrid_command(name="les", aliases=["sched", "schedule"]) @commands.hybrid_command(name="les", aliases=["sched", "schedule"])
@app_commands.rename(day_dt="date") @app_commands.rename(day_dt="date")
async def les(self, ctx: commands.Context, day_dt: Optional[app_commands.Transform[date, DateTransformer]] = None): async def les(
self, ctx: commands.Context, *, day_dt: Optional[app_commands.Transform[date, DateTransformer]] = None
):
"""Show your personalized schedule for a given day. """Show your personalized schedule for a given day.
If no day is provided, this defaults to the schedule for the current day. When invoked during a weekend, If no day is provided, this defaults to the schedule for the current day. When invoked during a weekend,
@ -71,7 +73,9 @@ class School(commands.Cog):
aliases=["eten", "food"], aliases=["eten", "food"],
) )
@app_commands.rename(day_dt="date") @app_commands.rename(day_dt="date")
async def menu(self, ctx: commands.Context, day_dt: Optional[app_commands.Transform[date, DateTransformer]] = None): async def menu(
self, ctx: commands.Context, *, day_dt: Optional[app_commands.Transform[date, DateTransformer]] = None
):
"""Show the menu in the Ghent University restaurants on `date`. """Show the menu in the Ghent University restaurants on `date`.
If no value for `date` is provided, this defaults to the schedule for the current day. If no value for `date` is provided, this defaults to the schedule for the current day.