support into master #371

Merged
edraft merged 46 commits from support into master 2023-09-27 20:46:54 +02:00
Showing only changes of commit 4cc094576d - Show all commits

View File

@ -99,6 +99,15 @@ class SyncXpGroup(DiscordCommandABC):
await self._message_service.send_ctx_msg(ctx, self._t.transform("modules.technician.synced_message"))
self._logger.trace(__name__, f"Finished sync xp command")
@all_members.autocomplete("server_id")
async def list_autocomplete(self, interaction: discord.Interaction, current: str) -> list[app_commands.Choice]:
return [
app_commands.Choice(name=server.name, value=server.id)
for server in self._client_utils.get_auto_complete_list(
self._servers.get_servers(), current, lambda x: x.name
)
]
@sync_xp.command(name="by_member")
@commands.guild_only()
@CommandChecks.check_is_ready()
@ -137,7 +146,7 @@ class SyncXpGroup(DiscordCommandABC):
await self._message_service.send_ctx_msg(ctx, self._t.transform("modules.technician.synced_message"))
self._logger.trace(__name__, f"Finished sync xp command")
@sync_xp.autocomplete("server_id")
@by_member.autocomplete("server_id")
async def list_autocomplete(self, interaction: discord.Interaction, current: str) -> list[app_commands.Choice]:
return [
app_commands.Choice(name=server.name, value=server.id)