Class Member

Represents a member of a guild.

Hierarchy

Accessors

  • get discriminator(): string
  • The Discord-tag of the user associated with this member.

    Returns string

  • get displayName(): string
  • The nick of this member if set, the display name of this member's user if set, or their username.

    Returns string

  • get system(): boolean
  • If this user associated with this member is an official discord system user.

    Returns boolean

  • get tag(): string
  • The 4 digits after this user's username, if they have not been migrated. If migrated, this will be a single "0".

    Returns string

Constructors

Methods

  • The url of this user's guild avatar (or their user avatar if no guild avatar is set, or their default avatar if none apply).

    Parameters

    • Optional format: "jpg" | "jpeg" | "png" | "webp" | "gif"

      The format the url should be.

    • Optional size: number

      The dimensions of the image.

    Returns string

  • Remove a role from this member.

    Parameters

    • roleID: string

      The ID of the role to remove.

    • Optional reason: string

      The reason for removing the role.

    Returns Promise<void>

Properties

avatar: null | string

The member's avatar hash, if they have set a guild avatar.

communicationDisabledUntil: null | Date

When the member's timeout will expire, if active.

deaf: boolean

If this member is server deafened.

flags: number

The member's flags.

guildID: string

The id of the guild this member is for.

id: string
isPending?: boolean

Undocumented.

joinedAt: null | Date

The date at which this member joined the guild.

mute: boolean

If this member is server muted.

nick: null | string

This member's nickname, if any.

pending: boolean

If this member has not passed the guild's membership screening requirements.

premiumSince: null | Date

The date at which this member started boosting the guild, if applicable.

presence?: Presence

The presence of this member.

roles: string[]

The roles this member has.

user: User

The user associated with this member.