Skip to main content

Class: ClanWarMember

Represents a Clash of Clans War Member.

Constructors

constructor

new ClanWarMember(clan, war, data)

Parameters

NameType
clanWarClan
warClanWar
dataAPIClanWarMember

Defined in

struct/ClanWar.ts:106

Properties

war

war: ClanWar

The current war this member is in.

Defined in

struct/ClanWar.ts:83


clan

clan: WarClan

The member's clan.

Defined in

struct/ClanWar.ts:86


name

name: string

The member's name.

Defined in

struct/ClanWar.ts:89


tag

tag: string

The member's tag.

Defined in

struct/ClanWar.ts:92


mapPosition

mapPosition: number

The member's map position in the war.

Defined in

struct/ClanWar.ts:95


townHallLevel

townHallLevel: number

The member's town hall level.

Defined in

struct/ClanWar.ts:98


attacks

attacks: ClanWarAttack[]

The member's attacks this war.

Defined in

struct/ClanWar.ts:101


defenseCount

defenseCount: number

The number of times this member has been attacked.

Defined in

struct/ClanWar.ts:104

Accessors

isOpponent

get isOpponent(): boolean

Whether the member is from the opponent clan.

Returns

boolean

Defined in

struct/ClanWar.ts:120


defenses

get defenses(): ClanWarAttack[]

The member's defenses this war.

Returns

ClanWarAttack[]

Defined in

struct/ClanWar.ts:125


bestOpponentAttack

get bestOpponentAttack(): null | ClanWarAttack

Best opponent attack on this base.

Returns

null | ClanWarAttack

Defined in

struct/ClanWar.ts:130


get shareLink(): string

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

Returns

string

Defined in

struct/ClanWar.ts:136

Methods

previousBestOpponentAttack

previousBestOpponentAttack(): null | ClanWarAttack

Returns the previous best opponent attack on this village. This is useful for calculating the new stars or destruction for new attacks.

Returns

null | ClanWarAttack

Deprecated

order is affecting this method. Use previousBestAttack instead.

Defined in

struct/ClanWar.ts:146