@command_history.command(name='guild', aliases=['server'])
@commands.is_owner()
async def command_history_guild(self, ctx, guild_id: int):
    'Command history for a guild.'
    query = 'SELECT\n                        CASE failed\n                            WHEN TRUE THEN command || \' [!]\'\n                            ELSE command\n                        END AS "command",\n                        channel_id,\n                        author_id,\n                        used\n                   FROM commands\n                   WHERE guild_id=$1\n                   ORDER BY used DESC\n                   LIMIT 15;\n                '
    (await self.tabulate_query(ctx, query, guild_id))
Command history for a guild.
@command_history.command(name='guild', aliases=['server'])
@commands.is_owner()
async def command_history_guild(self, ctx, guild_id: int):
    
    query = 'SELECT\n                        CASE failed\n                            WHEN TRUE THEN command || \' [!]\'\n                            ELSE command\n                        END AS "command",\n                        channel_id,\n                        author_id,\n                        used\n                   FROM commands\n                   WHERE guild_id=$1\n                   ORDER BY used DESC\n                   LIMIT 15;\n                '
    (await self.tabulate_query(ctx, query, guild_id))