Class Member

Represents a member of a guild.

Hierarchy

Constructors

  • Parameters

    Returns Member

Properties

_cachedGuild?: any
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.

toggleFlag: any
user: User

The user associated with this member.

Accessors

  • get bot(): boolean
  • If the member associated with the user is a bot.

    Returns boolean

  • get createdAt(): Date
  • Returns Date

  • 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 guild(): Guild
  • The guild this member is for. This will throw an error if the guild is not cached.

    Returns Guild

  • get mention(): string
  • A string that will mention this member.

    Returns string

  • get permissions(): Permission
  • The permissions of this member.

    Returns Permission

  • get publicFlags(): number
  • The user associated with this member's public flags.

    Returns number

  • 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

  • get username(): string
  • The username associated with this member's user.

    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

  • Create a ban for this member.

    Parameters

    Returns Promise<void>

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

    Returns Promise<void>

  • Edit this guild member's voice state. channelID is required, and the user must already be in that channel. See Discord's docs for more information.

    Parameters

    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>

  • Returns JSONMember

  • Returns string

  • Remove a ban for this member.

    Parameters

    • Optional reason: string

      The reason for removing the ban.

    Returns Promise<void>

  • Parameters

    Returns void

  • Parameters

    • Optional timestamp: number | Date

    Returns string

  • Parameters

    • id: string

    Returns Date

  • Parameters

    • id: string

    Returns number

Generated using TypeDoc