@mcpedb/query
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

libquery

libquery is a NodeJS library for queries on different game servers

Installation

npm i @mcpedb/query

Usage

// Promises
const query = require("@mcpedb/query");

query("play.symp.fr", 19132).then((data) => {
	console.log("The server is in " + data.version);
}).catch((err) => {
	console.log("An error occured!\n " + err.message);
});

// Async
try{
    let data = await query("play.symp.fr", 19132);
    console.log("The server is in " + data.version);
}catch(err){
    console.log("An error occured!\n " + err.message);
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Package Sidebar

Install

npm i @mcpedb/query

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

15.3 kB

Total Files

9

Last publish

Collaborators

  • mzztin