Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a guild from the API

Hierarchy

Index

Constructors

Private constructor

  • new Guild(data: Object, params: Object): Guild

Properties

apiVersion

apiVersion: `${number}.${number}.${number}`

The version of the requested API route

banner

banner: BannerData

The banner data of the guild

created

created: Date

The creation date of the guild

createdTimestamp

createdTimestamp: number

The creation date of the guild as a unix timestamp

hasAdditionalStats

hasAdditionalStats: boolean

Indicates whether the object has the data returned if GuildRequestOptions.fetchAdditionalStats=true during request

This is used to determine whether `Guild#fetchAdditionalStats()` has an effect.

level

level: number

The level of the guild

libVersion

libVersion: `${number}.${number}.${number}`

The version of the representation of the data by the wrapper

members

members: GuildMember[]

The members of the guild

name

name: string

The name of the guild

requestedAt

requestedAt: number

The unix timestamp indicating when this request started executing

source

The route used to request the data for this object

This is the value used to identify cache entries. API results with the same source can use the cache.

tag

tag: string

The tag of the guild

territories

territories: number | Territory[]

The amount of territories the guild currently holds

If hasAdditionalStats=true, this is an array of Territories instead.

timestamp

timestamp: number

The unix timestamp indicating when the data of this request was last updated

This stat does not reflect the time this data was created, but when the API frontend last synced this data. The PvP leaderboard, for instance, updates once per hour. Yet this timestamp will update once every 30 seconds.

xp

xp: number

The xp percentage of the 1.19 requirement of the guilds current level as a number between 0 and 1

Calculates like current_xp /requirement_1_19.
You can use data.guildLevels to translate the percentages to 1.20 values or percentages.

Methods

fetchAdditionalStats

  • Mutates the object as if the fetchAdditionalStats property was true when this guild was requested

    This method causes API requests.

    Parameters

    • Optional options: GuildRequestOptions

      The options for the request; the guild field has no effect

    Returns Promise<Guild>

Generated using TypeDoc