You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

17 lines
774 B

import discord
class Extension:
def __init__(self, core):
@core.tree.command(name = "use", description = "Использовать команду на игрока")
@discord.app_commands.checks.has_role("Администратор")
@discord.app_commands.describe(command="Команда исполнения", profile=core.ANY_INPUT, args="Аргумент если нужен")
async def rcon_use_command(
interaction: discord.Interaction,
command: str,
profile: str,
args: str = ""
):
await interaction.response.defer(thinking=True)
steam64 = await core.GetSteam64OfDiscord(interaction.user)
player = await core.GetPlayer(profile, steam64)
return await interaction.followup.send(f'{await player.rcon(command, args)}', ephemeral=False)