mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +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) {
|
||||
options = {};
|
||||
}
|
||||
|
||||
if (options instanceof MessageEmbed) {
|
||||
} else if (options instanceof MessageEmbed) {
|
||||
return isWebhook ? { content, embeds: [options], ...extra } : { content, embed: options, ...extra };
|
||||
}
|
||||
|
||||
if (options instanceof MessageAttachment) {
|
||||
} else if (options instanceof MessageAttachment) {
|
||||
return { content, files: [options], ...extra };
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue