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
Some checks are pending
Run pre-commit / Run pre-commit (push) Waiting to run
This commit is contained in:
parent
719abfbc97
commit
446c266f18
1 changed files with 2 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue