Global

Members


<constant> BanchoLobbyPlayerStates :Symbol

Contains the different player states for players in lobbies: Ready, Not Ready, No Map.
Alias for NotReady: "Not Ready"
Alias for NoMap: "No Map"

Type:
  • Symbol
Properties:
Name Type Default Description
Ready Symbol
NotReady Symbol
NoMap Symbol
Source:

<constant> BanchoLobbyTeamModes :number

The 4 different team modes in Bancho

Type:
  • number
Properties:
Name Type Default Description
HeadToHead number 0
TagCoop number 1
TeamVs number 2
TagTeamVs number 3
Source:

<constant> BanchoLobbyTeams

Contains the 2 different teams in a multiplayer lobby

Properties:
Name Type Default Description
Blue Blue
Red Red
Source:

<constant> BanchoLobbyWinConditions :number

The four different win conditions on Bancho

Type:
  • number
Properties:
Name Type Default Description
Score number 0
Accuracy number 1
Combo number 2
ScoreV2 number 3
Source:

<constant> ConnectStates :Symbol

Contains the different connect states: Disconnected, Connecting, Reconnecting, Connected.

Type:
  • Symbol
Properties:
Name Type Default Description
Disconnected Symbol

When we're purposely disconnected from Bancho or after an auth fail

Connecting Symbol

When we've opened the socket before any reconnection attempts and waiting for the Welcome packet

Reconnecting Symbol

When we've gotten disconnected, and are currently waiting before trying to reconnect

Connected Symbol

When we're online! \o/

Source:

Type Definitions


BanchoClientOptions

Options for a BanchoClient.

Type:
  • object
Properties:
Name Type Argument Default Description
username string

Username of the user to connect to Bancho

password string

IRC Password of the user to connect to Bancho (see https://osu.ppy.sh/p/irc)

host string <optional>
"irc.ppy.sh"

Custom IRC host (for proxy-ing through a firewall for example)

port number <optional>
6667

Custom IRC port

apiKey string <optional>

osu! API key for API requests (see https://osu.ppy.sh/p/api). WARNING: Multiplayer lobbies won't work without an API key!

rateLimiter RateLimiter <optional>

Instance of RateLimiter from the limiter npm module for outgoing Bancho messages. Default is safe for normal users in private messages (PM and #multiplayer channels), bots are not supposed to send public messages. Can be disabled by setting to null.

botAccount boolean <optional>
false

Apply bot account rate-limits to the default RateLimiter instance if true (see https://osu.ppy.sh/wiki/en/Bot_account).

gamemode number <optional>
null

Gamemode id to fetch users with. Defaults to null

Source: