mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
Fixes [p]trivia leaderboard not running. (#2983)
* Removes `MAX_BALANCE` from bank, user `bank.get_max_balance()` now `[p]bankset maxbal` can be used to set the maximum bank balance Signed-off-by: Guy <guyreis96@gmail.com> * Adds `invoke_without_command` to `[p]trivial leaderboard` Signed-off-by: guyre <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
parent
83483abfa5
commit
f3b6c4cf32
1
changelog.d/trivia/2911.bugfix.rst
Normal file
1
changelog.d/trivia/2911.bugfix.rst
Normal file
@ -0,0 +1 @@
|
||||
Fixes a bug where ``[p]trivia leaderboard`` failed to run.
|
||||
@ -267,14 +267,15 @@ class Trivia(commands.Cog):
|
||||
else:
|
||||
await ctx.send(msg)
|
||||
|
||||
@trivia.group(name="leaderboard", aliases=["lboard"], autohelp=False)
|
||||
@trivia.group(
|
||||
name="leaderboard", aliases=["lboard"], autohelp=False, invoke_without_command=True
|
||||
)
|
||||
async def trivia_leaderboard(self, ctx: commands.Context):
|
||||
"""Leaderboard for trivia.
|
||||
|
||||
Defaults to the top 10 of this server, sorted by total wins. Use
|
||||
subcommands for a more customised leaderboard.
|
||||
"""
|
||||
if ctx.invoked_subcommand == self.trivia_leaderboard:
|
||||
cmd = self.trivia_leaderboard_server
|
||||
if isinstance(ctx.channel, discord.abc.PrivateChannel):
|
||||
cmd = self.trivia_leaderboard_global
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user