//#region node_modules/discord-api-types/globals.d.ts /** * @see {@link https://discord.com/developers/docs/reference#snowflakes} */ type Snowflake = string; /** * @see {@link https://discord.com/developers/docs/topics/permissions} */ type Permissions = string; //#endregion //#region node_modules/discord-api-types/rest/common.d.ts /** * @see {@link https://discord.com/developers/docs/reference#locales} */ declare enum Locale { Indonesian = "id", EnglishUS = "en-US", EnglishGB = "en-GB", Bulgarian = "bg", ChineseCN = "zh-CN", ChineseTW = "zh-TW", Croatian = "hr", Czech = "cs", Danish = "da", Dutch = "nl", Finnish = "fi", French = "fr", German = "de", Greek = "el", Hindi = "hi", Hungarian = "hu", Italian = "it", Japanese = "ja", Korean = "ko", Lithuanian = "lt", Norwegian = "no", Polish = "pl", PortugueseBR = "pt-BR", Romanian = "ro", Russian = "ru", SpanishES = "es-ES", SpanishLATAM = "es-419", Swedish = "sv-SE", Thai = "th", Turkish = "tr", Ukrainian = "uk", Vietnamese = "vi" } //#endregion //#region node_modules/discord-api-types/payloads/common.d.ts type LocalizationMap = Partial>; //#endregion //#region node_modules/discord-api-types/utils/internals.d.ts type _NonNullableFields = { [P in keyof T]: NonNullable }; type _AddUndefinedToPossiblyUndefinedPropertiesOfInterface = { [K in keyof Base]: Base[K] extends Exclude ? _AddUndefinedToPossiblyUndefinedPropertiesOfInterface : _AddUndefinedToPossiblyUndefinedPropertiesOfInterface | undefined }; //#endregion //#region node_modules/discord-api-types/payloads/v10/permissions.d.ts /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ interface APIRole { /** * Role id */ id: Snowflake; /** * Role name */ name: string; /** * Integer representation of hexadecimal color code * * @deprecated Use `colors` instead. * @remarks `color` will still be returned by the API, but using the `colors` field is recommended when doing requests. */ color: number; /** * The role's colors */ colors: APIRoleColors; /** * If this role is pinned in the user listing */ hoist: boolean; /** * The role icon hash */ icon?: string | null; /** * The role unicode emoji as a standard emoji */ unicode_emoji?: string | null; /** * Position of this role */ position: number; /** * Permission bit set * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ permissions: Permissions; /** * Whether this role is managed by an integration */ managed: boolean; /** * Whether this role is mentionable */ mentionable: boolean; /** * The tags this role has */ tags?: APIRoleTags; /** * Role flags */ flags: RoleFlags; } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-tags-structure} */ interface APIRoleTags { /** * The id of the bot this role belongs to */ bot_id?: Snowflake; /** * Whether this is the guild's premium subscriber role */ premium_subscriber?: null; /** * The id of the integration this role belongs to */ integration_id?: Snowflake; /** * The id of this role's subscription sku and listing */ subscription_listing_id?: Snowflake; /** * Whether this role is available for purchase */ available_for_purchase?: null; /** * Whether this role is a guild's linked role */ guild_connections?: null; } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-object-role-flags} */ declare enum RoleFlags { /** * Role can be selected by members in an onboarding prompt */ InPrompt = 1 } /** * @see {@link https://discord.com/developers/docs/topics/permissions#role-colors-object} */ interface APIRoleColors { /** * The primary color for the role */ primary_color: number; /** * The secondary color for the role, this will make the role a gradient between the other provided colors */ secondary_color: number | null; /** * The tertiary color for the role, this will turn the gradient into a holographic style * * @remarks When sending `tertiary_color` the API enforces the role color to be a holographic style with values of `primary_color = 11127295`, `secondary_color = 16759788`, and `tertiary_color = 16761760`. */ tertiary_color: number | null; } //#endregion //#region node_modules/discord-api-types/payloads/v10/user.d.ts /** * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ interface APIUser { /** * The user's id */ id: Snowflake; /** * The user's username, not unique across the platform */ username: string; /** * The user's Discord-tag */ discriminator: string; /** * The user's display name, if it is set */ global_name: string | null; /** * The user's avatar hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ avatar: string | null; /** * Whether the user belongs to an OAuth2 application */ bot?: boolean; /** * Whether the user is an Official Discord System user (part of the urgent message system) */ system?: boolean; /** * Whether the user has two factor enabled on their account */ mfa_enabled?: boolean; /** * The user's banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner?: string | null; /** * The user's banner color encoded as an integer representation of hexadecimal color code */ accent_color?: number | null; /** * The user's chosen language option */ locale?: string; /** * Whether the email on this account has been verified */ verified?: boolean; /** * The user's email */ email?: string | null; /** * The flags on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ flags?: UserFlags; /** * The type of Nitro subscription on a user's account * * @remarks This field will return `0` for applications that have not been approved for the {@link OAuth2Scopes.IdentifyPremium} scope. * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ premium_type?: UserPremiumType; /** * The public flags on a user's account * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ public_flags?: UserFlags; /** * The user's avatar decoration hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} * @deprecated Use {@link APIUser.avatar_decoration_data} instead */ avatar_decoration?: string | null; /** * The data for the user's avatar decoration * * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ avatar_decoration_data?: APIAvatarDecorationData | null; /** * The data for the user's collectibles * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ collectibles?: APICollectibles | null; /** * The user's primary guild * * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild} */ primary_guild?: APIUserPrimaryGuild | null; } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-flags} */ declare enum UserFlags { /** * Discord Employee */ Staff = 1, /** * Partnered Server Owner */ Partner = 2, /** * HypeSquad Events Member */ Hypesquad = 4, /** * Bug Hunter Level 1 */ BugHunterLevel1 = 8, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ MFASMS = 16, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ PremiumPromoDismissed = 32, /** * House Bravery Member */ HypeSquadOnlineHouse1 = 64, /** * House Brilliance Member */ HypeSquadOnlineHouse2 = 128, /** * House Balance Member */ HypeSquadOnlineHouse3 = 256, /** * Early Nitro Supporter */ PremiumEarlySupporter = 512, /** * User is a {@link https://discord.com/developers/docs/topics/teams | team} */ TeamPseudoUser = 1024, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ HasUnreadUrgentMessages = 8192, /** * Bug Hunter Level 2 */ BugHunterLevel2 = 16384, /** * Verified Bot */ VerifiedBot = 65536, /** * Early Verified Bot Developer */ VerifiedDeveloper = 131072, /** * Moderator Programs Alumni */ CertifiedModerator = 262144, /** * Bot uses only {@link https://discord.com/developers/docs/interactions/receiving-and-responding#receiving-an-interaction | HTTP interactions} and is shown in the online member list */ BotHTTPInteractions = 524288, /** * User has been identified as spammer * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ Spammer = 1048576, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ DisablePremium = 2097152, /** * User is an {@link https://support-dev.discord.com/hc/articles/10113997751447 | Active Developer} * * @deprecated This user flag is no longer available. See {@link https://support-dev.discord.com/hc/articles/10113997751447-Active-Developer-Badge} for more information. */ ActiveDeveloper = 4194304, /** * User's account has been {@link https://support.discord.com/hc/articles/6461420677527 | quarantined} based on recent activity * * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 44`, but bit shifting above `1 << 30` requires bigints */ Quarantined = 17592186044416, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 50`, but bit shifting above `1 << 30` requires bigints */ Collaborator = 1125899906842624, /** * @unstable This user flag is currently not documented by Discord but has a known value which we will try to keep up to date. * @privateRemarks * * This value would be `1 << 51`, but bit shifting above `1 << 30` requires bigints */ RestrictedCollaborator = 2251799813685248 } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-premium-types} */ declare enum UserPremiumType { None = 0, NitroClassic = 1, Nitro = 2, NitroBasic = 3 } /** * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ interface APIAvatarDecorationData { /** * The avatar decoration hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ asset: string; /** * The id of the avatar decoration's SKU */ sku_id: Snowflake; } /** * The collectibles the user has, excluding Avatar Decorations and Profile Effects. * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ interface APICollectibles { /** * Object mapping of {@link APINameplateData} */ nameplate?: APINameplateData; } /** * @see {@link https://discord.com/developers/docs/resources/user#nameplate} */ interface APINameplateData { /** * ID of the nameplate SKU */ sku_id: Snowflake; /** * Path to the nameplate asset * * @example `nameplates/nameplates/twilight/` */ asset: string; /** * The label of this nameplate. Currently unused */ label: string; /** * Background color of the nameplate */ palette: NameplatePalette; } /** * Background color of a nameplate. */ declare enum NameplatePalette { Berry = "berry", BubbleGum = "bubble_gum", Clover = "clover", Cobalt = "cobalt", Crimson = "crimson", Forest = "forest", Lemon = "lemon", Sky = "sky", Teal = "teal", Violet = "violet", White = "white" } /** * @see {@link https://discord.com/developers/docs/resources/user#user-object-user-primary-guild} */ interface APIUserPrimaryGuild { /** * The id of the user's primary guild */ identity_guild_id: Snowflake | null; /** * Whether the user is displaying the primary guild's server tag. * This can be `null` if the system clears the identity, e.g. because the server no longer supports tags */ identity_enabled: boolean | null; /** * The text of the user's server tag. Limited to 4 characters */ tag: string | null; /** * The server tag badge hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ badge: string | null; } //#endregion //#region node_modules/discord-api-types/payloads/v10/emoji.d.ts /** * Not documented but mentioned */ interface APIPartialEmoji { /** * Emoji id */ id: Snowflake | null; /** * Emoji name (can be null only in reaction emoji objects) */ name: string | null; /** * Whether this emoji is animated */ animated?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object-emoji-structure} */ interface APIEmoji extends APIPartialEmoji { /** * Roles this emoji is whitelisted to */ roles?: APIRole['id'][]; /** * User that created this emoji */ user?: APIUser; /** * Whether this emoji must be wrapped in colons */ require_colons?: boolean; /** * Whether this emoji is managed */ managed?: boolean; /** * Whether this emoji can be used, may be false due to loss of Server Boosts */ available?: boolean; } //#endregion //#region node_modules/discord-api-types/payloads/v10/channel.d.ts interface APIBasePartialChannel { /** * The id of the channel */ id: Snowflake; /** * The type of the channel * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ type: ChannelType; } interface APINameableChannel { /** * The name of the channel (1-100 characters) */ name?: string | null; } /** * Not documented, but partial only includes id, name, and type */ interface APIPartialChannel extends APIBasePartialChannel, APINameableChannel {} /** * This interface is used to allow easy extension for other channel types. While * also allowing `APIPartialChannel` to be used without breaking. */ interface APIChannelBase extends APIBasePartialChannel { type: T; flags?: ChannelFlags; } type TextChannelType = ChannelType.AnnouncementThread | ChannelType.DM | ChannelType.GroupDM | ChannelType.GuildAnnouncement | ChannelType.GuildStageVoice | ChannelType.GuildText | ChannelType.GuildVoice | ChannelType.PrivateThread | ChannelType.PublicThread; type GuildChannelType = Exclude; type ApplicationCommandOptionAllowedChannelType = Exclude; interface APISlowmodeChannel extends APIChannelBase { /** * Amount of seconds a user has to wait before sending another message (0-21600); * bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected * * `rate_limit_per_user` also applies to thread creation. Users can send one message and create one thread during each `rate_limit_per_user` interval. * * For thread channels, `rate_limit_per_user` is only returned if the field is set to a non-zero and non-null value. * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. */ rate_limit_per_user?: number; } interface APISortableChannel { /** * Sorting position of the channel */ position: number; } interface APITextBasedChannel extends APIChannelBase, APISlowmodeChannel { /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; } interface APIPinChannel extends APIChannelBase { /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; } interface APIGuildChannel extends APIChannelBase { /** * The name of the channel (1-100 characters) */ name: string; /** * The id of the guild (may be missing for some channel objects received over gateway guild dispatches) */ guild_id?: Snowflake; /** * Explicit permission overwrites for members and roles * * @see {@link https://discord.com/developers/docs/resources/channel#overwrite-object} */ permission_overwrites?: APIOverwrite[]; /** * ID of the parent category for a channel (each parent category can contain up to 50 channels) */ parent_id?: Snowflake | null; /** * Whether the channel is nsfw */ nsfw?: boolean; } type GuildTextChannelType = Exclude; interface APIGuildTextChannel extends APITextBasedChannel, APIGuildChannel, APISortableChannel, APIPinChannel { /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** * The initial `rate_limit_per_user` to set on newly created threads. * This field is copied to the thread at creation time and does not live update */ default_thread_rate_limit_per_user?: number; /** * The channel topic (0-1024 characters) */ topic?: string | null; } type APITextChannel = APIGuildTextChannel; type APINewsChannel = APIGuildTextChannel; interface APIGuildCategoryChannel extends APIGuildChannel, APISortableChannel { parent_id?: null; } interface APIVoiceChannelBase extends APIGuildChannel, APISortableChannel, APITextBasedChannel, APISlowmodeChannel { /** * The bitrate (in bits) of the voice or stage channel */ bitrate?: number; /** * The user limit of the voice or stage channel */ user_limit?: number; /** * Voice region id for the voice or stage channel, automatic when set to `null` * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} */ rtc_region?: string | null; /** * The camera video quality mode of the voice or stage channel, `1` when not present * * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-video-quality-modes} */ video_quality_mode?: VideoQualityMode; } type APIGuildVoiceChannel = APIVoiceChannelBase; type APIGuildStageVoiceChannel = APIVoiceChannelBase; interface APIDMChannelBase extends APITextBasedChannel, APIPinChannel { /** * The recipients of the DM * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ recipients?: APIUser[]; } interface APIDMChannel extends APIDMChannelBase { /** * The name of the channel (always null for DM channels) */ name: null; } interface APIGroupDMChannel extends APIDMChannelBase { /** * The name of the channel (1-100 characters) */ name: string | null; /** * Application id of the group DM creator if it is bot-created */ application_id?: Snowflake; /** * Icon hash */ icon?: string | null; /** * ID of the DM creator */ owner_id?: Snowflake; /** * The id of the last message sent in this channel (may not point to an existing or valid message) */ last_message_id?: Snowflake | null; /** * Whether the channel is managed by an OAuth2 application */ managed?: boolean; } type ThreadChannelType = ChannelType.AnnouncementThread | ChannelType.PrivateThread | ChannelType.PublicThread; interface APIThreadChannel extends APITextBasedChannel, APIGuildChannel, APIPinChannel { /** * The client users member for the thread, only included in select endpoints */ member?: APIThreadMember; /** * The metadata for a thread channel not shared by other channels */ thread_metadata?: APIThreadMetadata; /** * Number of messages (not including the initial message or deleted messages) in a thread * * If the thread was created before July 1, 2022, it stops counting at 50 messages */ message_count?: number; /** * The approximate member count of the thread, does not count above 50 even if there are more members */ member_count?: number; /** * ID of the thread creator */ owner_id?: Snowflake; /** * Number of messages ever sent in a thread * * Similar to `message_count` on message creation, but won't decrement when a message is deleted */ total_message_sent?: number; /** * The IDs of the set of tags that have been applied to a thread in a thread-only channel */ applied_tags?: Snowflake[]; /** * ID of the parent channel for the thread */ parent_id?: Snowflake; } type APIPublicThreadChannel = APIThreadChannel; type APIPrivateThreadChannel = APIThreadChannel; type APIAnnouncementThreadChannel = APIThreadChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#forum-tag-object-forum-tag-structure} */ interface APIGuildForumTag { /** * The id of the tag */ id: Snowflake; /** * The name of the tag (0-20 characters) */ name: string; /** * Whether this tag can only be added to or removed from threads by a member with the `MANAGE_THREADS` permission */ moderated: boolean; /** * The id of a guild's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of the emoji */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel#default-reaction-object-default-reaction-structure} */ interface APIGuildForumDefaultReactionEmoji { /** * The id of a guild's custom emoji */ emoji_id: Snowflake | null; /** * The unicode character of the emoji */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-sort-order-types} */ declare enum SortOrderType { /** * Sort forum posts by activity */ LatestActivity = 0, /** * Sort forum posts by creation time (from most recent to oldest) */ CreationDate = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel/#channel-object-forum-layout-types} */ declare enum ForumLayoutType { /** * No default has been set for forum channel */ NotSet = 0, /** * Display posts as a list */ ListView = 1, /** * Display posts as a collection of tiles */ GalleryView = 2 } interface APIThreadOnlyChannel extends APIGuildChannel, APISortableChannel { /** * The channel topic (0-4096 characters) */ topic?: string | null; /** * The id of the last thread created in this channel (may not point to an existing or valid thread) */ last_message_id?: Snowflake | null; /** * Amount of seconds a user has to wait before creating another thread (0-21600); * bots, as well as users with the permission `BYPASS_SLOWMODE`, are unaffected * * The absence of this field in API calls and Gateway events should indicate that slowmode has been reset to the default value. */ rate_limit_per_user?: number; /** * When the last pinned message was pinned. * This may be `null` in events such as `GUILD_CREATE` when a message is not pinned */ last_pin_timestamp?: string | null; /** * Default duration for newly created threads, in minutes, to automatically archive the thread after recent activity */ default_auto_archive_duration?: ThreadAutoArchiveDuration; /** * The set of tags that can be used in a thread-only channel */ available_tags: APIGuildForumTag[]; /** * The initial `rate_limit_per_user` to set on newly created threads. * This field is copied to the thread at creation time and does not live update */ default_thread_rate_limit_per_user?: number; /** * The emoji to show in the add reaction button on a thread in a thread-only channel */ default_reaction_emoji: APIGuildForumDefaultReactionEmoji | null; /** * The default sort order type used to order posts in a thread-only channel */ default_sort_order: SortOrderType | null; } interface APIGuildForumChannel extends APIThreadOnlyChannel { /** * The default layout type used to display posts in a forum channel * * @defaultValue `ForumLayoutType.NotSet` which indicates a layout view has not been set by a channel admin */ default_forum_layout: ForumLayoutType; } type APIGuildMediaChannel = APIThreadOnlyChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-structure} */ type APIChannel = APIAnnouncementThreadChannel | APIDMChannel | APIGroupDMChannel | APIGuildCategoryChannel | APIGuildForumChannel | APIGuildMediaChannel | APIGuildStageVoiceChannel | APIGuildVoiceChannel | APINewsChannel | APIPrivateThreadChannel | APIPublicThreadChannel | APITextChannel; /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-types} */ declare enum ChannelType { /** * A text channel within a guild */ GuildText = 0, /** * A direct message between users */ DM = 1, /** * A voice channel within a guild */ GuildVoice = 2, /** * A direct message between multiple users */ GroupDM = 3, /** * An organizational category that contains up to 50 channels * * @see {@link https://support.discord.com/hc/articles/115001580171} */ GuildCategory = 4, /** * A channel that users can follow and crosspost into their own guild * * @see {@link https://support.discord.com/hc/articles/360032008192} */ GuildAnnouncement = 5, /** * A temporary sub-channel within a Guild Announcement channel */ AnnouncementThread = 10, /** * A temporary sub-channel within a Guild Text or Guild Forum channel */ PublicThread = 11, /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission */ PrivateThread = 12, /** * A voice channel for hosting events with an audience * * @see {@link https://support.discord.com/hc/articles/1500005513722} */ GuildStageVoice = 13, /** * The channel in a Student Hub containing the listed servers * * @see {@link https://support.discord.com/hc/articles/4406046651927} */ GuildDirectory = 14, /** * A channel that can only contain threads */ GuildForum = 15, /** * A channel like forum channels but contains media for server subscriptions * * @see {@link https://creator-support.discord.com/hc/articles/14346342766743} */ GuildMedia = 16, /** * A channel that users can follow and crosspost into their own guild * * @deprecated This is the old name for {@link ChannelType.GuildAnnouncement} * @see {@link https://support.discord.com/hc/articles/360032008192} */ GuildNews = 5, /** * A temporary sub-channel within a Guild Announcement channel * * @deprecated This is the old name for {@link ChannelType.AnnouncementThread} */ GuildNewsThread = 10, /** * A temporary sub-channel within a Guild Text channel * * @deprecated This is the old name for {@link ChannelType.PublicThread} */ GuildPublicThread = 11, /** * A temporary sub-channel within a Guild Text channel that is only viewable by those invited and those with the Manage Threads permission * * @deprecated This is the old name for {@link ChannelType.PrivateThread} */ GuildPrivateThread = 12 } declare enum VideoQualityMode { /** * Discord chooses the quality for optimal performance */ Auto = 1, /** * 720p */ Full = 2 } /** * @see {@link https://discord.com/developers/docs/resources/channel#overwrite-object-overwrite-structure} */ interface APIOverwrite { /** * Role or user id */ id: Snowflake; /** * Either 0 (role) or 1 (member) */ type: OverwriteType; /** * Permission bit set * * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ allow: Permissions; /** * Permission bit set * * @see {@link https://discord.com/developers/docs/topics/permissions#permissions-bitwise-permission-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ deny: Permissions; } declare enum OverwriteType { Role = 0, Member = 1 } /** * @see {@link https://discord.com/developers/docs/resources/channel#thread-metadata-object-thread-metadata-structure} */ interface APIThreadMetadata { /** * Whether the thread is archived */ archived: boolean; /** * Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080 */ auto_archive_duration: ThreadAutoArchiveDuration; /** * An ISO8601 timestamp when the thread's archive status was last changed, used for calculating recent activity */ archive_timestamp: string; /** * Whether the thread is locked; when a thread is locked, only users with `MANAGE_THREADS` can unarchive it */ locked: boolean; /** * Whether non-moderators can add other non-moderators to the thread; only available on private threads */ invitable?: boolean; /** * Timestamp when the thread was created; only populated for threads created after 2022-01-09 */ create_timestamp?: string; } declare enum ThreadAutoArchiveDuration { OneHour = 60, OneDay = 1440, ThreeDays = 4320, OneWeek = 10080 } /** * @see {@link https://discord.com/developers/docs/resources/channel#thread-member-object-thread-member-structure} */ interface APIThreadMember { /** * The id of the thread * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** */ id?: Snowflake; /** * The id of the member * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** */ user_id?: Snowflake; /** * An ISO8601 timestamp for when the member last joined */ join_timestamp: string; /** * Member flags combined as a bitfield * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags: ThreadMemberFlags; /** * Additional information about the user * * **This field is omitted on the member sent within each thread in the `GUILD_CREATE` event** * * **This field is only present when `with_member` is set to true when calling `List Thread Members` or `Get Thread Member`** */ member?: APIGuildMember; } declare enum ThreadMemberFlags { /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ HasInteracted = 1, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ AllMessages = 2, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ OnlyMentions = 4, /** * @unstable This thread member flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ NoMessages = 8 } /** * @see {@link https://discord.com/developers/docs/resources/channel#channel-object-channel-flags} */ declare enum ChannelFlags { /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ GuildFeedRemoved = 1, /** * This thread is pinned to the top of its parent forum channel */ Pinned = 2, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ActiveChannelsRemoved = 4, /** * Whether a tag is required to be specified when creating a thread in a forum channel. * Tags are specified in the `applied_tags` field */ RequireTag = 16, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsSpam = 32, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsGuildResourceChannel = 128, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ClydeAI = 256, /** * @unstable This channel flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ IsScheduledForDeletion = 512, /** * Whether media download options are hidden. */ HideMediaDownloadOptions = 32768 } //#endregion //#region node_modules/discord-api-types/payloads/v10/gateway.d.ts /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway} */ interface APIGatewayInfo { /** * The WSS URL that can be used for connecting to the gateway */ url: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#get-gateway-bot} */ interface APIGatewayBotInfo extends APIGatewayInfo { /** * The recommended number of shards to use when connecting * * @see {@link https://discord.com/developers/docs/topics/gateway#sharding} */ shards: number; /** * Information on the current session start limit * * @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object} */ session_start_limit: APIGatewaySessionStartLimit; } /** * @see {@link https://discord.com/developers/docs/topics/gateway#session-start-limit-object} */ interface APIGatewaySessionStartLimit { /** * The total number of session starts the current user is allowed */ total: number; /** * The remaining number of session starts the current user is allowed */ remaining: number; /** * The number of milliseconds after which the limit resets */ reset_after: number; /** * The number of identify requests allowed per 5 seconds */ max_concurrency: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence} */ interface GatewayGuildMembersChunkPresence { /** * The user presence is being updated for * * **The user object within this event can be partial, the only field which must be sent is the `id` field, * everything else is optional.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: Partial & Pick; /** * Either "idle", "dnd", "online", or "offline" */ status?: PresenceUpdateReceiveStatus; /** * User's current activities * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object} */ activities?: GatewayActivity[]; /** * User's platform-dependent status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object} */ client_status?: GatewayPresenceClientStatus; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields} */ interface GatewayPresenceUpdate extends GatewayGuildMembersChunkPresence { /** * ID of the guild */ guild_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types} */ declare enum PresenceUpdateStatus { Online = "online", DoNotDisturb = "dnd", Idle = "idle", /** * Invisible and shown as offline */ Invisible = "invisible", Offline = "offline" } type PresenceUpdateReceiveStatus = Exclude; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#client-status-object} */ interface GatewayPresenceClientStatus { /** * The user's status set for an active desktop (Windows, Linux, Mac) application session */ desktop?: PresenceUpdateReceiveStatus; /** * The user's status set for an active mobile (iOS, Android) application session */ mobile?: PresenceUpdateReceiveStatus; /** * The user's status set for an active web (browser, bot account) application session */ web?: PresenceUpdateReceiveStatus; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-structure} */ interface GatewayActivity { /** * The activity's id * * @unstable */ id: string; /** * The activity's name */ name: string; /** * Activity type * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ type: ActivityType; /** * Stream url, is validated when type is `1` */ url?: string | null; /** * Unix timestamp of when the activity was added to the user's session */ created_at: number; /** * Unix timestamps for start and/or end of the game */ timestamps?: GatewayActivityTimestamps; /** * The Spotify song id * * @unstable */ sync_id?: string; /** * The platform this activity is being done on * * @unstable You can use {@link ActivityPlatform} as a stepping stone, but this might be inaccurate */ platform?: string; /** * Application id for the game */ application_id?: Snowflake; /** * Controls which field is displayed in the user's status text in the member list * * @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types} */ status_display_type?: StatusDisplayType | null; /** * What the player is currently doing */ details?: string | null; /** * URL that is linked when clicking on the details text */ details_url?: string | null; /** * The user's current party status, or the text used for a custom status */ state?: string | null; /** * URL that is linked when clicking on the state text */ state_url?: string | null; /** * The emoji used for a custom status * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji} */ emoji?: GatewayActivityEmoji; /** * @unstable */ session_id?: string; /** * Information for the current party of the player * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party} */ party?: GatewayActivityParty; /** * Images for the presence and their hover texts * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets} */ assets?: GatewayActivityAssets; /** * Secrets for Rich Presence joining and spectating * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets} */ secrets?: GatewayActivitySecrets; /** * Whether or not the activity is an instanced game session */ instance?: boolean; /** * Activity flags `OR`d together, describes what the payload includes * * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: ActivityFlags; /** * The custom buttons shown in the Rich Presence (max 2) */ buttons?: GatewayActivityButton[] | string[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-types} */ declare enum ActivityType { /** * Playing \{game\} */ Playing = 0, /** * Streaming \{details\} */ Streaming = 1, /** * Listening to \{name\} */ Listening = 2, /** * Watching \{details\} */ Watching = 3, /** * \{emoji\} \{state\} */ Custom = 4, /** * Competing in \{name\} */ Competing = 5 } /** * Controls which field is used in the user's status message * * @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-status-display-types} */ declare enum StatusDisplayType { /** * Playing \{name\} */ Name = 0, /** * Playing \{state\} */ State = 1, /** * Playing \{details\} */ Details = 2 } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-timestamps} */ interface GatewayActivityTimestamps { /** * Unix time (in milliseconds) of when the activity started */ start?: number; /** * Unix time (in milliseconds) of when the activity ends */ end?: number; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji} */ type GatewayActivityEmoji = Partial> & Pick; /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party} */ interface GatewayActivityParty { /** * The id of the party */ id?: string; /** * Used to show the party's current and maximum size */ size?: [current_size: number, max_size: number]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-assets} */ interface GatewayActivityAssets { /** * @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image} */ large_image?: string; /** * Text displayed when hovering over the large image of the activity */ large_text?: string; /** * URL that is opened when clicking on the large image */ large_url?: string; /** * @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image} */ small_image?: string; /** * Text displayed when hovering over the small image of the activity */ small_text?: string; /** * URL that is opened when clicking on the small image */ small_url?: string; /** * Displayed as a banner on a Game Invite. * * @see {@link https://discord.com/developers/docs/events/gateway-events#activity-object-activity-asset-image | Activity Asset Image} * @see {@link https://discord.com/developers/docs/discord-social-sdk/development-guides/managing-game-invites | Game Invite} */ invite_cover_image?: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-secrets} */ interface GatewayActivitySecrets { /** * The secret for joining a party */ join?: string; /** * The secret for spectating a game */ spectate?: string; /** * The secret for a specific instance of a match */ match?: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-flags} */ declare enum ActivityFlags { Instance = 1, Join = 2, Spectate = 4, JoinRequest = 8, Sync = 16, Play = 32, PartyPrivacyFriends = 64, PartyPrivacyVoiceChannel = 128, Embedded = 256 } interface GatewayActivityButton { /** * The text shown on the button (1-32 characters) */ label: string; /** * The url opened when clicking the button (1-512 characters) */ url: string; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-list-sync-thread-list-sync-event-fields} */ interface GatewayThreadListSync { /** * ID of the guild */ guild_id: Snowflake; /** * The ids of all the parent channels whose threads are being synced, otherwise the entire guild */ channel_ids?: Snowflake[]; /** * Array of the synced threads */ threads: APIThreadChannel[]; /** * The member objects for the client user in each joined thread that was synced */ members: APIThreadMember[]; } /** * @see {@link https://discord.com/developers/docs/topics/gateway-events#thread-members-update-thread-members-update-event-fields} */ interface GatewayThreadMembersUpdate { /** * The id of the thread for which members are being synced */ id: Snowflake; /** * The id of the guild that the thread is in */ guild_id: Snowflake; /** * The approximate member count of the thread, does not count above 50 even if there are more members */ member_count: number; /** * The members that were added to the thread */ added_members?: APIThreadMember[]; /** * The ids of the members that were removed from the thread */ removed_member_ids?: Snowflake[]; } //#endregion //#region node_modules/discord-api-types/payloads/v10/oauth2.d.ts /** * Types extracted from https://discord.com/developers/docs/topics/oauth2 */ declare enum OAuth2Scopes { /** * For oauth2 bots, this puts the bot in the user's selected guild by default */ Bot = "bot", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-user-connections | `/users/@me/connections`} * to return linked third-party accounts * * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections} */ Connections = "connections", /** * Allows your app to see information about the user's DMs and group DMs - requires Discord approval */ DMChannelsRead = "dm_channels.read", /** * Enables {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} to return an `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Email = "email", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user | `/users/@me`} without `email` * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user} */ Identify = "identify", /** * Allows your app to read a user's Nitro subscription type as defined by `premium_type` on the * {@link https://docs.discord.com/developers/resources/user#user-object-user-structure | User object} - only available to approved partners * * @see {@link https://docs.discord.com/developers/resources/user#user-object-user-structure} */ IdentifyPremium = "identify.premium", /** * Allows {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds | `/users/@me/guilds`} * to return basic information about all of a user's guilds * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds} */ Guilds = "guilds", /** * Allows {@link https://discord.com/developers/docs/resources/guild#add-guild-member | `/guilds/[guild.id]/members/[user.id]`} * to be used for joining users to a guild * * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member} */ GuildsJoin = "guilds.join", /** * Allows /users/\@me/guilds/\{guild.id\}/member to return a user's member information in a guild * * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member} */ GuildsMembersRead = "guilds.members.read", /** * Allows your app to join users to a group dm * * @see {@link https://discord.com/developers/docs/resources/channel#group-dm-add-recipient} */ GroupDMJoins = "gdm.join", /** * For local rpc server api access, this allows you to read messages from all client channels * (otherwise restricted to channels/guilds your app creates) */ MessagesRead = "messages.read", /** * Allows your app to update a user's connection and metadata for the app */ RoleConnectionsWrite = "role_connections.write", /** * For local rpc server access, this allows you to control a user's local Discord client - requires Discord approval */ RPC = "rpc", /** * For local rpc server access, this allows you to update a user's activity - requires Discord approval */ RPCActivitiesWrite = "rpc.activities.write", /** * For local rpc server access, this allows you to read a user's voice settings and listen for voice events - requires Discord approval */ RPCVoiceRead = "rpc.voice.read", /** * For local rpc server access, this allows you to update a user's voice settings - requires Discord approval */ RPCVoiceWrite = "rpc.voice.write", /** * For local rpc server api access, this allows you to receive notifications pushed out to the user - requires Discord approval */ RPCNotificationsRead = "rpc.notifications.read", /** * This generates a webhook that is returned in the oauth token response for authorization code grants */ WebhookIncoming = "webhook.incoming", /** * Allows your app to connect to voice on user's behalf and see all the voice members - requires Discord approval */ Voice = "voice", /** * Allows your app to upload/update builds for a user's applications - requires Discord approval */ ApplicationsBuildsUpload = "applications.builds.upload", /** * Allows your app to read build data for a user's applications */ ApplicationsBuildsRead = "applications.builds.read", /** * Allows your app to read and update store data (SKUs, store listings, achievements, etc.) for a user's applications */ ApplicationsStoreUpdate = "applications.store.update", /** * Allows your app to read entitlements for a user's applications */ ApplicationsEntitlements = "applications.entitlements", /** * Allows your app to know a user's friends and implicit relationships - requires Discord approval */ RelationshipsRead = "relationships.read", /** * Allows your app to fetch data from a user's "Now Playing/Recently Played" list - requires Discord approval */ ActivitiesRead = "activities.read", /** * Allows your app to update a user's activity - requires Discord approval (NOT REQUIRED FOR GAMESDK ACTIVITY MANAGER) * * @see {@link https://discord.com/developers/docs/game-sdk/activities} */ ActivitiesWrite = "activities.write", /** * Allows your app to use Application Commands in a guild * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationsCommands = "applications.commands", /** * Allows your app to update its Application Commands via this bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationsCommandsUpdate = "applications.commands.update", /** * Allows your app to update permissions for its commands using a Bearer token - client credentials grant only * * @see {@link https://discord.com/developers/docs/interactions/application-commands} */ ApplicationCommandsPermissionsUpdate = "applications.commands.permissions.update" } //#endregion //#region node_modules/discord-api-types/payloads/v10/sticker.d.ts /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ interface APISticker { /** * ID of the sticker */ id: Snowflake; /** * For standard stickers, ID of the pack the sticker is from */ pack_id?: Snowflake; /** * Name of the sticker */ name: string; /** * Description of the sticker */ description: string | null; /** * For guild stickers, the Discord name of a unicode emoji representing the sticker's expression. for standard stickers, a comma-separated list of related expressions. */ tags: string; /** * Previously the sticker asset hash, now an empty string * * @deprecated This field is no longer documented by Discord and will be removed in v11 * @unstable This field is no longer documented by Discord and will be removed in v11 */ asset?: ''; /** * Type of sticker * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ type: StickerType; /** * Type of sticker format * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ format_type: StickerFormatType; /** * Whether this guild sticker can be used, may be false due to loss of Server Boosts */ available?: boolean; /** * ID of the guild that owns this sticker */ guild_id?: Snowflake; /** * The user that uploaded the guild sticker */ user?: APIUser; /** * The standard sticker's sort order within its pack */ sort_value?: number; } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-types} */ declare enum StickerType { /** * An official sticker in a pack */ Standard = 1, /** * A sticker uploaded to a guild for the guild's members */ Guild = 2 } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types} */ declare enum StickerFormatType { PNG = 1, APNG = 2, Lottie = 3, GIF = 4 } /** * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object} */ type APIStickerItem = Pick; //#endregion //#region node_modules/discord-api-types/payloads/v10/guild.d.ts interface APIBaseGuild { /** * Guild id */ id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/guild#unavailable-guild-object} */ interface APIUnavailableGuild extends APIBaseGuild { /** * `true` if this guild is unavailable due to an outage */ unavailable: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ interface APIPartialGuild extends APIBaseGuild { /** * Guild name (2-100 characters, excluding trailing and leading whitespace) */ name: string; /** * Icon hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * Splash hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ splash: string | null; /** * Banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner?: string | null; /** * The description for the guild */ description?: string | null; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features?: GuildFeature[]; /** * Verification level required for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level?: GuildVerificationLevel; /** * The vanity url code for the guild */ vanity_url_code?: string | null; /** * The welcome screen of a Community guild, shown to new members * * Returned in the invite object */ welcome_screen?: APIGuildWelcomeScreen; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ interface APIGuild extends APIPartialGuild { /** * Icon hash, returned when in the template object * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon_hash?: string | null; /** * Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ discovery_splash: string | null; /** * `true` if the user is the owner of the guild * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** */ owner?: boolean; /** * ID of owner */ owner_id: Snowflake; /** * Total permissions for the user in the guild (excludes overrides) * * **This field is only received from https://discord.com/developers/docs/resources/user#get-current-user-guilds** * * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ permissions?: Permissions; /** * Voice region id for the guild * * @see {@link https://discord.com/developers/docs/resources/voice#voice-region-object} * @deprecated This field has been deprecated in favor of `rtc_region` on the channel. */ region?: string | null; /** * ID of afk channel */ afk_channel_id: Snowflake | null; /** * afk timeout in seconds, can be set to: `60`, `300`, `900`, `1800`, `3600` */ afk_timeout: 1800 | 3600 | 60 | 300 | 900; /** * `true` if the guild widget is enabled */ widget_enabled?: boolean; /** * The channel id that the widget will generate an invite to, or `null` if set to no invite */ widget_channel_id?: Snowflake | null; /** * Verification level required for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ verification_level: GuildVerificationLevel; /** * Default message notifications level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ default_message_notifications: GuildDefaultMessageNotifications; /** * Explicit content filter level * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ explicit_content_filter: GuildExplicitContentFilter; /** * Roles in the guild * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles: APIRole[]; /** * Custom guild emojis * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emojis: APIEmoji[]; /** * Enabled guild features * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ features: GuildFeature[]; /** * Required MFA level for the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ mfa_level: GuildMFALevel; /** * Application id of the guild creator if it is bot-created */ application_id: Snowflake | null; /** * The id of the channel where guild notices such as welcome messages and boost events are posted */ system_channel_id: Snowflake | null; /** * System channel flags * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ system_channel_flags: GuildSystemChannelFlags; /** * The id of the channel where Community guilds can display rules and/or guidelines */ rules_channel_id: Snowflake | null; /** * The maximum number of presences for the guild (`null` is always returned, apart from the largest of guilds) */ max_presences?: number | null; /** * The maximum number of members for the guild */ max_members?: number; /** * The vanity url code for the guild */ vanity_url_code: string | null; /** * The description for the guild */ description: string | null; /** * Banner hash * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ banner: string | null; /** * Premium tier (Server Boost level) * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ premium_tier: GuildPremiumTier; /** * The number of boosts this guild currently has */ premium_subscription_count?: number; /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord * * @defaultValue `"en-US"` */ preferred_locale: Locale; /** * The id of the channel where admins and moderators of Community guilds receive notices from Discord */ public_updates_channel_id: Snowflake | null; /** * The maximum amount of users in a video channel */ max_video_channel_users?: number; /** * The maximum amount of users in a stage video channel */ max_stage_video_channel_users?: number; /** * Approximate number of members in this guild, * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_member_count?: number; /** * Approximate number of non-offline members in this guild, * returned from the `GET /guilds/` and `/users/@me/guilds` (OAuth2) endpoints when `with_counts` is `true` */ approximate_presence_count?: number; /** * The nsfw level of the guild * * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ nsfw_level: GuildNSFWLevel; /** * Custom guild stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} */ stickers?: APISticker[]; /** * Whether the guild has the boost progress bar enabled. */ premium_progress_bar_enabled: boolean; /** * The type of Student Hub the guild is */ hub_type: GuildHubType | null; /** * The id of the channel where admins and moderators of Community guilds receive safety alerts from Discord */ safety_alerts_channel_id: Snowflake | null; /** * The incidents data for this guild */ incidents_data: APIIncidentsData | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-structure} */ interface APIPartialInteractionGuild extends Pick { /** * The preferred locale of a Community guild; used in guild discovery and notices from Discord * * @unstable https://github.com/discord/discord-api-docs/issues/6938 * @defaultValue `"en-US"` */ locale: Locale; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-default-message-notification-level} */ declare enum GuildDefaultMessageNotifications { AllMessages = 0, OnlyMentions = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-explicit-content-filter-level} */ declare enum GuildExplicitContentFilter { Disabled = 0, MembersWithoutRoles = 1, AllMembers = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-mfa-level} */ declare enum GuildMFALevel { None = 0, Elevated = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level} */ declare enum GuildNSFWLevel { Default = 0, Explicit = 1, Safe = 2, AgeRestricted = 3 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-verification-level} */ declare enum GuildVerificationLevel { /** * Unrestricted */ None = 0, /** * Must have verified email on account */ Low = 1, /** * Must be registered on Discord for longer than 5 minutes */ Medium = 2, /** * Must be a member of the guild for longer than 10 minutes */ High = 3, /** * Must have a verified phone number */ VeryHigh = 4 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-premium-tier} */ declare enum GuildPremiumTier { None = 0, Tier1 = 1, Tier2 = 2, Tier3 = 3 } declare enum GuildHubType { Default = 0, HighSchool = 1, College = 2 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-system-channel-flags} */ declare enum GuildSystemChannelFlags { /** * Suppress member join notifications */ SuppressJoinNotifications = 1, /** * Suppress server boost notifications */ SuppressPremiumSubscriptions = 2, /** * Suppress server setup tips */ SuppressGuildReminderNotifications = 4, /** * Hide member join sticker reply buttons */ SuppressJoinNotificationReplies = 8, /** * Suppress role subscription purchase and renewal notifications */ SuppressRoleSubscriptionPurchaseNotifications = 16, /** * Hide role subscription sticker reply buttons */ SuppressRoleSubscriptionPurchaseNotificationReplies = 32 } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-object-guild-features} */ declare enum GuildFeature { /** * Guild has access to set an animated guild banner image */ AnimatedBanner = "ANIMATED_BANNER", /** * Guild has access to set an animated guild icon */ AnimatedIcon = "ANIMATED_ICON", /** * Guild is using the old permissions configuration behavior * * @see {@link https://discord.com/developers/docs/change-log#upcoming-application-command-permission-changes} */ ApplicationCommandPermissionsV2 = "APPLICATION_COMMAND_PERMISSIONS_V2", /** * Guild has set up auto moderation rules */ AutoModeration = "AUTO_MODERATION", /** * Guild has access to set a guild banner image */ Banner = "BANNER", /** * Guild can enable welcome screen, Membership Screening and discovery, and receives community updates */ Community = "COMMUNITY", /** * Guild has enabled monetization */ CreatorMonetizableProvisional = "CREATOR_MONETIZABLE_PROVISIONAL", /** * Guild has enabled the role subscription promo page */ CreatorStorePage = "CREATOR_STORE_PAGE", /** * Guild has been set as a support server on the App Directory */ DeveloperSupportServer = "DEVELOPER_SUPPORT_SERVER", /** * Guild is able to be discovered in the directory */ Discoverable = "DISCOVERABLE", /** * Guild is able to be featured in the directory */ Featurable = "FEATURABLE", /** * Guild is listed in a directory channel */ HasDirectoryEntry = "HAS_DIRECTORY_ENTRY", /** * Guild is a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ Hub = "HUB", /** * Guild has disabled invite usage, preventing users from joining */ InvitesDisabled = "INVITES_DISABLED", /** * Guild has access to set an invite splash background */ InviteSplash = "INVITE_SPLASH", /** * Guild is in a Student Hub * * @see {@link https://support.discord.com/hc/articles/4406046651927} * @unstable This feature is currently not documented by Discord, but has known value */ LinkedToHub = "LINKED_TO_HUB", /** * Guild has enabled Membership Screening */ MemberVerificationGateEnabled = "MEMBER_VERIFICATION_GATE_ENABLED", /** * Guild has increased custom soundboard sound slots */ MoreSoundboard = "MORE_SOUNDBOARD", /** * Guild has enabled monetization * * @unstable This feature is no longer documented by Discord */ MonetizationEnabled = "MONETIZATION_ENABLED", /** * Guild has increased custom sticker slots */ MoreStickers = "MORE_STICKERS", /** * Guild has access to create news channels */ News = "NEWS", /** * Guild is partnered */ Partnered = "PARTNERED", /** * Guild can be previewed before joining via Membership Screening or the directory */ PreviewEnabled = "PREVIEW_ENABLED", /** * Guild has access to create private threads */ PrivateThreads = "PRIVATE_THREADS", /** * Guild has disabled alerts for join raids in the configured safety alerts channel */ RaidAlertsDisabled = "RAID_ALERTS_DISABLED", RelayEnabled = "RELAY_ENABLED", /** * Guild is able to set role icons */ RoleIcons = "ROLE_ICONS", /** * Guild has role subscriptions that can be purchased */ RoleSubscriptionsAvailableForPurchase = "ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE", /** * Guild has enabled role subscriptions */ RoleSubscriptionsEnabled = "ROLE_SUBSCRIPTIONS_ENABLED", /** * Guild has created soundboard sounds */ Soundboard = "SOUNDBOARD", /** * Guild has enabled ticketed events */ TicketedEventsEnabled = "TICKETED_EVENTS_ENABLED", /** * Guild has access to set a vanity URL */ VanityURL = "VANITY_URL", /** * Guild is verified */ Verified = "VERIFIED", /** * Guild has access to set 384kbps bitrate in voice (previously VIP voice servers) */ VIPRegions = "VIP_REGIONS", /** * Guild has enabled the welcome screen */ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED", /** * Guild has access to set guild tags */ GuildTags = "GUILD_TAGS", /** * Guild is able to set gradient colors to roles */ EnhancedRoleColors = "ENHANCED_ROLE_COLORS", /** * Guild has access to guest invites */ GuestsEnabled = "GUESTS_ENABLED", /** * Guild has migrated to the new pin messages permission * * @unstable This feature is currently not documented by Discord, but has known value */ PinPermissionMigrationComplete = "PIN_PERMISSION_MIGRATION_COMPLETE" } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIBaseGuildMember { /** * This users guild nickname */ nick?: string | null; /** * Array of role object ids * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ roles: Snowflake[]; /** * When the user started boosting the guild * * @see {@link https://support.discord.com/hc/articles/360028038352} */ premium_since?: string | null; /** * Whether the user has not yet passed the guild's Membership Screening requirements * * @remarks If this field is not present, it can be assumed as `false`. */ pending?: boolean; /** * Timestamp of when the time out will be removed; until then, they cannot interact with the guild */ communication_disabled_until?: string | null; /** * The data for the member's guild avatar decoration * * @see {@link https://discord.com/developers/docs/resources/user#avatar-decoration-data-object} */ avatar_decoration_data?: APIAvatarDecorationData | null; /** * The data for the member's collectibles * * @see {@link https://discord.com/developers/docs/resources/user#collectibles} */ collectibles?: APICollectibles | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIFlaggedGuildMember { /** * Guild member flags represented as a bit set * * @defaultValue `0` */ flags: GuildMemberFlags; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIGuildMemberJoined { /** * When the user joined the guild */ joined_at: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIGuildMemberAvatar { /** * The member's guild avatar hash */ avatar?: string | null; /** * The member's guild banner hash */ banner?: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIBaseVoiceGuildMember { /** * Whether the user is deafened in voice channels */ deaf: boolean; /** * Whether the user is muted in voice channels */ mute: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIGuildMemberUser { /** * The user this guild member represents * * **This field won't be included in the member object attached to `MESSAGE_CREATE` and `MESSAGE_UPDATE` gateway events.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user: APIUser; } /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ interface APIGuildMember extends APIBaseGuildMember, APIBaseVoiceGuildMember, APIFlaggedGuildMember, APIGuildMemberAvatar, APIGuildMemberJoined, APIGuildMemberUser {} /** * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags} */ declare enum GuildMemberFlags { /** * Member has left and rejoined the guild */ DidRejoin = 1, /** * Member has completed onboarding */ CompletedOnboarding = 2, /** * Member is exempt from guild verification requirements */ BypassesVerification = 4, /** * Member has started onboarding */ StartedOnboarding = 8, /** * Member is a guest and can only access the voice channel they were invited to */ IsGuest = 16, /** * Member has started Server Guide new member actions */ StartedHomeActions = 32, /** * Member has completed Server Guide new member actions */ CompletedHomeActions = 64, /** * Member's username, display name, or nickname is blocked by AutoMod */ AutomodQuarantinedUsernameOrGuildNickname = 128, /** * @deprecated * {@link https://github.com/discord/discord-api-docs/pull/7113 | discord-api-docs#7113} */ AutomodQuarantinedBio = 256, /** * Member has dismissed the DM settings upsell */ DmSettingsUpsellAcknowledged = 512, /** * Member's guild tag is blocked by AutoMod */ AutoModQuarantinedGuildTag = 1024 } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object} */ interface APIGuildIntegration { /** * Integration id */ id: Snowflake; /** * Integration name */ name: string; /** * Integration type */ type: APIGuildIntegrationType; /** * Is this integration enabled */ enabled: boolean; /** * Is this integration syncing * * **This field is not provided for `discord` bot integrations.** */ syncing?: boolean; /** * ID that this integration uses for "subscribers" * * **This field is not provided for `discord` bot integrations.** */ role_id?: Snowflake; /** * Whether emoticons should be synced for this integration (`twitch` only currently) * * **This field is not provided for `discord` bot integrations.** */ enable_emoticons?: boolean; /** * The behavior of expiring subscribers * * **This field is not provided for `discord` bot integrations.** * * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ expire_behavior?: IntegrationExpireBehavior; /** * The grace period (in days) before expiring subscribers * * **This field is not provided for `discord` bot integrations.** */ expire_grace_period?: number; /** * User for this integration * * **Some older integrations may not have an attached user.** * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ user?: APIUser; /** * Integration account information * * @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object} */ account: APIIntegrationAccount; /** * When this integration was last synced * * **This field is not provided for `discord` bot integrations.** */ synced_at?: string; /** * How many subscribers this integration has * * **This field is not provided for `discord` bot integrations.** */ subscriber_count?: number; /** * Has this integration been revoked * * **This field is not provided for `discord` bot integrations.** */ revoked?: boolean; /** * The bot/OAuth2 application for discord integrations * * @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object} * * **This field is not provided for `discord` bot integrations.** */ application?: APIGuildIntegrationApplication; /** * The scopes the application has been authorized for */ scopes?: OAuth2Scopes[]; } type APIGuildIntegrationType = 'discord' | 'guild_subscription' | 'twitch' | 'youtube'; /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors} */ declare enum IntegrationExpireBehavior { RemoveRole = 0, Kick = 1 } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-account-object} */ interface APIIntegrationAccount { /** * ID of the account */ id: string; /** * Name of the account */ name: string; } /** * @see {@link https://discord.com/developers/docs/resources/guild#integration-application-object} */ interface APIGuildIntegrationApplication { /** * The id of the app */ id: Snowflake; /** * The name of the app */ name: string; /** * The icon hash of the app * * @see {@link https://discord.com/developers/docs/reference#image-formatting} */ icon: string | null; /** * The description of the app */ description: string; /** * The bot associated with this application * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ bot?: APIUser; } interface APIGuildWelcomeScreen { /** * The welcome screen short message */ description: string | null; /** * Array of suggested channels */ welcome_channels: APIGuildWelcomeScreenChannel[]; } interface APIGuildWelcomeScreenChannel { /** * The channel id that is suggested */ channel_id: Snowflake; /** * The description shown for the channel */ description: string; /** * The emoji id of the emoji that is shown on the left of the channel */ emoji_id: Snowflake | null; /** * The emoji name of the emoji that is shown on the left of the channel */ emoji_name: string | null; } /** * @see {@link https://discord.com/developers/docs/resources/guild#incidents-data-object} */ interface APIIncidentsData { /** * When invites get enabled again */ invites_disabled_until: string | null; /** * When direct messages get enabled again */ dms_disabled_until: string | null; /** * When the dm spam was detected */ dm_spam_detected_at?: string | null; /** * When the raid was detected */ raid_detected_at?: string | null; } //#endregion //#region node_modules/discord-api-types/payloads/v10/poll.d.ts interface APIBasePoll { /** * The question of the poll */ question: APIPollMedia; } interface APIPollDefaults { /** * Whether a user can select multiple answers * * @defaultValue `false` */ allow_multiselect: boolean; /** * The layout type of the poll * * @defaultValue `PollLayoutType.Default` */ layout_type: PollLayoutType; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure} */ interface APIPoll extends APIBasePoll, APIPollDefaults { /** * Each of the answers available in the poll, up to 10 */ answers: APIPollAnswer[]; /** * The time when the poll ends (IS08601 timestamp) */ expiry: string | null; /** * The results of the poll */ results?: APIPollResults; } /** * @see {@link https://discord.com/developers/docs/resources/poll#layout-type} */ declare enum PollLayoutType { /** * The, uhm, default layout type */ Default = 1 } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure} */ interface APIPollMedia { /** * The text of the field * * The maximum length is `300` for the question, and `55` for any answer */ text?: string; /** * The emoji of the field */ emoji?: APIPartialEmoji; } interface APIBasePollAnswer { /** * The data of the answer */ poll_media: APIPollMedia; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure} */ interface APIPollAnswer extends APIBasePollAnswer { /** * The ID of the answer. Starts at `1` for the first answer and goes up sequentially */ answer_id: number; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure} */ interface APIPollResults { /** * Whether the votes have been precisely counted */ is_finalized: boolean; /** * The counts for each answer */ answer_counts: APIPollAnswerCount[]; } /** * @see {@link https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure} */ interface APIPollAnswerCount { /** * The `answer_id` */ id: number; /** * The number of votes for this answer */ count: number; /** * Whether the current user voted for this answer */ me_voted: boolean; } //#endregion //#region node_modules/discord-api-types/payloads/v10/message.d.ts interface APIMessageMentions { /** * Users specifically mentioned in the message * * The `member` field is only present in `MESSAGE_CREATE` and `MESSAGE_UPDATE` events * from text-based guild channels * * @see {@link https://discord.com/developers/docs/resources/user#user-object} * @see {@link https://discord.com/developers/docs/resources/guild#guild-member-object} */ mentions: APIUser[]; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-structure} */ interface APIBaseMessageNoChannel { /** * ID of the message */ id: Snowflake; /** * The author of this message (only a valid user in the case where the message is generated by a user or bot user) * * If the message is generated by a webhook, the author object corresponds to the webhook's id, * username, and avatar. You can tell if a message is generated by a webhook by checking for the `webhook_id` property * * @see {@link https://discord.com/developers/docs/resources/user#user-object} */ author: APIUser; /** * Contents of the message * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ content: string; /** * When this message was sent */ timestamp: string; /** * When this message was edited (or null if never) */ edited_timestamp: string | null; /** * Whether this was a TTS message */ tts: boolean; /** * Whether this message mentions everyone */ mention_everyone: boolean; /** * Roles specifically mentioned in this message * * @see {@link https://discord.com/developers/docs/topics/permissions#role-object} */ mention_roles: APIRole['id'][]; /** * Channels specifically mentioned in this message * * Not all channel mentions in a message will appear in `mention_channels`. * - Only textual channels that are visible to everyone in a public guild will ever be included * - Only crossposted messages (via Channel Following) currently include `mention_channels` at all * * If no mentions in the message meet these requirements, this field will not be sent * * @see {@link https://discord.com/developers/docs/resources/message#channel-mention-object} */ mention_channels?: APIChannelMention[]; /** * Any attached files that are not referenced in embeds or components * * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ attachments: APIAttachment[]; /** * Any embedded content * * @see {@link https://discord.com/developers/docs/resources/message#embed-object} * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ embeds: APIEmbed[]; /** * Reactions to the message * * @see {@link https://discord.com/developers/docs/resources/message#reaction-object} */ reactions?: APIReaction[]; /** * A nonce that can be used for optimistic message sending (up to 25 characters) * * **You will not receive this from further fetches. This is received only once from a `MESSAGE_CREATE` * event to ensure it got sent** */ nonce?: number | string; /** * Whether this message is pinned */ pinned: boolean; /** * If the message is generated by a webhook, this is the webhook's id */ webhook_id?: Snowflake; /** * Type of message * * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-types} */ type: MessageType; /** * Sent with Rich Presence-related chat embeds * * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-activity-structure} */ activity?: APIMessageActivity; /** * Sent with Rich Presence-related chat embeds * * @see {@link https://discord.com/developers/docs/resources/application#application-object} */ application?: Partial; /** * If the message is a response to an Interaction, this is the id of the interaction's application */ application_id?: Snowflake; /** * Reference data sent with crossposted messages, replies, pins, and thread starter messages * * @see {@link https://discord.com/developers/docs/resources/message#message-reference-structure} */ message_reference?: APIMessageReference; /** * Message flags combined as a bitfield * * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: MessageFlags; /** * The message associated with the `message_reference` * * This field is only returned for messages with a `type` of `19` (REPLY). * * If the message is a reply but the `referenced_message` field is not present, * the backend did not attempt to fetch the message that was being replied to, * so its state is unknown. * * If the field exists but is `null`, the referenced message was deleted * * @see {@link https://discord.com/developers/docs/resources/message#message-object} */ referenced_message?: APIMessage | null; /** * Sent if the message is sent as a result of an interaction */ interaction_metadata?: APIMessageInteractionMetadata; /** * Sent if the message is a response to an Interaction * * @deprecated In favor of `interaction_metadata` */ interaction?: APIMessageInteraction; /** * Sent if a thread was started from this message */ thread?: APIChannel; /** * Sent if the message contains components like buttons, action rows, or other interactive components * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ components?: APIMessageTopLevelComponent[]; /** * Sent if the message contains stickers * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-item-object} */ sticker_items?: APIStickerItem[]; /** * The stickers sent with the message * * @see {@link https://discord.com/developers/docs/resources/sticker#sticker-object} * @deprecated Use {@link APIBaseMessageNoChannel.sticker_items} instead */ stickers?: APISticker[]; /** * A generally increasing integer (there may be gaps or duplicates) that represents the approximate position of the message in a thread * * It can be used to estimate the relative position of the message in a thread in company with `total_message_sent` on parent thread */ position?: number; /** * Data of the role subscription purchase or renewal that prompted this `ROLE_SUBSCRIPTION_PURCHASE` message */ role_subscription_data?: APIMessageRoleSubscriptionData; /** * Data for users, members, channels, and roles referenced in this message * * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure} */ resolved?: APIInteractionDataResolved; /** * A poll! * * The `MESSAGE_CONTENT` privileged gateway intent is required for verified applications to receive a non-empty value from this field * * In the Discord Developers Portal, you need to enable the toggle of this intent of your application in **Bot \> Privileged Gateway Intents**. * You also need to specify the intent bit value (`1 << 15`) if you are connecting to the gateway * * @see {@link https://support-dev.discord.com/hc/articles/6207308062871} */ poll?: APIPoll; /** * The message associated with the message_reference. This is a minimal subset of fields in a message (e.g. author is excluded.) */ message_snapshots?: APIMessageSnapshot[]; /** * The call associated with the message */ call?: APIMessageCall; /** * The custom client-side theme shared via the message */ shared_client_theme?: APIMessageSharedClientTheme; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-structure} */ interface APIBaseMessage extends APIBaseMessageNoChannel { /** * ID of the channel the message was sent in */ channel_id: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-structure} */ interface APIMessage extends APIBaseMessage, APIMessageMentions {} /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-types} */ declare enum MessageType { Default = 0, RecipientAdd = 1, RecipientRemove = 2, Call = 3, ChannelNameChange = 4, ChannelIconChange = 5, ChannelPinnedMessage = 6, UserJoin = 7, GuildBoost = 8, GuildBoostTier1 = 9, GuildBoostTier2 = 10, GuildBoostTier3 = 11, ChannelFollowAdd = 12, GuildDiscoveryDisqualified = 14, GuildDiscoveryRequalified = 15, GuildDiscoveryGracePeriodInitialWarning = 16, GuildDiscoveryGracePeriodFinalWarning = 17, ThreadCreated = 18, Reply = 19, ChatInputCommand = 20, ThreadStarterMessage = 21, GuildInviteReminder = 22, ContextMenuCommand = 23, AutoModerationAction = 24, RoleSubscriptionPurchase = 25, InteractionPremiumUpsell = 26, StageStart = 27, StageEnd = 28, StageSpeaker = 29, /** * @unstable https://github.com/discord/discord-api-docs/pull/5927#discussion_r1107678548 */ StageRaiseHand = 30, StageTopic = 31, GuildApplicationPremiumSubscription = 32, GuildIncidentAlertModeEnabled = 36, GuildIncidentAlertModeDisabled = 37, GuildIncidentReportRaid = 38, GuildIncidentReportFalseAlarm = 39, PurchaseNotification = 44, PollResult = 46 } /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-activity-structure} */ interface APIMessageActivity { /** * Type of message activity * * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-activity-types} */ type: MessageActivityType; /** * `party_id` from a Rich Presence event * * @see {@link https://discord.com/developers/docs/rich-presence/how-to#updating-presence-update-presence-payload-fields} */ party_id?: string; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-reference-structure} */ interface APIMessageReference { /** * Type of reference */ type?: MessageReferenceType; /** * ID of the originating message */ message_id?: Snowflake; /** * ID of the originating message's channel */ channel_id: Snowflake; /** * ID of the originating message's guild */ guild_id?: Snowflake; } /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-activity-types} */ declare enum MessageActivityType { Join = 1, Spectate = 2, Listen = 3, JoinRequest = 5 } /** * @see {@link https://discord.com/developers/docs/resources/message#message-reference-types} */ declare enum MessageReferenceType { /** * A standard reference used by replies */ Default = 0, /** * Reference used to point to a message at a point in time */ Forward = 1 } /** * @see {@link https://discord.com/developers/docs/resources/message#message-object-message-flags} */ declare enum MessageFlags { /** * This message has been published to subscribed channels (via Channel Following) */ Crossposted = 1, /** * This message originated from a message in another channel (via Channel Following) */ IsCrosspost = 2, /** * Do not include any embeds when serializing this message */ SuppressEmbeds = 4, /** * The source message for this crosspost has been deleted (via Channel Following) */ SourceMessageDeleted = 8, /** * This message came from the urgent message system */ Urgent = 16, /** * This message has an associated thread, which shares its id */ HasThread = 32, /** * This message is only visible to the user who invoked the Interaction */ Ephemeral = 64, /** * This message is an Interaction Response and the bot is "thinking" */ Loading = 128, /** * This message failed to mention some roles and add their members to the thread */ FailedToMentionSomeRolesInThread = 256, /** * @unstable This message flag is currently not documented by Discord but has a known value which we will try to keep up to date. */ ShouldShowLinkNotDiscordWarning = 1024, /** * This message will not trigger push and desktop notifications */ SuppressNotifications = 4096, /** * This message is a voice message */ IsVoiceMessage = 8192, /** * This message has a snapshot (via Message Forwarding) */ HasSnapshot = 16384, /** * Allows you to create fully component-driven messages * * @see {@link https://discord.com/developers/docs/components/overview} */ IsComponentsV2 = 32768 } /** * @see {@link https://discord.com/developers/docs/resources/message#message-call-object-message-call-object-structure} */ interface APIMessageCall { /** * Array of user ids that participated in the call */ participants: Snowflake[]; /** * ISO8601 timestamp when the call ended */ ended_timestamp?: string | null; } /** * @see https://docs.discord.com/developers/resources/message#base-theme-types */ declare enum BaseThemeType { Unset = 0, Dark = 1, Light = 2, Darker = 3, Midnight = 4 } /** * @see https://docs.discord.com/developers/resources/message#shared-client-theme-object */ interface APIMessageSharedClientTheme { /** * The hexadecimal-encoded colors of the theme (max of 5) */ colors: string[]; /** * The direction of the theme's colors (max of 360) */ gradient_angle: number; /** * The intensity of the theme's colors (max of 100) */ base_mix: number; /** * The mode of the theme */ base_theme?: BaseThemeType | null; } /** * @see {@link https://discord.com/developers/docs/resources/message#role-subscription-data-object-role-subscription-data-object-structure} */ interface APIMessageRoleSubscriptionData { /** * The id of the SKU and listing the user is subscribed to */ role_subscription_listing_id: Snowflake; /** * The name of the tier the user is subscribed to */ tier_name: string; /** * The number of months the user has been subscribed for */ total_months_subscribed: number; /** * Whether this notification is for a renewal */ is_renewal: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/message#reaction-object-reaction-structure} */ interface APIReaction { /** * Total number of times this emoji has been used to react (including super reacts) */ count: number; /** * An object detailing the individual reaction counts for different types of reactions */ count_details: APIReactionCountDetails; /** * Whether the current user reacted using this emoji */ me: boolean; /** * Whether the current user super-reacted using this emoji */ me_burst: boolean; /** * Emoji information * * @see {@link https://discord.com/developers/docs/resources/emoji#emoji-object} */ emoji: APIPartialEmoji; /** * Hexadecimal colors used for this super reaction */ burst_colors: string[]; } /** * @see {@link https://discord.com/developers/docs/resources/message#reaction-count-details-object-reaction-count-details-structure} */ interface APIReactionCountDetails { /** * Count of super reactions */ burst: number; /** * Count of normal reactions */ normal: number; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-structure} * * Length limit: 6000 characters */ interface APIEmbed { /** * Title of embed * * Length limit: 256 characters */ title?: string; /** * Type of embed (always "rich" for webhook embeds) */ type?: EmbedType; /** * Description of embed * * Length limit: 4096 characters */ description?: string; /** * URL of embed */ url?: string; /** * Timestamp of embed content */ timestamp?: string; /** * Color code of the embed */ color?: number; /** * Footer information * * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-footer-structure} */ footer?: APIEmbedFooter; /** * Image information * * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure} */ image?: APIEmbedImage; /** * Thumbnail information * * @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-image-structure} */ thumbnail?: APIEmbedImage; /** * Video information * * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure} */ video?: APIEmbedVideo; /** * Provider information * * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure} */ provider?: APIEmbedProvider; /** * Author information * * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-author-structure} */ author?: APIEmbedAuthor; /** * Fields information * * Length limit: 25 field objects * * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure} */ fields?: APIEmbedField[]; /** * Embed flags combined as a bitfield * * @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: EmbedFlags; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-types} */ declare enum EmbedType { /** * Generic embed rendered from embed attributes */ Rich = "rich", /** * Image embed */ Image = "image", /** * Video embed */ Video = "video", /** * Animated gif image embed rendered as a video embed */ GIFV = "gifv", /** * Article embed */ Article = "article", /** * Link embed */ Link = "link", /** * Auto moderation alert embed * * @unstable This embed type is currently not documented by Discord, but it is returned in the auto moderation system messages. */ AutoModerationMessage = "auto_moderation_message", /** * Poll result embed */ PollResult = "poll_result" } /** * @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-flags} */ declare enum EmbedFlags { /** * This embed is a fallback for a reply to an activity card */ IsContentInventoryEntry = 32 } /** * @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags} */ declare enum EmbedMediaFlags { /** * This image is animated */ IsAnimated = 32 } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure} */ interface APIEmbedVideo { /** * Source url of video */ url?: string; /** * A proxied url of the video */ proxy_url?: string; /** * Height of video */ height?: number; /** * Width of video */ width?: number; /** * The video's media type * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string; /** * ThumbHash placeholder of the video * * @see {@link https://evanw.github.io/thumbhash/} */ placeholder?: string; /** * Version of the placeholder */ placeholder_version?: number; /** * Description (alt text) for the video */ description?: string; /** * Embed media flags combined as a bitfield * * @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: EmbedMediaFlags; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure} */ interface APIEmbedImage { /** * Source url of image (only supports http(s) and attachments) */ url: string; /** * A proxied url of the image */ proxy_url?: string; /** * Height of image */ height?: number; /** * Width of image */ width?: number; /** * The image's media type * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string; /** * ThumbHash placeholder of the image * * @see {@link https://evanw.github.io/thumbhash/} */ placeholder?: string; /** * Version of the placeholder */ placeholder_version?: number; /** * Description (alt text) for the image */ description?: string; /** * Embed media flags combined as a bitfield * * @see {@link https://docs.discord.com/developers/resources/message#embed-object-embed-media-flags} * @see {@link https://en.wikipedia.org/wiki/Bit_field} */ flags?: EmbedMediaFlags; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure} */ interface APIEmbedProvider { /** * Name of provider */ name?: string; /** * URL of provider */ url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-author-structure} */ interface APIEmbedAuthor { /** * Name of author * * Length limit: 256 characters */ name: string; /** * URL of author */ url?: string; /** * URL of author icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of author icon */ proxy_icon_url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-footer-structure} */ interface APIEmbedFooter { /** * Footer text * * Length limit: 2048 characters */ text: string; /** * URL of footer icon (only supports http(s) and attachments) */ icon_url?: string; /** * A proxied url of footer icon */ proxy_icon_url?: string; } /** * @see {@link https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure} */ interface APIEmbedField { /** * Name of the field * * Length limit: 256 characters */ name: string; /** * Value of the field * * Length limit: 1024 characters */ value: string; /** * Whether or not this field should display inline */ inline?: boolean; } /** * @see {@link https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure} */ interface APIAttachment { /** * Attachment id */ id: Snowflake; /** * Name of file attached */ filename: string; /** * The original filename of the upload with special characters preserved * * This will be present when the filename contains special characters (e.g. Cyrillic), * in which case the `filename` field will be a sanitized version without those characters */ title?: string; /** * Description (alt text) for the file (max 1024 characters) */ description?: string; /** * The attachment's media type * * @see {@link https://en.wikipedia.org/wiki/Media_type} */ content_type?: string; /** * Size of file in bytes */ size: number; /** * Source url of file */ url: string; /** * A proxied url of file */ proxy_url: string; /** * Height of file (if image or video) */ height?: number | null; /** * Width of file (if image or video) */ width?: number | null; /** * ThumbHash placeholder (if image or video) * * @see {@link https://evanw.github.io/thumbhash/} */ placeholder?: string; /** * Version of the placeholder (if image or video) */ placeholder_version?: number; /** * Whether this attachment is ephemeral * * @remarks Ephemeral attachments will automatically be removed after a set period of time. Ephemeral attachments on messages are guaranteed to be available as long as the message itself exists. */ ephemeral?: boolean; /** * The duration of the audio file (currently for voice messages) */ duration_secs?: number; /** * Base64 encoded bytearray representing a sampled waveform (currently for voice messages) */ waveform?: string; /** * Attachment flags combined as a bitfield */ flags?: AttachmentFlags; /** * For Clips, array of users who were in the stream */ clip_participants?: APIUser[]; /** * For Clips, when the clip was created */ clip_created_at?: string; /** * For Clips, the application in the stream, if recognized */ application?: APIApplication | null; } /** * @see {@link https://docs.discord.com/developers/resources/message#attachment-object-attachment-flags} */ declare enum AttachmentFlags { /** * This attachment is a Clip from a stream * * @see {@link https://support.discord.com/hc/en-us/articles/16861982215703} */ IsClip = 1, /** * This attachment is the thumbnail of a thread in a media channel, displayed in the grid but not on the message */ IsThumbnail = 2, /** * This attachment has been edited using the remix feature on mobile * * @deprecated */ IsRemix = 4, /** * This attachment was marked as a spoiler and is blurred until clicked */ IsSpoiler = 8, /** * This attachment is an animated image */ IsAnimated = 32 } /** * @see {@link https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure} */ interface APIChannelMention { /** * ID of the channel */ id: Snowflake; /** * ID of the guild containing the channel */ guild_id: Snowflake; /** * The type of channel * * @see {@link https://discord.com/developers/docs/resources/message#channel-object-channel-types} */ type: ChannelType; /** * The name of the channel */ name: string; } /** * @see {@link https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types} */ declare enum AllowedMentionsTypes { /** * Controls `@everyone` and `@here` mentions */ Everyone = "everyone", /** * Controls role mentions */ Role = "roles", /** * Controls user mentions */ User = "users" } /** * @see {@link https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mentions-structure} */ interface APIAllowedMentions { /** * An array of allowed mention types to parse from the content * * @see {@link https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mention-types} */ parse?: AllowedMentionsTypes[]; /** * Array of role_ids to mention (Max size of 100) */ roles?: Snowflake[]; /** * Array of user_ids to mention (Max size of 100) */ users?: Snowflake[]; /** * For replies, whether to mention the author of the message being replied to * * @defaultValue `false` */ replied_user?: boolean; } /** * @see {@link https://discord.com/developers/docs/components/reference#anatomy-of-a-component} */ interface APIBaseComponent { /** * The type of the component */ type: T; /** * 32 bit integer used as an optional identifier for component * * The id field is optional and is used to identify components in the response from an interaction that aren't interactive components. The id must be unique within the message and is generated sequentially if left empty. Generation of ids won't use another id that exists in the message if you have one defined for another component. */ id?: number; } /** * @see {@link https://discord.com/developers/docs/components/reference#component-object-component-types} */ declare enum ComponentType { /** * Container to display a row of interactive components */ ActionRow = 1, /** * Button component */ Button = 2, /** * Select menu for picking from defined text options */ StringSelect = 3, /** * Text Input component */ TextInput = 4, /** * Select menu for users */ UserSelect = 5, /** * Select menu for roles */ RoleSelect = 6, /** * Select menu for users and roles */ MentionableSelect = 7, /** * Select menu for channels */ ChannelSelect = 8, /** * Container to display text alongside an accessory component */ Section = 9, /** * Markdown text */ TextDisplay = 10, /** * Small image that can be used as an accessory */ Thumbnail = 11, /** * Display images and other media */ MediaGallery = 12, /** * Displays an attached file */ File = 13, /** * Component to add vertical padding between other components */ Separator = 14, /** * @unstable This component type is currently not documented by Discord but has a known value which we will try to keep up to date. */ ContentInventoryEntry = 16, /** * Container that visually groups a set of components */ Container = 17, /** * Container associating a label and description with a component */ Label = 18, /** * Component for uploading files */ FileUpload = 19, /** * Single-choice set of radio group option */ RadioGroup = 21, /** * Multi-select group of checkboxes */ CheckboxGroup = 22, /** * Single checkbox for binary choice */ Checkbox = 23, /** * Select menu for picking from defined text options * * @deprecated This is the old name for {@link ComponentType.StringSelect} */ SelectMenu = 3 } /** * An Action Row is a top-level layout component used in messages. Use in modals is deprecated. * * @see {@link https://discord.com/developers/docs/components/reference#action-row} */ interface APIActionRowComponent extends APIBaseComponent { /** * The components in the ActionRow */ components: T[]; } interface APIButtonBase