mirror of
https://github.com/danbulant/discord.js
synced 2026-05-25 04:52:22 +00:00
Allow Message#edit to accept a MessageEmbed as options parameter (#1844)
This commit is contained in:
parent
65d9d46a3c
commit
b7c55f02c2
1 changed files with 3 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue