import discord

class Extension:
	def __init__(self, core):
		@core.tree.command(name = "report", description = "Пожаловать на игрока с сервера")
		@discord.app_commands.describe(profile=core.ANY_INPUT)
		async def report_player(
			interaction: discord.Interaction,
			profile: str,
			reason: str
		):
			await interaction.response.defer(thinking=True)
			steam64 = await core.GetSteam64OfDiscord(interaction.user)
			player = await core.GetPlayer(profile, steam64, False)
			return await interaction.followup.send(f'{await player.report(reason)}', ephemeral=False)