Represents a member of a guild on Discord.
Extends
BaseThe timestamp this member's timeout will be removed
Whether the client user is above this user in the hierarchy, according to role position and guild ownership. This is a prerequisite for many moderative actions.
The overall set of permissions for this member, taking only roles and owner status into account
A link to the member's guild avatar.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
Bans this guild member.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | BanOptions | Yes | Options for the ban |
A link to the member's banner.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the banner URL |
Creates a DM channel between the client and this member.
Name | Type | Optional | Description |
---|---|---|---|
force | boolean | Yes | Whether to skip the cache check and request the API |
Deletes any DMs with this member.
Times this guild member out.
Example
Example
Name | Type | Optional | Description |
---|---|---|---|
communicationDisabledUntil | DateResolvable | null | No | The date or timestamp for the member's communication to be disabled until. Provide null to remove the timeout. |
reason | string | Yes | The reason for this timeout. |
A link to the member's guild avatar if they have one. Otherwise, a link to their will be returned.
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
A link to the member's guild banner if they have one. Otherwise, a link to their will be returned.
Returns
Name | Type | Optional | Description |
---|---|---|---|
options | ImageURLOptions | Yes | Options for the image URL |
Edits this member.
Name | Type | Optional | Description |
---|---|---|---|
options | GuildMemberEditOptions | No | The options to provide |
Whether this guild member equals another guild member. It compares all properties, so for most comparison it is advisable to just compare
member.id === member2.id
as it is significantly faster and is often what most users need.Name | Type | Optional | Description |
---|---|---|---|
member | GuildMember | No | The member to compare with |
Fetches this GuildMember.
Name | Type | Optional | Description |
---|---|---|---|
force | boolean | Yes | Whether to skip the cache check and request the API |
isCommunicationDisabled():this is GuildMember & { communicationDisabledUntilTimestamp: number; readonly communicationDisabledUntil: Date; }
Whether this member is currently timed out
Kicks this member from the guild.
Name | Type | Optional | Description |
---|---|---|---|
reason | string | Yes | Reason for kicking user |
Returns
channel.permissionsFor(guildMember)
. Returns permissions for a member in a guild channel, taking into account roles and permission overwrites.Name | Type | Optional | Description |
---|---|---|---|
channel | GuildChannelResolvable | No | The guild channel to use as context |
Sends a message to this user.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | string | MessagePayload | MessageCreateOptions | No | The options to provide |
Sets the flags for this member.
Name | Type | Optional | Description |
---|---|---|---|
flags | GuildMemberFlagsResolvable | No | The flags to set |
reason | string | Yes | Reason for setting the flags |
Sets the nickname for this member.
Example
Example
Times this guild member out.
Example
When concatenated with a string, this automatically returns the user's mention instead of the GuildMember object.
Example
Name | Type | Optional | Description |
---|---|---|---|
options | string | MessagePayload | MessageCreateOptions | No | None |