Skip to main content

Server Manager

The server manager is used for manipulating and retrieving server configurations exposed through the RCON API.


Set Team Switch Cooldown​

danger

This command will always return a 400 error, even if it was successful.

await RCONClientV2.server.setTeamSwitchCooldown(cooldown);

Parameters​

NameDescriptionTypeRequired
cooldownThe cooldown in minutes.numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Set Max Queued Players​

await RCONClientV2.server.setMaxQueuedPlayers(count);

Parameters​

NameDescriptionTypeRequired
countThe queue size. 1-6numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Get Max Queued Players​

await RCONClientV2.server.getMaxQueuedPlayers();

Returns​

Promise<{ success: boolean, error?: string, maxQueueCount?: number }>


Set Idle Kick Cooldown​

danger

This works until you try and disable the cooldown by providing 0. This is how its disabled in the RCONv1 api, but throws a server error in RCONv2. Using the RCONv1 equivalent of this command is recommended.

await RCONClientV2.server.setIdleKickCooldown(cooldown);

Parameters​

NameDescriptionTypeRequired
cooldownThe cooldown.numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Set High Ping Threshold​

danger

This works until you try and disable the threshold by providing 0. This is how its disabled in the RCONv1 api, but throws a server error in RCONv2. Using the RCONv1 equivalent of this command is recommended.

await RCONClientV2.server.setPingThreshold(time);

Parameters​

NameDescriptionTypeRequired
timeThe ping in MS.numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Get Slots​

await RCONClientV2.server.getSlots();

Returns​

Promise<{ success: boolean, error?: string, current: number, maxiumum: number }>


Get Server Name​

await RCONClientV2.server.getServerName();

Returns​

Promise<{ success: boolean, error?: string, name?: string }>


Set Welcome Message​

await RCONClientV2.server.setWelcomeMessage(message);

Parameters​

NameDescriptionTypeRequired
messageThe message to set.stringTrue

Returns​

Promise<{ success: boolean, error?: string>


Set Auto Balancing Enabled​

await RCONClientV2.server.setAutoBalanceEnabled(enable);

Parameters​

NameDescriptionTypeRequired
enableWhether or not to enable the feature.booleanTrue

Returns​

Promise<{ success: boolean, error?: string>


Set Auto Balancing Threshold​

await RCONClientV2.server.setAutoBalanceThreshold(difference);

Parameters​

NameDescriptionTypeRequired
differenceThe difference in player count for auto balancing to be invoked.numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Set Vote Kicks Enabled​

await RCONClientV2.server.setVoteKicksEnabled(enable);

Parameters​

NameDescriptionTypeRequired
enableWhether or not to enable vote kicks.booleanTrue

Returns​

Promise<{ success: boolean, error?: string }>


Set Vote Kick Thresholds​

await RCONClientV2.server.setVoteKickThresholds(thresholds);

Example​

// If there are 0-19 players in the server, vote kicks require 5 votes.
// If there are 20-49 players on the server, vote kicks require 10 votes.
// If there are 50+ players on the server, vote kicks require 25 votes.
await RCONClientV2.server.setVoteKickThresholds([[0, 5], [20, 10], [50, 25]]);

Parameters​

NameDescriptionTypeRequired
thresholdsThe vote kick thresholds.Array<Array<number>>True

Returns​

Promise<{ success: boolean, error?: string }>


Reset Vote Kick Thresholds​

warning

Using this command to manipulate vote kick thresholds is not recommended. It sets the threshold to an empty string with a space, I am unable to verify what this actually reflects to on the server. If you need to update the vote kick thresholds, use the before mentioned setVoteKickThresholds method.

await RCONClientV2.server.resetVoteKickThresholds();

Returns​

Promise<{ success: boolean, error?: string }>


Get Server Configuration​

await RCONClientV2.server.getConfiguration();

Returns​

Promise<{
success: boolean,
error?: string,
config?: {
serverName: string,
buildNumber: string,
buildRevision: string,
supportedPlatforms: Array<string>,
passwordProtected: boolean
}
}>

List Profanities​

await RCONClientV2.server.listProfanities();

Returns​

Promise<{ success: boolean, error?: string, bannedWords?: Array<string> }>


Add Profanities​

await RCONClientV2.server.addProfanities(profanities);

Parameters​

NameDescriptionTypeRequired
profanitiesThe words or phrases you want to ban.Array<string>True

Returns​

Promise<{ success: boolean, error?: string }>


Remove Profanities​

await RCONClientV2.server.removeProfanities(profanities);

Parameters​

NameDescriptionTypeRequired
profanitiesThe words or phrases you want to unban.Array<string>True

Returns​

Promise<{ success: boolean, error?: string }>


Set Match Timer Length​

note

gamemode Is not case sensitive.

info

Valid durations for gamemodes:
Warfare: [30, 180]
Offensive: [10, 60]
Skirmish: [10, 60]

await RCONClientV2.server.setMatchLength(gameMode, duration);

Parameters​

NameDescriptionTypeRequired
gamemodeThe gamemode to set the timer length for. Can be Warfare, Offensive, or Skirmish.stringTrue
durationThe time in minutes to set the duration for.numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Reset Match Timer Length​

note

gamemode Is not case sensitive.

await RCONClientV2.server.resetMatchLength(gameMode);

Parameters​

NameDescriptionTypeRequired
gamemodeThe gamemode to set the timer length for. Can be Warfare, Offensive, or Skirmish.stringTrue

Returns​

Promise<{ success: boolean, error?: string }>


Set Match Warmup Timer Length​

note

gamemode Is not case sensitive.

info

duration Must be between 1 and 10.

await RCONClientV2.server.setWarmupLength(gameMode, duration);

Parameters​

NameDescriptionTypeRequired
gamemodeThe gamemode to set the warmup timer length for. Can be Warfare, Offensive, or Skirmish.stringTrue
durationThe time in minutes to set the duration for.numberTrue

Returns​

Promise<{ success: boolean, error?: string }>


Reset Match Timer Length​

note

gamemode Is not case sensitive.

await RCONClientV2.server.resetWarmupLength(gameMode);

Parameters​

NameDescriptionTypeRequired
gamemodeThe gamemode to set the warmup timer length for. Can be Warfare, Offensive, or Skirmish.stringTrue

Returns​

Promise<{ success: boolean, error?: string }>