pterodactyl.ts
    Preparing search index...

    Class Server

    Implements

    • ServerAttributes
    Index

    Constructors

    Properties

    allocations?: Allocation[]
    description: string
    docker_image: string
    egg?: RawEgg
    egg_features: string[]
    feature_limits: { allocations: number; backups: number; databases: number }
    identifier: string
    internal_id: string | number
    invocation: string
    is_installing: boolean
    is_node_under_maintenance: boolean
    is_suspended: boolean
    is_transferring: boolean
    limits: {
        cpu: number;
        disk: number;
        io: number;
        memory: number;
        oom_disabled: boolean;
        swap: number;
        threads?: string | null;
    }
    name: string
    node: string
    server_owner: boolean
    sftp_details: { ip: string; port: number }
    status: null

    Use getStatus() or getUsage() instead, as the panel will always return null as status

    subusers?: SubUser[]
    uuid: string
    variables?: Variable[]

    Methods

    • Create a folder in a specific directory

      Parameters

      • dir: string
      • folderName: string

      Returns Promise<void>

    • Decompress a archive

      Parameters

      • dir: string
      • file: string | File

      Returns Promise<void>

    • Delete files in a specific directory

      Parameters

      • dir: string
      • files: (string | File)[]

      Returns Promise<void>

    • Rename files in a specific directory

      Parameters

      • dir: string
      • files: { from: string | File; to: string }[]

      Returns Promise<void>

    • Send a console command to this server

      Parameters

      • command: string

      Returns Promise<void>

    • Set the description for this server

      Parameters

      • description: string

      Returns Promise<void>

    • Set the docker image for this server

      Parameters

      • image: string

      Returns Promise<void>

    • Set the name for this server

      Parameters

      • name: string

      Returns Promise<void>

    • Upload a file

      Parameters

      • dir: string = '/'
      • file: string | Blob | Buffer<ArrayBufferLike>
      • filename: string

      Returns Promise<void>

      A buffer, blob or the path to the file