async def show_member_stats(self, ctx, member):
    lookup = ('🥇', '🥈', '🥉', '🏅', '🏅')
    embed = discord.Embed(title='Command Stats', colour=member.colour)
    embed.set_author(name=str(member), icon_url=member.avatar_url)
    query = 'SELECT COUNT(*), MIN(used) FROM commands WHERE guild_id=$1 AND author_id=$2;'
    count = (await ctx.db.fetchrow(query, ctx.guild.id, member.id))
    embed.description = f'{count[0]} commands used.'
    embed.set_footer(text='First command used').timestamp = (count[1] or datetime.datetime.utcnow())
    query = 'SELECT command,\n                          COUNT(*) as "uses"\n                   FROM commands\n                   WHERE guild_id=$1 AND author_id=$2\n                   GROUP BY command\n                   ORDER BY "uses" DESC\n                   LIMIT 5;\n                '
    records = (await ctx.db.fetch(query, ctx.guild.id, member.id))
    value = ('\n'.join((f'{lookup[index]}: {command} ({uses} uses)' for (index, (command, uses)) in enumerate(records))) or 'No Commands')
    embed.add_field(name='Most Used Commands', value=value, inline=False)
    query = 'SELECT command,\n                          COUNT(*) as "uses"\n                   FROM commands\n                   WHERE guild_id=$1\n                   AND author_id=$2\n                   AND used > (CURRENT_TIMESTAMP - INTERVAL \'1 day\')\n                   GROUP BY command\n                   ORDER BY "uses" DESC\n                   LIMIT 5;\n                '
    records = (await ctx.db.fetch(query, ctx.guild.id, member.id))
    value = ('\n'.join((f'{lookup[index]}: {command} ({uses} uses)' for (index, (command, uses)) in enumerate(records))) or 'No Commands')
    embed.add_field(name='Most Used Commands Today', value=value, inline=False)
    (await ctx.send(embed=embed))
async def show_member_stats(self, ctx, member):
    lookup = ('🥇', '🥈', '🥉', '🏅', '🏅')
    embed = discord.Embed(title='Command Stats', colour=member.colour)
    embed.set_author(name=str(member), icon_url=member.avatar_url)
    query = 'SELECT COUNT(*), MIN(used) FROM commands WHERE guild_id=$1 AND author_id=$2;'
    count = (await ctx.db.fetchrow(query, ctx.guild.id, member.id))
    embed.description = f'{count[0]} commands used.'
    embed.set_footer(text='First command used').timestamp = (count[1] or datetime.datetime.utcnow())
    query = 'SELECT command,\n                          COUNT(*) as "uses"\n                   FROM commands\n                   WHERE guild_id=$1 AND author_id=$2\n                   GROUP BY command\n                   ORDER BY "uses" DESC\n                   LIMIT 5;\n                '
    records = (await ctx.db.fetch(query, ctx.guild.id, member.id))
    value = ('\n'.join((f'{lookup[index]}: {command} ({uses} uses)' for (index, (command, uses)) in enumerate(records))) or 'No Commands')
    embed.add_field(name='Most Used Commands', value=value, inline=False)
    query = 'SELECT command,\n                          COUNT(*) as "uses"\n                   FROM commands\n                   WHERE guild_id=$1\n                   AND author_id=$2\n                   AND used > (CURRENT_TIMESTAMP - INTERVAL \'1 day\')\n                   GROUP BY command\n                   ORDER BY "uses" DESC\n                   LIMIT 5;\n                '
    records = (await ctx.db.fetch(query, ctx.guild.id, member.id))
    value = ('\n'.join((f'{lookup[index]}: {command} ({uses} uses)' for (index, (command, uses)) in enumerate(records))) or 'No Commands')
    embed.add_field(name='Most Used Commands Today', value=value, inline=False)
    (await ctx.send(embed=embed))