0.3 #146

Merged
edraft merged 359 commits from 0.3 into master 2023-01-12 07:04:40 +01:00
Showing only changes of commit 95e33109fe - Show all commits

View File

@ -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'))