Utils

Utils methods

Resource Usages

See the resources being used by your server

const ptero = require('lmadactyl')
let result = await ptero.client.utils.resourceUsage("https://yourpanel.com", "apikey", "serverId")
console.log(result) //Object

Server Console Command.

Run a command in the console

const ptero = require('lmadactyl')
let result = await ptero.client.utils.sendConsoleCommand("https://yourpanel.com", "apikey", "serverId", "help", true)
console.log(result) //If an error occurs when displaying the console information, it will return 204 (No content)

View logs

See your console.

const ptero = require('lmadactyl')
let result = await ptero.client.utils.logs("https://yourpanel.com", "apikey", "serverId", true)
console.log(result) //If an error occurs when displaying the console information, it will return 204 (No content)

Do not set a high time as it can slow down your computer and increase the resource usage of the machine you are using.

Send signal

Send signal to server

const ptero = require('lmadactyl')
let result = await ptero.client.utils.sendSignal("https://yourpanel.com", "apikey", "serverId", "start")
console.log(result) //204

Server List

Lists all servers that are registered in the user's account

const ptero = require('lmadactyl')
let result = await ptero.client.utils.serverList("https://yourpanel.com", "apikey")
console.log(result)

Last updated