UNPKG

minecraftstatuspinger

Version:

A modern library for pinging Minecraft servers and getting their status and playerlist, written in TypeScript with zero dependencies.

39 lines 1.04 kB
import { ServerStatusOptions, ServerStatus } from "./types.ts"; /** * Looks up the server. * @example * Here's a simple example: * ``` * let result = await mc.lookup({ * host: "mc.hypixel.net" * port: 25565, * timeout: 10000, * ping: true, * protocolVersion: 769 * throwOnParseError: false, * SRVLookup: true, * JSONParse: true * }) * ``` */ export declare function lookup(options?: ServerStatusOptions): Promise<ServerStatus>; /** * Used for changing the default DNS servers. * @example * ``` // Recommended servers mc.setDnsServers(["9.9.9.9", "1.1.1.1", "8.8.8.8"]) // (Quad9, Cloudflare, Google) // Note: Cloudflare is typically the fastest for DNS queries. ``` */ export declare function setDnsServers(serverArray: Array<string>): Promise<boolean>; /** * The default export, containing setDnsServers and lookup */ declare const _default: { setDnsServers: typeof setDnsServers; lookup: typeof lookup; }; export default _default; //# sourceMappingURL=index.d.ts.map