Module

dotaBot

Dota bot functions

View Source lib/dotaBot.js, line 1

Classes

DotaBot

Methods

inner isDotaLobbyReady(teamCache, playerState) → {boolean}

Checks if all entries in a player to team mapping match the player to team state mapping.

Parameters:
Name Type Description
teamCache Object

The intended player to team state.

playerState Object

The current state of players to teams.

View Source lib/dotaBot.js, line 130

Whether the player state matches the team cache.

boolean

inner slotToTeam(slot) → {number}

Converts a Dota team slot value to a faction value.

Parameters:
Name Type Description
slot number

The Dota team slot.

View Source lib/dotaBot.js, line 84

An inhouse lobby faction.

number

async inner startDotaLobby(dotaBot) → {string}

Start a dota lobby and return the match id.

Parameters:
Name Type Description
dotaBot module:dotaBot.DotaBot

The dota bot.

View Source lib/dotaBot.js, line 315

The match id.

string

inner updatePlayerState(steamId64, slotnullable, playerState) → {Object}

Updates a player to team mapping object. Used to track which players have joined team slots in lobby. A null slot value will remove the player from the mapping meaning they are not in a team slot.

Parameters:
Name Type Attributes Description
steamId64 string

The player's steamid64.

slot number <nullable>

The lobby team slot the player joined.

playerState Object

A player to team mapping.

View Source lib/dotaBot.js, line 105

A player to team mapping.

Object