mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(Message): editing with MessageEmbed or APIMessage (#5612)
This commit is contained in:
@@ -494,11 +494,8 @@ class Message extends Base {
|
||||
* .catch(console.error);
|
||||
*/
|
||||
edit(content, options) {
|
||||
if (!options && typeof content === 'object' && !Array.isArray(content)) {
|
||||
options = content;
|
||||
content = undefined;
|
||||
}
|
||||
return this.channel.messages.edit(this.id, { content, ...options });
|
||||
options = content instanceof APIMessage ? content : APIMessage.create(this.channel, content, options);
|
||||
return this.channel.messages.edit(this.id, options);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user