This commit is contained in:
Sven Heidemann 2023-01-04 17:05:32 +01:00
parent 986d7c4562
commit 1337ef35dd

View File

@ -179,7 +179,7 @@ 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] return [app_commands.Choice(name=value, value=key) for key, value in self._atr_list]
@user.command() @user.command()
@commands.guild_only() @commands.guild_only()
@ -219,7 +219,7 @@ 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 = [('xp', self._atr_dict['xp'])]
return [app_commands.Choice(name=key, value=value) for key, value in atr_list] return [app_commands.Choice(name=value, value=key) for key, value in atr_list]
@user.command() @user.command()
@commands.guild_only() @commands.guild_only()