Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1449,15 +1449,16 @@ declare namespace Eris {
tts?: boolean;
}
interface AdvancedMessageContentEdit {
flags?: number;
allowedMentions?: AllowedMentions;
attachments?: PartialAttachment[];
components?: ActionRow[];
content?: string;
/** @deprecated */
embed?: EmbedOptions;
embeds?: EmbedOptions[];
enforceNonce?: boolean;
file?: FileContent | FileContent[];
flags?: number;
}
interface AllowedMentions {
everyone?: boolean;
Expand Down
2 changes: 2 additions & 0 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ class Client extends EventEmitter {
* @arg {String} [content.content] A content string
* @arg {Object} [content.embed] [DEPRECATED] An embed object. See [the official Discord API documentation entry](https://discord.com/developers/docs/resources/channel#embed-object) for object structure
* @arg {Array<Object>} [content.embeds] An array of embed objects. See [the official Discord API documentation entry](https://discord.com/developers/docs/resources/channel#embed-object) for object structure
* @arg {Boolean} [content.enforceNonce] If true and `content.nonce` is present, if multiple messages are sent with the same nonce within a few minutes of each other, that message will be returned and no new message created
* @arg {Object} [content.messageReference] The message reference, used when replying to or forwarding messages
* @arg {String} [content.messageReference.channelID] The channel ID of the referenced message. Required when forwarding messages
* @arg {Boolean} [content.messageReference.failIfNotExists=true] Whether to throw an error if the message reference doesn't exist. If false, and the referenced message doesn't exist, the message is created without a referenced message
Expand Down Expand Up @@ -952,6 +953,7 @@ class Client extends EventEmitter {
content.embeds.push(content.embed);
}
content.allowed_mentions = this._formatAllowedMentions(content.allowedMentions);
content.enforce_nonce = content.enforceNonce;
content.sticker_ids = content.stickerIDs;
if (content.messageReference) {
content.message_reference = content.messageReference;
Expand Down
1 change: 1 addition & 0 deletions lib/structures/DMChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class DMChannel extends Channel {
* @arg {String} [content.content] A content string
* @arg {Object} [content.embed] [DEPRECATED] An embed object. See [the official Discord API documentation entry](https://discord.com/developers/docs/resources/channel#embed-object) for object structure
* @arg {Array<Object>} [content.embeds] An array of embed objects. See [the official Discord API documentation entry](https://discord.com/developers/docs/resources/channel#embed-object) for object structure
* @arg {Boolean} [content.enforceNonce] If true and `content.nonce` is present, if multiple messages are sent with the same nonce within a few minutes of each other, that message will be returned and no new message created
* @arg {Object} [content.messageReference] The message reference, used when replying to or forwarding messages
* @arg {String} [content.messageReference.channelID] The channel ID of the referenced message. Required when forwarding messages
* @arg {Boolean} [content.messageReference.failIfNotExists=true] Whether to throw an error if the message reference doesn't exist. If false, and the referenced message doesn't exist, the message is created without a referenced message
Expand Down
1 change: 1 addition & 0 deletions lib/structures/GuildTextableChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class GuildTextableChannel extends GuildChannel {
* @arg {String} [content.content] A content string
* @arg {Object} [content.embed] [DEPRECATED] An embed object. See [the official Discord API documentation entry](https://discord.com/developers/docs/resources/channel#embed-object) for object structure
* @arg {Array<Object>} [content.embeds] An array of embed objects. See [the official Discord API documentation entry](https://discord.com/developers/docs/resources/channel#embed-object) for object structure
* @arg {Boolean} [content.enforceNonce] If true and `content.nonce` is present, if multiple messages are sent with the same nonce within a few minutes of each other, that message will be returned and no new message created
* @arg {Number} [content.flags] A number representing the [flags](https://discord.dev/resources/channel#message-object-message-flags) to apply to the message (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS)
* @arg {Object} [content.messageReference] The message reference, used when replying to or forwarding messages
* @arg {String} [content.messageReference.channelID] The channel ID of the referenced message. Required when forwarding messages
Expand Down