Skip to content

Multiplayer servers

List multiplayer servers, check the current connection, and switch servers from Flow Pro scripts.

Updated View as Markdown
For humans
Flow APIFlow Pro scriptingCommunity and Twitch

This article covers the following platforms

Use the Community API to list the available multiplayer servers, check the current connection, and switch servers.

get_servers()

Get the multiplayer servers available to the user.

SignatureTypeScript contract
get_servers(): unknown[]
ExampleJavaScript
const servers = this.$api.community.get_servers();
console.log(servers);

Returns

unknown[]Array of available multiplayer servers.

get_server()

Get the multiplayer server the user is currently connected to.

SignatureTypeScript contract
get_server(): string
ExampleJavaScript
const server = this.$api.community.get_server();
console.log(server);

Returns

stringName of the user’s current multiplayer server.

is_online()

Check whether the user is connected to a multiplayer server.

SignatureTypeScript contract
is_online(): boolean
ExampleJavaScript
const isOnline = this.$api.community.is_online();
console.log(isOnline);

Returns

booleanWhether the user is connected to the server.

set_server()

Connect the user to an available multiplayer server.

SignatureTypeScript contract
set_server(server_name: string): void

Parameters

NameTypeRequiredDescription
server_namestringYesServer to connect to. Use get_servers() to obtain an available name.
ExampleJavaScript
this.$api.community.set_server("USA East");

Returns

voidNo direct return value is documented.
Navigation

Type to search…

↑↓ navigate↵ selectEsc close