mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
Slightly simplify logic in APIMessage.transformOptions
This commit is contained in:
@@ -287,13 +287,9 @@ class APIMessage {
|
|||||||
|
|
||||||
if (!options) {
|
if (!options) {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
} else if (options instanceof MessageEmbed) {
|
||||||
|
|
||||||
if (options instanceof MessageEmbed) {
|
|
||||||
return isWebhook ? { content, embeds: [options], ...extra } : { content, embed: options, ...extra };
|
return isWebhook ? { content, embeds: [options], ...extra } : { content, embed: options, ...extra };
|
||||||
}
|
} else if (options instanceof MessageAttachment) {
|
||||||
|
|
||||||
if (options instanceof MessageAttachment) {
|
|
||||||
return { content, files: [options], ...extra };
|
return { content, files: [options], ...extra };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user