mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-17 03:53:29 +01:00
allow content in edit options like in message send options (#1657)
This commit is contained in:
@@ -359,6 +359,7 @@ class Message {
|
|||||||
/**
|
/**
|
||||||
* Options that can be passed into editMessage.
|
* Options that can be passed into editMessage.
|
||||||
* @typedef {Object} MessageEditOptions
|
* @typedef {Object} MessageEditOptions
|
||||||
|
* @property {string} [content] Content to be edited
|
||||||
* @property {Object} [embed] An embed to be added/edited
|
* @property {Object} [embed] An embed to be added/edited
|
||||||
* @property {string|boolean} [code] Language for optional codeblock formatting to apply
|
* @property {string|boolean} [code] Language for optional codeblock formatting to apply
|
||||||
*/
|
*/
|
||||||
@@ -381,6 +382,7 @@ class Message {
|
|||||||
} else if (!options) {
|
} else if (!options) {
|
||||||
options = {};
|
options = {};
|
||||||
}
|
}
|
||||||
|
if (typeof options.content !== 'undefined') content = options.content;
|
||||||
|
|
||||||
if (typeof content !== 'undefined') content = Util.resolveString(content);
|
if (typeof content !== 'undefined') content = Util.resolveString(content);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user