add typing to denote operation in leaderboard commands
@@ -1041,6 +1041,7 @@ class Econ(commands.Cog):
@leaderboards.command(name='emeralds', aliases=['ems'])
async def leaderboard_emeralds(self, ctx):
+ with ctx.typing():
emeralds = sorted((await self.db.mass_fetch_balances()), key=(lambda tup: tup[1]), reverse=True)
lb_global = await self.leaderboard_logic(emeralds, ctx.author.id, '\n`{0}.` **{0}**{1} {0}'.format('{}', self.d.emojis.emerald))
@@ -1056,6 +1057,7 @@ class Econ(commands.Cog):
@leaderboards.command(name='pillages', aliases=['pil', 'stolen'])
async def leaderboard_pillages(self, ctx):
+ with ctx.typing():
pillages = sorted((await self.db.mass_fetch_leaderboard('pillages')), key=(lambda tup: tup[1]), reverse=True)
lb_global = await self.leaderboard_logic(pillages, ctx.author.id, '\n`{0}.` **{0}**{1} {0}'.format('{}', self.d.emojis.emerald))
@@ -1071,6 +1073,7 @@ class Econ(commands.Cog):
@leaderboards.command(name='mobkills', aliases=['kil', 'kills', 'kill', 'bonk'])
async def leaderboard_mobkills(self, ctx):
+ with ctx.typing():
kills = sorted((await self.db.mass_fetch_leaderboard('mobs_killed')), key=(lambda tup: tup[1]), reverse=True)
lb_global = await self.leaderboard_logic(kills, ctx.author.id, '\n`{0}.` **{0}**{1} {0}'.format('{}', self.d.emojis.stevegun))
@@ -1086,6 +1089,7 @@ class Econ(commands.Cog):
@leaderboards.command(name='bees', aliases=['jarofbees', 'jarsofbees'])
async def leaderboard_bees(self, ctx):
+ with ctx.typing():
bees = [(r['uid'], r['amount']) for r in await self.db.mass_fetch_item('Jar Of Bees')]
bees = sorted(bees, key=(lambda tup: tup[1]), reverse=True)
@@ -1102,6 +1106,7 @@ class Econ(commands.Cog):
@leaderboards.command(name='commands', aliases=['cmds'])
async def leaderboard_commands(self, ctx):
+ with ctx.typing():
cmds = sorted(self.d.cmd_lb.items(), key=(lambda tup: tup[1]), reverse=True)
lb_global = await self.leaderboard_logic(cmds, ctx.author.id, '\n`{0}.` **{0}**{1} {0}'.format('{}', ':keyboard:'))
@@ -1117,6 +1122,7 @@ class Econ(commands.Cog):
@leaderboards.command(name='votes', aliases=['votestreaks', 'votestreak'])
async def leaderboard_votes(self, ctx):
+ with ctx.typing():
vote_streaks = sorted(await self.db.mass_fetch_votestreaks(), key=(lambda tup: tup[1]), reverse=True)
lb_global = await self.leaderboard_logic(vote_streaks, ctx.author.id, '\n`{0}.` **{0}**{1} {0}'.format('{}', self.d.emojis.updoot))
