mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
fix(Message): keep reply option when replying with an embed or attachment
Fixes #2651
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user