Class Member

Represents a guild user.

Hierarchy

Constructors

Properties

_createdAt: number

Timestamp (unix epoch time) of the user's account creation.

_joinedAt: null | number

Timestamp (unix epoch time) of when the member joined the server.

avatarURL: null | string

Current avatar url of the user.

bannerURL: null | string

Current banned url of the user.

bot: boolean

If set to true, the user is a bot.

client: Client

Bot's client.

guildID: string

Server ID.

id: string | number

Item ID

isOwner: boolean

Tells you if the member is the server owner.

nickname: null | string

Member's server nickname.

roles: number[]

Array of member's roles.

type: null | UserTypes

User type

username: string

User's username.

Accessors

  • get createdAt(): Date
  • Date of the user's account creation.

    Returns Date

  • get guild(): Guild | Promise<Guild>
  • Guild where the user comes from, returns Guild or a promise. If guild isn't cached & the request failed, this will return you undefined.

    Returns Guild | Promise<Guild>

  • get joinedAt(): null | number | Date
  • String representation of the _joinedAt timestamp.

    Returns null | number | Date

Methods

  • Add a role to this member.

    Parameters

    • roleID: number

      ID of the role to be added.

    Returns Promise<void>

  • Add this member to a guild group.

    Parameters

    • groupID: string

      ID of the guild group.

    Returns Promise<void>

  • Award the member using the built-in EXP system.

    Parameters

    • amount: number

      Amount of experience to give.

    Returns Promise<number>

  • Get a specified social link from the member, if member is connected to them through Guilded.

    Parameters

    • socialMediaName: string

      Name of a social media linked to this member.

    Returns Promise<void | socialLinkTypes>

  • Remove this member from a guild group.

    Parameters

    • groupID: string

      ID of the guild group.

    Returns Promise<void>

  • Remove a role from this member.

    Parameters

    • roleID: number

      ID of the role to be added.

    Returns Promise<void>

  • Set member's experience using the built-in EXP system.

    Parameters

    • amount: number

      Amount of experience to set.

    Returns Promise<number>