0.3 #146
@ -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 :("
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -158,7 +158,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(
|
||||
@ -178,10 +178,6 @@ class UserGroup(DiscordCommandABC):
|
||||
async def set(self, ctx: Context, 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
|
||||
|
||||
@ -196,17 +192,14 @@ class UserGroup(DiscordCommandABC):
|
||||
self._db.save_changes()
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user