Renamed remove command #179
This commit is contained in:
parent
e481958bad
commit
5d3ceff3bf
@ -231,8 +231,8 @@ class UserGroup(DiscordCommandABC):
|
|||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@CommandChecks.check_is_ready()
|
@CommandChecks.check_is_ready()
|
||||||
@CommandChecks.check_is_member_moderator()
|
@CommandChecks.check_is_member_moderator()
|
||||||
async def remove(self, ctx: Context, atr: str, member: discord.Member = None):
|
async def reset(self, ctx: Context, atr: str, member: discord.Member = None):
|
||||||
self._logger.debug(__name__, f'Received command user-remove {atr} {ctx}:{member}')
|
self._logger.debug(__name__, f'Received command user-reset {atr} {ctx}:{member}')
|
||||||
|
|
||||||
if member is None or not isinstance(member, discord.Member):
|
if member is None or not isinstance(member, discord.Member):
|
||||||
member = ctx.author
|
member = ctx.author
|
||||||
@ -259,11 +259,11 @@ class UserGroup(DiscordCommandABC):
|
|||||||
|
|
||||||
await self._message_service.send_interaction_msg(
|
await self._message_service.send_interaction_msg(
|
||||||
ctx.interaction,
|
ctx.interaction,
|
||||||
self._t.transform(f'modules.base.user.remove.{atr.lower()}').format(atr, member.mention)
|
self._t.transform(f'modules.base.user.reset.{atr.lower()}').format(atr, member.mention)
|
||||||
)
|
)
|
||||||
|
|
||||||
@remove.autocomplete('atr')
|
@reset.autocomplete('atr')
|
||||||
async def remove_autocomplete(self, interaction: discord.Interaction, current: str) -> List[
|
async def reset_autocomplete(self, interaction: discord.Interaction, current: str) -> List[
|
||||||
app_commands.Choice[str]
|
app_commands.Choice[str]
|
||||||
]:
|
]:
|
||||||
return [app_commands.Choice(name=value, value=key) for key, value in self._atr_list]
|
return [app_commands.Choice(name=value, value=key) for key, value in self._atr_list]
|
||||||
|
Loading…
Reference in New Issue
Block a user