mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Reorganised a bunch of methods
This commit is contained in:
@@ -191,7 +191,7 @@ class GuildMember {
|
||||
|
||||
/**
|
||||
* Checks whether the roles of the members allow them to perform specific actions.
|
||||
* @param {Array<PermissionResolvable>} permissions the permissions to test for
|
||||
* @param {PermissionResolvable[]} permissions the permissions to test for
|
||||
* @param {boolean} [explicit=false] whether to require the member to explicitly have the exact permissions
|
||||
* @returns {boolean}
|
||||
*/
|
||||
@@ -199,6 +199,15 @@ class GuildMember {
|
||||
return permissions.map(p => this.hasPermission(p, explicit)).every(v => v);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a Guild Member
|
||||
* @param {GuildmemberEditData} data The data to edit the member with
|
||||
* @returns {Promise<GuildMember>}
|
||||
*/
|
||||
edit(data) {
|
||||
return this.client.rest.methods.updateGuildMember(this, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mute/unmute a user
|
||||
* @param {boolean} mute Whether or not the member should be muted
|
||||
@@ -299,15 +308,6 @@ class GuildMember {
|
||||
return this.edit({ nick });
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a Guild Member
|
||||
* @param {GuildmemberEditData} data The data to edit the member with
|
||||
* @returns {Promise<GuildMember>}
|
||||
*/
|
||||
edit(data) {
|
||||
return this.client.rest.methods.updateGuildMember(this, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes any DMs with this Guild Member
|
||||
* @returns {Promise<DMChannel>}
|
||||
|
||||
Reference in New Issue
Block a user