Skip to content
oof2win2 edited this page May 3, 2021 · 1 revision

Classes

rconInterface

Typedefs

RCONOutput : Object

rconInterface

Kind: global class

new rconInterface(rconConfig, pw)

RCON interface for servers

Param Type Description
rconConfig Array.<Object> Array of RCON configs
rconConfig.rconport number Port of RCON
rconConfig.server Object Server object from ../servers.js
pw string RCON password - Same for all servers

rconInterface.rconCommand(command, serverIdentifier) ⇒ Promise.<RCONOutput>

Send a RCON command to a Factorio server

Kind: instance method of rconInterface
Returns: Promise.<RCONOutput> - RCON output or error. Can be "Server couldn't be found" if no server was found

Param Type Description
command string Command to send to the server. Automatically prefixed with /
serverIdentifier discord.Snowflake | String Identifier for server. Either server's Discord channel ID, Discord name or debug name

rconInterface.rconCommandAll(command) ⇒ Promise.<Array.<RCONOutput>>

Send a RCON command to all Factorio servers

Kind: instance method of rconInterface
Returns: Promise.<Array.<RCONOutput>> - RCON output of all servers

Param Type Description
command string Command to send to the servers. Automatically prefixed with /

rconInterface.rconCommandAllExclude(command, exclusionServerIdentifiers) ⇒ Promise.<Array.<RCONOutput>>

Send a RCON command to all Factorio servers except the one you specify

Kind: instance method of rconInterface
Returns: Promise.<Array.<RCONOutput>> - RCON output of servers

Param Type Description
command string Command to send to the servers. Automatically prefixed with /
exclusionServerIdentifiers Array.<discord.Snowflake> | Array.<String> Identifier of server to exclude

RCONOutput : Object

Kind: global typedef
Properties

Name Type Description
resp String | Error RCON output or error
server Object Server