mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 20:43:30 +01:00
feat: v13 support SUPPRESS_NOTIFICATIONS flag (#9184)
feat: add suppress notifications flag
This commit is contained in:
@@ -19,7 +19,8 @@ class GuildForumThreadManager extends ThreadManager {
|
|||||||
/**
|
/**
|
||||||
* @typedef {BaseMessageOptions} GuildForumThreadMessageCreateOptions
|
* @typedef {BaseMessageOptions} GuildForumThreadMessageCreateOptions
|
||||||
* @property {StickerResolvable} [stickers] The stickers to send with the message
|
* @property {StickerResolvable} [stickers] The stickers to send with the message
|
||||||
* @property {BitFieldResolvable} [flags] The flags to send with the message
|
* @property {BitFieldResolvable} [flags] The flags to send with the message.
|
||||||
|
* Only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ class TextBasedChannel {
|
|||||||
* @typedef {BaseMessageOptions} MessageOptions
|
* @typedef {BaseMessageOptions} MessageOptions
|
||||||
* @property {ReplyOptions} [reply] The options for replying to a message
|
* @property {ReplyOptions} [reply] The options for replying to a message
|
||||||
* @property {StickerResolvable[]} [stickers=[]] Stickers to send in the message
|
* @property {StickerResolvable[]} [stickers=[]] Stickers to send in the message
|
||||||
* @property {MessageFlags} [flags] Which flags to set for the message. Only `SUPPRESS_EMBEDS` can be set.
|
* @property {MessageFlags} [flags]
|
||||||
|
* Which flags to set for the message. Only `SUPPRESS_EMBEDS` and `SUPPRESS_NOTIFICATIONS` can be set.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ class MessageFlags extends BitField {}
|
|||||||
* * `HAS_THREAD`
|
* * `HAS_THREAD`
|
||||||
* * `EPHEMERAL`
|
* * `EPHEMERAL`
|
||||||
* * `LOADING`
|
* * `LOADING`
|
||||||
|
* * `SUPPRESS_NOTIFICATIONS`
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags}
|
* @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags}
|
||||||
*/
|
*/
|
||||||
@@ -43,6 +44,7 @@ MessageFlags.FLAGS = {
|
|||||||
HAS_THREAD: 1 << 5,
|
HAS_THREAD: 1 << 5,
|
||||||
EPHEMERAL: 1 << 6,
|
EPHEMERAL: 1 << 6,
|
||||||
LOADING: 1 << 7,
|
LOADING: 1 << 7,
|
||||||
|
SUPPRESS_NOTIFICATIONS: 1 >> 12,
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = MessageFlags;
|
module.exports = MessageFlags;
|
||||||
|
|||||||
5
typings/index.d.ts
vendored
5
typings/index.d.ts
vendored
@@ -5817,7 +5817,8 @@ export type MessageFlagsString =
|
|||||||
| 'URGENT'
|
| 'URGENT'
|
||||||
| 'HAS_THREAD'
|
| 'HAS_THREAD'
|
||||||
| 'EPHEMERAL'
|
| 'EPHEMERAL'
|
||||||
| 'LOADING';
|
| 'LOADING'
|
||||||
|
| 'SUPPRESS_NOTIFICATIONS';
|
||||||
|
|
||||||
export interface MessageInteraction {
|
export interface MessageInteraction {
|
||||||
id: Snowflake;
|
id: Snowflake;
|
||||||
@@ -5853,7 +5854,7 @@ export interface MessageOptions {
|
|||||||
reply?: ReplyOptions;
|
reply?: ReplyOptions;
|
||||||
stickers?: StickerResolvable[];
|
stickers?: StickerResolvable[];
|
||||||
attachments?: MessageAttachment[];
|
attachments?: MessageAttachment[];
|
||||||
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS', number>;
|
flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS', number>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MessageReactionResolvable = MessageReaction | Snowflake | string;
|
export type MessageReactionResolvable = MessageReaction | Snowflake | string;
|
||||||
|
|||||||
Reference in New Issue
Block a user