allow content in edit options like in message send options (#1657)

This commit is contained in:
Gus Caplan
2017-07-05 03:01:07 -05:00
committed by Amish Shah
parent f8a1f2c23b
commit 39a3e72894

View File

@@ -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);