import discord class Extension: core = None def __init__(self, core): self.core = core @core.tree.command(name = "profile", description = "Проверить профиль") @discord.app_commands.describe(profile=core.ANY_INPUT) async def check_profile( interaction: discord.Interaction, profile: str = "" ): await interaction.response.defer(thinking=True) player = await self.__call__(profile, interaction.user) return await interaction.followup.send(embed=player.embed, ephemeral=False) async def __call__(self, profile:str, discord_user: discord.Member): steam64 = await self.core.GetSteam64OfDiscord(discord_user) player = await self.core.GetPlayer(profile, steam64) if profile else await self.core.GetPlayer(steam64, steam64) return player