Adding Servers
You can add servers to interact with via your application by following the documentation on this page.
Example Code
import { RCEManager, RCEIntent } from "rce.js";
const rce = new RCEManager();
const success = await rce.addServer({
identifier: "my-solo-duo-trio-3x",
rcon: {
host: "127.0.0.1",
port: 1234,
password: "testing123"
},
state: ["trio", "3x"],
intents: [RCEIntent.ServerInfo, RCEIntent.PlayerList],
intentTimers: {
[RCEIntent.ServerInfo]: 30_000,
[RCEIntent.PlayerList]: 45_000
},
reconnection: {
enabled: true,
interval: 10_000, // 10 seconds
maxAttempts: -1 // unlimited
},
});const { default: RCEManager, RCEIntent } = require("rce.js");
const rce = new RCEManager();
const success = await rce.addServer({
identifier: "my-solo-duo-trio-3x",
rcon: {
host: "127.0.0.1",
port: 1234,
password: "testing123"
},
state: ["trio", "3x"],
intents: [RCEIntent.ServerInfo, RCEIntent.PlayerList],
intentTimers: {
[RCEIntent.ServerInfo]: 30_000,
[RCEIntent.PlayerList]: 45_000
},
reconnection: {
enabled: true,
interval: 10_000, // 10 seconds
maxAttempts: -1 // unlimited
},
});Server Options
Below is a brief explanation of each option when defining new server(s).
Last updated