import { getServer, ServerPlatform } from "mcutils-library"; /** * Checks if the server is valid. * * @param platform the server's platform * @param query the hostname for the server * @returns true if valid, false otherwise */ export async function isValidServer(platform: ServerPlatform, query: string): Promise { try { await getServer(platform, query); return true; } catch { return false; } }