mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Allow Message#edit to accept a MessageEmbed as options parameter (#1844)
This commit is contained in:
@@ -354,7 +354,7 @@ class Message extends Base {
|
||||
/**
|
||||
* Edit the content of the message.
|
||||
* @param {StringResolvable} [content] The new content for the message
|
||||
* @param {MessageEditOptions} [options] The options to provide
|
||||
* @param {MessageEditOptions|MessageEmbed} [options] The options to provide
|
||||
* @returns {Promise<Message>}
|
||||
* @example
|
||||
* // Update the content of a message
|
||||
@@ -369,6 +369,8 @@ class Message extends Base {
|
||||
} else if (!options) {
|
||||
options = {};
|
||||
}
|
||||
if (options instanceof Embed) options = { embed: options };
|
||||
|
||||
if (typeof options.content !== 'undefined') content = options.content;
|
||||
|
||||
if (typeof content !== 'undefined') content = Util.resolveString(content);
|
||||
|
||||
Reference in New Issue
Block a user