From 9c369b911a22139e4c0e6d0435dd2c325410f0af Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 28 Dec 2022 20:10:20 +0100 Subject: [PATCH] Fixed user group --- kdb-bot/src/modules/base/command/user_group.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kdb-bot/src/modules/base/command/user_group.py b/kdb-bot/src/modules/base/command/user_group.py index 626ce84a..66a9eeff 100644 --- a/kdb-bot/src/modules/base/command/user_group.py +++ b/kdb-bot/src/modules/base/command/user_group.py @@ -142,7 +142,7 @@ class UserGroup(DiscordCommandABC): @commands.guild_only() @CommandChecks.check_is_ready() async def get(self, ctx: Context, atr: str, member: discord.Member = None): - self._logger.debug(__name__, f'Received command user-get {ctx}:{member}') + self._logger.debug(__name__, f'Received command user-get {atr} {ctx}:{member}') is_mod = self._permissions.is_member_moderator(ctx.author) if member is not None and not is_mod: @@ -171,7 +171,7 @@ class UserGroup(DiscordCommandABC): await self._message_service.send_interaction_msg( ctx.interaction, - self._t.transform(f'modules.base.user.get.{atr}').format(member.mention, value) + self._t.transform(f'modules.base.user.get.{atr.lower()}').format(member.mention, value) ) @get.autocomplete('atr') @@ -184,7 +184,7 @@ class UserGroup(DiscordCommandABC): @CommandChecks.check_is_ready() @CommandChecks.check_is_member_moderator() 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}') + self._logger.debug(__name__, f'Received command user-set {atr} {ctx}:{member}') if member is None or not isinstance(member, discord.Member): member = ctx.author @@ -212,7 +212,7 @@ class UserGroup(DiscordCommandABC): 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(ctx.interaction,self._t.transform(f'modules.base.user.set.{atr}').format(member.mention, value)) + await self._message_service.send_interaction_msg(ctx.interaction, self._t.transform(f'modules.base.user.set.{atr.lower()}').format(member.mention, value)) @set.autocomplete('atr') async def set_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]: @@ -224,7 +224,7 @@ class UserGroup(DiscordCommandABC): @CommandChecks.check_is_ready() @CommandChecks.check_is_member_moderator() async def remove(self, ctx: Context, atr: str, member: discord.Member = None): - self._logger.debug(__name__, f'Received command user-remove {ctx}:{member}') + self._logger.debug(__name__, f'Received command user-remove {atr} {ctx}:{member}') if member is None or not isinstance(member, discord.Member): member = ctx.author @@ -248,7 +248,7 @@ class UserGroup(DiscordCommandABC): await self._message_service.send_interaction_msg( ctx.interaction, - self._t.transform(f'modules.base.user.remove.{atr}').format(atr, member.mention) + self._t.transform(f'modules.base.user.remove.{atr.lower()}').format(atr, member.mention) ) @remove.autocomplete('atr')