Member

Member

Represents a server member

Constructor

new Member()

Properties:
Properties
Name Type Attributes Description
accentColor Number <nullable>

The user's banner color, or null if no banner color (REST only)

activities Array.<Object> <nullable>

The member's current activities

avatar String <nullable>

The hash of the member's guild avatar, or null if no guild avatar

avatarDecorationData Object <nullable>

The data of the user's avatar decoration, including the asset and sku ID, or null if no avatar decoration

avatarDecorationURL String <nullable>

The URL of the user's avatar decoration

avatarURL String

The URL of the user's avatar which can be either a JPG or GIF

banner String <nullable>

The hash of the user's banner, or null if no banner (REST only)

bannerURL String <nullable>

The URL of the user's banner

bot Boolean

Whether the user is an OAuth bot or not

clientStatus Object <nullable>

The member's per-client status

Name Type Description
desktop String

The member's status on desktop. Either "online", "idle", "dnd", or "offline". Will be "offline" for bots

mobile String

The member's status on mobile. Either "online", "idle", "dnd", or "offline". Will be "offline" for bots

web String

The member's status on web. Either "online", "idle", "dnd", or "offline". Will be "online" for bots

communicationDisabledUntil Number <nullable>

Timestamp of timeout expiry. If null, the member is not timed out

createdAt Number

Timestamp of user creation

defaultAvatar String

The hash for the default avatar of a user if there is no avatar set

defaultAvatarURL String

The URL of the user's default avatar

discriminator String

The discriminator of the user. If they've migrated to the new username system, this will be "0"

flags Number

The member's flags (see Constants)

game Object <nullable>

The active game the member is playing

Properties
Name Type Attributes Description
name String

The name of the active game

type Number

The type of the active game (0 is default, 1 is Twitch, 2 is YouTube)

url String <nullable>

The url of the active game

globalName String <nullable>

The user's display name, if it is set. For bots, this is the application name

guild Guild

The guild the member is in

id String

The ID of the member

joinedAt Number <nullable>

Timestamp of when the member joined the guild

mention String

A string that mentions the member

nick String <nullable>

The server nickname of the member

pending Boolean <nullable>

Whether the member has passed the guild's Membership Screening requirements

permission Permission

[DEPRECATED] The guild-wide permissions of the member. Use Member#permissions instead

permissions Permission

The guild-wide permissions of the member

premiumSince Number <nullable>

Timestamp of when the member boosted the guild

roles Array.<String>

An array of role IDs this member is a part of

staticAvatarURL String

The URL of the user's avatar (always a JPG)

status String

The member's status. Either "online", "idle", "dnd", or "offline"

user User

The user object of the member

username String

The username of the user

voiceState VoiceState

The voice state of the member

Source:

Methods

addRole(roleID, reasonopt) → {Promise}

Add a role to the guild member

Source:
Parameters:
Name Type Attributes Description
roleID String

The ID of the role

reason String <optional>

The reason to be displayed in audit logs

Returns:
Type:
Promise

ban(reasonopt) → {Promise}

Ban the user from the guild

Source:
Parameters:
Name Type Attributes Default Description
options.deleteMessageDays Number <optional>
0

[DEPRECATED] Number of days to delete messages for, between 0-7 inclusive

options.deleteMessageSeconds Number <optional>
0

Number of seconds to delete messages for, between 0 and 604,800 inclusive

options.reason String <optional>

The reason to be displayed in audit logs

reason String <optional>

[DEPRECATED] The reason to be displayed in audit logs

Returns:
Type:
Promise

dynamicAvatarURL(formatopt, sizeopt) → {String}

Get the member's avatar with the given format and size

Source:
Parameters:
Name Type Attributes Description
format String <optional>

The filetype of the avatar ("jpg", "jpeg", "png", "gif", or "webp")

size Number <optional>

The size of the avatar (any power of two between 16 and 4096)

Returns:
Type:
String

edit(options, reasonopt) → {Promise}

Edit the guild member

Source:
Parameters:
Name Type Attributes Description
options Object

The properties to edit

Name Type Attributes Description
channelID String <optional>
<nullable>

The ID of the voice channel to move the member to (must be in voice). Set to null to disconnect the member

communicationDisabledUntil Date <optional>
<nullable>

When the user's timeout should expire. Set to null to instantly remove timeout

deaf Boolean <optional>

Server deafen the user

flags Number <optional>

The user's flags - OR the BYPASSES_VERIFICATION flag (4) to make the member exempt from verification requirements, NAND the flag to make the member not exempt

mute Boolean <optional>

Server mute the user

nick String <optional>

Set the user's server nickname, "" to remove

roles Array.<String> <optional>

The array of role IDs the user should have

reason String <optional>

The reason to be displayed in audit logs

Returns:
Type:
Promise

kick(reasonopt) → {Promise}

Kick the member from the guild

Source:
Parameters:
Name Type Attributes Description
reason String <optional>

The reason to be displayed in audit logs

Returns:
Type:
Promise

removeRole(roleID, reasonopt) → {Promise}

Remove a role from the guild member

Source:
Parameters:
Name Type Attributes Description
roleID String

The ID of the role

reason String <optional>

The reason to be displayed in audit logs

Returns:
Type:
Promise

unban(reasonopt) → {Promise}

Unban the user from the guild

Source:
Parameters:
Name Type Attributes Description
reason String <optional>

The reason to be displayed in audit logs

Returns:
Type:
Promise