Reorganised a bunch of methods

This commit is contained in:
Schuyler Cebulskie
2016-09-11 23:55:50 -04:00
parent ce6cb626dc
commit 95de09f389
7 changed files with 169 additions and 175 deletions

View File

@@ -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>}