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. |
async inner createInhouseState() → {module:ihl.InhouseState}
Creates an inhouse state. Sets up the inhouse category, channel, and role.
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. |
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. |
async inner getUserRankTier(steamId64) → {number}
Gets a player's badge rank from opendota.
Parameters:
Name | Type | Description |
---|---|---|
steamId64 |
string | The player's steamid64. |
The player badge rank.
async inner hasActiveLobbies(user) → {boolean}
Checks if a user has active lobbies.
Parameters:
Name | Type | Description |
---|---|---|
user |
module:db.User | The user to check. |
Whether the user has active lobbies.
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. |
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. |
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. |
The newly created user database record.
Type Definitions
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. |
LeagueGuildObject
Properties:
Name | Type | Description |
---|---|---|
league |
module:db.League | A database league record |
guild |
external:discordjs.Guild | The guild the league belongs to |