mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
feat: update Discord developer documentation links and add new flags (#9473)
- Update developer documentation links in WebSocketShard.js, ActivityFlags.js, Constants.js, and MessageFlags.js - Add new flags in ApplicationFlags.js, MessageFlags.js, Permissions.js, and SystemChannelFlags.js - Update typings in index.d.ts for the added flags
This commit is contained in:
@@ -735,7 +735,7 @@ class WebSocketShard extends EventEmitter {
|
||||
/**
|
||||
* Adds a packet to the queue to be sent to the gateway.
|
||||
* <warn>If you use this method, make sure you understand that you need to provide
|
||||
* a full [Payload](https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-commands).
|
||||
* a full [Payload](https://discord.com/developers/docs/topics/gateway-events#payload-structure).
|
||||
* Do not use this method if you don't know what you're doing.</warn>
|
||||
* @param {Object} data The full packet to send
|
||||
* @param {boolean} [important=false] If this packet should be added first in queue
|
||||
|
||||
@@ -27,7 +27,7 @@ class ActivityFlags extends BitField {}
|
||||
* * `PARTY_PRIVACY_VOICE_CHANNEL`
|
||||
* * `EMBEDDED`
|
||||
* @type {Object}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#activity-object-activity-flags}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags}
|
||||
*/
|
||||
ActivityFlags.FLAGS = {
|
||||
INSTANCE: 1 << 0,
|
||||
|
||||
@@ -23,6 +23,7 @@ class ApplicationFlags extends BitField {}
|
||||
|
||||
/**
|
||||
* Numeric application flags. All available properties:
|
||||
* * `APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE`
|
||||
* * `GATEWAY_PRESENCE`
|
||||
* * `GATEWAY_PRESENCE_LIMITED`
|
||||
* * `GATEWAY_GUILD_MEMBERS`
|
||||
@@ -31,10 +32,12 @@ class ApplicationFlags extends BitField {}
|
||||
* * `EMBEDDED`
|
||||
* * `GATEWAY_MESSAGE_CONTENT`
|
||||
* * `GATEWAY_MESSAGE_CONTENT_LIMITED`
|
||||
* * `APPLICATION_COMMAND_BADGE`
|
||||
* @type {Object}
|
||||
* @see {@link https://discord.com/developers/docs/resources/application#application-object-application-flags}
|
||||
*/
|
||||
ApplicationFlags.FLAGS = {
|
||||
APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE: 1 << 6,
|
||||
GATEWAY_PRESENCE: 1 << 12,
|
||||
GATEWAY_PRESENCE_LIMITED: 1 << 13,
|
||||
GATEWAY_GUILD_MEMBERS: 1 << 14,
|
||||
@@ -43,6 +46,7 @@ ApplicationFlags.FLAGS = {
|
||||
EMBEDDED: 1 << 17,
|
||||
GATEWAY_MESSAGE_CONTENT: 1 << 18,
|
||||
GATEWAY_MESSAGE_CONTENT_LIMITED: 1 << 19,
|
||||
APPLICATION_COMMAND_BADGE: 1 << 23,
|
||||
};
|
||||
|
||||
module.exports = ApplicationFlags;
|
||||
|
||||
@@ -432,7 +432,7 @@ exports.PartialTypes = keyMirror(['USER', 'CHANNEL', 'GUILD_MEMBER', 'MESSAGE',
|
||||
* * GUILD_SCHEDULED_EVENT_USER_REMOVE
|
||||
* * GUILD_AUDIT_LOG_ENTRY_CREATE
|
||||
* @typedef {string} WSEventType
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events}
|
||||
* @see {@link https://discord.com/developers/docs/topics/gateway-events#receive-events}
|
||||
*/
|
||||
exports.WSEvents = keyMirror([
|
||||
'READY',
|
||||
|
||||
@@ -31,7 +31,9 @@ class MessageFlags extends BitField {}
|
||||
* * `HAS_THREAD`
|
||||
* * `EPHEMERAL`
|
||||
* * `LOADING`
|
||||
* * `FAILED_TO_MENTION_SOME_ROLES_IN_THREAD`
|
||||
* * `SUPPRESS_NOTIFICATIONS`
|
||||
* * `IS_VOICE_MESSAGE`
|
||||
* @type {Object}
|
||||
* @see {@link https://discord.com/developers/docs/resources/channel#message-object-message-flags}
|
||||
*/
|
||||
@@ -44,6 +46,7 @@ MessageFlags.FLAGS = {
|
||||
HAS_THREAD: 1 << 5,
|
||||
EPHEMERAL: 1 << 6,
|
||||
LOADING: 1 << 7,
|
||||
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD: 1 << 8,
|
||||
SUPPRESS_NOTIFICATIONS: 1 << 12,
|
||||
IS_VOICE_MESSAGE: 1 << 13,
|
||||
};
|
||||
|
||||
@@ -110,6 +110,7 @@ class Permissions extends BitField {
|
||||
* * `MODERATE_MEMBERS`
|
||||
* * `VIEW_CREATOR_MONETIZATION_ANALYTICS`
|
||||
* * `USE_SOUNDBOARD`
|
||||
* * `SEND_VOICE_MESSAGES`
|
||||
* @type {Object<string, bigint>}
|
||||
* @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags}
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,8 @@ class SystemChannelFlags extends BitField {}
|
||||
* * `SUPPRESS_PREMIUM_SUBSCRIPTIONS` (Suppress server boost notifications)
|
||||
* * `SUPPRESS_GUILD_REMINDER_NOTIFICATIONS` (Suppress server setup tips)
|
||||
* * `SUPPRESS_JOIN_NOTIFICATION_REPLIES` (Hide member join sticker reply buttons)
|
||||
* * `SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS` (Suppress role subscription purchase and renewal notifications)
|
||||
* * `SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES` (HHide role subscription sticker reply buttons)
|
||||
* @type {Object}
|
||||
* @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags}
|
||||
*/
|
||||
@@ -46,6 +48,8 @@ SystemChannelFlags.FLAGS = {
|
||||
SUPPRESS_PREMIUM_SUBSCRIPTIONS: 1 << 1,
|
||||
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS: 1 << 2,
|
||||
SUPPRESS_JOIN_NOTIFICATION_REPLIES: 1 << 3,
|
||||
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS: 1 << 4,
|
||||
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES: 1 << 5,
|
||||
};
|
||||
|
||||
module.exports = SystemChannelFlags;
|
||||
|
||||
Reference in New Issue
Block a user