CurrentGame class
A representation of an ongoing game.
Signature:
export declare class CurrentGame
Constructor
new CurrentGame (client: Client, data: CurrentGameData, champions: Collection<string, Champion>, runeTrees: Collection<string, RuneTree>, summonerSpells: Collection<string, SummonerSpell>)
Constructs a new instance of the CurrentGame
class.
Parameters:
Parameter | Type | Description |
---|---|---|
client | Client | The client that requested this data. |
data | CurrentGameData | The raw current game data from the API. |
champions | Collection < String, Champion > | The champions that are involved in the game. |
runeTrees | Collection < String, RuneTree > | The collection of the runes in the game. |
summonerSpells | Collection < String, SummonerSpell > | The collection of the summoner spells in the game. |
Properties
id
The numerical ID of the game.
Combining this with the CurrentGame.platform gives the full ID of the game. The full ID can be used to fetch all the details of the match after it has ended using MatchManager.fetch.
Type: Number
length
The amount of time (in seconds) that has passed since the game started.
Type: Number
map
The map on which the game is being played.
Type: GameMap
matchId
The match ID for fetching the match details after the game is over.
Type: String
mode
The game mode.
Type: GameMode
observerKey
The observer key for the game.
Type: String
platform
The platform (server) on which the game is being played.
Type: String
queue
The type of queue for the game.
Type: Queue
startTimestamp
The time at which the game started.
Type: Number
teams
A collection of the participating teams.
Type: Collection < 'red' | 'blue', CurrentGameTeam >
type
The type of game.
Type: GameType