-
Notifications
You must be signed in to change notification settings - Fork 144
Member
SinisterRectus edited this page Mar 4, 2017
·
35 revisions
Objects Accessible via Caches
- Roles
Properties Inherited From Container
Name | Type | Mutable | Description |
---|---|---|---|
client | Client | Client object to which the Discord object is known | |
parent | * | Parent Discord object |
Properties Inherited From Snowflake
Name | Type | Mutable | Description |
---|---|---|---|
createdAt | number | Unix time in seconds at which the object was created by Discord | |
id | string | Shortcut for member.user.id | |
timestamp | string | ISO 8601 date and time at which the object was created by Discord |
Name | Type | Mutable | Description |
---|---|---|---|
avatar | string | Shortcut for member.user.avatar | |
avatarUrl | string | Shortcut for member.user.avatarUrl | |
bot | string | Shortcut for member.user.bot | |
color | Color | The member's displayed name color | |
defaultAvatar | string | Shortcut for member.user.defaultAvatar | |
defaultAvatarUrl | string | Shortcut for member.user.defaultAvatarUrl | |
discriminator | string | Shortcut for member.user.discriminator | |
gameName | string? | Name of the game set in the member's status | |
guild | Guild | The guild in which this member exists | |
joinedAt | string? | Date and time when the member joined the guild | |
mentionString | string | Shortcut for member.user.mentionString | |
name | string | The member's nickname if one is set. Otherwise, its username. | |
nickname | string? | X | The member's nickname for the guild in which it exists |
roleCount | number | How many Roles are cached for the member. | |
roles | function | Iterator for the member's cached Roles. | |
status | string | Whether the member is online, offline, or idle | |
user | User | The base user associated with this member | |
username | string | Shortcut for member.user.username | |
voiceChannel | GuildVoiceChannel? | X | If connected, this is the member's voice channel. |
Prototype | Interface | Description |
---|---|---|
addRole(role) | HTTP | Adds a role to the member. |
addRoles(roles[, ...]) | HTTP | Adds a role or roles to the member. |
ban([guild][, days]) | HTTP | Shortcut for member.user:ban . The member's guild is used if none is provided. |
getMembership([guild]) | Local or HTTP | Shortcut for member.user:getMembership
|
hasRole(role) | Local | Returns whether the member has a role. |
hasRoles(roles[, ...]) | Local | Returns whether the member has a role or roles. |
kick([guild]) | HTTP | Shortcut for member.user:kick . The member's guild is used if none is provided. |
removeRole(role) | HTTP | Removes a role from the member. |
removeRoles(roles[, ...]) | HTTP | Removes a role or roles from the member. |
sendMessage(content) | HTTP | Shortcut for member.user:sendMessage
|
setDeaf([boolean]) | HTTP | Deafens or undeafens the member guild-wide (default: false). |
setMute([boolean]) | HTTP | Mutes or unmutes the member guild-wide (default: false). |
unban([guild]) | HTTP | Shortcut for member.user:unban . The member's guild is used if none is provided. |