Removed old code #46
This commit is contained in:
parent
5dca2e5fed
commit
95e33109fe
@ -95,17 +95,6 @@ class StatsGroup(DiscordCommandABC):
|
||||
statistic = self._stats.where(lambda s: s.name == name).single()
|
||||
result = await self._statistic.execute(statistic.func, server)
|
||||
|
||||
# headers = ''
|
||||
# rows = ''
|
||||
# for header in result.header:
|
||||
# headers += f'\n{header}'
|
||||
#
|
||||
# for row in result.values:
|
||||
# row_str = ''
|
||||
# for column in row:
|
||||
# row_str += f'\n{column}'
|
||||
# rows += f'\n{row_str}'
|
||||
|
||||
embed = discord.Embed(
|
||||
title=statistic.name,
|
||||
description=statistic.description,
|
||||
@ -119,9 +108,7 @@ class StatsGroup(DiscordCommandABC):
|
||||
value += f'\n{row[i]}'
|
||||
embed.add_field(name=header, value=value, inline=True)
|
||||
|
||||
# embed.add_field(name=self._t.transform('modules.auto_role.list.message_id'), value=rows, inline=True)
|
||||
await self._message_service.send_ctx_msg(ctx, embed, wait_before_delete=wait)
|
||||
# await self._message_service.send_ctx_msg(ctx, name, wait_before_delete=wait)
|
||||
except Exception as e:
|
||||
self._logger.error(__name__, f'Cannot view statistic {name}', e)
|
||||
await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.stats.view.failed'))
|
||||
|
Loading…
Reference in New Issue
Block a user