@commands.group(invoke_without_command=True)
@commands.guild_only()
@commands.cooldown(1, 30.0, type=commands.BucketType.member)
async def stats(self, ctx, *, member: discord.Member=None):
    'Tells you command usage stats for the server or a member.'
    async with ctx.typing():
        if (member is None):
            (await self.show_guild_stats(ctx))
        else:
            (await self.show_member_stats(ctx, member))
Tells you command usage stats for the server or a member.
@commands.group(invoke_without_command=True)
@commands.guild_only()
@commands.cooldown(1, 30.0, type=commands.BucketType.member)
async def stats(self, ctx, *, member: discord.Member=None):
    
    async with ctx.typing():
        if (member is None):
            (await self.show_guild_stats(ctx))
        else:
            (await self.show_member_stats(ctx, member))