mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
Allow Message#edit to accept a RichEmbed and fixed RichEmbed#file's type (#1829)
This commit is contained in:
parent
1fe201ae90
commit
56fe70266e
2 changed files with 4 additions and 2 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const Mentions = require('./MessageMentions');
|
||||
const Attachment = require('./MessageAttachment');
|
||||
const Embed = require('./MessageEmbed');
|
||||
const RichEmbed = require('./RichEmbed');
|
||||
const MessageReaction = require('./MessageReaction');
|
||||
const ReactionCollector = require('./ReactionCollector');
|
||||
const Util = require('../util/Util');
|
||||
|
|
@ -365,7 +366,7 @@ class Message {
|
|||
/**
|
||||
* Edit the content of the message.
|
||||
* @param {StringResolvable} [content] The new content for the message
|
||||
* @param {MessageEditOptions} [options] The options to provide
|
||||
* @param {MessageEditOptions|RichEmbed} [options] The options to provide
|
||||
* @returns {Promise<Message>}
|
||||
* @example
|
||||
* // Update the content of a message
|
||||
|
|
@ -380,6 +381,7 @@ class Message {
|
|||
} else if (!options) {
|
||||
options = {};
|
||||
}
|
||||
if (options instanceof RichEmbed) options = { embed: options };
|
||||
return this.client.rest.methods.updateMessage(this, content, options);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ class RichEmbed {
|
|||
|
||||
/**
|
||||
* File to upload alongside this Embed
|
||||
* @type {string}
|
||||
* @type {FileOptions|string|Attachment}
|
||||
*/
|
||||
this.file = data.file;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue