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 from 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!

limiterTimespan number <optional>
6000

Span of milliseconds in you may not exceed the following limits. Default should be safe for normal users, recommended value for chat bot accounts is 60000.

limiterPrivate number <optional>
4

Amount of private messages (PMs & messages in multiplayer channels) you allow the bot to send in the last timespan. Default should be safe for normal users, recommended value for chat bot accounts is 270 (300 * 0.9, 10% margin to protect from accuracy issues, because of bancho/network).

limiterPublic number <optional>
3

Amount of public messages (messages that aren't private) you allow the bot to send in the last timespan. Default should be safe for normal users, recommended value for chat bot accounts is 54 (60 * 0.9, 10% margin to protect from accuracy issues, because of bancho/network).

Source: