Constructor
new Member()
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 |
communicationDisabledUntilNumber
Timestamp of timeout expiry. If null, the member is not timed out
createdAtNumber
Timestamp of user creation
defaultAvatarString
The hash for the default avatar of a user if there is no avatar set
defaultAvatarURLString
The URL of the user's default avatar
discriminatorString
The discriminator of the user. If they've migrated to the new username system, this will be "0"
flagsNumber
The member's flags (see Constants)
gameObject
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 |
globalNameString
The user's display name, if it is set. For bots, this is the application name
guildGuild
The guild the member is in
idString
The ID of the member
joinedAtNumber
Timestamp of when the member joined the guild
mentionString
A string that mentions the member
nickString
The server nickname of the member
pendingBoolean
Whether the member has passed the guild's Membership Screening requirements
permissionPermission
[DEPRECATED] The guild-wide permissions of the member. Use Member#permissions instead
permissionsPermission
The guild-wide permissions of the member
premiumSinceNumber
Timestamp of when the member boosted the guild
rolesArray.<String>
An array of role IDs this member is a part of
staticAvatarURLString
The URL of the user's avatar (always a JPG)
statusString
The member's status. Either "online", "idle", "dnd", or "offline"
userUser
The user object of the member
usernameString
The username of the user
voiceStateVoiceState
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
|
|||||||||||||||||||||||||||||||||
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