Rearrange and clean up more webhook stuff

This commit is contained in:
Schuyler Cebulskie
2016-10-09 15:50:50 -04:00
parent e7745a0af5
commit 29b33bffaa
7 changed files with 66 additions and 80 deletions

View File

@@ -279,6 +279,15 @@ class Client extends EventEmitter {
return this.rest.methods.getInvite(code);
}
/**
* Fetch a webhook by ID.
* @param {string} id ID of the webhook
* @returns {Promise<Webhook>}
*/
fetchWebhook(id) {
return this.rest.methods.getWebhook(id);
}
/**
* Sweeps all channels' messages and removes the ones older than the max message lifetime.
* If the message has been edited, the time of the edit is used rather than the time of the original message.