Refactor globalboard command in Leaderboard cog to allow the default help command to handle unrecognized subcommands. This change improves command handling and user experience by providing clearer guidance when no specific subcommand is invoked.
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run

This commit is contained in:
Valerie 2025-05-26 04:15:02 -04:00
parent 719abfbc97
commit 446c266f18

View file

@ -195,7 +195,8 @@ class Leaderboard(commands.Cog):
async def globalboard(self, ctx: commands.Context):
"""Global leaderboard commands."""
if ctx.invoked_subcommand is None:
await self.show_leaderboard(ctx)
# Let the default help command handle it
return
@globalboard.command(name="show")
async def show_leaderboard(self, ctx: commands.Context, page: int = 1):