Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

executeWebhook returns a bare object, not a Message object. #578

Merged
merged 10 commits into from Dec 1, 2019
4 changes: 2 additions & 2 deletions lib/Client.js
Expand Up @@ -628,7 +628,7 @@ class Client extends EventEmitter {
* @arg {Boolean} [options.tts=false] Whether the message should be a TTS message or not
* @arg {Boolean} [options.wait=false] Whether to wait for the server to confirm the message create or not
* @arg {Boolean} [options.disableEveryone] Whether to filter @everyone/@here or not (overrides default)
* @returns {Promise}
* @returns {Promise<Message?>}
*/
executeWebhook(webhookID, token, options) {
if(!options.content && !options.file && !options.embeds) {
Expand All @@ -643,7 +643,7 @@ class Client extends EventEmitter {
username: options.username,
avatar_url: options.avatarURL,
tts: options.tts
}, options.file);
}, options.file).then((response) => options.wait ? new Message(response, this) : undefined);
}

/**
Expand Down