Variable DiscordConstantsConst

DiscordConstants: {
    APPLICATION_COMMAND_LIMITS: {
        AUTOCOMPLETE_MAX_CHOICES: 25;
        DESCRIPTION: 100;
        NAME: 32;
        OPTION: {
            CHOICES: 25;
            DESCRIPTION: 100;
            NAME: 32;
        };
        OPTIONS: 25;
    };
    CDN: {
        BASE_URL: "https://cdn.discordapp.com";
        IMAGE_FORMATS: readonly ["gif", "jpeg", "jpg", "json", "png", "webp"];
        IMAGE_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
    };
    DISCORD_EPOCH: 1420070400000;
    GATEWAY: {
        INTENTS: {
            AUTO_MODERATION_CONFIGURATION: AutoModerationConfiguration;
            AUTO_MODERATION_EXECUTION: AutoModerationExecution;
            DIRECT_MESSAGES: DirectMessages;
            DIRECT_MESSAGE_REACTIONS: DirectMessageReactions;
            DIRECT_MESSAGE_TYPING: DirectMessageTyping;
            GUILDS: Guilds;
            GUILD_BANS: GuildModeration;
            GUILD_EMOJIS_AND_STICKERS: GuildEmojisAndStickers;
            GUILD_INTEGRATIONS: GuildIntegrations;
            GUILD_INVITES: GuildInvites;
            GUILD_MEMBERS: GuildMembers;
            GUILD_MESSAGES: GuildMessages;
            GUILD_MESSAGE_REACTIONS: GuildMessageReactions;
            GUILD_MESSAGE_TYPING: GuildMessageTyping;
            GUILD_PRESENCES: GuildPresences;
            GUILD_SCHEDULED_EVENTS: GuildScheduledEvents;
            GUILD_VOICE_STATES: GuildVoiceStates;
            GUILD_WEBHOOKS: GuildWebhooks;
            MESSAGE_CONTENT: MessageContent;
        };
        PRIVILEGED_INTENTS: {
            GUILD_MEMBERS: GuildMembers;
            GUILD_PRESENCES: GuildPresences;
            MESSAGE_CONTENT: MessageContent;
        };
        RATELIMITS: {
            SEND_LIMIT: 120;
            SEND_RESET_AFTER: 60000;
            SHARD_SPAWN_COOLDOWN: 5000;
        };
        REQUEST_GUILD_MEMBERS_MAX_NONCE_LENGTH: 32;
    };
    MESSAGE_COMPONENT_LIMITS: {
        BUTTON: {
            CUSTOM_ID: 100;
            LABEL: 80;
        };
        SELECT_MENU: {
            CUSTOM_ID: 100;
            MAX_VALUES: {
                MAX: 25;
                MIN: 1;
            };
            MIN_VALUES: {
                MAX: 25;
                MIN: 0;
            };
            OPTION: {
                DESCRIPTION: 100;
                LABEL: 100;
                VALUE: 100;
            };
            OPTIONS: 25;
            PLACEHOLDER: 150;
        };
        TEXT_INPUT: {
            CUSTOM_ID: 100;
            LABEL: 45;
            MAX_LENGTH: {
                MAX: 4000;
                MIN: 1;
            };
            MIN_LENGTH: {
                MAX: 4000;
                MIN: 0;
            };
            PLACEHOLDER: 100;
            VALUE: 4000;
        };
    };
    MESSAGE_LIMITS: {
        ATTACHMENTS: 10;
        CONTENT: 2000;
        EMBED: {
            AUTHOR_NAME: 256;
            DESCRIPTION: 4096;
            FIELD: {
                NAME: 256;
                VALUE: 1024;
            };
            FIELDS: 25;
            FOOTER_TEXT: 2048;
            TITLE: 256;
        };
        EMBEDS: 10;
        EMBEDS_LENGTH: 6000;
        MAX_DEFAULT_ATTACHMENTS_SIZE: 8388608;
    };
    MODAL_LIMITS: {
        COMPONENTS: 5;
        CUSTOM_ID: 100;
        TITLE: 45;
    };
    PERMISSION_FLAGS: {
        ADD_REACTIONS: bigint;
        ADMINISTRATOR: bigint;
        ATTACH_FILES: bigint;
        BAN_MEMBERS: bigint;
        CHANGE_NICKNAME: bigint;
        CONNECT: bigint;
        CREATE_INSTANT_INVITE: bigint;
        CREATE_PRIVATE_THREADS: bigint;
        CREATE_PUBLIC_THREADS: bigint;
        DEAFEN_MEMBERS: bigint;
        EMBED_LINKS: bigint;
        KICK_MEMBERS: bigint;
        MANAGE_CHANNELS: bigint;
        MANAGE_EMOJIS_AND_STICKERS: bigint;
        MANAGE_EVENTS: bigint;
        MANAGE_GUILD: bigint;
        MANAGE_MESSAGES: bigint;
        MANAGE_NICKNAMES: bigint;
        MANAGE_ROLES: bigint;
        MANAGE_THREADS: bigint;
        MANAGE_WEBHOOKS: bigint;
        MENTION_EVERYONE: bigint;
        MODERATE_MEMBERS: bigint;
        MOVE_MEMBERS: bigint;
        MUTE_MEMBERS: bigint;
        PRIORITY_SPEAKER: bigint;
        READ_MESSAGE_HISTORY: bigint;
        REQUEST_TO_SPEAK: bigint;
        SEND_MESSAGES: bigint;
        SEND_MESSAGES_IN_THREADS: bigint;
        SEND_TTS_MESSAGES: bigint;
        SPEAK: bigint;
        STREAM: bigint;
        USE_APPLICATION_COMMANDS: bigint;
        USE_EMBEDDED_ACTIVITIES: bigint;
        USE_EXTERNAL_EMOJIS: bigint;
        USE_EXTERNAL_STICKERS: bigint;
        USE_VAD: bigint;
        VIEW_AUDIT_LOG: bigint;
        VIEW_CHANNEL: bigint;
        VIEW_GUILD_INSIGHTS: bigint;
    };
    PERMISSION_FLAGS_TIMEOUT: {
        READ_MESSAGE_HISTORY: bigint;
        VIEW_CHANNEL: bigint;
    };
    REST: {
        BASE_URL: "https://discord.com/api";
        ERROR_KEY: "_errors";
        OLD_MESSAGE_THRESHOLD: 1209600000;
        RATELIMIT_HEADERS: {
            BUCKET: "x-ratelimit-bucket";
            GLOBAL: "x-ratelimit-global";
            GLOBAL_RETRY_AFTER: "retry-after";
            LIMIT: "x-ratelimit-limit";
            REMAINING: "x-ratelimit-remaining";
            RESET: "x-ratelimit-reset";
            RESET_AFTER: "x-ratelimit-reset-after";
            SCOPE: "x-ratelimit-scope";
        };
    };
} = ...

