From 1d9edec56719b805bb48892994f611b1868c5a6b Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Sun, 8 Jul 2018 21:40:12 +0200 Subject: [PATCH] fix(Message): keep reply option when replying with an embed or attachment Fixes #2651 --- src/structures/interfaces/TextBasedChannel.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/structures/interfaces/TextBasedChannel.js b/src/structures/interfaces/TextBasedChannel.js index fe69ecb19..3109d85d4 100644 --- a/src/structures/interfaces/TextBasedChannel.js +++ b/src/structures/interfaces/TextBasedChannel.js @@ -117,8 +117,13 @@ class TextBasedChannel { options = {}; } + const { reply } = options; if (options instanceof Attachment) options = { files: [options.file] }; - if (options instanceof RichEmbed) options = { embed: options }; + if (options instanceof RichEmbed) { + if (options.reply) options.reply = undefined; + options = { embed: options }; + } + options.reply = reply; if (options.embed && options.embed.file) { if (options.files) options.files.push(options.embed.file);