Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a guild from the API

Hierarchy

Index

Constructors

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

Properties

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

The version of the requested API route

banner: BannerData

The banner data of the guild

created: Date

The creation date of the guild

createdTimestamp: number

The creation date of the guild as a unix timestamp

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: number

The level of the guild

levelProgression: number

The progress of the guild to the next level as a number between 0 and 1

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

The version of the representation of the data by the wrapper

members: GuildMember[]

The members of the guild

name: string

The name of the guild

requestedAt: number

The unix timestamp indicating when this request started executing

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: string

The tag of the guild

territories: number | Territory[]

The amount of territories the guild currently holds

If hasAdditionalStats=true, this is an array of Territories instead.
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: number

The XP percentage of the guilds current level; Usually a number between 0 and 1

This number may be more than 1 as levelling up takes a couple minutes. Use Guild#levelprogression instead to get a safe percentage factor.

Some data that was extracted from the guild level

Make sure Guild#xpFriendly.isSafe is true, the data will only be present on guild levels up to 150.

Methods

  • 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