Class

DotaBot

dotaBot~DotaBot(steamClient, steamUser, steamFriends, dotaClient, config)

Class representing a Dota bot. Handles all in game functions required to host an inhouse lobby.

Constructor

new DotaBot(steamClient, steamUser, steamFriends, dotaClient, config)

Constructor of the DotaBot. This prepares an object for connecting to Steam and the Dota2 Game Coordinator.

Parameters:
Name Type Description
steamClient external:steam.SteamClient

A SteamClient instance.

steamUser external:steam.SteamUser

A SteamUser instance.

steamFriends external:steam.SteamFriends

A SteamFriends instance.

dotaClient external:Dota2.Dota2Client

A Dota2Client instance.

config module:db.Bot

Bot configuration object.

View Source lib/dotaBot.js, line 343

Extends

Members

accountId

Get the bot account id

View Source lib/dotaBot.js, line 472

backoff

Get the current backoff time of the queue

View Source lib/dotaBot.js, line 504

backoff

Set the backoff time of the queue

View Source lib/dotaBot.js, line 512

dotaLobbyId

Get the dota lobby id

View Source lib/dotaBot.js, line 448

lobby

Get the dota lobby object

View Source lib/dotaBot.js, line 440

lobbyChannelName

Get the dota lobby channel name

View Source lib/dotaBot.js, line 464

playerState

Get the dota lobby player state

View Source lib/dotaBot.js, line 456

rateLimit

Get the current rate limit factor

View Source lib/dotaBot.js, line 488

rateLimit

Set the rate limiting factor

View Source lib/dotaBot.js, line 496

state

Get the current state of the queue

View Source lib/dotaBot.js, line 480

steamId64

Get bot steamId64

View Source lib/dotaBot.js, line 432

teamCache

Get the player to team mapping object

View Source lib/dotaBot.js, line 416

teamCache

Set the player to team mapping object

View Source lib/dotaBot.js, line 424

Methods

block()

Block the queue

View Source lib/dotaBot.js, line 527

clear()

Clear the queue

View Source lib/dotaBot.js, line 541

async connect()

Initiates the connection to Steam and the Dota2 Game Coordinator.

View Source lib/dotaBot.js, line 592

async connectToDota()

Connect to dota and unblock queue.

View Source lib/dotaBot.js, line 613

async disconnect()

Disconnect from the Game Coordinator. This will also cancel all queued operations!

View Source lib/dotaBot.js, line 624

async inviteToLobby(steamId64)

Invites the given steam id to the Dota lobby.

Parameters:
Name Type Description
steamId64 string

A steam id.

View Source lib/dotaBot.js, line 687

async joinPracticeLobby(dotaLobbyId)

Join the lobby by dota lobby id.

Parameters:
Name Type Description
dotaLobbyId string

A dota lobby id.

View Source lib/dotaBot.js, line 939

async logOnToSteam()

Log on to steam. Set online state and display name.

View Source lib/dotaBot.js, line 602

onDotaReady()

Dota ready handler. Unblocks the queue.

View Source lib/dotaBot.js, line 573

onDotaUnready()

Dota unready handler. Blocks the queue.

View Source lib/dotaBot.js, line 583

async onSteamClientError()

Steam client error handler. Attempts to connect to steam and connect to Dota

View Source lib/dotaBot.js, line 561

async onSteamClientLoggedOff()

Steam client logged off handler. Attempts to log on to steam and connect to Dota

View Source lib/dotaBot.js, line 549

async practiceLobbyKick(accountId)

Kick the given account id from the lobby.

Parameters:
Name Type Description
accountId number

An account id.

View Source lib/dotaBot.js, line 800

async practiceLobbyKickFromTeam(accountId)

Kick the given account id from the lobby team slots.

Parameters:
Name Type Description
accountId number

An account id.

View Source lib/dotaBot.js, line 771

release()

Unblock the queue

View Source lib/dotaBot.js, line 534

schedule()

Schedule a function for execution. This function will be executed as soon as the GC is available.

View Source lib/dotaBot.js, line 520