The base of all structures in this library. All structures that have an ID will extend this class.

Hierarchy

Constructors

Properties

_joinedAt: null | number

Date this member joined

banned: boolean

Whether this member has been banned

client: Client
id: string

Identifier of this structrure

isOwner: boolean

Whether this member owns the server

kicked: boolean

Whether this member has been kicked

nickname: null | string = null

The nickname for this member

Bare data of this structure

roleIds: number[] = []

Roles this member has by ID (TODO: role object when Guilded API has one)

serverId: string

The ID of the server this role belongs to

socialLinks: Collection<"twitch" | "bnet" | "psn" | "xbox" | "steam" | "origin" | "youtube" | "twitter" | "facebook" | "switch" | "patreon" | "roblox" | "epic", SocialLinkPayload>

Cached social links of this member

Accessors

  • get displayName(): null | string
  • Either the nickname or the username associated with this member.

    Returns null | string

    The nickname of this member or their username if they have no nickname, or null if the user does not exist.

  • get username(): null | string
  • The username of this member.

    Returns null | string

    The username of this member or null if the user is not cached.

Methods

  • Add role to this member.

    Parameters

    • roleId: number

      The ID of the role to add to the member.

    Returns Promise<void>

    A Promise that resolves once the role has been added to the member.

  • Award XP to this member.

    Parameters

    • amount: number

      The amount of XP to award to the member.

    Returns Promise<number>

    A Promise that resolves with the new total amount of XP the member has.

  • Get a list of the roles assigned to this member.

    Returns Promise<number[]>

    A Promise that resolves with an array of role IDs assigned to this member.

  • Remove role from this member.

    Parameters

    • roleId: number

      The ID of the role to remove from the member.

    Returns Promise<void>

    A Promise that resolves once the role has been removed from the member.

  • Reset this member's nickname.

    Returns Promise<void>

    A Promise that resolves once the member's nickname has been reset.

  • Update this member's nickname.

    Parameters

    • nickname: string

      The new nickname for the member.

    Returns Promise<string>

    A Promise that resolves with the new nickname for the member.

Generated using TypeDoc