Skip to main content

Class: ClanWarLeagueGroup

Represents a CWL Group.

Constructors

constructor

new ClanWarLeagueGroup(client, data)

Parameters

NameType
clientClient
dataAPIClanWarLeagueGroup

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

NameTypeDescription
clanTag?stringOptional clan tag. If present, this will only return wars which belong to this clan.
options?OverrideOptionsOverride 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

NameType
clanTagstring
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

NameType
warTagstring

Returns

null | number

Defined in

struct/ClanWarLeagueGroup.ts:162