listing other peoples claims
This commit is contained in:
parent
c054e1ea30
commit
e9c6e57c98
@ -93,10 +93,12 @@ class BotManager:
|
|||||||
|
|
||||||
@commands.command(name='listclaims', aliases=['claimed', 'mybots'])
|
@commands.command(name='listclaims', aliases=['claimed', 'mybots'])
|
||||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||||
async def _claimed_bots(self, ctx):
|
async def _claimed_bots(self, ctx, usr: discord.Member=None):
|
||||||
bots = await self.bot.db_con.fetch('select * from bots where owner = $1', ctx.author.id)
|
if usr is None:
|
||||||
|
usr = ctx.author
|
||||||
|
bots = await self.bot.db_con.fetch('select * from bots where owner = $1', usr.id)
|
||||||
if bots:
|
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)
|
colour=self.bot.embed_color)
|
||||||
for bot in bots:
|
for bot in bots:
|
||||||
member = ctx.guild.get_member(int(bot['id']))
|
member = ctx.guild.get_member(int(bot['id']))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user