Compare commits
No commits in common. "47415af8683bfc5c36533e2865cbd01a8b99dac5" and "6353c7ca866ddfa769ac8ad1246d3c7448f3eceb" have entirely different histories.
47415af868
...
6353c7ca86
@ -67,8 +67,6 @@ class UserGroup(DiscordCommandABC):
|
|||||||
'ontime': self._t.transform('modules.base.user.atr.ontime')
|
'ontime': self._t.transform('modules.base.user.atr.ontime')
|
||||||
}
|
}
|
||||||
|
|
||||||
self._atr_list = [(key, self._atr_dict[key]) for key in self._atr_dict]
|
|
||||||
|
|
||||||
@commands.hybrid_group()
|
@commands.hybrid_group()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def user(self, ctx: Context):
|
async def user(self, ctx: Context):
|
||||||
@ -179,7 +177,8 @@ class UserGroup(DiscordCommandABC):
|
|||||||
|
|
||||||
@get.autocomplete('atr')
|
@get.autocomplete('atr')
|
||||||
async def get_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:
|
async def get_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:
|
||||||
return [app_commands.Choice(name=key, value=value) for key, value in self._atr_list]
|
atr_list = [self._atr_dict["xp"], self._atr_dict["ontime"]]
|
||||||
|
return [app_commands.Choice(name=atr, value=atr) for atr in atr_list]
|
||||||
|
|
||||||
@user.command()
|
@user.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@ -218,8 +217,8 @@ class UserGroup(DiscordCommandABC):
|
|||||||
|
|
||||||
@set.autocomplete('atr')
|
@set.autocomplete('atr')
|
||||||
async def set_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:
|
async def set_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:
|
||||||
atr_list = [('xp', self._atr_dict['xp'])]
|
atr_list = [self._atr_dict["xp"]]
|
||||||
return [app_commands.Choice(name=key, value=value) for key, value in atr_list]
|
return [app_commands.Choice(name=atr, value=atr) for atr in atr_list]
|
||||||
|
|
||||||
@user.command()
|
@user.command()
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
@ -255,4 +254,5 @@ class UserGroup(DiscordCommandABC):
|
|||||||
|
|
||||||
@remove.autocomplete('atr')
|
@remove.autocomplete('atr')
|
||||||
async def remove_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:
|
async def remove_autocomplete(self, interaction: discord.Interaction, current: str) -> List[app_commands.Choice[str]]:
|
||||||
return [app_commands.Choice(name=value, value=key) for key, value in self._atr_list]
|
atr_list = [self._atr_dict["xp"], self._atr_dict["ontime"]]
|
||||||
|
return [app_commands.Choice(name=atr, value=atr) for atr in atr_list]
|
||||||
|
Loading…
Reference in New Issue
Block a user