From a5ef2551e8c7521589d153ab5e5d540d20d68aa2 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 9 Nov 2022 19:50:57 +0100 Subject: [PATCH] Improved error translation #26 --- kdb-bot/src/bot/translation/de.json | 3 ++- kdb-bot/src/modules/level/command/level_group.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/kdb-bot/src/bot/translation/de.json b/kdb-bot/src/bot/translation/de.json index 0aa1395eec..4528139300 100644 --- a/kdb-bot/src/bot/translation/de.json +++ b/kdb-bot/src/bot/translation/de.json @@ -212,7 +212,8 @@ "set": { "already_level": "{} hat bereits das Level {} :/", "success": "{} ist nun Level {} :)", - "failed": "Das Level von {} konnte nicht auf {} gesetzt werden :(" + "failed": "Das Level von {} konnte nicht auf {} gesetzt werden :(", + "not_found": "Das Level {} konnte nicht gefunden werden :(" } }, "database": {}, diff --git a/kdb-bot/src/modules/level/command/level_group.py b/kdb-bot/src/modules/level/command/level_group.py index c024dbe37d..32ccb708a4 100644 --- a/kdb-bot/src/modules/level/command/level_group.py +++ b/kdb-bot/src/modules/level/command/level_group.py @@ -343,7 +343,7 @@ class LevelGroup(DiscordCommandABC): new_level = self._levels.get_levels_by_server_id(server.server_id).where(lambda l: l.name == level).single_or_default() if new_level is None: - await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.level.set.failed').format(member.name, level)) + await self._message_service.send_ctx_msg(ctx, self._t.transform('modules.level.set.not_found').format(level)) self._logger.trace(__name__, f'Finished command level set') return