Update sdk/js/server/query
parent
738d19ce51
commit
e50a85c6ba
@ -6,7 +6,7 @@ import { CachedJavaMinecraftServer, CachedBedrockMinecraftServer } from "restful
|
||||
import { getMinecraftServer } from "restfulmc-lib";
|
||||
|
||||
try {
|
||||
const server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer = await getMinecraftServer("java / bedrock", "hypixel.net");
|
||||
const server: CachedJavaMinecraftServer | CachedBedrockMinecraftServer = await getMinecraftServer(Platform.JAVA / Platform.BEDROCK, "hypixel.net");
|
||||
console.log(`Pinged ${server.ip}:${server.port}, there are ${server.players.online}/${server.players.max} players online`);
|
||||
} catch (err) {
|
||||
if ((err as ErrorResponse).code == 404) {
|
||||
|
Loading…
Reference in New Issue
Block a user