diff --git a/bot/modules/economy/cointop_cmd.py b/bot/modules/economy/cointop_cmd.py index a7d220c4..fbf45c71 100644 --- a/bot/modules/economy/cointop_cmd.py +++ b/bot/modules/economy/cointop_cmd.py @@ -46,7 +46,7 @@ async def cmd_topcoin(ctx): guildid=ctx.guild.id, userid=data.NOT([m.id for m in ctx.guild_settings.unranked_roles.members]), select_columns=('userid', 'coins'), - _extra="ORDER BY coins DESC " + ("LIMIT 100" if top100 else "") + _extra="AND coins > 0 ORDER BY coins DESC " + ("LIMIT 100" if top100 else "") ) # Quit early if the leaderboard is empty diff --git a/bot/modules/study/top_cmd.py b/bot/modules/study/top_cmd.py index 6fc138e2..bea0cca7 100644 --- a/bot/modules/study/top_cmd.py +++ b/bot/modules/study/top_cmd.py @@ -46,7 +46,7 @@ async def cmd_top(ctx): guildid=ctx.guild.id, userid=data.NOT([m.id for m in ctx.guild_settings.unranked_roles.members]), select_columns=('userid', 'tracked_time'), - _extra="ORDER BY tracked_time DESC " + ("LIMIT 100" if top100 else "") + _extra="AND tracked_time > 0 ORDER BY tracked_time DESC " + ("LIMIT 100" if top100 else "") ) # Quit early if the leaderboard is empty