The players, refers to the players field in any game class (Game.players)
Checks if a game code exists and returns basic information about it
The game code to check
Creates an account with the given email and password and adds it to the current bot
The email
The password
The result of the login attempt, including the account if it succeeded
Connects to the matchmaker for the first time and establishes automatic reconnection
The result of the connection attempt, including the region list if it succeeded
Creates a private game with the given region, mode, and map. This does NOT join the game.
The name of the region to create the game in; must be one from Bot.regionList (e.g. 'useast')
The mode to create, either as a string (e.g. 'ffa') or as a GameMode (e.g. GameMode.FFA)
The name of the map to create on (e.g. 'warehouse'); must be one from Maps
The result of the create attempt, including the game info if it succeeded
Disposes a bot instance by clearing timeouts, leaving games, and disconnecting from the matchmaker
The easier way to dispatch something.
The event name. You can see a list in the "properties" of DispatchIndex
The arguments you can pass. You can find the file link in DispatchIndex and then look at the constructor of the dispatch class to see what arguments it takes.
Finds a public game with the given region and mode. This does NOT join the game.
The name of the region to find the game in; must be one from Bot.regionList (e.g. 'useast')
The mode to find, either as a string (e.g. 'ffa') or as a GameMode (e.g. GameMode.FFA)
The result of the find attempt, including the game info if it succeeded
Ensures the bot is in game; best used with Typescript
Initializes the session for the by logging in (if not already) and connecting to the matchmaker (if not already). This is required before finding, creating, or joining a game and is called automatically if you fail to do so
Whether the initialization succeeded or the error that caused it to fail
Joins a game
The name to join the game with
Either the game ID (the string at the end of the game URL, e.g. 'abc123' from https://shellshock.io/game/abc123) or the full game object returned from the matchmaker (either from Bot.findPublicGame or Bot.createPrivateGame)
Some extra options for joining documented in JoinOptions
The result of the join attempt, including the game info if it succeeded
Logs into an existing account with the given email and password and adds it to the current bot
The email
The password
The result of the login attempt, including the account if it succeeded
Logs in anonymously, which is the recommended way to do a quick login without needing to create an account. You can save these if absolutely needed by saving the Account.firebase's refreshToken and using Bot.loginWithRefreshToken
The result of the login attempt, including the account if it succeeded
Logs in using Google (works only on Node and non-headless environments)
OptionalrequiredEmail: stringThe result of the login attempt, including the account if it succeeded
Logs in with a refresh token from a previous session; see the link below to copy it from the game
The refresh token from the session
The result of the login attempt, including the account if it succeeded
Removes a specific callback hook for a specific event
Regisers a global callback for any hooks. This is incredibly resource-intensive and shouldn't be used aside from development (things like finding hook names), as it means that some hooks (such as BotEvents.packet) run intensive data computations that aren't normally performed unless needed.
OptionalaccountThe bot's account, if it has one
An associated firebase instance
OptionalgameThe bot's game, if it's in one
The game instance attached to the bot.
OptionalmatchmakerThe matchmaker socket, if it's connected to the matchmaker (Bot.createMatchmaker)
Listeners for messages from the matchmaker, requires you to call Bot.createMatchmaker first
Allows you to override the handlers for specific packets.
The instance protocol attached to the bot.
The proxy the bot uses to connect to games.
The region list the bot has found, requires you to call Bot.createMatchmaker first
The session renewal
A Bot! The big big amazing class the world revolves around