fix(Message): keep reply option when replying with an embed or attachment

Fixes #2651
This commit is contained in:
SpaceEEC
2018-07-08 21:40:12 +02:00
parent d81441f627
commit 1d9edec567

View File

@@ -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);