mirror of
https://github.com/danbulant/discord.js
synced 2026-05-31 13:21:56 +00:00
fix(Message): keep reply option when replying with an embed or attachment
Fixes #2651
This commit is contained in:
parent
d81441f627
commit
1d9edec567
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue