From e9c6e57c9818b8920b5b1636364c573023d7da30 Mon Sep 17 00:00:00 2001 From: raatty Date: Fri, 15 Jun 2018 20:12:37 +1200 Subject: [PATCH] listing other peoples claims --- src/cogs/bot_management.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cogs/bot_management.py b/src/cogs/bot_management.py index 50a7532..8fdea45 100644 --- a/src/cogs/bot_management.py +++ b/src/cogs/bot_management.py @@ -93,10 +93,12 @@ class BotManager: @commands.command(name='listclaims', aliases=['claimed', 'mybots']) @commands.cooldown(1, 5, commands.BucketType.user) - async def _claimed_bots(self, ctx): - bots = await self.bot.db_con.fetch('select * from bots where owner = $1', ctx.author.id) + async def _claimed_bots(self, ctx, usr: discord.Member=None): + if usr is None: + usr = ctx.author + bots = await self.bot.db_con.fetch('select * from bots where owner = $1', usr.id) if bots: - em = discord.Embed(title='You have claimed the following bots:', + em = discord.Embed(title='{usr.display_name} has claimed the following bots:', colour=self.bot.embed_color) for bot in bots: member = ctx.guild.get_member(int(bot['id']))