This commit is contained in:
Travis CI 2016-12-03 04:00:30 +00:00
parent 3478205e76
commit fa75a728e1
2 changed files with 10 additions and 1 deletions

View file

@ -3405,6 +3405,15 @@ class Message {
return this.client.rest.methods.sendMessage(this.channel, content, options);
}
/**
* Fetches the webhook used to create this message.
* @returns {Promise<?Webhook>}
*/
fetchWebhook() {
if (!this.webhookID) return Promise.reject(new Error('The message was not sent by a webhook.'));
return this.client.fetchWebhook(this.webhookID);
}
/**
* Used mainly internally. Whether two messages are identical in properties. If you want to compare messages
* without checking all the properties, use `message.id === message2.id`, which is much more efficient. This

File diff suppressed because one or more lines are too long