add embed support! (#894)

* add embed support!

* document message embeds

* make gawdl3y happy

* make edit great again

* make docs better

* Update Message.js

* Update TextBasedChannel.js

* Update TextBasedChannel.js
This commit is contained in:
Gus Caplan
2016-11-13 00:05:13 -06:00
committed by Schuyler Cebulskie
parent ee3a03f707
commit 27270a3bad
3 changed files with 19 additions and 10 deletions

View File

@@ -340,9 +340,16 @@ class Message {
return this.mentions.users.has(data) || this.mentions.channels.has(data) || this.mentions.roles.has(data);
}
/**
* Options that can be passed into editMessage
* @typedef {Object} MessageEditOptions
* @property {Object} [embed] An embed to be added/edited
*/
/**
* Edit the content of the message
* @param {StringResolvable} content The new content for the message
* @param {MessageEditOptions} [options={}] The options to provide
* @returns {Promise<Message>}
* @example
* // update the content of a message
@@ -350,8 +357,8 @@ class Message {
* .then(msg => console.log(`Updated the content of a message from ${msg.author}`))
* .catch(console.error);
*/
edit(content) {
return this.client.rest.methods.updateMessage(this, content);
edit(content, options = {}) {
return this.client.rest.methods.updateMessage(this, content, options);
}
/**