Skip to main content

Class: WarClan

Represents a War Clan.

Constructors

constructor

new WarClan(war, data)

Parameters

NameType
warClanWar
dataAPIWarClan

Defined in

struct/ClanWar.ts:185

Properties

name

name: string

The clan's name.

Defined in

struct/ClanWar.ts:162


tag

tag: string

The clan's tag.

Defined in

struct/ClanWar.ts:165


badge

badge: Badge

The clan's badge.

Defined in

struct/ClanWar.ts:168


level

level: number

The clan's level.

Defined in

struct/ClanWar.ts:171


stars

stars: number

Number of stars achieved by this clan.

Defined in

struct/ClanWar.ts:174


destruction

destruction: number

The destruction achieved as a percentage.

Defined in

struct/ClanWar.ts:177


members

members: ClanWarMember[]

An array of members that are in the war.

Defined in

struct/ClanWar.ts:180


attackCount

attackCount: number

Total attacks used by this clan.

Defined in

struct/ClanWar.ts:183

Accessors

isOpponent

get isOpponent(): boolean

Whether the clan is the opponent clan.

Returns

boolean

Defined in

struct/ClanWar.ts:199


averageAttackDuration

get averageAttackDuration(): number

Average duration of all clan member's attacks.

Returns

number

Defined in

struct/ClanWar.ts:204


attacks

get attacks(): ClanWarAttack[]

Returns all clan member's attacks.

Returns

ClanWarAttack[]

Defined in

struct/ClanWar.ts:210


defenses

get defenses(): ClanWarAttack[]

Returns all clan member's defenses.

Returns

ClanWarAttack[]

Defined in

struct/ClanWar.ts:219


get shareLink(): string

Get clan's formatted link to open clan in-game.

Returns

string

Defined in

struct/ClanWar.ts:234

Methods

getMember

getMember(tag): null | ClanWarMember

Get a member of the clan for the given tag, or null if not found.

Parameters

NameType
tagstring

Returns

null | ClanWarMember

Defined in

struct/ClanWar.ts:224


getMemberByMapPosition

getMemberByMapPosition(mapPosition): null | ClanWarMember

Get a member of the clan for the given map position, or null if not found.

Parameters

NameType
mapPositionnumber

Returns

null | ClanWarMember

Defined in

struct/ClanWar.ts:229