Class Member

Represents a member of a guild.

Hierarchy (view full)

Constructors

Properties

avatar: null | string

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

avatarDecorationData: null | AvatarDecorationData

The data for this user's avatar decoration.

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

Methods

  • The url of this member's avatar decoration (or their user avatar decoration). This will always be a png. Discord does not combine the decoration and their current avatar for you. This is ONLY the decoration.

    Parameters

    • Optional size: number

      The dimensions of the image.

    Returns null | string

  • 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 any of the following permission sets:

    • MANAGE_GUILD
    • MANAGE_ROLES
    • MODERATE_MEMBERS and KICK_MEMBERS and BAN_MEMBERS

    Parameters

    • Optional reason: string

      The reason for disabling the flag.

    Returns Promise<void>

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

    Parameters

    • Optional reason: string

      The reason for enabling the flag.

    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>