Discord API constants.

Type declaration

  • Readonly APPLICATION_COMMAND_LIMITS: {
        AUTOCOMPLETE_MAX_CHOICES: 25;
        DESCRIPTION: 100;
        NAME: 32;
        OPTION: {
            CHOICES: 25;
            DESCRIPTION: 100;
            NAME: 32;
        };
        OPTIONS: 25;
    }

    Application command limits.

    See

    Discord API Reference

    • Readonly AUTOCOMPLETE_MAX_CHOICES: 25

      The maximum number of choices an autocomplete response can specify.

      See

      Discord API Reference

    • Readonly DESCRIPTION: 100

      The maximum length for a command's description.

    • Readonly NAME: 32

      The maximum length for a command's name.

    • Readonly OPTION: {
          CHOICES: 25;
          DESCRIPTION: 100;
          NAME: 32;
      }

      Option limits.

      See

      Discord API Reference

      • Readonly CHOICES: 25

        The maximum number of choices allowed.

      • Readonly DESCRIPTION: 100

        The maximum length for an option's description.

      • Readonly NAME: 32

        The maximum length for an option's name.

    • Readonly OPTIONS: 25

      The maximum number of options allowed.

  • Readonly CDN: {
        BASE_URL: "https://cdn.discordapp.com";
        IMAGE_FORMATS: readonly ["gif", "jpeg", "jpg", "json", "png", "webp"];
        IMAGE_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096];
    }

    CDN constants.

    • Readonly BASE_URL: "https://cdn.discordapp.com"

      Discord's CDN URL.

      See

      Discord API Reference

    • Readonly IMAGE_FORMATS: readonly ["gif", "jpeg", "jpg", "json", "png", "webp"]

      Allowed image formats.

      See

      Discord API Reference

    • Readonly IMAGE_SIZES: readonly [16, 32, 64, 128, 256, 512, 1024, 2048, 4096]

      Allowed image sizes.

      See

      Discord API Reference

  • Readonly DISCORD_EPOCH: 1420070400000

    The Discord epoch as a unix millisecond timestamp.

    See

    Discord API Reference

  • Readonly GATEWAY: {
        INTENTS: {
            AUTO_MODERATION_CONFIGURATION: AutoModerationConfiguration;
            AUTO_MODERATION_EXECUTION: AutoModerationExecution;
            DIRECT_MESSAGES: DirectMessages;
            DIRECT_MESSAGE_REACTIONS: DirectMessageReactions;
            DIRECT_MESSAGE_TYPING: DirectMessageTyping;
            GUILDS: Guilds;
            GUILD_BANS: GuildModeration;
            GUILD_EMOJIS_AND_STICKERS: GuildEmojisAndStickers;
            GUILD_INTEGRATIONS: GuildIntegrations;
            GUILD_INVITES: GuildInvites;
            GUILD_MEMBERS: GuildMembers;
            GUILD_MESSAGES: GuildMessages;
            GUILD_MESSAGE_REACTIONS: GuildMessageReactions;
            GUILD_MESSAGE_TYPING: GuildMessageTyping;
            GUILD_PRESENCES: GuildPresences;
            GUILD_SCHEDULED_EVENTS: GuildScheduledEvents;
            GUILD_VOICE_STATES: GuildVoiceStates;
            GUILD_WEBHOOKS: GuildWebhooks;
            MESSAGE_CONTENT: MessageContent;
        };
        PRIVILEGED_INTENTS: {
            GUILD_MEMBERS: GuildMembers;
            GUILD_PRESENCES: GuildPresences;
            MESSAGE_CONTENT: MessageContent;
        };
        RATELIMITS: {
            SEND_LIMIT: 120;
            SEND_RESET_AFTER: 60000;
            SHARD_SPAWN_COOLDOWN: 5000;
        };
        REQUEST_GUILD_MEMBERS_MAX_NONCE_LENGTH: 32;
    }

    Gateway related constants.

    • Readonly INTENTS: {
          AUTO_MODERATION_CONFIGURATION: AutoModerationConfiguration;
          AUTO_MODERATION_EXECUTION: AutoModerationExecution;
          DIRECT_MESSAGES: DirectMessages;
          DIRECT_MESSAGE_REACTIONS: DirectMessageReactions;
          DIRECT_MESSAGE_TYPING: DirectMessageTyping;
          GUILDS: Guilds;
          GUILD_BANS: GuildModeration;
          GUILD_EMOJIS_AND_STICKERS: GuildEmojisAndStickers;
          GUILD_INTEGRATIONS: GuildIntegrations;
          GUILD_INVITES: GuildInvites;
          GUILD_MEMBERS: GuildMembers;
          GUILD_MESSAGES: GuildMessages;
          GUILD_MESSAGE_REACTIONS: GuildMessageReactions;
          GUILD_MESSAGE_TYPING: GuildMessageTyping;
          GUILD_PRESENCES: GuildPresences;
          GUILD_SCHEDULED_EVENTS: GuildScheduledEvents;
          GUILD_VOICE_STATES: GuildVoiceStates;
          GUILD_WEBHOOKS: GuildWebhooks;
          MESSAGE_CONTENT: MessageContent;
      }

      Gateway intents. Includes privileged intents.

      See

      Discord API Reference

      • Readonly AUTO_MODERATION_CONFIGURATION: AutoModerationConfiguration
      • Readonly AUTO_MODERATION_EXECUTION: AutoModerationExecution
      • Readonly DIRECT_MESSAGES: DirectMessages
      • Readonly DIRECT_MESSAGE_REACTIONS: DirectMessageReactions
      • Readonly DIRECT_MESSAGE_TYPING: DirectMessageTyping
      • Readonly GUILDS: Guilds
      • Readonly GUILD_BANS: GuildModeration
      • Readonly GUILD_EMOJIS_AND_STICKERS: GuildEmojisAndStickers
      • Readonly GUILD_INTEGRATIONS: GuildIntegrations
      • Readonly GUILD_INVITES: GuildInvites
      • Readonly GUILD_MEMBERS: GuildMembers
      • Readonly GUILD_MESSAGES: GuildMessages
      • Readonly GUILD_MESSAGE_REACTIONS: GuildMessageReactions
      • Readonly GUILD_MESSAGE_TYPING: GuildMessageTyping
      • Readonly GUILD_PRESENCES: GuildPresences
      • Readonly GUILD_SCHEDULED_EVENTS: GuildScheduledEvents
      • Readonly GUILD_VOICE_STATES: GuildVoiceStates
      • Readonly GUILD_WEBHOOKS: GuildWebhooks
      • Readonly MESSAGE_CONTENT: MessageContent
    • Readonly PRIVILEGED_INTENTS: {
          GUILD_MEMBERS: GuildMembers;
          GUILD_PRESENCES: GuildPresences;
          MESSAGE_CONTENT: MessageContent;
      }

      Privileged gateway intents.

      See

      Discord API Reference

      • Readonly GUILD_MEMBERS: GuildMembers
      • Readonly GUILD_PRESENCES: GuildPresences
      • Readonly MESSAGE_CONTENT: MessageContent
    • Readonly RATELIMITS: {
          SEND_LIMIT: 120;
          SEND_RESET_AFTER: 60000;
          SHARD_SPAWN_COOLDOWN: 5000;
      }

      Gateway rate limits.

      See

      Discord API Reference

      • Readonly SEND_LIMIT: 120

        The number of commands allowed to be sent every RESET_AFTER milliseconds.

      • Readonly SEND_RESET_AFTER: 60000

        The amount of time in milliseconds that SEND_LIMIT is specified for.

      • Readonly SHARD_SPAWN_COOLDOWN: 5000

        The cooldown between spawning shards from the same bucket in milliseconds.

        See

        Discord API Reference

    • Readonly REQUEST_GUILD_MEMBERS_MAX_NONCE_LENGTH: 32

      The maximum length in bytes allowed for the nonce property in a request guild members payload.

  • Readonly MESSAGE_COMPONENT_LIMITS: {
        BUTTON: {
            CUSTOM_ID: 100;
            LABEL: 80;
        };
        SELECT_MENU: {
            CUSTOM_ID: 100;
            MAX_VALUES: {
                MAX: 25;
                MIN: 1;
            };
            MIN_VALUES: {
                MAX: 25;
                MIN: 0;
            };
            OPTION: {
                DESCRIPTION: 100;
                LABEL: 100;
                VALUE: 100;
            };
            OPTIONS: 25;
            PLACEHOLDER: 150;
        };
        TEXT_INPUT: {
            CUSTOM_ID: 100;
            LABEL: 45;
            MAX_LENGTH: {
                MAX: 4000;
                MIN: 1;
            };
            MIN_LENGTH: {
                MAX: 4000;
                MIN: 0;
            };
            PLACEHOLDER: 100;
            VALUE: 4000;
        };
    }

    Message component limits.

    See

    Discord API Reference

    • Readonly BUTTON: {
          CUSTOM_ID: 100;
          LABEL: 80;
      }

      Button limits.

      See

      Discord API Reference

      • Readonly CUSTOM_ID: 100

        The maximum length for a button's custom ID.

      • Readonly LABEL: 80

        The maximum length for a button's label.

    • Readonly SELECT_MENU: {
          CUSTOM_ID: 100;
          MAX_VALUES: {
              MAX: 25;
              MIN: 1;
          };
          MIN_VALUES: {
              MAX: 25;
              MIN: 0;
          };
          OPTION: {
              DESCRIPTION: 100;
              LABEL: 100;
              VALUE: 100;
          };
          OPTIONS: 25;
          PLACEHOLDER: 150;
      }

      Select menu limits.

      See

      Discord API Reference

      • Readonly CUSTOM_ID: 100

        The maximum length for a select menu's custom ID.

      • Readonly MAX_VALUES: {
            MAX: 25;
            MIN: 1;
        }

        Maximum value limits.

        • Readonly MAX: 25
        • Readonly MIN: 1
      • Readonly MIN_VALUES: {
            MAX: 25;
            MIN: 0;
        }

        Minimum value limits.

        • Readonly MAX: 25
        • Readonly MIN: 0
      • Readonly OPTION: {
            DESCRIPTION: 100;
            LABEL: 100;
            VALUE: 100;
        }

        Option limits.

        See

        Discord API Reference

        • Readonly DESCRIPTION: 100

          The maximum length for an option's description.

        • Readonly LABEL: 100

          The maximum length for an option's label.

        • Readonly VALUE: 100

          The maximum length for an option's value.

      • Readonly OPTIONS: 25

        The maximum number of options allowed.

      • Readonly PLACEHOLDER: 150

        The maximum length for a select menu's placeholder.

    • Readonly TEXT_INPUT: {
          CUSTOM_ID: 100;
          LABEL: 45;
          MAX_LENGTH: {
              MAX: 4000;
              MIN: 1;
          };
          MIN_LENGTH: {
              MAX: 4000;
              MIN: 0;
          };
          PLACEHOLDER: 100;
          VALUE: 4000;
      }

      Text input limits.

      See

      Discord API Reference

      • Readonly CUSTOM_ID: 100

        The maximum length for a text input's custom ID.

      • Readonly LABEL: 45

        The maximum length for a text input's label.

      • Readonly MAX_LENGTH: {
            MAX: 4000;
            MIN: 1;
        }

        Maximum value limits.

        • Readonly MAX: 4000
        • Readonly MIN: 1
      • Readonly MIN_LENGTH: {
            MAX: 4000;
            MIN: 0;
        }

        Minimum value limits.

        • Readonly MAX: 4000
        • Readonly MIN: 0
      • Readonly PLACEHOLDER: 100

        The maximum length for a text input's placeholder.

      • Readonly VALUE: 4000

        The maximum length for a text input's value.

  • Readonly MESSAGE_LIMITS: {
        ATTACHMENTS: 10;
        CONTENT: 2000;
        EMBED: {
            AUTHOR_NAME: 256;
            DESCRIPTION: 4096;
            FIELD: {
                NAME: 256;
                VALUE: 1024;
            };
            FIELDS: 25;
            FOOTER_TEXT: 2048;
            TITLE: 256;
        };
        EMBEDS: 10;
        EMBEDS_LENGTH: 6000;
        MAX_DEFAULT_ATTACHMENTS_SIZE: 8388608;
    }

    Message limits.

    See

    Discord API Reference

    • Readonly ATTACHMENTS: 10

      The maximum number of attachments allowed.

    • Readonly CONTENT: 2000

      The maximum length for a message's content.

    • Readonly EMBED: {
          AUTHOR_NAME: 256;
          DESCRIPTION: 4096;
          FIELD: {
              NAME: 256;
              VALUE: 1024;
          };
          FIELDS: 25;
          FOOTER_TEXT: 2048;
          TITLE: 256;
      }

      Embed limits.

      See

      Discord API Reference

      • Readonly AUTHOR_NAME: 256

        The maximum length for an embed's author.

      • Readonly DESCRIPTION: 4096

        The maximum length for an embed's description.

      • Readonly FIELD: {
            NAME: 256;
            VALUE: 1024;
        }

        Field limits.

        • Readonly NAME: 256

          The maximum length for a field's name.

        • Readonly VALUE: 1024

          The maximum length for a field's value.

      • Readonly FIELDS: 25

        The maximum number of fields allowed.

      • Readonly FOOTER_TEXT: 2048

        The maximum length for an embed's footer.

      • Readonly TITLE: 256

        The maximum length for an embed's title.

    • Readonly EMBEDS: 10

      The maximum number of embeds allowed.

    • Readonly EMBEDS_LENGTH: 6000

      The maximum length allowed for the sum of all limited fields on all embeds in a single message.

      See

      Discord API Reference

    • Readonly MAX_DEFAULT_ATTACHMENTS_SIZE: 8388608

      The maximum default attachment size.

      See

      Discord API Reference

  • Readonly MODAL_LIMITS: {
        COMPONENTS: 5;
        CUSTOM_ID: 100;
        TITLE: 45;
    }

    Modal limits.

    See

    Discord API Reference

    • Readonly COMPONENTS: 5

      The maximum number of components allowed.

    • Readonly CUSTOM_ID: 100

      The maximum length for a modal's custom ID.

    • Readonly TITLE: 45

      The maximum length for a modal's title.

  • Readonly PERMISSION_FLAGS: {
        ADD_REACTIONS: bigint;
        ADMINISTRATOR: bigint;
        ATTACH_FILES: bigint;
        BAN_MEMBERS: bigint;
        CHANGE_NICKNAME: bigint;
        CONNECT: bigint;
        CREATE_INSTANT_INVITE: bigint;
        CREATE_PRIVATE_THREADS: bigint;
        CREATE_PUBLIC_THREADS: bigint;
        DEAFEN_MEMBERS: bigint;
        EMBED_LINKS: bigint;
        KICK_MEMBERS: bigint;
        MANAGE_CHANNELS: bigint;
        MANAGE_EMOJIS_AND_STICKERS: bigint;
        MANAGE_EVENTS: bigint;
        MANAGE_GUILD: bigint;
        MANAGE_MESSAGES: bigint;
        MANAGE_NICKNAMES: bigint;
        MANAGE_ROLES: bigint;
        MANAGE_THREADS: bigint;
        MANAGE_WEBHOOKS: bigint;
        MENTION_EVERYONE: bigint;
        MODERATE_MEMBERS: bigint;
        MOVE_MEMBERS: bigint;
        MUTE_MEMBERS: bigint;
        PRIORITY_SPEAKER: bigint;
        READ_MESSAGE_HISTORY: bigint;
        REQUEST_TO_SPEAK: bigint;
        SEND_MESSAGES: bigint;
        SEND_MESSAGES_IN_THREADS: bigint;
        SEND_TTS_MESSAGES: bigint;
        SPEAK: bigint;
        STREAM: bigint;
        USE_APPLICATION_COMMANDS: bigint;
        USE_EMBEDDED_ACTIVITIES: bigint;
        USE_EXTERNAL_EMOJIS: bigint;
        USE_EXTERNAL_STICKERS: bigint;
        USE_VAD: bigint;
        VIEW_AUDIT_LOG: bigint;
        VIEW_CHANNEL: bigint;
        VIEW_GUILD_INSIGHTS: bigint;
    }

    Bitwise permission flags.

    See

    Discord API Reference

    • Readonly ADD_REACTIONS: bigint
    • Readonly ADMINISTRATOR: bigint
    • Readonly ATTACH_FILES: bigint
    • Readonly BAN_MEMBERS: bigint
    • Readonly CHANGE_NICKNAME: bigint
    • Readonly CONNECT: bigint
    • Readonly CREATE_INSTANT_INVITE: bigint
    • Readonly CREATE_PRIVATE_THREADS: bigint
    • Readonly CREATE_PUBLIC_THREADS: bigint
    • Readonly DEAFEN_MEMBERS: bigint
    • Readonly EMBED_LINKS: bigint
    • Readonly KICK_MEMBERS: bigint
    • Readonly MANAGE_CHANNELS: bigint
    • Readonly MANAGE_EMOJIS_AND_STICKERS: bigint
    • Readonly MANAGE_EVENTS: bigint
    • Readonly MANAGE_GUILD: bigint
    • Readonly MANAGE_MESSAGES: bigint
    • Readonly MANAGE_NICKNAMES: bigint
    • Readonly MANAGE_ROLES: bigint
    • Readonly MANAGE_THREADS: bigint
    • Readonly MANAGE_WEBHOOKS: bigint
    • Readonly MENTION_EVERYONE: bigint
    • Readonly MODERATE_MEMBERS: bigint
    • Readonly MOVE_MEMBERS: bigint
    • Readonly MUTE_MEMBERS: bigint
    • Readonly PRIORITY_SPEAKER: bigint
    • Readonly READ_MESSAGE_HISTORY: bigint
    • Readonly REQUEST_TO_SPEAK: bigint
    • Readonly SEND_MESSAGES: bigint
    • Readonly SEND_MESSAGES_IN_THREADS: bigint
    • Readonly SEND_TTS_MESSAGES: bigint
    • Readonly SPEAK: bigint
    • Readonly STREAM: bigint
    • Readonly USE_APPLICATION_COMMANDS: bigint
    • Readonly USE_EMBEDDED_ACTIVITIES: bigint
    • Readonly USE_EXTERNAL_EMOJIS: bigint
    • Readonly USE_EXTERNAL_STICKERS: bigint
    • Readonly USE_VAD: bigint
    • Readonly VIEW_AUDIT_LOG: bigint
    • Readonly VIEW_CHANNEL: bigint
    • Readonly VIEW_GUILD_INSIGHTS: bigint
  • Readonly PERMISSION_FLAGS_TIMEOUT: {
        READ_MESSAGE_HISTORY: bigint;
        VIEW_CHANNEL: bigint;
    }

    Bitwise permission flags for when a user is timed out.

    See

    Discord API Reference

    • Readonly READ_MESSAGE_HISTORY: bigint
    • Readonly VIEW_CHANNEL: bigint
  • Readonly REST: {
        BASE_URL: "https://discord.com/api";
        ERROR_KEY: "_errors";
        OLD_MESSAGE_THRESHOLD: 1209600000;
        RATELIMIT_HEADERS: {
            BUCKET: "x-ratelimit-bucket";
            GLOBAL: "x-ratelimit-global";
            GLOBAL_RETRY_AFTER: "retry-after";
            LIMIT: "x-ratelimit-limit";
            REMAINING: "x-ratelimit-remaining";
            RESET: "x-ratelimit-reset";
            RESET_AFTER: "x-ratelimit-reset-after";
            SCOPE: "x-ratelimit-scope";
        };
    }

    REST related constants.

    • Readonly BASE_URL: "https://discord.com/api"

      Discord's base API URL.

      See

      Discord API Reference

    • Readonly ERROR_KEY: "_errors"

      The ending key where an error array is defined on a rest error.

    • Readonly OLD_MESSAGE_THRESHOLD: 1209600000

      The amount of milliseconds after a message is created where it causes issues with rate limiting.

      See

      GitHub Issue

    • Readonly RATELIMIT_HEADERS: {
          BUCKET: "x-ratelimit-bucket";
          GLOBAL: "x-ratelimit-global";
          GLOBAL_RETRY_AFTER: "retry-after";
          LIMIT: "x-ratelimit-limit";
          REMAINING: "x-ratelimit-remaining";
          RESET: "x-ratelimit-reset";
          RESET_AFTER: "x-ratelimit-reset-after";
          SCOPE: "x-ratelimit-scope";
      }

      Rest rate limit headers. Headers are lowercase to allow for easier comparison (receivedHeader.toLowerCase() === REST_RATELIMIT_HEADERS.HEADER), as some http libraries return headers in all uppercase or all lowercase.

      See

      Discord API Reference

      • Readonly BUCKET: "x-ratelimit-bucket"
      • Readonly GLOBAL: "x-ratelimit-global"
      • Readonly GLOBAL_RETRY_AFTER: "retry-after"
      • Readonly LIMIT: "x-ratelimit-limit"
      • Readonly REMAINING: "x-ratelimit-remaining"
      • Readonly RESET: "x-ratelimit-reset"
      • Readonly RESET_AFTER: "x-ratelimit-reset-after"
      • Readonly SCOPE: "x-ratelimit-scope"

Generated using TypeDoc