From b759fc415e89c1f3eb3523deb23c5b514968c845 Mon Sep 17 00:00:00 2001 From: Schuyler Cebulskie Date: Sat, 27 Oct 2018 15:28:05 -0400 Subject: [PATCH] Slightly simplify logic in APIMessage.transformOptions --- src/structures/APIMessage.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/structures/APIMessage.js b/src/structures/APIMessage.js index bb4d16179..8b714fcd5 100644 --- a/src/structures/APIMessage.js +++ b/src/structures/APIMessage.js @@ -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 }; }