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

@@ -235,6 +235,18 @@ class Guild {
return this.channels.get(this.id);
}
/**
* Returns the GuildMember form of a User object, if the User is present in the guild.
* @param {UserResolvable} user The user that you want to obtain the GuildMember of
* @returns {?GuildMember}
* @example
* // get the guild member of a user
* const member = guild.member(message.author);
*/
member(user) {
return this.client.resolver.resolveGuildMember(this, user);
}
/**
* Updates the Guild with new information - e.g. a new name.
* @param {GuildEditData} data The data to update the guild with
@@ -364,18 +376,6 @@ class Guild {
return this.edit({ splash });
}
/**
* Returns the GuildMember form of a User object, if the User is present in the guild.
* @param {UserResolvable} user The user that you want to obtain the GuildMember of
* @returns {?GuildMember}
* @example
* // get the guild member of a user
* const member = guild.member(message.author);
*/
member(user) {
return this.client.resolver.resolveGuildMember(this, user);
}
/**
* Bans a user from the guild.
* @param {UserResolvable} user The user to ban