Module

ihl

Methods

async inner banInhouseQueue(user, timeout)

Bans a user from an inhouse queue.

Parameters:
Name Type Description
user module:db.User

The player to ban.

timeout number

The duration of ban in minutes.

View Source lib/ihl.js, line 276

async inner createInhouseState() → {module:ihl.InhouseState}

Creates an inhouse state. Sets up the inhouse category, channel, and role.

View Source lib/ihl.js, line 113

An inhouse state object.

async inner getAllLobbyQueues(inhouseState, user)

Add a user to all lobby queues.

Parameters:
Name Type Description
inhouseState module:ihl.InhouseState

An inhouse state.

user module:db.User

The player to queue.

View Source lib/ihl.js, line 234

async inner getAllLobbyQueuesForUser(inhouseState, user)

Removes a user from all lobby queues.

Parameters:
Name Type Description
inhouseState module:ihl.InhouseState

An inhouse state.

user module:db.User

The player to dequeue.

View Source lib/ihl.js, line 259

async inner getUserRankTier(steamId64) → {number}

Gets a player's badge rank from opendota.

Parameters:
Name Type Description
steamId64 string

The player's steamid64.

View Source lib/ihl.js, line 76

The player badge rank.

number

async inner hasActiveLobbies(user) → {boolean}

Checks if a user has active lobbies.

Parameters:
Name Type Description
user module:db.User

The user to check.

View Source lib/ihl.js, line 198

Whether the user has active lobbies.

boolean

inner joinLobbyQueue(lobbyState, user)

Adds a user to a lobby queue.

Parameters:
Name Type Description
lobbyState module:lobby.LobbyState

A lobby state.

user module:db.User

The player to queue.

View Source lib/ihl.js, line 209

inner leaveLobbyQueue(lobbyState, user)

Removes a user from a lobby queue.

Parameters:
Name Type Description
lobbyState module:lobby.LobbyState

A lobby state.

user module:db.User

The player to dequeue.

View Source lib/ihl.js, line 245

async inner registerUser(guildId, steamId64, discordId) → {User}

Adds a player to the inhouse league.

Parameters:
Name Type Description
guildId string

A guild id.

steamId64 string

The player's steamid64.

discordId string

The player's discord id.

View Source lib/ihl.js, line 97

The newly created user database record.

User

Type Definitions

Object

InhouseState

Properties:
Name Type Description
guild external:discordjs.Guild

The discord guild the inhouse belongs to.

category external:discordjs.CategoryChannel

The discord inhouse category.

channel external:discordjs.GuildChannel

The discord inhouse general channel.

adminRole external:discordjs.Role

The discord inhouse admin role.

readyCheckTimeout number

Duration in milliseconds before lobby ready timeout.

captainRankThreshold number

Maximum rank difference between captains.

captainRoleRegexp string

Regular expression string for captain roles.

View Source lib/ihl.js, line 5

Object

LeagueGuildObject

Properties:
Name Type Description
league module:db.League

A database league record

guild external:discordjs.Guild

The guild the league belongs to

View Source lib/ihl.js, line 17