import discord class Extension: core = None def __init__(self, core): self.core = core @core.tree.command(name = "unban", description = "Разбанить игрока") @discord.app_commands.describe(profile=core.ANY_INPUT) async def unban_player( interaction: discord.Interaction, profile: str ): await interaction.response.defer(thinking=True) await interaction.followup.send(f'{await self.__call__(profile, interaction.user)}', ephemeral=False) try: await self.core.loaded_extensions["ban_roles"].updater() except: print("Cannot update ban roles on main server") async def __call__(self, profile, discord_user): steam64 = await self.core.GetSteam64OfDiscord(discord_user) player = await self.core.GetPlayer(profile, steam64, False) return await player.unban()