mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 16:22:08 +00:00
Slightly simplify logic in APIMessage.transformOptions
This commit is contained in:
parent
01476de582
commit
b759fc415e
1 changed files with 2 additions and 6 deletions
|
|
@ -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 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue