Clean up some webhook stuff

This commit is contained in:
Schuyler Cebulskie
2016-10-09 15:30:46 -04:00
parent bd7ff36b66
commit e7745a0af5
5 changed files with 49 additions and 48 deletions

View File

@@ -296,6 +296,14 @@ class Guild {
return this.client.rest.methods.getGuildInvites(this);
}
/**
* Fetch all webhooks for the guild.
* @returns {Collection<Webhook>}
*/
fetchWebhooks() {
return this.client.rest.methods.fetchGuildWebhooks(this);
}
/**
* Fetch a single guild member from a user.
* @param {UserResolvable} user The user to fetch the member for
@@ -622,14 +630,6 @@ class Guild {
return this.client.rest.methods.deleteGuild(this);
}
/**
* Fetch all webhooks for the guild.
* @returns {Collection<Webhook>}
*/
fetchWebhooks() {
return this.client.rest.methods.fetchGuildWebhooks(this);
}
/**
* Whether this Guild equals another Guild. It compares all properties, so for most operations
* it is advisable to just compare `guild.id === guild2.id` as it is much faster and is often