UNPKG

pterodactyl-manager

Version:

A powerful and easy-to-use API wrapper for Pterodactyl's API, providing a seamless integration of server management and user administration functionalities.

7 lines (5 loc) 294 B
const getServers = require('./getServers'); module.exports = async function getServer(url, headers, query) { const servers = await getServers(url, headers) return isNaN(query) ? servers.data.find((x) => x.attributes?.name == query) : servers.data.find((x) => x.attributes.id == query); };