mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 04:31:05 +00:00
fix(Webhook#send): incorrect docs + return
Two things: * Documentation doesn't account for possible raw object return * Allows the return to be a Message object as well, like the docs originally intended
This commit is contained in:
parent
8df1ac9920
commit
e978253896
2 changed files with 5 additions and 2 deletions
|
|
@ -806,7 +806,10 @@ class RESTMethods {
|
||||||
content,
|
content,
|
||||||
tts,
|
tts,
|
||||||
embeds,
|
embeds,
|
||||||
}, files).then(resolve, reject);
|
}, files).then(data => {
|
||||||
|
if (!this.client.channels) resolve(data);
|
||||||
|
else resolve(this.client.actions.MessageCreate.handle(data).message);
|
||||||
|
}, reject);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ class Webhook {
|
||||||
* @param {StringResolvable} content The content to send
|
* @param {StringResolvable} content The content to send
|
||||||
* @param {WebhookMessageOptions|Attachment|RichEmbed} [options] The options to provide
|
* @param {WebhookMessageOptions|Attachment|RichEmbed} [options] The options to provide
|
||||||
* can also be just a RichEmbed or Attachment
|
* can also be just a RichEmbed or Attachment
|
||||||
* @returns {Promise<Message|Message[]>}
|
* @returns {Promise<Message|Message[]|Object|Object[]>}
|
||||||
* @example
|
* @example
|
||||||
* // Send a message
|
* // Send a message
|
||||||
* webhook.send('hello!')
|
* webhook.send('hello!')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue