forked from DistroByte/AwF-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
rcon
oof2win2 edited this page May 3, 2021
·
1 revision
-
RCONOutput :
Object
Kind: global class
-
rconInterface
- new rconInterface(rconConfig, pw)
-
.rconCommand(command, serverIdentifier) ⇒
Promise.<RCONOutput> -
.rconCommandAll(command) ⇒
Promise.<Array.<RCONOutput>> -
.rconCommandAllExclude(command, exclusionServerIdentifiers) ⇒
Promise.<Array.<RCONOutput>>
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 |
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 |
Kind: global typedef
Properties
| Name | Type | Description |
|---|---|---|
| resp |
String | Error
|
RCON output or error |
| server | Object |
Server |