mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Economy] Fixed [p]leaderboard not being handled in DMs (#1825)
This commit is contained in:
parent
2b2491f40f
commit
7aa9e67bc2
@ -454,11 +454,14 @@ class Economy:
|
|||||||
async def leaderboard(self, ctx):
|
async def leaderboard(self, ctx):
|
||||||
"""Server / global leaderboard
|
"""Server / global leaderboard
|
||||||
|
|
||||||
Defaults to server"""
|
Defaults to \"server\" if not issued in DM"""
|
||||||
if ctx.invoked_subcommand is None:
|
if ctx.invoked_subcommand is None:
|
||||||
await ctx.invoke(self._server_leaderboard)
|
if ctx.message.server:
|
||||||
|
await ctx.invoke(self._server_leaderboard)
|
||||||
|
else:
|
||||||
|
await ctx.invoke(self._global_leaderboard)
|
||||||
|
|
||||||
@leaderboard.command(name="server", pass_context=True)
|
@leaderboard.command(name="server", pass_context=True, no_pm=True)
|
||||||
async def _server_leaderboard(self, ctx, top: int=10):
|
async def _server_leaderboard(self, ctx, top: int=10):
|
||||||
"""Prints out the server's leaderboard
|
"""Prints out the server's leaderboard
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user