mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
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:
committed by
Schuyler Cebulskie
parent
ee3a03f707
commit
27270a3bad
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user