diff --git a/kdb-bot/src/bot/translation/de.json b/kdb-bot/src/bot/translation/de.json index 2c88a59e9b..018090966a 100644 --- a/kdb-bot/src/bot/translation/de.json +++ b/kdb-bot/src/bot/translation/de.json @@ -177,9 +177,15 @@ "footer": "" }, "get": { - "atr_not_found": "Das Attribut {} konnte nicht gefunden werden :(", "xp": "{} hat {} xp", "ontime": "{} war insgesamt {} Stunden aktiv in einem Sprachkanal" + }, + "set": { + "xp": "{} hat nun {} xp" + }, + "error": { + "atr_not_found": "Das Attribut {} konnte nicht gefunden werden :(", + "value_type": "Der angegebende Wert konnte nicht für das Attribut interpretiert werden :(" } } }, diff --git a/kdb-bot/src/modules/base/command/user_group.py b/kdb-bot/src/modules/base/command/user_group.py index f9cc5b7764..ae0ad32f82 100644 --- a/kdb-bot/src/modules/base/command/user_group.py +++ b/kdb-bot/src/modules/base/command/user_group.py @@ -154,7 +154,7 @@ class UserGroup(DiscordCommandABC): ) case other: - await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.base.user.get.atr_not_found').format(atr)) + await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.base.user.error.atr_not_found').format(atr)) return await self._message_service.send_interaction_msg( @@ -173,10 +173,6 @@ class UserGroup(DiscordCommandABC): async def set(self, ctx: Contex, atr: str, value: str, member: discord.Member = None): self._logger.debug(__name__, f'Received command user-set {ctx}:{member}') - if value == '': - await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.base.user.set.error.no_value')) - return - if member is None or not isinstance(member, discord.Member): member = ctx.author @@ -189,17 +185,14 @@ class UserGroup(DiscordCommandABC): user.xp = int(value) except Exception as e: await self._logger.trace(__name__, f'Value couldn\'t be converted to int\n'+e) - # ToDo: Add text for this exception await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform('modules.base.user.error.value_type')) return case other: - # ToDo: Move atr_not_found await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform( 'modules.base.user.error.atr_not_found').format(atr)) return - # ToDo: Add text for set await self._message_service.send_interaction_msg( ctx.interaction, self._t.transform(f'modules.base.user.set.{atr}').format(member.mention, value)