Class: ClanWarMember
Represents a Clash of Clans War Member.
Constructors
constructor
• new ClanWarMember(clan
, war
, data
)
Parameters
Name | Type |
---|---|
clan | WarClan |
war | ClanWar |
data | APIClanWarMember |
Defined in
Properties
war
• war: ClanWar
The current war this member is in.
Defined in
clan
• clan: WarClan
The member's clan.
Defined in
name
• name: string
The member's name.
Defined in
tag
• tag: string
The member's tag.
Defined in
mapPosition
• mapPosition: number
The member's map position in the war.
Defined in
townHallLevel
• townHallLevel: number
The member's town hall level.
Defined in
attacks
• attacks: ClanWarAttack
[]
The member's attacks this war.
Defined in
defenseCount
• defenseCount: number
The number of times this member has been attacked.
Defined in
Accessors
isOpponent
• get
isOpponent(): boolean
Whether the member is from the opponent clan.
Returns
boolean
Defined in
defenses
• get
defenses(): ClanWarAttack
[]
The member's defenses this war.
Returns
Defined in
bestOpponentAttack
• get
bestOpponentAttack(): null
| ClanWarAttack
Best opponent attack on this base.
Returns
null
| ClanWarAttack
Defined in
shareLink
• get
shareLink(): string
Get member's formatted link to open member in-game.
Returns
string
Defined in
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.