0.3 - Statistiken (#46) #102

Merged
edraft merged 28 commits from #46 into 0.3 2022-11-09 20:55:06 +01:00
Showing only changes of commit 82365a24ba - Show all commits

View File

@ -84,17 +84,22 @@ class StatsGroup(DiscordCommandABC):
descriptions += f'\n{statistic.description}'
embed.add_field(name=self._t.transform('modules.stats.list.statistic'), value=statistics, inline=True)
embed.add_field(name=self._t.transform('modules.stats.list.description'), value=statistics, inline=True)
embed.add_field(name=self._t.transform('modules.stats.list.description'), value=descriptions, inline=True)
edraft marked this conversation as resolved Outdated

Hier wurde zwei mal value=statisticsangegeben

embed.add_field(name=self._t.transform('modules.stats.list.statistic'), value=statistics, inline=True)
embed.add_field(name=self._t.transform('modules.stats.list.description'), value=statistics, inline=True)

statt

embed.add_field(name=self._t.transform('modules.stats.list.statistic'), value=statistics, inline=True)
embed.add_field(name=self._t.transform('modules.stats.list.description'), value=descriptions, inline=True)
Hier wurde zwei mal ```value=statistics```angegeben ```python embed.add_field(name=self._t.transform('modules.stats.list.statistic'), value=statistics, inline=True) embed.add_field(name=self._t.transform('modules.stats.list.description'), value=statistics, inline=True) ``` statt ```python embed.add_field(name=self._t.transform('modules.stats.list.statistic'), value=statistics, inline=True) embed.add_field(name=self._t.transform('modules.stats.list.description'), value=descriptions, inline=True) ```
await self._message_service.send_ctx_msg(ctx, embed, wait_before_delete=wait)
self._logger.trace(__name__, f'Finished command stats list')
@stats.command()
@commands.guild_only()
async def view(self, ctx: Context, name: str, wait: int = None):
self._logger.debug(__name__, f'Received command stats {ctx}:{name}')
self._logger.debug(__name__, f'Received command stats view {ctx}:{name}')
if not await self._client_utils.check_if_bot_is_ready_yet_and_respond(ctx):
return
edraft marked this conversation as resolved
Review

Fehlt hier nicht noch ein Permission check?

if not self._permissions.is_member_moderator(ctx.author):
    await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
    self._logger.trace(__name__, f'Finished command stats list')
    return
Fehlt hier nicht noch ein Permission check? ```python if not self._permissions.is_member_moderator(ctx.author): await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message')) self._logger.trace(__name__, f'Finished command stats list') return ```
if not self._permissions.is_member_moderator(ctx.author):
await self._message_service.send_ctx_msg(ctx, self._t.transform('common.no_permission_message'))
self._logger.trace(__name__, f'Finished command stats view')
return
if ctx.guild is None:
return
@ -122,7 +127,7 @@ class StatsGroup(DiscordCommandABC):
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'))
self._logger.trace(__name__, f'Finished stats command')
self._logger.trace(__name__, f'Finished stats view command')
@view.autocomplete('name')
async def view_autocomplete(self, interaction: discord.Interaction, current: str) -> TList[app_commands.Choice[str]]: