Class Member

Represents a member of a guild.

Hierarchy

Constructors

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.

Accessors

  • get discriminator(): string
  • The 4 digits after the username of the user associated with this member.

    Returns string

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

    Returns string

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

    Returns boolean

  • get tag(): string
  • A combination of the user associated with this member's username and discriminator.

    Returns string

Methods

  • Add a role to this member.

    Parameters

    • roleID: string

      The ID of the role to add.

    • Optional reason: string

    Returns Promise<void>

  • 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

  • Disable the BYPASSES_VERIFICATION flag for this member. Requires the Manage Guild permission.

    Returns Promise<void>

  • Enable the BYPASSES_VERIFICATION flag for this member. Requires the Manage Guild permission.

    Returns Promise<void>

  • Remove a member from the guild.

    Parameters

    • Optional reason: string

      The reason for the kick.

    Returns Promise<void>

  • 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>

  • Remove a ban for this member.

    Parameters

    • Optional reason: string

      The reason for removing the ban.

    Returns Promise<void>