yarn add hll-rcon
...
npm i hll-rconconst { RCONClient } = require("hll-rcon");
const client = new RCONClient({
host: "123.123.123.123",
port: "7799",
password: "RCON_PASSWORD"
});
client.on("ready", async () => {
const serverName = await client.server.getServerName();
console.log(`Logged in to server: ${serverName}`);
});