Class: ClanWarLeagueGroup
Represents a CWL Group.
Constructors
constructor
• new ClanWarLeagueGroup(client, data)
Parameters
| Name | Type |
|---|---|
client | Client |
data | APIClanWarLeagueGroup |
Defined in
struct/ClanWarLeagueGroup.ts:104
Properties
state
• state: "notInWar" | "preparation" | "inWar" | "ended"
The CWL group's current war state.
Defined in
struct/ClanWarLeagueGroup.ts:90
season
• season: string
Season Id of this CWL group.
Defined in
struct/ClanWarLeagueGroup.ts:93
clans
• clans: ClanWarLeagueClan[]
Returns all participating clans.
Defined in
struct/ClanWarLeagueGroup.ts:96
rounds
• rounds: ClanWarLeagueRound[]
An array containing all war tags for each round.
Defined in
struct/ClanWarLeagueGroup.ts:99
Accessors
isNotInWar
• get isNotInWar(): boolean
Whether the clan is not in CWL group.
Returns
boolean
Defined in
struct/ClanWarLeagueGroup.ts:115
totalRounds
• get totalRounds(): number
Total number of rounds for this CWL.
Returns
number
Defined in
struct/ClanWarLeagueGroup.ts:120
Methods
getWars
▸ getWars(clanTag?, options?): Promise<ClanWar[]>
This returns an array of ClanWar which fetches all wars in parallel.
Parameters
| Name | Type | Description |
|---|---|---|
clanTag? | string | Optional clan tag. If present, this will only return wars which belong to this clan. |
options? | OverrideOptions | Override options for the request. |
Returns
Promise<ClanWar[]>
Defined in
struct/ClanWarLeagueGroup.ts:129
getCurrentWars
▸ getCurrentWars(clanTag, options?): Promise<ClanWar[]>
Returns active wars (last 2) of the CWL group.
Parameters
| Name | Type |
|---|---|
clanTag | string |
options? | OverrideOptions |
Returns
Promise<ClanWar[]>
Defined in
struct/ClanWarLeagueGroup.ts:144
getRoundIndex
▸ getRoundIndex(warTag): null | number
Returns the index of the round for this specified warTag.
Parameters
| Name | Type |
|---|---|
warTag | string |
Returns
null | number