0.3 #146

Merged
edraft merged 359 commits from 0.3 into master 2023-01-12 07:04:40 +01:00
Showing only changes of commit 9c369b911a - Show all commits

View File

@ -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')