+ +
+ endpoint when with_counts is true
+ approximate_member_count: number?, -- approximate count of total members, returned from the GET /invites/ endpoint when with_counts is true
+ expires_at: string?, -- the expiration date of this invite, returned from the GET /invites/ endpoint when with_expiration is true
+ stage_instance: StageInstanceObject?, -- stage instance data if there is a public Stage instance in the Stage channel this invite is for (deprecated)
+ guild_scheduled_event: GuildScheduledEventObject?, -- guild scheduled event data, only included if guild_scheduled_event_id contains a valid guild scheduled event id
+}
+
+-- https://discord.com/developers/docs/resources/invite#invite-metadata-object
+export type InviteMetadataObject = {
+ uses: number, -- number of times this invite has been used
+ max_uses: number, -- max number of times this invite can be used
+ max_age: number, -- duration (in seconds) after which the invite expires
+ temporary: boolean, -- whether this invite only grants temporary membership
+ created_at: string, -- when this invite was created
+}
+
+-- https://discord.com/developers/docs/resources/channel#followed-channel-object
+export type FollowedChannelObject = {
+ channel_id: Snowflake, -- source channel id
+ webhook_id: Snowflake, -- created target webhook id
+}
+
+-- https://discord.com/developers/docs/resources/guild#guild-preview-object
+export type GuildPreviewObject = {
+ id: Snowflake, -- guild id
+ name: string, -- guild name (2-100 characters)
+ icon: string?, -- icon hash
+ splash: string?, -- splash hash
+ discovery_splash: string?, -- discovery splash hash
+ emojis: { EmojiObject }, -- custom guild emojis
+ features: { GuildFeature }, -- enabled guild features
+ approximate_member_count: number, -- approximate number of members in this guild
+ approximate_presence_count: number, -- approximate number of online members in this guild
+ description: string?, -- the description for the guild
+ stickers: { StickerObject }, -- custom guild stickers
+}
+
+-- https://discord.com/developers/docs/resources/guild#ban-object
+export type BanObject = {
+ reason: string?, -- the reason for the ban
+ user: UserObject, -- the banned user=
+}
+
+-- https://discord.com/developers/docs/resources/voice#voice-region-object
+export type VoiceRegionObject = {
+ id: string, -- unique ID for the region
+ name: string, -- name of the region
+ optimal: boolean, -- true for a single server that is closest to the current user's client
+ deprecated: boolean, -- whether this is a deprecated voice region (avoid switching to these)
+ custom: boolean, -- whether this is a custom voice region (used for events/etc)
+}
+
+-- https://discord.com/developers/docs/resources/guild#guild-widget-settings-object
+export type GuildWidgetSettingsObject = {
+ enabled: boolean, -- whether the widget is enabled
+ channel_id: Snowflake?, -- the widget channel id
+}
+
+-- https://discord.com/developers/docs/resources/guild#guild-widget-object
+export type GuildWidgetObject = {
+ id: Snowflake, -- guild id
+ name: string, -- guild name (2-100 characters)
+ instant_invite: string?, -- instant invite for the guilds specified widget invite channel
+ channels: { ChannelObject }, -- voice and stage channels which are accessible by @everyone
+ members: { UserObject }, -- special widget user objects that includes users presence (Limit 100)
+ presence_count: number, -- number of online members in this guild
+}
+
+-- https://discord.com/developers/docs/resources/guild#guild-onboarding-object-prompt-option-structure
+export type PromptOptionObject = {
+ id: Snowflake, -- ID of the prompt option
+ channel_ids: { Snowflake }, -- IDs for channels a member is added to when the option is selected
+ role_ids: { Snowflake }, -- IDs for roles assigned to a member when the option is selected
+ emoji: EmojiObject?, -- Emoji of the option (see below)
+ emoji_id: Snowflake, -- Emoji ID of the option (see below)
+ emoji_name: string?, -- Emoji name of the option (see below)
+ emoji_animated: boolean?, -- Whether the emoji is animated (see below)
+ title: string, -- Title of the option
+ description: string?, -- Description of the option
+}
+
+-- https://discord.com/developers/docs/resources/guild#guild-onboarding-object-onboarding-prompt-structure
+export type OnboardingPromptObject = {
+ id: Snowflake, -- ID of the prompt
+ type: PromptTypes, -- Type of prompt
+ options: { PromptOptionObject }, -- Options available within the prompt
+ title: string, -- Title of the prompt
+ single_select: boolean, -- Indicates whether users are limited to selecting one option for the prompt
+ required: boolean, -- Indicates whether the prompt is required before a user completes the onboarding flow
+ in_onboarding: boolean, -- Indicates whether the prompt is present in the onboarding flow. If false, the prompt will only appear in the Channels & Roles tab
+}
+
+-- https://discord.com/developers/docs/resources/guild#guild-onboarding-object
+export type GuildOnboardingObject = {
+ guild_id: Snowflake, -- ID of the guild this onboarding is part of
+ prompts: { OnboardingPromptObject }, -- Prompts shown during onboarding and in customize community
+ default_channel_ids: { Snowflake }, -- Channel IDs that members get opted into automatically
+ enabled: boolean, -- Whether onboarding is enabled in the guild
+ mode: OnboardingMode, -- Current mode of onboarding
+}
+
+-- https://discord.com/developers/docs/resources/guild-scheduled-event#guild-scheduled-event-user-object
+export type GuildScheduledEventUserObject = {
+ guild_scheduled_event_id: Snowflake, -- the scheduled event id which the user subscribed to
+ user: UserObject, -- user which subscribed to an event
+ member: GuildMemberObject?, -- guild member data for this user for the guild which this event belongs to, if any
+}
+
+-- https://discord.com/developers/docs/resources/guild-template#guild-template-object
+export type GuildTemplateObject = {
+ code: string, -- the template code (unique ID)
+ name: string, -- template name
+ description: string?, -- the description for the template
+ usage_count: number, -- number of times this template has been used
+ creator_id: Snowflake, -- the ID of the user who created the template
+ creator: UserObject, -- the user who created the template
+ created_at: string, -- when this template was created
+ updated_at: string, -- when this template was last synced to the source guild
+ source_guild_id: Snowflake, -- the ID of the guild this template is based on
+ serialized_source_guild: GuildObject, -- the guild snapshot this template contains
+ is_dirty: boolean?, -- whether the template has unsynced changes
+}
+
+-- https://discord.com/developers/docs/resources/sticker#sticker-pack-object
+export type StickerPackObject = {
+ id: Snowflake, -- id of the sticker pack
+ stickers: { StickerObject }, -- the stickers in the pack
+ name: string, -- name of the sticker pack
+ sku_id: Snowflake, -- id of the pack's SKU
+ cover_sticker_id: Snowflake?, -- id of a sticker in the pack which is shown as the pack's icon
+ description: string, -- description of the sticker pack
+ banner_asset_id: Snowflake?, -- id of the sticker pack's banner image
+}
+
+-- https://discord.com/developers/docs/resources/user#connection-object
+export type ConnectionObject = {
+ id: string, -- id of the connection account
+ name: string, -- the username of the connection account
+ type: ConnectionObjectServices, -- the service of this connection
+ revoked: boolean?, -- whether the connection is revoked
+ integrations: { IntegrationObject }?, -- an array of partial server integrations
+ verified: boolean, -- whether the connection is verified
+ friend_sync: boolean, -- whether friend sync is enabled for this connection
+ show_Activity: boolean, -- whether activities related to this connection will be shown in presence updates
+ two_way_link: boolean, -- whether this connection has a corresponding third party OAuth2 token
+ visibility: ConnectionVisibilityTypes, -- visibility of this connection
+}
+
+-- https://discord.com/developers/docs/resources/user#application-role-connection-object
+export type ApplicationRoleConnectionObject = {
+ platform_name: string?, -- the vanity name of the platform a bot has connected (max 50 characters)
+ platform_username: string?, -- the username on the platform a bot has connected (max 100 characters)
+ metadata: ApplicationRoleConnectionMetadataObject, -- object mapping application role connection metadata keys to their string-ified value (max 100 characters) for the user on the platform a bot has connected
+}
+
+-- https://discord.com/developers/docs/topics/gateway#session-start-limit-object
+export type SessionStartLimitObject = {
+ total: number, -- Total number of session starts the current user is allowed
+ remaining: number, -- Remaining number of session starts the current user is allowed
+ reset_after: number, -- Number of milliseconds after which the limit resets
+ max_concurrency: number, -- Number of identify requests allowed per 5 seconds
+}
+
+-- https://discord.com/developers/docs/resources/channel#allowed-mentions-object
+export type AllowedMentionObject = {
+ parse: { AllowedMentionTypes }?, -- An array of allowed mention types to parse from the content.
+ users: { string }?, -- Array of role_ids to mention (Max size of 100)
+ roles: { string }?, -- Array of user_ids to mention (Max size of 100)
+ replied_user: boolean?, -- For replies, whether to mention the author of the message being replied to (default false)
+}
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel-forum-and-media-thread-message-params-object
+export type ForumAndMediaThreadMessageObject = {
+ content: string?, -- Message contents (up to 2000 characters)
+ embeds: { EmbedObject }?, -- Up to 10 rich embeds (up to 6000 characters)
+ allowed_mentions: AllowedMentionObject?, -- Allowed mentions for the message
+ components: { ComponentObjects }?, -- Components to include with the message
+ sticker_ids: { Snowflake }?, -- IDs of up to 3 stickers in the server to send in the message
+ attachments: { AttachmentObject }?, -- Attachment objects with filename and description. See Uploading Files
+ flags: number?, -- Message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set)
+}
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
+export type InteractionCallbackAutocompleteObject = {
+ choices: { ApplicationCommandOptionChoiceObject }?, -- autocomplete choices (max of 25 choices)
+}
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-data-structure
+export type InteractionCallbackModalObject = {
+ custom_id: string?, -- Developer-defined identifier for the modal, max 100 characters
+ title: string?, -- Title of the popup modal, max 45 characters
+ -- components: {} -- Between 1 and 5 (inclusive) components that make up the modal
+}
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-response-object-interaction-callback-type
+export type InteractionResponseObject = {
+ type: InteractionCallbackType, -- the type of response
+ data: (Partial | InteractionCallbackAutocompleteObject | InteractionCallbackModalObject)?, -- an optional response message
+}
+
+return "DISCORD_V10_PAYLOAD_TYPES"
diff --git a/packages/api-types/src/application.luau b/packages/api-types/src/application.luau
new file mode 100644
index 0000000..b1c7773
--- /dev/null
+++ b/packages/api-types/src/application.luau
@@ -0,0 +1,51 @@
+local reflect = require("@utils/table/reflect")
+
+local MembershipState = table.freeze(reflect({
+ Invited = 1,
+ Accepted = 2,
+}))
+
+local IntegrationTypesConfig = table.freeze(reflect({
+ GuildInstall = 0,
+ UserInstall = 1,
+}))
+
+export type MembershipState = "Invited" | "Accepted"
+export type TeamRole = "Owner" | "Admin" | "Developer" | "ReadOnly"
+
+export type IntegrationTypesConfig = "GuildInstall" | "UserInstall"
+
+export type OAuth2Scopes =
+ "activities.read"
+ | "activities.write"
+ | "applications.builds.read"
+ | "applications.builds.upload"
+ | "applications.commands"
+ | "applications.commands.update"
+ | "applications.commands.permissions.update"
+ | "applications.entitlements"
+ | "applications.store.update"
+ | "bot"
+ | "connections"
+ | "dm_channels.read"
+ | "email"
+ | "gdm.join"
+ | "guilds"
+ | "guilds.join"
+ | "guilds.members.read"
+ | "identify"
+ | "messages.read"
+ | "relationships.read"
+ | "role_connections.write"
+ | "rpc"
+ | "rpc.activities.write"
+ | "rpc.notifications.read"
+ | "rpc.voice.read"
+ | "rpc.voice.write"
+ | "voice"
+ | "webhook.incoming"
+
+return {
+ MembershipState = MembershipState,
+ IntegrationTypesConfig = IntegrationTypesConfig,
+}
diff --git a/packages/api-types/src/channel.luau b/packages/api-types/src/channel.luau
new file mode 100644
index 0000000..1615222
--- /dev/null
+++ b/packages/api-types/src/channel.luau
@@ -0,0 +1,67 @@
+local reflect = require("@utils/table/reflect")
+
+local ChannelTypes = table.freeze(reflect({
+ GuildText = 0,
+ DM = 1,
+ GuildVoice = 2,
+ GroupDM = 3,
+ GuildCategory = 4,
+ GuildAnnouncement = 5,
+ AnnouncementThread = 10,
+ PublicThread = 11,
+ PrivateThread = 12,
+ GuildStageVoice = 13,
+ GuildDirectory = 14,
+ GuildForum = 15,
+ GuildMedia = 16,
+}))
+
+local MediaSortOrder = table.freeze(reflect({
+ LatestActivity = 0,
+ CreationDate = 1,
+}))
+
+local ForumSortOrder = table.freeze(reflect({
+ LatestActivity = 0,
+ CreationDate = 1,
+}))
+
+local ForumLayout = table.freeze(reflect({
+ NotSet = 0,
+ ListView = 1,
+ GalleryView = 2,
+}))
+
+local VideoQualityMode = table.freeze(reflect({
+ Auto = 1,
+ Full = 2,
+}))
+
+export type ChannelType =
+ "GuildText"
+ | "DM"
+ | "GuildVoice"
+ | "GroupDM"
+ | "GuildCategory"
+ | "GuildAnnouncement"
+ | "AnnouncementThread"
+ | "PublicThread"
+ | "PrivateThread"
+ | "GuildStageVoice"
+ | "GuildDirectory"
+ | "GuildForum"
+ | "GuildMedia"
+
+export type MediaSortOrder = "LatestActivity" | "CreationDate"
+export type ForumSortOrder = "LatestActivity" | "CreationDate"
+export type ForumLayout = "NotSet" | "ListView" | "GalleryView"
+
+export type VideoQualityMode = "Auto" | "Full"
+
+return {
+ ChannelTypes = ChannelTypes,
+ MediaSortOrder = MediaSortOrder,
+ ForumSortOrder = ForumSortOrder,
+ ForumLayout = ForumLayout,
+ VideoQualityMode = VideoQualityMode,
+}
diff --git a/packages/api-types/src/embed.luau b/packages/api-types/src/embed.luau
new file mode 100644
index 0000000..c1660f2
--- /dev/null
+++ b/packages/api-types/src/embed.luau
@@ -0,0 +1,17 @@
+local reflect = require("@utils/table/reflect")
+
+local EmbedType = table.freeze(reflect({
+ Rich = "rich",
+ Image = "image",
+ Video = "video",
+ Gifv = "gifv",
+ Article = "article",
+ Link = "link",
+ PollResult = "poll_result",
+}))
+
+export type EmbedType = "Rich" | "Image" | "Video" | "Gifv" | "Article" | "Link" | "PollResult"
+
+return {
+ EmbedType = EmbedType,
+}
diff --git a/packages/api-types/src/entitlement.luau b/packages/api-types/src/entitlement.luau
new file mode 100644
index 0000000..9f0e0b0
--- /dev/null
+++ b/packages/api-types/src/entitlement.luau
@@ -0,0 +1,26 @@
+local reflect = require("@utils/table/reflect")
+
+local EntitlementType = table.freeze(reflect({
+ Purchase = 1,
+ PremiumSubscription = 2,
+ DeveloperGift = 3,
+ TestModePurchase = 4,
+ FreePurchase = 5,
+ UserGift = 6,
+ PremiumPurchase = 7,
+ ApplicationSubscription = 8,
+}))
+
+export type EntitlementType =
+ "Purchase"
+ | "PremiumSubscription"
+ | "DeveloperGift"
+ | "TestModePurchase"
+ | "FreePurchase"
+ | "UserGift"
+ | "PremiumPurchase"
+ | "ApplicationSubscription"
+
+return {
+ EntitlementType = EntitlementType,
+}
diff --git a/packages/api-types/src/gateway/closeCodes.luau b/packages/api-types/src/gateway/closeCodes.luau
new file mode 100644
index 0000000..1b7ae32
--- /dev/null
+++ b/packages/api-types/src/gateway/closeCodes.luau
@@ -0,0 +1,38 @@
+--[[
+ https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes
+]]
+
+local CloseCodes = table.freeze({
+ UnknownError = 4000,
+ UnknownOpcode = 4001,
+ DecodeError = 4002,
+ NotAuthenticated = 4003,
+ AuthenticationFailed = 4004,
+ AlreadyAuthenticated = 4005,
+ InvalidSeq = 4007,
+ Ratelimited = 4008,
+ SessionTimedOut = 4009,
+ InvalidShard = 4010,
+ ShardingRequired = 4011,
+ InvalidAPIVersion = 4012,
+ InvalidIntents = 4013,
+ DisallowedIntents = 4014,
+})
+
+export type CloseCode =
+ "UnknownError"
+ | "UnknownOpcode"
+ | "DecodeError"
+ | "NotAuthenticated"
+ | "AuthenticationFailed"
+ | "AlreadyAuthenticated"
+ | "InvalidSeq"
+ | "Ratelimited"
+ | "SessionTimedOut"
+ | "InvalidShard"
+ | "ShardingRequired"
+ | "InvalidAPIVersion"
+ | "InvalidIntents"
+ | "DisallowedIntents"
+
+return CloseCodes
diff --git a/packages/api-types/src/gateway/intents.luau b/packages/api-types/src/gateway/intents.luau
new file mode 100644
index 0000000..46c0d01
--- /dev/null
+++ b/packages/api-types/src/gateway/intents.luau
@@ -0,0 +1,52 @@
+--[[
+ https://discord.com/developers/docs/topics/gateway#list-of-intents
+]]
+
+local Intents = table.freeze({
+ Guilds = 0,
+ GuildMembers = 1,
+ GuildModeration = 2,
+ GuildEmojisAndStickers = 3,
+ GuildIntegrations = 4,
+ GuildWebhooks = 5,
+ GuildInvites = 6,
+ GuildVoiceStates = 7,
+ GuildPresences = 8,
+ GuildMessages = 9,
+ GuildMessageReactions = 10,
+ GuildMessageTyping = 11,
+ DirectMessages = 12,
+ DirectMessageReactions = 13,
+ DirectMessageTyping = 14,
+ MessageContent = 15,
+ GuildScheduleEvents = 16,
+ AutoModerationConfiguration = 20,
+ AutoModerationExecution = 21,
+ GuildMessagePolls = 24,
+ DirectMessagePolls = 25,
+})
+
+export type Intent =
+ "Guilds"
+ | "GuildMembers"
+ | "GuildModeration"
+ | "GuildEmojisAndStickers"
+ | "GuildIntegrations"
+ | "GuildWebhooks"
+ | "GuildInvites"
+ | "GuildVoiceStates"
+ | "GuildPresences"
+ | "GuildMessages"
+ | "GuildMessageReactions"
+ | "GuildMessageTyping"
+ | "DirectMessages"
+ | "DirectMessageReactions"
+ | "DirectMessageTyping"
+ | "MessageContent"
+ | "GuildScheduleEvents"
+ | "AutoModerationConfiguration"
+ | "AutoModerationExecution"
+ | "GuildMessagePolls"
+ | "DirectMessagePolls"
+
+return Intents
diff --git a/packages/api-types/src/gateway/opcodes.luau b/packages/api-types/src/gateway/opcodes.luau
new file mode 100644
index 0000000..a738b82
--- /dev/null
+++ b/packages/api-types/src/gateway/opcodes.luau
@@ -0,0 +1,32 @@
+--[[
+ https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes
+]]
+
+local Opcodess = table.freeze({
+ Dispatch = 0,
+ Heartbeat = 1,
+ Identify = 2,
+ PresenceUpdate = 3,
+ VoiceStateUpdate = 4,
+ Resume = 6,
+ Reconnect = 7,
+ RequestGuildMembers = 8,
+ InvalidSession = 9,
+ Hello = 10,
+ HeartbeatACK = 11,
+})
+
+export type Opcode =
+ "Dispatch"
+ | "Heartbeat"
+ | "Identify"
+ | "PresenceUpdate"
+ | "VoiceStateUpdate"
+ | "Resume"
+ | "Reconnect"
+ | "RequestGuildMembers"
+ | "InvalidSession"
+ | "Hello"
+ | "HeartbeatACK"
+
+return Opcodess
diff --git a/packages/api-types/src/gateway/receiveEvents.luau b/packages/api-types/src/gateway/receiveEvents.luau
new file mode 100644
index 0000000..11f8c0c
--- /dev/null
+++ b/packages/api-types/src/gateway/receiveEvents.luau
@@ -0,0 +1,151 @@
+--[[
+ https://discord.com/developers/docs/topics/gateway-events#receive-events
+
+ these enums map to the `T` event name given in a Discord payload;
+ https://discord.com/developers/docs/topics/gateway-events#payload-structure
+]]
+
+local ReceiveEvents = table.freeze({
+ Hello = "HELLO",
+ Ready = "READY",
+ Resumed = "RESUMED",
+ Reconnect = "RECONNECT",
+ InvalidSession = "INVALID_SESSION",
+ ApplicationCommandPermissionsUpdate = "APPLICATION_COMMAND_PERMISSIONS_UPDATE",
+ AutoModerationRuleCreate = "AUTO_MODERATION_RULE_CREATE",
+ AutoModerationRuleUpdate = "AUTO_MODERATION_RULE_UPDATE",
+ AutoModerationRuleDelete = "AUTO_MODERATION_RULE_DELETE",
+ AutoModerationActionExecution = "AUTO_MODERATION_ACTION_EXECUTION",
+ ChannelCreate = "CHANNEL_CREATE",
+ ChannelUpdate = "CHANNEL_UPDATE",
+ ChannelDelete = "CHANNEL_DELETE",
+ ChannelPinsUpdate = "CHANNEL_PINS_UPDATE",
+ ThreadCreate = "THREAD_CREATE",
+ ThreadUpdate = "THREAD_UPDATE",
+ ThreadDelete = "THREAD_DELETE",
+ ThreadListSync = "THREAD_LIST_SYNC",
+ ThreadMemberUpdate = "THREAD_MEMBER_UPDATE",
+ ThreadMembersUpdate = "THREAD_MEMBERS_UPDATE",
+ EntitlementCreate = "ENTITLEMENT_CREATE",
+ EntitlementUpdate = "ENTITLEMENT_UPDATE",
+ EntitlementDelete = "ENTITLEMENT_DELETE",
+ GuildCreate = "GUILD_CREATE",
+ GuildUpdate = "GUILD_UPDATE",
+ GuildDelete = "GUILD_DELETE",
+ GuildAuditLogEntryCreate = "GUILD_AUDIT_LOG_ENTRY_CREATE",
+ GuildBanAdd = "GUILD_BAN_ADD",
+ GuildBanRemove = "GUILD_BAN_REMOVE",
+ GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE",
+ GuildStickersUpdate = "GUILD_STICKERS_UPDATE",
+ GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE",
+ GuildMemberAdd = "GUILD_MEMBER_ADD",
+ GuildMemberRemove = "GUILD_MEMBER_REMOVE",
+ GuildMemberUpdate = "GUILD_MEMBER_UPDATE",
+ GuildMembersChunk = "GUILD_MEMBERS_CHUNK",
+ GuildRoleCreate = "GUILD_ROLE_CREATE",
+ GuildRoleDelete = "GUILD_ROLE_DELETE",
+ GuildRoleUpdate = "GUILD_ROLE_UPDATE",
+ GuildScheduledEventCreate = "GUILD_SCHEDULED_EVENT_CREATE",
+ GuildScheduledEventUpdate = "GUILD_SCHEDULED_EVENT_UPDATE",
+ GuildScheduledEventDelete = "GUILD_SCHEDULED_EVENT_DELETE",
+ GuildScheduledEventUserAdd = "GUILD_SCHEDULED_EVENT_USER_ADD",
+ GuildScheduledEventUserRemove = "GUILD_SCHEDULED_EVENT_USER_REMOVE",
+ IntegrationCreate = "INTEGRATION_CREATE",
+ IntegrationUpdate = "INTEGRATION_UPDATE",
+ IntegrationDelete = "INTEGRATION_DELETE",
+ InteractionCreate = "INTERACTION_CREATE",
+ InviteCreate = "INVITE_CREATE",
+ InviteDelete = "INVITE_DELETE",
+ MessageCreate = "MESSAGE_CREATE",
+ MessageUpdate = "MESSAGE_UPDATE",
+ MessageDelete = "MESSAGE_DELETE",
+ MessageDeleteBulk = "MESSAGE_DELETE_BULK",
+ MessageReactionAdd = "MESSAGE_REACTION_ADD",
+ MessageReactionRemove = "MESSAGE_REACTION_REMOVE",
+ MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL",
+ MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI",
+ PresenceUpdate = "PRESENCE_UPDATE",
+ StageInstanceCreate = "STAGE_INSTANCE_CREATE",
+ StageInstanceUpdate = "STAGE_INSTANCE_UPDATE",
+ StageInstanceDelete = "STAGE_INSTANCE_DELETE",
+ TypingStart = "TYPING_START",
+ UserUpdate = "USER_UPDATE",
+ VoiceStateUpdate = "VOICE_STATE_UPDATE",
+ VoiceServerUpdate = "VOICE_SERVER_UPDATE",
+ WebhooksUpdate = "WEBHOOKS_UPDATE",
+ MessagePollVoteAdd = "MESSAGE_POLL_VOTE_ADD",
+ MessagePollVoteRemove = "MESSAGE_POLL_VOTE_REMOVE",
+})
+
+export type ReceiveEvent =
+ "Hello"
+ | "Ready"
+ | "Resumed"
+ | "Reconnect"
+ | "InvalidSession"
+ | "ApplicationCommandPermissionsUpdate"
+ | "AutoModerationRuleCreate"
+ | "AutoModerationRuleUpdate"
+ | "AutoModerationRuleDelete"
+ | "AutoModerationActionExecution"
+ | "ChannelCreate"
+ | "ChannelUpdate"
+ | "ChannelDelete"
+ | "ChannelPinsUpdate"
+ | "ThreadCreate"
+ | "ThreadUpdate"
+ | "ThreadDelete"
+ | "ThreadListSync"
+ | "ThreadMemberUpdate"
+ | "ThreadMembersUpdate"
+ | "EntitlementCreate"
+ | "EntitlementUpdate"
+ | "EntitlementDelete"
+ | "GuildCreate"
+ | "GuildUpdate"
+ | "GuildDelete"
+ | "GuildAuditLogEntryCreate"
+ | "GuildBanAdd"
+ | "GuildBanRemove"
+ | "GuildEmojisUpdate"
+ | "GuildStickersUpdate"
+ | "GuildIntegrationsUpdate"
+ | "GuildMemberAdd"
+ | "GuildMemberRemove"
+ | "GuildMemberUpdate"
+ | "GuildMembersChunk"
+ | "GuildRoleCreate"
+ | "GuildRoleDelete"
+ | "GuildRoleUpdate"
+ | "GuildScheduledEventCreate"
+ | "GuildScheduledEventUpdate"
+ | "GuildScheduledEventDelete"
+ | "GuildScheduledEventUserAdd"
+ | "GuildScheduledEventUserRemove"
+ | "IntegrationCreate"
+ | "IntegrationUpdate"
+ | "IntegrationDelete"
+ | "InteractionCreate"
+ | "InviteCreate"
+ | "InviteDelete"
+ | "MessageCreate"
+ | "MessageUpdate"
+ | "MessageDelete"
+ | "MessageDeleteBulk"
+ | "MessageReactionAdd"
+ | "MessageReactionRemove"
+ | "MessageReactionRemoveAll"
+ | "MessageReactionRemoveEmoji"
+ | "PresenceUpdate"
+ | "StageInstanceCreate"
+ | "StageInstanceUpdate"
+ | "StageInstanceDelete"
+ | "TypingStart"
+ | "UserUpdate"
+ | "VoiceStateUpdate"
+ | "VoiceServerUpdate"
+ | "WebhooksUpdate"
+ | "MessagePollVoteAdd"
+ | "MessagePollVoteRemove"
+
+return ReceiveEvents
diff --git a/packages/api-types/src/gateway/sendEvents.luau b/packages/api-types/src/gateway/sendEvents.luau
new file mode 100644
index 0000000..ee96fb9
--- /dev/null
+++ b/packages/api-types/src/gateway/sendEvents.luau
@@ -0,0 +1,18 @@
+--[[
+ https://discord.com/developers/docs/topics/gateway-events#send-events
+
+ these enums map to the `opcodes` module under `@api-types/gateway/optcodes.luau`
+]]
+
+local SendEvents = table.freeze({
+ Identify = "Identify",
+ Resume = "Resume",
+ Heartbeat = "Heartbeat",
+ RequestGuildMembers = "RequestGuildMembers",
+ UpdateVoiceState = "UpdateVoiceState",
+ UpdatePresence = "UpdatePresence",
+})
+
+export type SendEvent = "Identify" | "Resume" | "Heartbeat" | "RequestGuildMembers" | "UpdateVoiceState" | "UpdatePresence"
+
+return SendEvents
diff --git a/packages/api-types/src/gateway/types.luau b/packages/api-types/src/gateway/types.luau
new file mode 100644
index 0000000..61fef64
--- /dev/null
+++ b/packages/api-types/src/gateway/types.luau
@@ -0,0 +1,488 @@
+--[[
+ Mapping out all discord recieve/send payloads that can be consumed by the Discord v10 API.
+]]
+
+local objects = require("@api-types/apiTypes")
+
+-- [[ Base ]] --
+export type Payload = {
+ op: number,
+ d: DATA,
+ s: number?,
+ t: string?,
+}
+
+-- [[ Send Events - https://discord.com/developers/docs/topics/gateway-events#send-events ]] --
+
+-- https://discord.com/developers/docs/topics/gateway-events#identify
+export type IdentifyPayload = Payload<{
+ token: string, -- Authentication token
+ properties: objects.IdentifyPropertiesObject, -- Connection properties
+ compress: boolean?, -- Whether this connection supports compression of packets
+ large_threshold: number?, -- Value between 50 and 250, total number of members where the gateway will stop sending offline members in the guild member list
+ shard: { number }?, -- Used for Guild Sharding
+ presence: objects.ActivityObject?, -- Presence structure for initial presence information
+ intents: number, -- Gateway Intents you wish to receive
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#resume
+export type ResumePayload = Payload<{
+ token: string, -- Session token
+ session_id: string, -- Session ID
+ seq: number, -- Last sequence number received
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#heartbeat
+export type HeartbeatPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#request-guild-members
+export type RequestGuildMembersPayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild to get members for
+ query: string?, -- string that username starts with, or an empty string to return all members
+ limit: number, -- maximum number of members to send matching the query; a limit of 0 can be used with an empty string query to return all members
+ presences: boolean?, -- used to specify if we want the presences of the matched members
+ user_ids: { objects.Snowflake }?, -- used to specify which users you wish to fetch
+ nonce: string?, -- nonce to identify the Guild Members Chunk response
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#update-voice-state
+export type UpdateVoiceStatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ channel_id: string?, -- ID of the voice channel client wants to join (null if disconnecting)
+ self_mute: boolean, -- Whether the client is muted
+ self_deaf: boolean, -- Whether the client deafened
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#update-presence
+export type UpdatePresencePayload = Payload
+
+-- [[ Receive Events - https://discord.com/developers/docs/topics/gateway-events#receive-events ]] --
+
+-- https://discord.com/developers/docs/topics/gateway-events#hello
+export type HelloPayload = Payload<{
+ heartbeat_interval: number, -- Interval (in milliseconds) an app should heartbeat with
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#ready
+export type ReadyPayload = Payload<{
+ v: number,
+ user: objects.UserObject,
+ guilds: { objects.UnavailableGuildObject },
+ session_id: string,
+ resume_gateway_url: string,
+ shard: { number }?,
+ application: objects.ApplicationObject,
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#resumed
+export type ResumedPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#reconnect
+export type ReconnectPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#invalid-session
+export type InvalidSessionPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-create
+export type ApplicationCommandPermissionsCreatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#application-command-permissions-update
+export type ApplicationCommandPermissionsUpdatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#auto-moderation-rule-delete
+export type ApplicationCommandPermissionsDeletePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#auto-moderation-action-execution
+export type ApplicationCommandPermissionsExecutionPayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild in which action was executed
+ action: objects.AutomoderationActionObject, -- Action which was executed
+ rule_id: objects.Snowflake, -- ID of the rule which action belongs to
+ rule_trigger_type: objects.AutomoderationRuleTriggerType, -- Trigger type of rule which was triggered
+ user_id: objects.Snowflake, -- ID of the user which generated the content which triggered the rule
+ channel_id: objects.Snowflake?, -- ID of the channel in which user content was posted
+ message_id: objects.Snowflake?, -- ID of any user message which content belongs to *
+ alert_system_message_id: objects.Snowflake?, -- ID of any system auto moderation messages posted as a result of this action **
+ content: string, -- User-generated text content
+ matched_keyword: string?, -- Word or phrase configured in the rule that triggered the rule
+ matched_content: string?, -- Substring in content that triggered the rule
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#channel-create
+export type CreateChannelPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#channel-update
+export type UpdateChannelPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#channel-delete
+export type DeleteChannelPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#channel-pins-update
+export type ChannelPinsUpdatePayload = Payload<{
+ guild_id: objects.Snowflake?,
+ channel_id: objects.Snowflake,
+ last_pin_timestamp: string?,
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#thread-create
+export type CreateThreadPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#thread-update
+export type UpdateThreadPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#thread-delete
+export type DeleteThreadPayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#thread-list-sync
+export type ThreadListSyncPayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ channel_ids: { objects.Snowflake }?, -- Parent channel IDs whose threads are being synced. If omitted, then threads were synced for the entire guild. This array may contain channel_ids that have no active threads as well, so you know to clear that data.
+ threads: { objects.ChannelObject }, -- All active threads in the given channels that the current user can access
+ members: { objects.ThreadMemberObject }, -- All thread member objects from the synced threads for the current user, indicating which threads the current user has been added to
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#thread-member-update
+export type ThreadMemberUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#thread-member-update
+export type ThreadMembersUpdatePayload = Payload<{
+ id: objects.Snowflake, -- ID of the thread
+ guild_id: objects.Snowflake, -- ID of the guild
+ member_count: number, -- Approximate number of members in the thread, capped at 50
+ added_members: { objects.ThreadMemberObject }?, -- Users who were added to the thread
+ removed_member_ids: { objects.Snowflake }?, -- ID of the users who were removed from the thread
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#entitlement-create
+export type EntitlementCreatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#entitlement-update
+export type EntitlementUpdatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#entitlement-delete
+export type EntitlementDeletePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-create
+export type GuildCreatePayload = Payload<
+ objects.UnavailableGuildObject | (objects.GuildObject & {
+ joined_at: string, -- When this guild was joined at
+ large: boolean, -- true if this is considered a large guild
+ unavailable: boolean?, -- true if this guild is unavailable due to an outage
+ member_count: number, -- Total number of members in this guild
+ voice_states: { objects.VoiceStateObject }, -- States of members currently in voice channels; lacks the guild_id key
+ members: { objects.GuildMemberObject }, -- Users in the guild
+ channels: { objects.ChannelObject }, -- Channels in the guild
+ threads: { objects.ChannelObject }, -- All active threads in the guild that current user has permission to view
+ presences: { objects.PresenceUpdateObject }, -- Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold
+ stage_instances: { objects.StageInstanceObject }, -- Stage instances in the guild
+ guild_scheduled_events: { objects.GuildScheduledEventObject }, -- Scheduled events in the guild
+ })
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-update
+export type GuildUpdatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-delete
+export type GuildDeletePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-ban-add
+export type GuildBanAddPayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ user: objects.UserObject, -- User who was banned
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-ban-remove
+export type GuildBanRemovePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ user: objects.UserObject, -- User who was unbanned
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-emojis-update
+export type GuildEmojisUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ emojis: { objects.EmojiObject }, -- Array of emojis
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-stickers-update
+export type GuildStickersUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ stickers: { objects.StickerObject }, -- Array of stickers
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-integrations-update
+export type GuildIntegrationsUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-member-add
+export type GuildMemberAddPayload = Payload<
+ objects.GuildMemberObject & {
+ guild_id: objects.Snowflake, -- ID of the guild
+ }
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-member-remove
+export type GuildMemberRemovePayload = Payload<{
+ guild_id: objects.Snowflake, --ID of the guild
+ user: objects.UserObject, -- User who was removed
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-member-update
+export type GuildMemberUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ roles: { objects.Snowflake }, -- User role ids
+ user: objects.UserObject, -- The user effected
+ nick: string?, -- Nickname of the user in the guild
+ avatar: string?, -- Member's guild avatar hash
+ joined_at: string?, -- When the user joined the guild
+ premium_since: string?, -- When the user starting boosting the guild
+ deaf: boolean?, -- Whether the user is deafened in voice channels
+ mute: boolean?, -- Whether the user is muted in voice channels
+ pending: boolean?, -- Whether the user has not yet passed the guild's Membership Screening requirements
+ communication_disabled_until: string?, -- When the user's timeout will expire and the user will be able to communicate in the guild again, null or a time in the past if the user is not timed out
+ flags: number?, -- Guild member flags represented as a bit set, defaults to 0
+ avatar_decoration_data: objects.AvatarDecorationDataObject?, -- Data for the member's guild avatar decoration
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-members-chunk
+export type GuildMembersChunkPayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ members: { objects.GuildMemberObject }, -- Set of guild members
+ chunk_index: number, -- Chunk index in the expected chunks for this response (0 <= chunk_index < chunk_count)
+ chunk_count: number, -- Total number of expected chunks for this response
+ not_found: { unknown }?, -- When passing an invalid ID to REQUEST_GUILD_MEMBERS, it will be returned here
+ presences: { objects.PresenceObject }?, -- When passing true to REQUEST_GUILD_MEMBERS, presences of the returned members will be here
+ nonce: string?, -- Nonce used in the Guild Members Request
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-role-create
+export type GuildRoleCreatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ role: objects.GuildRoleObject, -- Role that was created
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-role-update
+export type GuildRoleUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ role: objects.GuildRoleObject, -- Role that was updated
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-role-delete
+export type GuildRoleDeletePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ role_id: objects.Snowflake, -- ID of the role
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create
+export type GuildScheduledEventCreatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create
+export type GuildScheduledEventUpdatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create
+export type GuildScheduledEventDeletePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create
+export type GuildScheduledEventUserAddPayload = Payload<{
+ guild_scheduled_event_id: objects.Snowflake, -- ID of the guild scheduled event
+ user_id: objects.Snowflake, -- ID of the user
+ guild_id: objects.Snowflake, -- ID of the guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#guild-scheduled-event-create
+export type GuildScheduledEventUserRemovePayload = Payload<{
+ guild_scheduled_event_id: objects.Snowflake, -- ID of the guild scheduled event
+ user_id: objects.Snowflake, -- ID of the user
+ guild_id: objects.Snowflake, -- ID of the guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#integration-create
+export type IntegrationCreatePayload = Payload<
+ objects.IntegrationObject & {
+ guild_id: objects.Snowflake?, -- ID of the guild
+ }
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#integration-update
+export type IntegrationUpdatePayload = Payload<
+ objects.IntegrationObject & {
+ guild_id: objects.Snowflake?, -- ID of the guild
+ }
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#integration-delete
+export type IntegrationDeletePayload = Payload<
+ objects.IntegrationObject & {
+ id: objects.Snowflake?, -- Integration ID
+ guild_id: objects.Snowflake, -- ID of the guild
+ application_id: objects.Snowflake?, -- ID of the bot/OAuth2 application for this discord integration
+ }
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#interaction-create
+export type InteractionCreatePayload = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#invite-create
+export type InviteCreatePayload = Payload<{
+ channel_id: objects.Snowflake, -- Channel the invite is for
+ code: string, -- Unique invite code
+ created_at: string, -- Time at which the invite was created
+ guild_id: objects.Snowflake?, -- Guild of the invite
+ inviter: objects.UserObject?, -- User that created the invite
+ max_age: number, -- How long the invite is valid for (in seconds)
+ max_uses: number, -- Maximum number of times the invite can be used
+ target_type: objects.InviteTargetTypes?, -- Type of target for this voice channel invite
+ target_user: objects.UserObject?, -- User whose stream to display for this voice channel stream invite
+ target_application: objects.ApplicationObject?, -- Embedded application to open for this voice channel embedded application invite
+ temporary: boolean, -- Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role)
+ uses: number, -- How many times the invite has been used (always will be 0)
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#invite-delete
+export type InviteDeletePayload = Payload<{
+ channel_id: objects.Snowflake, -- Channel of the invite
+ code: string, -- Unique invite code
+ guild_id: objects.Snowflake?, -- Guild of the invite
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-create
+export type MessageCreatePayload = Payload<
+ objects.MessageObject & {
+ mentions: { objects.UserObject & { member: objects.GuildMemberObject } }, -- Users specifically mentioned in the message
+ member: objects.GuildMemberObject?, -- Member properties for this message's author. Missing for ephemeral messages and messages from webhooks
+ guild_id: objects.Snowflake?, -- ID of the guild the message was sent in - unless it is an ephemeral message
+ }
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-update
+export type MessageUpdatePayload = Payload<
+ objects.MessageObject & {
+ mentions: { objects.UserObject & { member: objects.GuildMemberObject } }, -- Users specifically mentioned in the message
+ member: objects.GuildMemberObject?, -- Member properties for this message's author. Missing for ephemeral messages and messages from webhooks
+ guild_id: objects.Snowflake?, -- ID of the guild the message was sent in - unless it is an ephemeral message
+ }
+>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-delete
+export type MessageDeletePayload = Payload<{
+ id: objects.Snowflake, -- ID of the messages
+ channel_id: objects.Snowflake, -- ID of the channel
+ guild_id: objects.Snowflake?, -- ID of the guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-delete-bulk
+export type MessageDeleteBulkPayload = Payload<{
+ ids: { objects.Snowflake }, -- IDs of the messages
+ channel_id: objects.Snowflake, -- ID of the channel
+ guild_id: objects.Snowflake?, -- ID of the guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-reaction-add
+export type MessageReactionAddPayload = Payload<{
+ user_id: objects.Snowflake, -- ID of the user
+ channel_id: objects.Snowflake, -- ID of the channel
+ message_id: objects.Snowflake, -- ID of the message
+ guild_id: objects.Snowflake?, -- ID of the guild
+ member: objects.GuildMemberObject?, -- Member who reacted if this happened in a guild
+ emoji: objects.EmojiObject, -- Emoji used to react - example
+ message_author_id: objects.Snowflake?, -- ID of the user who authored the message which was reacted to
+ burst: boolean, -- true if this is a super-reaction
+ burst_colors: { string }, -- Colors used for super-reaction animation in "#rrggbb" format
+ type: objects.ReactionType, -- The type of reaction
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove
+export type MessageReactionRemovePayload = Payload<{
+ user_id: objects.Snowflake, -- ID of the user
+ channel_id: objects.Snowflake, -- ID of the channel
+ message_id: objects.Snowflake, -- ID of the message
+ guild_id: objects.Snowflake?, -- ID of the guild
+ emoji: objects.EmojiObject, -- Emoji used to react - example
+ burst: boolean, -- true if this was a super-reaction
+ type: objects.ReactionType, -- The type of reaction
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-all
+export type MessageReactionRemoveAllPayload = Payload<{
+ channel_id: objects.Snowflake, -- ID of the channel
+ message_id: objects.Snowflake, -- ID of the guild
+ guild_id: objects.Snowflake?, -- ID of the message
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-reaction-remove-emoji
+export type MessageReactionRemoveEmojiPayload = Payload<{
+ channel_id: objects.Snowflake, -- ID of the channel
+ message_id: objects.Snowflake, -- ID of the guild
+ guild_id: objects.Snowflake?, -- ID of the message
+ emoji: objects.EmojiObject, -- Emoji that was removed
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#presence-update
+export type PresenceUpdatePayload = Payload<{
+ user: objects.UserObject, -- User whose presence is being updated
+ guild_id: objects.Snowflake, -- ID of the guild
+ status: string, -- Either "idle", "dnd", "online", or "offline"
+ activities: { objects.ActivityObject }, -- User's current activities
+ client_status: objects.ClientStatusObject, -- User's platform-dependent status
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#stage-instance-create
+export type StageInstanceCreate = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#stage-instance-update
+export type StageInstanceUpdate = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#stage-instance-delete
+export type StageInstanceDelete = Payload
+
+-- https://discord.com/developers/docs/topics/gateway-events#typing-start
+export type TypingStartPayload = Payload<{
+ channel_id: objects.Snowflake, -- ID of the channel
+ guild_id: objects.Snowflake?, -- ID of the guild
+ user_id: objects.Snowflake, -- ID of the user
+ timestamp: number, -- Unix time (in seconds) of when the user started typing
+ member: objects.GuildMemberObject?, -- Member who started typing if this happened in a guild
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#user-update
+export type UserUpdatePayload = Payload
+-- https://discord.com/developers/docs/topics/gateway-events#voice-state-update
+export type VoiceStateUpdatePayload = Payload<{
+ token: string, -- Voice connection token
+ guild_id: objects.Snowflake, -- Guild this voice server update is for
+ endpoint: string?, -- Voice server host
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#voice-server-update
+export type VoiceServerUpdatePayload = Payload<{
+ token: string, -- Voice connection token
+ guild_id: objects.Snowflake, -- Guild this voice server update is for
+ endpoint: string?, -- Voice server host
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#webhooks-update
+export type WebhooksUpdatePayload = Payload<{
+ guild_id: objects.Snowflake, -- ID of the guild
+ channel_id: objects.Snowflake, -- ID of the channel=
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add
+export type MessagePollVoteAdd = Payload<{
+ user_id: objects.Snowflake, -- ID of the user
+ channel_id: objects.Snowflake, -- ID of the channel
+ message_id: objects.Snowflake, -- ID of the message
+ guild_id: objects.Snowflake?, -- ID of the guild
+ answer_id: number, -- ID of the answer
+}>
+
+-- https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove
+export type MessagePollVoteRemove = Payload<{
+ user_id: objects.Snowflake, -- ID of the user
+ channel_id: objects.Snowflake, -- ID of the channel
+ message_id: objects.Snowflake, -- ID of the message
+ guild_id: objects.Snowflake?, -- ID of the guild
+ answer_id: number, -- ID of the answer
+}>
+
+return "DISCORD_V10_PAYLOAD_TYPES"
diff --git a/packages/api-types/src/guild.luau b/packages/api-types/src/guild.luau
new file mode 100644
index 0000000..eada762
--- /dev/null
+++ b/packages/api-types/src/guild.luau
@@ -0,0 +1,55 @@
+local reflect = require("@utils/table/reflect")
+
+local VerificationLevel = table.freeze(reflect({
+ None = 0,
+ Low = 1,
+ Medium = 2,
+ High = 3,
+ VeryHigh = 4,
+}))
+
+local DefaultMessageNotification = table.freeze(reflect({
+ AllMessages = 0,
+ OnlyMentions = 1,
+}))
+
+local ExplicitContentFilterLevel = table.freeze(reflect({
+ Disabled = 0,
+ MembersWithoutRoles = 1,
+ AllMembers = 2,
+}))
+
+local NSFWLevel = table.freeze(reflect({
+ Default = 0,
+ Explicit = 1,
+ Safe = 2,
+ AgeRestricted = 3,
+}))
+
+local PremiumTier = table.freeze(reflect({
+ None = 0,
+ Tier1 = 1,
+ Tier2 = 2,
+ Tier3 = 3,
+}))
+
+local MFALevel = table.freeze(reflect({
+ None = 0,
+ Elevated = 1,
+}))
+
+export type VerificationLevel = "None" | "Low" | "Medium" | "High" | "VeryHigh"
+export type DefaultMessageNotification = "AllMessages" | "OnlyMentions"
+export type ExplicitContentFilterLevel = "Disabled" | "MembersWithoutRoles" | "AllMembers"
+export type NSFWLevel = "Default" | "Explicit" | "Safe" | "AgeRestricted"
+export type PremiumTier = "None" | "Tier1" | "Tier2" | "Tier3"
+export type MFALevel = "None" | "Elevated"
+
+return {
+ VerificationLevel = VerificationLevel,
+ DefaultMessageNotification = DefaultMessageNotification,
+ ExplicitContentFilterLevel = ExplicitContentFilterLevel,
+ NSFWLevel = NSFWLevel,
+ PremiumTier = PremiumTier,
+ MFALevel = MFALevel,
+}
diff --git a/packages/api-types/src/interaction.luau b/packages/api-types/src/interaction.luau
new file mode 100644
index 0000000..18b99c4
--- /dev/null
+++ b/packages/api-types/src/interaction.luau
@@ -0,0 +1,67 @@
+local reflect = require("@utils/table/reflect")
+
+local InteractionType = table.freeze(reflect({
+ Ping = 1,
+ ApplicationCommand = 2,
+ MessageComponent = 3,
+ ApplicationCommandAutocomplete = 4,
+ ModalSubmit = 5,
+}))
+
+local ApplicationCommandOptionType = table.freeze(reflect({
+ SubCommand = 1,
+ SubCommandGroup = 2,
+ String = 3,
+ Integer = 4,
+ Boolean = 5,
+ User = 6,
+ Channel = 7,
+ Role = 8,
+ Mentionable = 9,
+ Number = 10,
+ Attachment = 11,
+}))
+
+local InteractionContextType = table.freeze(reflect({
+ Guild = 0,
+ BotDm = 1,
+ PrivateChannel = 2,
+}))
+
+local ApplicationCommandType = table.freeze(reflect({
+ ChatInput = 1,
+ User = 2,
+ Message = 3,
+ PrimaryEntryPoiant = 4,
+}))
+
+export type InteractionType =
+ "Ping"
+ | "ApplicationCommand"
+ | "MessageComponent"
+ | "ApplicationCommandAutocomplete"
+ | "ModalSubmit"
+
+export type ApplicationCommandOptionType =
+ "SubCommand"
+ | "SubCommandGroup"
+ | "String"
+ | "Integer"
+ | "Boolean"
+ | "User"
+ | "Channel"
+ | "Role"
+ | "Mentionable"
+ | "Number"
+ | "Attachment"
+
+export type ApplicationCommandType = "ChatInput" | "User" | "Message" | "PrimaryEntryPoiant"
+
+export type InteractionContextType = "Guild" | "BotDm" | "PrivateChannel"
+
+return {
+ InteractionType = InteractionType,
+ ApplicationCommandOptionType = ApplicationCommandOptionType,
+ InteractionContextType = InteractionContextType,
+ ApplicationCommandType = ApplicationCommandType,
+}
diff --git a/packages/api-types/src/message.luau b/packages/api-types/src/message.luau
new file mode 100644
index 0000000..2801f10
--- /dev/null
+++ b/packages/api-types/src/message.luau
@@ -0,0 +1,135 @@
+local reflect = require("@utils/table/reflect")
+
+local MessageType = table.freeze(reflect({
+ 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,
+ StageTopic = 31,
+ GuildApplicationPremiumSubscription = 32,
+ GuildIncidentAlertModeEnabled = 36,
+ GuildIncidentAlertModeDisabled = 37,
+ GuildIncidentReportRaid = 38,
+ GuildIncidentReportFalseAlarm = 39,
+ PurchaseNotification = 44,
+ PollResult = 46,
+}))
+
+local MessageAcitvityType = table.freeze(reflect({
+ Join = 1,
+ Spectate = 2,
+ Listen = 3,
+ JoinRequest = 5,
+}))
+
+local MessageReferenceType = table.freeze(reflect({
+ Default = 0,
+ Forward = 1,
+}))
+
+local ButtonStyle = table.freeze(reflect({
+ Blurple = 1,
+ Grey = 2,
+ Green = 3,
+ Red = 4,
+}))
+
+local TextInputStyle = table.freeze(reflect({
+ Short = 1,
+ Paragraph = 2,
+}))
+
+local SelectDefaultValueType = table.freeze(reflect({
+ Role = "role",
+ User = "user",
+ Channel = "channel",
+}))
+
+local PollLayoutType = table.freeze(reflect({
+ Default = 1,
+}))
+
+export type MessageType =
+ "Default"
+ | "RecipientAdd"
+ | "RecipientRemove"
+ | "Call"
+ | "ChannelNameChange"
+ | "ChannelIconChange"
+ | "ChannelPinnedMessage"
+ | "UserJoin"
+ | "GuildBoost"
+ | "GuildBoostTier1"
+ | "GuildBoostTier2"
+ | "GuildBoostTier3"
+ | "ChannelFollowAdd"
+ | "GuildDiscoveryDisqualified"
+ | "GuildDiscoveryRequalified"
+ | "GuildDiscoveryGracePeriodInitialWarning"
+ | "GuildDiscoveryGracePeriodFinalWarning"
+ | "ThreadCreated"
+ | "Reply"
+ | "ChatInputCommand"
+ | "ThreadStarterMessage"
+ | "GuildInviteReminder"
+ | "ContextMenuCommand"
+ | "AutoModerationAction"
+ | "RoleSubscriptionPurchase"
+ | "InteractionPremiumUpsell"
+ | "StageStart"
+ | "StageEnd"
+ | "StageSpeaker"
+ | "StageTopic"
+ | "GuildApplicationPremiumSubscription"
+ | "GuildIncidentAlertModeEnabled"
+ | "GuildIncidentAlertModeDisabled"
+ | "GuildIncidentReportRaid"
+ | "GuildIncidentReportFalseAlarm"
+ | "PurchaseNotification"
+ | "PollResult"
+
+export type MessageAcitvityType = "Join" | "Spectate" | "Listen" | "JoinRequest"
+export type MessageReferenceType = "Default" | "Forward"
+
+export type ButtonStyle = "Blurple" | "Grey" | "Green" | "Red" | "Grey"
+
+export type SelectDefaultValueType = "User" | "Role" | "Channel"
+
+export type TextInputStyle = "Short" | "Paragraph"
+
+export type PollLayoutType = "Default"
+
+return {
+ MessageType = MessageType,
+ MessageAcitvityType = MessageAcitvityType,
+ MessageReferenceType = MessageReferenceType,
+ ButtonStyle = ButtonStyle,
+ TextInputStyle = TextInputStyle,
+ SelectDefaultValueType = SelectDefaultValueType,
+ PollLayoutType = PollLayoutType,
+}
diff --git a/packages/api-types/src/permission.luau b/packages/api-types/src/permission.luau
new file mode 100644
index 0000000..eb8c342
--- /dev/null
+++ b/packages/api-types/src/permission.luau
@@ -0,0 +1,108 @@
+local reflect = require("@utils/table/reflect")
+
+local bit = require("@vendor/bit")
+
+local Permissions = table.freeze(reflect({
+ CreateInstantInvite = bit.lshift(1, 0),
+ KickMembers = bit.lshift(1, 1),
+ BanMembers = bit.lshift(1, 2),
+ Administrator = bit.lshift(1, 3),
+ ManageChannels = bit.lshift(1, 4),
+ ManageGuild = bit.lshift(1, 5),
+ AddReactions = bit.lshift(1, 6),
+ ViewAuditLog = bit.lshift(1, 7),
+ PrioritySpeaker = bit.lshift(1, 8),
+ Stream = bit.lshift(1, 9),
+ ViewChannel = bit.lshift(1, 10),
+ SendMessages = bit.lshift(1, 11),
+ SendTTSMessages = bit.lshift(1, 12),
+ ManageMessages = bit.lshift(1, 13),
+ EmbedLinks = bit.lshift(1, 14),
+ AttachFiles = bit.lshift(1, 15),
+ ReadMessageHistory = bit.lshift(1, 16),
+ MentionEveryone = bit.lshift(1, 17),
+ UseExternalEmojis = bit.lshift(1, 18),
+ ViewGuildInsights = bit.lshift(1, 19),
+ Connect = bit.lshift(1, 20),
+ Speak = bit.lshift(1, 21),
+ MuteMembers = bit.lshift(1, 22),
+ DeafenMembers = bit.lshift(1, 23),
+ MoveMembers = bit.lshift(1, 24),
+ UseVAD = bit.lshift(1, 25),
+ ChangeNickname = bit.lshift(1, 26),
+ ManageNicknames = bit.lshift(1, 27),
+ ManageRoles = bit.lshift(1, 28),
+ ManageWebhooks = bit.lshift(1, 29),
+ ManageGuildExpressions = bit.lshift(1, 30),
+ UseApplicationCommands = bit.lshift(1, 31),
+ RequestToSpeak = bit.lshift(1, 32),
+ ManageEvents = bit.lshift(1, 33),
+ ManageThreads = bit.lshift(1, 34),
+ CreatePublicThreads = bit.lshift(1, 35),
+ CreatePrivateThreads = bit.lshift(1, 36),
+ UseExternalStickers = bit.lshift(1, 37),
+ SendMessagesInThreads = bit.lshift(1, 38),
+ UseEmbeddedActivities = bit.lshift(1, 39),
+ ModerateMembers = bit.lshift(1, 40),
+ ViewCreatorMonetizationAnalytics = bit.lshift(1, 41),
+ UseSoundboard = bit.lshift(1, 42),
+ UseExternalSounds = bit.lshift(1, 45),
+ SendVoiceMessages = bit.lshift(1, 46),
+ SendPolls = bit.lshift(1, 49),
+ UseExternalApps = bit.lshift(1, 50),
+}))
+
+export type Permissions =
+ "CreateInstantInvite"
+ | "KickMembers"
+ | "BanMembers"
+ | "Administrator"
+ | "ManageChannels"
+ | "ManageGuild"
+ | "AddReactions"
+ | "ViewAuditLog"
+ | "PrioritySpeaker"
+ | "Stream"
+ | "ViewChannel"
+ | "SendMessages"
+ | "SendTtsMessages"
+ | "ManageMessages"
+ | "EmbedLinks"
+ | "AttachFiles"
+ | "ReadMessageHistory"
+ | "MentionEveryone"
+ | "UseExternalEmojis"
+ | "ViewGuildInsights"
+ | "Connect"
+ | "Speak"
+ | "MuteMembers"
+ | "DeafenMembers"
+ | "MoveMembers"
+ | "UseVad"
+ | "ChangeNickname"
+ | "ManageNicknames"
+ | "ManageRoles"
+ | "ManageWebhooks"
+ | "ManageEmojisAndStickers"
+ | "UseApplicationCommands"
+ | "RequestToSpeak"
+ | "ManageEvents"
+ | "ManageThreads"
+ | "CreatePublicThreads"
+ | "CreatePrivateThreads"
+ | "UseExternalStickers"
+ | "SendMessagesInThreads"
+ | "UseEmbeddedActivities"
+ | "ModerateMembers"
+ | "ViewCreatorMonetizationAnalytics"
+ | "UseSoundboard"
+ | "CreateGuildExpressions"
+ | "CreateEvents"
+ | "UseExternalSounds"
+ | "SendVoiceMessages"
+ | "SendPolls"
+ | "UseExternalApps"
+
+return {
+ Permissions = Permissions,
+}
diff --git a/packages/api-types/src/poll.luau b/packages/api-types/src/poll.luau
new file mode 100644
index 0000000..b2a8d65
--- /dev/null
+++ b/packages/api-types/src/poll.luau
@@ -0,0 +1,3 @@
+export type PollLayoutType = "Default"
+
+return "DISCORD_V10_APPLICATION_TYPES"
diff --git a/packages/api-types/src/rest/endpoints.luau b/packages/api-types/src/rest/endpoints.luau
new file mode 100644
index 0000000..e8b8a13
--- /dev/null
+++ b/packages/api-types/src/rest/endpoints.luau
@@ -0,0 +1,745 @@
+--[[
+ Mapping out all discord V10 endpoints.
+]]
+
+local endpoints = table.freeze({
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+ CreateInteractionResponse = "/interactions/%s/%s/callback",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response
+ GetOriginalInteractionResponse = "/webhooks/%s/%s/messages/@original",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+ EditOriginalInteractionResponse = "/webhooks/%s/%s/messages/@original",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response
+ DeleteOriginalInteractionResponse = "/webhooks/%s/%s/messages/@original",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+ CreateFollowupMessage = "/webhooks/%s/%s",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message
+ GetFollowupMessage = "/webhooks/%s/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+ EditFollowupMessage = "/webhooks/%s/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message
+ DeleteFollowupMessage = "/webhooks/%s/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+ GetGlobalApplicationCommands = "/applications/%s/commands",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+ CreateGlobalApplicationCommand = "/applications/%s/commands",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
+ GetGlobalApplicationCommand = "/applications/%s/commands/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+ EditGlobalApplicationCommand = "/applications/%s/commands/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command
+ DeleteGlobalApplicationCommand = "/applications/%s/commands/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+ BulkOverwriteGlobalApplicationCommands = "/applications/%s/commands",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+ GetGuildApplicationCommands = "/applications/%s/guilds/%s/commands",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+ CreateGuildApplicationCommand = "/applications/%s/guilds/%s/commands",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command
+ GetGuildApplicationCommand = "/applications/%s/guilds/%s/commands/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+ EditGuildApplicationCommand = "/applications/%s/guilds/%s/commands/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command
+ DeleteGuildApplicationCommand = "/applications/%s/guilds/%s/commands/%s",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+ BulkOverwriteGuildApplicationCommands = "/applications/%s/guilds/%s/commands",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
+ GetGuildApplicationCommandPermissions = "/applications/%s/guilds/%s/commands/permissions",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
+ GetApplicationCommandPermissions = "/applications/%s/guilds/%s/commands/%s/permissions",
+
+ -- https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+ EditApplicationCommandPermissions = "/applications/%s/guilds/%s/commands/%s/permissions",
+
+ -- https://discord.com/developers/docs/resources/application#get-current-application
+ GetCurrentApplication = "/applications/@me",
+
+ -- https://discord.com/developers/docs/resources/application#edit-current-application
+ EditCurrentApplication = "/applications/@me",
+
+ -- https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
+ GetApplicationRoleConnectionMetadataRecords = "/applications/%s/role-connections/metadata",
+
+ -- https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
+ UpdateApplicationRoleConnectionMetadataRecords = "/applications/%s/role-connections/metadata",
+
+ -- https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
+ GetGuildAuditLog = "/guilds/%s/audit-logs",
+
+ -- https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild
+ ListAutoModerationRulesForGuild = "/guilds/%s/auto-moderation/rules",
+
+ -- https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule
+ GetAutoModerationRule = "/guilds/%s/auto-moderation/rules/%s",
+
+ -- https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+ CreateAutoModerationRule = "/guilds/%s/auto-moderation/rules",
+
+ -- https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+ ModifyAutoModerationRule = "/guilds/%s/auto-moderation/rules/%s",
+
+ -- https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule
+ DeleteAutoModerationRule = "/guilds/%s/auto-moderation/rules/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#get-channel
+ GetChannel = "/channels/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#modify-channel
+ ModifyChannel = "/channels/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#deleteclose-channel
+ DeleteOrCloseChannel = "/channels/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#get-channel-messages
+ GetChannelMessages = "/channels/%s/messages",
+
+ -- https://discord.com/developers/docs/resources/channel#get-channel-message
+ GetChannelMessage = "/channels/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#get-channel-message
+ CreateMessage = "/channels/%s/messages",
+
+ -- https://discord.com/developers/docs/resources/channel#crosspost-message
+ CrosspostMessage = "/channels/%s/messages/%s/crosspost",
+
+ -- https://discord.com/developers/docs/resources/channel#create-reaction
+ CreateReaction = "/channels/%s/messages/%s/reactions/%s/@me",
+
+ -- https://discord.com/developers/docs/resources/channel#delete-own-reaction
+ DeleteOwnReaction = "/channels/%s/messages/%s/reactions/%s/@me",
+
+ -- https://discord.com/developers/docs/resources/channel#delete-user-reaction
+ DeleteUserReaction = "/channels/%s/messages/%s/reactions/%s/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#get-reactions
+ GetReactions = "/channels/%s/messages/%s/reactions/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#delete-all-reactions
+ DeleteAllReactions = "/channels/%s/messages/%s/reactions",
+
+ -- https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
+ DeleteAllReactionsForEmoji = "/channels/%s/messages/%s/reactions/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#edit-message
+ EditMessage = "/channels/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#delete-message
+ DeleteMessage = "/channels/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+ BulkDeleteMessages = "/channels/%s/messages/bulk-delete",
+
+ -- https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+ EditChannelPermissions = "/channels/%s/permissions/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#get-channel-invites
+ GetChannelInvites = "/channels/%s/invites",
+
+ -- https://discord.com/developers/docs/resources/channel#create-channel-invite
+ CreateChannelInvite = "/channels/%s/invites",
+
+ -- https://discord.com/developers/docs/resources/channel#delete-channel-permission
+ DeleteChannelPermission = "/channels/%s/permissions/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#follow-announcement-channel
+ FollowAnnouncementChannel = "/channels/%s/followers",
+
+ -- https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
+ TriggerTypingChannel = "/channels/%s/typing",
+
+ -- https://discord.com/developers/docs/resources/channel#get-pinned-messages
+ GetPinnedMessages = "/channels/%s/pins",
+
+ -- https://discord.com/developers/docs/resources/channel#get-pinned-messages
+ PinMessage = "/channels/%s/pins/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#unpin-message
+ UnpinMessage = "/channels/%s/pins/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+ GroupDMAddRecipient = "/channels/%s/recipients/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
+ GroupDMRemoveRecipient = "/channels/%s/recipients/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#start-thread-from-message
+ StartThreadFromMessage = "/channels/%s/messages/%s/threads",
+
+ -- https://discord.com/developers/docs/resources/channel#start-thread-without-message
+ StartThreadWithoutMessage = "/channels/%s/threads",
+
+ -- https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
+ StartThreadInForumOrMediaChannel = "/channels/%s/threads",
+
+ -- https://discord.com/developers/docs/resources/channel#join-thread
+ JoinThread = "/channels/%s/thread-members/@me",
+
+ -- https://discord.com/developers/docs/resources/channel#add-thread-member
+ AddThreadMember = "/channels/%s/thread-members/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#leave-thread
+ LeaveThread = "/channels/%s/thread-members/@me",
+
+ -- https://discord.com/developers/docs/resources/channel#remove-thread-member
+ RemoveThreadMember = "/channels/%s/thread-members/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#get-thread-member
+ GetThreadMember = "/channels/%s/thread-members/%s",
+
+ -- https://discord.com/developers/docs/resources/channel#list-thread-members
+ ListThreadMembers = "/channels/%s/thread-members",
+
+ -- https://discord.com/developers/docs/resources/channel#list-public-archived-threads
+ ListPublicArchivedThreads = "/channels/%s/threads/archived/public",
+
+ -- https://discord.com/developers/docs/resources/channel#list-public-archived-threads
+ ListPrivateArchivedThreads = "/channels/%s/threads/archived/private",
+
+ -- https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
+ ListJoinedPrivateArchivedThreads = "/channels/%s/users/@me/threads/archived/private",
+
+ -- https://discord.com/developers/docs/resources/emoji#list-guild-emojis
+ ListGuildEmojis = "/guilds/%s/emojis",
+
+ -- https://discord.com/developers/docs/resources/emoji#get-guild-emoji
+ GetGuildEmoji = "/guilds/%s/emojis/%s",
+
+ -- https://discord.com/developers/docs/resources/emoji#create-guild-emoji
+ CreateGuildEmoji = "/guilds/%s/emojis",
+
+ -- https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+ ModifyGuildEmoji = "/guilds/%s/emojis/%s",
+
+ -- https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
+ DeleteGuildEmoji = "/guilds/%s/emojis/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#create-guild
+ CreateGuild = "/guilds",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild
+ GetGuild = "/guilds/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-preview
+ GetGuildPreview = "/guilds/%s/preview",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild
+ ModifyGuild = "/guilds/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#delete-guild
+ DeleteGuild = "/guilds/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-channels
+ GetGuildChannels = "/guilds/%s/channels",
+
+ -- https://discord.com/developers/docs/resources/guild#create-guild-channel
+ CreateGuildChannel = "/guilds/%s/channels",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+ ModifyGuildChannelPositions = "/guilds/%s/channels",
+
+ -- https://discord.com/developers/docs/resources/guild#list-active-guild-threads
+ ListActiveGuildThreads = "/guilds/%s/threads/active",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-member
+ GetGuildMember = "/guilds/%s/members/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#list-guild-members
+ ListGuildMembers = "/guilds/%s/members?limit=%s&after=%s",
+
+ -- https://discord.com/developers/docs/resources/guild#search-guild-members
+ SearchGuildMembers = "/guilds/%s/members/search?query=%s&limit=%s",
+
+ -- https://discord.com/developers/docs/resources/guild#add-guild-member
+ AddGuildMember = "/guilds/%s/members/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-member
+ ModifyGuildMember = "/guilds/%s/members/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-current-member
+ ModifyCurrentMember = "/guilds/%s/members/@me",
+
+ -- https://discord.com/developers/docs/resources/guild#add-guild-member-role
+ AddGuildMemberRole = "/guilds/%s/members/%s/roles/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#remove-guild-member-role
+ RemoveGuildMemberRole = "/guilds/%s/members/%s/roles/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#remove-guild-member
+ RemoveGuildMember = "/guilds/%s/members/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-bans
+ GetGuildBans = "/guilds/%s/bans?before=%s&after=%s&limit=%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-ban
+ GetGuildBan = "/guilds/%s/bans/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#create-guild-ban
+ CreateGuildBan = "/guilds/%s/bans/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#remove-guild-ban
+ RemoveGuildBan = "/guilds/%s/bans/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#bulk-guild-ban
+ BulkGuildBan = "/guilds/%s/bulk-ban",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-roles
+ GetGuildRoles = "/guilds/%s/roles",
+
+ -- https://discord.com/developers/docs/resources/guild#create-guild-role
+ CreateGuildRole = "/guilds/%s/roles",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+ ModifyGuildRolePositions = "/guilds/%s/roles",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-role
+ ModifyGuildRole = "/guilds/%s/roles/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
+ ModifyGuildMFALevel = "/guilds/%s/mfa",
+
+ -- https://discord.com/developers/docs/resources/guild#delete-guild-role
+ DeleteGuildRole = "/guilds/%s/roles/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-prune-count
+ GetGuildPruneCount = "/guilds/%s/prune",
+
+ -- https://discord.com/developers/docs/resources/guild#begin-guild-prune
+ BeginGuildPrune = "/guilds/%s/prune",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
+ GetGuildVoiceRegions = "/guilds/%s/regions",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-invites
+ GetGuildInvites = "/guilds/%s/invites",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-integrations
+ GetGuildIntegrations = "/guilds/%s/integrations",
+
+ -- https://discord.com/developers/docs/resources/guild#delete-guild-integration
+ DeleteGuildIntegration = "/guilds/%s/integrations/%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
+ GetGuildWidgetSettings = "/guilds/%s/widget",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-widget
+ ModifyGuildWidget = "/guilds/%s/widget",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-widget
+ GetGuildWidget = "/guilds/%s/widget.json",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
+ GetGuildVanityURL = "/guilds/%s/vanity-url",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-widget-image
+ GetGuildWidgetImage = "/guilds/%s/widget.png?style=%s",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
+ GetGuildWelcomeScreen = "/guilds/%s/welcome-screen",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+ ModifyGuildWelcomeScreen = "/guilds/%s/welcome-screen",
+
+ -- https://discord.com/developers/docs/resources/guild#get-guild-onboarding
+ GetGuildOnboarding = "/guilds/%s/onboarding",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
+ ModifyGuildOnboarding = "/guilds/%s/onboarding",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
+ ModifyCurrentUserVoiceState = "/guilds/%s/voice-states/@me",
+
+ -- https://discord.com/developers/docs/resources/guild#modify-user-voice-state
+ ModifyUserVoiceState = "/guilds/%s/voice-states/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
+ ListGuildScheduledForEvents = "/guilds/%s/scheduled-events",
+
+ -- https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+ CreateGuildScheduledEvent = "/guilds/%s/scheduled-events",
+
+ -- https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
+ GetGuildScheduledEvent = "/guilds/%s/scheduled-events/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+ ModifyGuildScheduledEvent = "/guilds/%s/scheduled-events/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
+ DeleteGuildScheduledEvent = "/guilds/%s/scheduled-events/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
+ GetGuildScheduledEventUsers = "/guilds/%s/scheduled-events/%s/users",
+
+ -- https://discord.com/developers/docs/resources/guild-template#get-guild-template
+ GetGuildTemplate = "/guilds/templates/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
+ CreateGuildFromTemplate = "/guilds/templates/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-template#get-guild-templates
+ GetGuildTemplates = "/guilds/%s/templates",
+
+ -- https://discord.com/developers/docs/resources/guild-template#create-guild-template
+ CreateGuildTemplate = "/guilds/%s/templates",
+
+ -- https://discord.com/developers/docs/resources/guild-template#sync-guild-template
+ SyncGuildTemplate = "/guilds/%s/templates/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-template#modify-guild-template
+ ModifyGuildTemplate = "/guilds/%s/templates/%s",
+
+ -- https://discord.com/developers/docs/resources/guild-template#delete-guild-template
+ DeleteGuildTemplate = "/guilds/%s/templates/%s",
+
+ -- https://discord.com/developers/docs/resources/invite#get-invite
+ GetInvite = "/invites/%s",
+
+ -- https://discord.com/developers/docs/resources/invite#delete-invite
+ DeleteInvite = "/invites/%s",
+
+ -- https://discord.com/developers/docs/resources/poll#get-answer-voters
+ GetAnswerVoters = "/channels/%s/polls/%s/answers/%s",
+
+ -- https://discord.com/developers/docs/resources/poll#end-poll
+ EndPoll = "/channels/%s/polls/%s/expire",
+
+ -- https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+ CreateStageInstance = "/stage-instances",
+
+ -- https://discord.com/developers/docs/resources/stage-instance#get-stage-instance
+ GetStageInstance = "/stage-instances/%s",
+
+ -- https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
+ ModifyStageInstance = "/stage-instances/%s",
+
+ -- https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance
+ DeleteStageInstance = "/stage-instances/%s",
+
+ -- https://discord.com/developers/docs/resources/sticker#get-sticker
+ GetSticker = "/stickers/%s",
+
+ -- https://discord.com/developers/docs/resources/sticker#list-sticker-packs
+ ListStickerPacks = "/sticker-packs",
+
+ -- https://discord.com/developers/docs/resources/sticker#list-guild-stickers
+ ListGuildStickers = "/guilds/%s/stickers",
+
+ -- https://discord.com/developers/docs/resources/sticker#get-guild-sticker
+ GetGuildSticker = "/guilds/%s/stickers/%s",
+
+ -- https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
+ GetCurrentUserVoiceState = "/guilds/%s/voice-states/@me",
+
+ -- https://discord.com/developers/docs/resources/voice#get-user-voice-state
+ GetUserVoiceState = "/guilds/%s/voice-states/%s",
+
+ -- https://discord.com/developers/docs/resources/sticker#create-guild-sticker
+ CreateGuildSticker = "/guilds/%s/stickers",
+
+ -- https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
+ ModifyGuildSticker = "/guilds/%s/stickers/%s",
+
+ -- https://discord.com/developers/docs/resources/sticker#delete-guild-sticker
+ DeleteGuildSticker = "/guilds/%s/stickers/%s",
+
+ -- https://discord.com/developers/docs/resources/user#get-current-user
+ GetCurrentUser = "/users/@me",
+
+ -- https://discord.com/developers/docs/resources/user#get-user
+ GetUser = "/users/%s",
+
+ -- https://discord.com/developers/docs/resources/user#modify-current-user
+ ModifyCurrentUser = "/users/@me",
+
+ -- https://discord.com/developers/docs/resources/user#get-current-user-guilds
+ GetCurrentUserGuilds = "/users/@me/guilds",
+
+ -- https://discord.com/developers/docs/resources/user#get-current-user-guild-member
+ GetCurrentUserGuildMember = "/users/@me/guilds/%s/member",
+
+ -- https://discord.com/developers/docs/resources/user#leave-guild
+ LeaveGuild = "/users/@me/guilds/%s",
+
+ -- https://discord.com/developers/docs/resources/user#create-dm
+ CreateDM = "/users/@me/channels",
+
+ -- https://discord.com/developers/docs/resources/user#create-group-dm
+ CreateGroupDM = "/users/@me/channels",
+
+ -- https://discord.com/developers/docs/resources/user#get-current-user-connections
+ GetCurrentUserConnections = "/users/@me/connections",
+
+ -- https://discord.com/developers/docs/resources/user#get-current-user-application-role-connection
+ GetCurrentUserApplicationRolConnections = "/users/@me/applications/%s/role-connections",
+
+ -- https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection
+ UpdateCurrentUserApplicationRoleConnection = "/users/@me/applications/%s/role-connections/%s",
+
+ -- https://discord.com/developers/docs/resources/voice#list-voice-regions
+ ListVoiceRegions = "/voice/regions",
+
+ -- https://discord.com/developers/docs/resources/webhook#create-webhook
+ CreateWebhook = "/channels/%s/webhooks",
+
+ -- https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
+ GetChannelWebhooks = "/channels/%s/webhooks",
+
+ -- https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
+ GetGuildWebhooks = "/guilds/%s/webhooks",
+
+ -- https://discord.com/developers/docs/resources/webhook#get-webhook
+ GetWebhook = "/webhooks/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
+ GetWebhookWithToken = "/webhooks/%s/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#modify-webhook
+ ModifyWebhook = "/webhooks/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
+ ModifyWebhookWithToken = "/webhooks/%s/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#delete-webhook
+ DeleteWebhook = "/webhooks/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token
+ DeleteWebhookWithToken = "/webhooks/%s/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#execute-webhook
+ ExecuteWebhook = "/webhooks/%s/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
+ ExecuteSlackCompatibleWebhook = "/webhooks/%s/%s/slack",
+
+ -- https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
+ ExecuteGithubCompatibleWebhook = "/webhooks/%s/%s/github",
+
+ -- https://discord.com/developers/docs/resources/webhook#get-webhook-message
+ GetWebhookMessage = "/webhooks/%s/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+ EditWebhookMessage = "/webhooks/%s/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/resources/webhook#delete-webhook-message
+ DeleteWebhookMessage = "/webhooks/%s/%s/messages/%s",
+
+ -- https://discord.com/developers/docs/topics/gateway#get-gateway
+ GetGateway = "/gateway",
+
+ -- https://discord.com/developers/docs/topics/gateway#get-gateway-bot
+ GetGatewayBot = "/gateway/bot",
+
+ -- https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information
+ GetCurrentBotApplicationInformation = "/oauth2/applications/@me",
+
+ -- https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information
+ GetCurrentAuthorizationInformation = "/oauth2/@me",
+})
+
+export type Endpoint =
+ "CreateInteractionResponse"
+ | "GetOriginalInteractionResponse"
+ | "EditOriginalInteractionResponse"
+ | "DeleteOriginalInteractionResponse"
+ | "CreateFollowupMessage"
+ | "GetFollowupMessage"
+ | "EditFollowupMessage"
+ | "DeleteFollowupMessage"
+ | "GetGlobalApplicationCommands"
+ | "CreateGlobalApplicationCommand"
+ | "GetGlobalApplicationCommand"
+ | "EditGlobalApplicationCommand"
+ | "DeleteGlobalApplicationCommand"
+ | "BulkOverwriteGlobalApplicationCommands"
+ | "GetGuildApplicationCommands"
+ | "CreateGuildApplicationCommand"
+ | "GetGuildApplicationCommand"
+ | "EditGuildApplicationCommand"
+ | "DeleteGuildApplicationCommand"
+ | "BulkOverwriteGuildApplicationCommands"
+ | "GetGuildApplicationCommandPermissions"
+ | "GetApplicationCommandPermissions"
+ | "EditApplicationCommandPermissions"
+ | "GetCurrentApplication"
+ | "EditCurrentApplication"
+ | "GetApplicationRoleConnectionMetadataRecords"
+ | "UpdateApplicationRoleConnectionMetadataRecords"
+ | "GetGuildAuditLog"
+ | "BatchEditApplicationCommandPermissions"
+ | "ListAutoModerationRulesForGuild"
+ | "GetAutoModerationRule"
+ | "CreateAutoModerationRule"
+ | "ModifyAutoModerationRule"
+ | "DeleteAutoModerationRule"
+ | "GetChannel"
+ | "ModifyChannel"
+ | "DeleteOrCloseChannel"
+ | "GetChannelMessages"
+ | "GetChannelMessage"
+ | "CreateMessage"
+ | "CrosspostMessage"
+ | "CreateReaction"
+ | "DeleteOwnReaction"
+ | "DeleteUserReaction"
+ | "GetReactions"
+ | "DeleteAllReactions"
+ | "DeleteAllReactionsForEmoji"
+ | "EditMessage"
+ | "DeleteMessage"
+ | "BulkDeleteMessages"
+ | "EditChannelPermissions"
+ | "GetChannelInvites"
+ | "CreateChannelInvite"
+ | "DeleteChannelPermission"
+ | "FollowAnnouncementChannel"
+ | "TriggerTypingChannel"
+ | "GetPinnedMessages"
+ | "PinMessage"
+ | "UnpinMessage"
+ | "GroupDMAddRecipient"
+ | "GroupDMRemoveRecipient"
+ | "StartThreadFromMessage"
+ | "StartThreadWithoutMessage"
+ | "StartThreadInForumOrMediaChannel"
+ | "JoinThread"
+ | "AddThreadMember"
+ | "LeaveThread"
+ | "RemoveThreadMember"
+ | "GetThreadMember"
+ | "ListThreadMembers"
+ | "ListPublicArchivedThreads"
+ | "ListPrivateArchivedThreads"
+ | "ListJoinedPrivateArchivedThreads"
+ | "ListGuildEmojis"
+ | "GetGuildEmoji"
+ | "CreateGuildEmoji"
+ | "ModifyGuildEmoji"
+ | "DeleteGuildEmoji"
+ | "CreateGuild"
+ | "GetGuild"
+ | "GetGuildPreview"
+ | "ModifyGuild"
+ | "DeleteGuild"
+ | "GetGuildChannels"
+ | "CreateGuildChannel"
+ | "ModifyGuildChannelPositions"
+ | "ListActiveGuildThreads"
+ | "GetGuildMember"
+ | "ListGuildMembers"
+ | "SearchGuildMembers"
+ | "AddGuildMember"
+ | "ModifyGuildMember"
+ | "ModifyCurrentMember"
+ | "ModifyCurrentUserNick"
+ | "AddGuildMemberRole"
+ | "RemoveGuildMemberRole"
+ | "RemoveGuildMember"
+ | "GetGuildBans"
+ | "GetGuildBan"
+ | "CreateGuildBan"
+ | "RemoveGuildBan"
+ | "BulkGuildBan"
+ | "GetGuildRoles"
+ | "CreateGuildRole"
+ | "ModifyGuildRolePositions"
+ | "ModifyGuildRole"
+ | "ModifyGuildMFALevel"
+ | "DeleteGuildRole"
+ | "GetGuildPruneCount"
+ | "BeginGuildPrune"
+ | "GetGuildVoiceRegions"
+ | "GetGuildInvites"
+ | "GetGuildIntegrations"
+ | "DeleteGuildIntegration"
+ | "GetGuildWidgetSettings"
+ | "ModifyGuildWidget"
+ | "GetGuildWidget"
+ | "GetGuildVanityURL"
+ | "GetGuildWidgetImage"
+ | "GetGuildWelcomeScreen"
+ | "ModifyGuildWelcomeScreen"
+ | "GetGuildOnboarding"
+ | "ModifyGuildOnboarding"
+ | "ModifyCurrentUserVoiceState"
+ | "ModifyUserVoiceState"
+ | "ListGuildScheduledForEvents"
+ | "CreateGuildScheduledEvent"
+ | "GetGuildScheduledEvent"
+ | "ModifyGuildScheduledEvent"
+ | "DeleteGuildScheduledEvent"
+ | "GetGuildScheduledEventUsers"
+ | "GetGuildTemplate"
+ | "CreateGuildFromTemplate"
+ | "GetGuildTemplates"
+ | "CreateGuildTemplate"
+ | "SyncGuildTemplate"
+ | "ModifyGuildTemplate"
+ | "DeleteGuildTemplate"
+ | "GetInvite"
+ | "DeleteInvite"
+ | "GetAnswerVoters"
+ | "EndPoll"
+ | "CreateStageInstance"
+ | "GetStageInstance"
+ | "ModifyStageInstance"
+ | "DeleteStageInstance"
+ | "GetSticker"
+ | "ListStickerPacks"
+ | "ListGuildStickers"
+ | "GetGuildSticker"
+ | "CreateGuildSticker"
+ | "ModifyGuildSticker"
+ | "DeleteGuildSticker"
+ | "GetCurrentUser"
+ | "GetUser"
+ | "ModifyCurrentUser"
+ | "GetCurrentUserGuilds"
+ | "GetCurrentUserGuildMember"
+ | "LeaveGuild"
+ | "CreateDM"
+ | "CreateGroupDM"
+ | "GetCurrentUserConnections"
+ | "GetCurrentUserApplicationRolConnections"
+ | "UpdateCurrentUserApplicationRoleConnection"
+ | "ListVoiceRegions"
+ | "CreateWebhook"
+ | "GetChannelWebhooks"
+ | "GetGuildWebhooks"
+ | "GetWebhook"
+ | "GetWebhookWithToken"
+ | "ModifyWebhook"
+ | "ModifyWebhookWithToken"
+ | "DeleteWebhook"
+ | "DeleteWebhookWithToken"
+ | "ExecuteWebhook"
+ | "ExecuteSlackCompatibleWebhook"
+ | "ExecuteGithubCompatibleWebhook"
+ | "GetWebhookMessage"
+ | "EditWebhookMessage"
+ | "DeleteWebhookMessage"
+ | "GetGateway"
+ | "GetGatewayBot"
+ | "GetCurrentBotApplicationInformation"
+ | "GetCurrentAuthorizationInformation"
+
+return endpoints
diff --git a/packages/api-types/src/rest/types.luau b/packages/api-types/src/rest/types.luau
new file mode 100644
index 0000000..8aeafaf
--- /dev/null
+++ b/packages/api-types/src/rest/types.luau
@@ -0,0 +1,1203 @@
+--[[
+ Mapping out all discord responses that we can get from the Discord v10 REST/HTTP API.
+]]
+
+local objects = require("@api-types/apiTypes")
+
+-- [[ Base ]] --
+
+export type Response = DATA
+export type Request = DATA
+
+-- [[ Requests ]] --
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
+export type CreateInteractionRequest = Request
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response
+export type EditOriginalInteractionRequest = Request>
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
+export type CreateFollowupMessageRequest = Request>
+
+-- https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
+export type EditFollowupMessageRequest = Request>
+
+-- https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+export type CreateAutoModerationRuleRequest = Request<{
+ name: string, -- the rule name
+ event_type: objects.AutomoderationRuleEventType, -- the event type
+ trigger_type: objects.AutomoderationRuleTriggerType, -- the trigger type
+ trigger_metadata: objects.AutomoderationRuleTriggerMetadataObject?, -- the trigger metadata
+ actions: { objects.AutomoderationActionObject }, -- the actions which will execute when the rule is triggered
+ enabled: boolean?, -- whether the rule is enabled (False by default)
+ exempt_roles: { objects.Snowflake }?, -- the role ids that should not be affected by the rule (Maximum of 20)
+ exempt_channels: { objects.Snowflake }?, -- the channel ids that should not be affected by the rule (Maximum of 50)
+}>
+
+-- https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+export type ModifyAutoModerationRuleRequest = Request<{
+ name: string, -- the rule name
+ event_type: objects.AutomoderationRuleEventType, -- the event type
+ trigger_metadata: objects.AutomoderationRuleTriggerMetadataObject?, -- the trigger metadata
+ actions: { objects.AutomoderationActionObject }, -- the actions which will execute when the rule is triggered
+ enabled: boolean?, -- whether the rule is enabled (False by default)
+ exempt_roles: { objects.Snowflake }?, -- the role ids that should not be affected by the rule (Maximum of 20)
+ exempt_channels: { objects.Snowflake }?, -- the channel ids that should not be affected by the rule (Maximum of 50)
+}>
+
+-- https://discord.com/developers/docs/resources/application#edit-current-application
+export type EditCurrentApplicationRequest = Request<{
+ custom_install_url: string, -- Default custom authorization URL for the app, if enabled
+ description: string, -- Description of the app
+ role_connections_verification_url: string, -- Role connection verification URL for the app
+ install_params: objects.InstallParamsObject, -- Settings for the app's default in-app authorization link, if enabled
+ integration_types_config: { [objects.IntegrationType]: unknown }, -- In preview. Default scopes and permissions for each supported installation context. Value for each key is an integration type configuration object
+ flags: number, -- App's public flags
+ icon: string?, -- Icon for the app
+ cover_image: string?, -- Default rich presence invite cover image for the app
+ interactions_endpoint_url: string, -- Interactions endpoint URL for the app
+ tags: { string }, -- List of tags describing the content and functionality of the app (max of 20 characters per tag). Max of 5 tags.
+}>
+
+-- https://discord.com/developers/docs/resources/channel#modify-channel
+export type ModifyChannelRequest = Request<{
+ name: string, -- 1-100 character channel name
+ type: objects.ChannelType, -- the type of channel; only conversion between text and announcement is supported and only in guilds with the "NEWS" feature
+ icon: string, -- (if a group DM, the base64 encoded icon for the group DM)
+ position: number?, -- the position of the channel in the left-hand listing (channels with the same position are sorted by id)
+ topic: string?, -- 0-1024 character channel topic (0-4096 characters for GUILD_FORUM and GUILD_MEDIA channels)
+ nsfw: boolean?, -- whether the channel is nsfw
+ rate_limit_per_user: number?, -- amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected
+ bitrate: number?, -- the bitrate (in bits) of the voice or stage channel; min 8000
+ user_limit: number?, -- the user limit of the voice or stage channel, max 99 for voice channels and 10,000 for stage channels (0 refers to no limit)
+ permission_overwrites: { [objects.Snowflake]: objects.OverwriteObject }?, -- channel or category-specific permissions
+ parent_id: objects.Snowflake?, -- id of the new parent category for a channel
+ rtc_region: string?, -- channel voice region id, automatic when set to null
+ video_quality_mode: objects.VideoQualityMode, -- the camera video quality mode of the voice channel
+ default_auto_archive_duration: number?, -- the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity
+ flags: number?, -- channel flags combined as a bitfield. Currently only REQUIRE_TAG (1 << 4) is supported by GUILD_FORUM and GUILD_MEDIA channels. HIDE_MEDIA_DOWNLOAD_OPTIONS (1 << 15) is supported only by GUILD_MEDIA channels
+ available_tags: { objects.ForumTagObject }?, -- the set of tags that can be used in a GUILD_FORUM or a GUILD_MEDIA channel; limited to 20
+ default_reaction_emoji: objects.EmojiObject?, -- the emoji to show in the add reaction button on a thread in a GUILD_FORUM or a GUILD_MEDIA channel
+ default_thread_rate_limit_per_user: number?, -- the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update.
+ default_sort_order: objects.SortOrderType?, -- the default sort order type used to order posts in GUILD_FORUM and GUILD_MEDIA channels
+ default_forum_layout: objects.ForumLayoutType?, -- the default forum layout type used to display posts in GUILD_FORUM channels
+}>
+
+-- https://discord.com/developers/docs/resources/channel#create-message
+export type CreateMessageRequest = Request<{
+ content: string?, -- Message contents (up to 2000 characters)
+ nonce: (string | number)?, -- Can be used to verify a message was sent (up to 25 characters). Value will appear in the Message Create event.
+ tts: boolean?, -- true if this is a TTS message
+ embeds: { objects.EmbedObject }?, -- Up to 10 rich embeds (up to 6000 characters)
+ allowed_mentions: { objects.AllowedMentionObject }?, -- Allowed mentions for the message
+ message_reference: objects.MessageReferenceObject?, -- Include to make your message a reply or a forward
+ components: { objects.ComponentObjects }?, -- Components to include with the message
+ sticker_ids: { objects.Snowflake }?, -- IDs of up to 3 stickers in the server to send in the message
+ -- files: { },
+ -- payload_json: string,
+ attachments: { objects.AttachmentObject }?, -- Attachment objects with filename and description. See Uploading Files
+ flags: number?, -- Message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set)
+ enforce_nonse: boolean?, -- If true and nonce is present, it will be checked for uniqueness in the past few minutes. If another message was created by the same author with the same nonce, that message will be returned and no new message will be created.
+ poll: objects.PollObject?, -- The discord poll object
+}>
+
+-- https://discord.com/developers/docs/resources/channel#edit-message
+export type EditMessageRequest = Request<{
+ content: string?, -- Message contents (up to 2000 characters)
+ embeds: { objects.EmbedObject }?, -- Up to 10 rich embeds (up to 6000 characters)
+ allowed_mentions: { objects.AllowedMentionObject }?, -- Allowed mentions for the message
+ components: { objects.ComponentObjects }?, -- Components to include with the message
+ -- files: { },
+ -- payload_json: string,
+ attachments: { objects.AttachmentObject }?, -- Attachment objects with filename and description. See Uploading Files
+ flags: number?, -- Message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set)
+}>
+
+-- https://discord.com/developers/docs/resources/channel#create-channel-invite
+export type CreateChannelInviteRequest = Request<{
+ max_age: number, -- duration of invite in seconds before expiry, or 0 for never. between 0 and 604800 (7 days)
+ max_uses: number, -- max number of uses or 0 for unlimited. between 0 and 100
+ temporary: boolean, -- whether this invite only grants temporary membership
+ unique: boolean, -- if true, don't try to reuse a similar invite (useful for creating many unique one time use invites)
+ target_type: objects.InviteTargetTypes, -- the type of target for this voice channel invite
+ target_user_id: objects.Snowflake, -- the id of the user whose stream to display for this invite, required if target_type is 1, the user must be streaming in the channel
+ target_application_id: objects.Snowflake?, -- the id of the embedded application to open for this invite, required if target_type is 2, the application must have the EMBEDDED flag
+}>
+
+-- https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+export type BulkDeleteMessagesRequest = Request<{
+ messages: { objects.Snowflake },
+}>
+
+-- https://discord.com/developers/docs/resources/channel#follow-announcement-channel
+export type FollowAnnouncementChannelRequest = Request<{
+ webhook_channel_id: objects.Snowflake, -- id of target channel
+}>
+
+-- https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+export type GroupDMAddRecipientRequest = Request<{
+ access_token: string, -- access token of a user that has granted your app the gdm.join scope
+ nick: string, -- nickname of the user being added
+}>
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-from-message
+export type StartThreadFromMessageRequest = Request<{
+ name: string, -- 1-100 character channel name
+ auto_archive_duration: number?, -- the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080
+ rate_limit_per_user: number?, -- amount of seconds a user has to wait before sending another message (0-21600)
+}>
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-without-message
+export type StartThreadWithoutMessageRequest = Request<{
+ name: string, -- 1-100 character channel name
+ auto_archive_duration: number?, -- the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080
+ type: objects.ChannelType?, -- the type of thread to create
+ invitable: boolean?, -- whether non-moderators can add other non-moderators to a thread; only available when creating a private thread
+ rate_limit_per_user: number?, -- amount of seconds a user has to wait before sending another message (0-21600)
+}>
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
+export type StartThreadInForumOrMediaChannelRequest = Request<{
+ name: string, -- 1-100 character channel name
+ auto_archive_duration: number?, -- the thread will stop showing in the channel list after auto_archive_duration minutes of inactivity, can be set to: 60, 1440, 4320, 10080
+ rate_limit_per_user: number?, -- amount of seconds a user has to wait before sending another message (0-21600)
+ --files: { },
+ -- payload_json: string,
+ applied_tags: { objects.Snowflake }, -- the IDs of the set of tags that have been applied to a thread in a GUILD_FORUM or a GUILD_MEDIA channel
+ message: objects.ForumAndMediaThreadMessageObject?, -- contents of the first message in the forum/media thread
+}>
+
+-- https://discord.com/developers/docs/resources/emoji#create-guild-emoji
+export type CreateGuildEmojiRequest = Request<{
+ name: string, -- name of the emoji
+ image: string, -- the 128x128 emoji image
+ roles: { objects.Snowflake }, -- roles allowed to use this emoji
+}>
+
+-- https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+export type ModifyGuildEmojiRequest = Request<{
+ name: string, -- name of the emoji
+ roles: { objects.Snowflake }, -- roles allowed to use this emoji
+}>
+
+-- https://discord.com/developers/docs/resources/guild#create-guild
+export type CreateGuildRequest = Request<{
+ name: string, -- name of the guild (2-100 characters)
+ region: string?, -- voice region id (deprecated)
+ icon: string?, -- base64 128x128 image for the guild icon
+ verification_level: objects.VerificationLevel?, -- verification level
+ default_message_notifications: objects.DefaultMessageNotification?, -- default message notification level
+ explicit_content_filter: objects.ExplicitContentFilterLevel?, -- explicit content filter level
+ roles: { objects.GuildRoleObject }?, -- new guild roles
+ channels: { objects.ChannelObject }?, -- new guild's channels
+ afk_channel_id: objects.Snowflake, -- id for afk channel
+ afk_timeout: number, -- afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600
+ system_channel_id: objects.Snowflake?, -- the id of the channel where guild notices such as welcome messages and boost events are posted
+ system_channel_flags: objects.SystemChannelFlags?, -- system channel flags
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild
+export type ModifyGuildRequest = Request<{
+ name: string, -- guild name
+ region: string?, -- guild voice region id (deprecated)
+ verificationn_level: objects.VerificationLevel?, -- verification level
+ default_message_notifications: objects.DefaultMessageNotification?, -- default message notification level
+ explicit_content_filter: objects.ExplicitContentFilterLevel?, -- explicit content filter level
+ afk_channel_id: objects.Snowflake?, -- id for afk channel
+ afk_timeout: number?, -- afk timeout in seconds, can be set to: 60, 300, 900, 1800, 3600
+ icon: string?, -- base64 1024x1024 png/jpeg/gif image for the guild icon (can be animated gif when the server has the ANIMATED_ICON feature)
+ owner_id: objects.Snowflake, -- user id to transfer guild ownership to (must be owner)
+ splash: string?, -- base64 16:9 png/jpeg image for the guild splash (when the server has the INVITE_SPLASH feature)
+ discovery_splash: string?, -- base64 16:9 png/jpeg image for the guild discovery splash (when the server has the DISCOVERABLE feature)
+ banner: string?, -- base64 16:9 png/jpeg image for the guild banner (when the server has the BANNER feature; can be animated gif when the server has the ANIMATED_BANNER feature)
+ system_channel_id: objects.Snowflake?, -- the id of the channel where guild notices such as welcome messages and boost events are posted
+ system_channel_flags: objects.SystemChannelFlags?, -- system channel flags
+ rules_channel_id: objects.Snowflake?, -- the id of the channel where Community guilds display rules and/or guidelines
+ public_updates_channel_id: objects.Snowflake?, -- the id of the channel where admins and moderators of Community guilds receive notices from Discord
+ preferred_locale: objects.LanguageLocales?, -- the preferred locale of a Community guild used in server discovery and notices from Discord; defaults to "en-US"
+ features: { objects.GuildFeature }?, -- enabled guild features
+ description: string?, -- the description for the guild
+ premium_progress_bar_enabled: boolean?, -- whether the guild's boost progress bar should be enabled
+ safety_alerts_channel_id: objects.Snowflake?, -- the id of the channel where admins and moderators of Community guilds receive safety alerts from Discord
+}>
+
+-- https://discord.com/developers/docs/resources/guild#create-guild-channel
+export type CreateGuildChannelRequest = Request<{
+ name: string, -- channel name (1-100 characters)
+ type: objects.ChannelType, -- the type of channel
+ topic: string?, -- channel topic (0-1024 characters)
+ bitrate: number?, -- the bitrate (in bits) of the voice or stage channel; min 8000
+ user_limit: number?, -- the user limit of the voice channel
+ rate_limit_per_user: number?, -- amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected
+ position: number, -- sorting position of the channel (channels with the same position are sorted by id)
+ permission_overwrites: { objects.OverwriteObject }, -- the channel's permission overwrites
+ parent_id: objects.Snowflake?, -- id of the parent category for a channel
+ nsfw: boolean?, -- whether the channel is nsfw
+ rtc_region: string?, -- channel voice region id of the voice or stage channel, automatic when set to null
+ video_quality_mode: objects.VideoQualityMode?, -- the camera video quality mode of the voice channel
+ default_auto_archive_duration: number?, -- the default duration that the clients use (not the API) for newly created threads in the channel, in minutes, to automatically archive the thread after recent activity
+ default_reaction_emoji: objects.EmojiObject?, -- emoji to show in the add reaction button on a thread in a GUILD_FORUM or a GUILD_MEDIA channel
+ available_tags: { objects.ForumTagObject }?, -- set of tags that can be used in a GUILD_FORUM or a GUILD_MEDIA channel
+ default_sort_order: objects.SortOrderType?, -- the default sort order type used to order posts in GUILD_FORUM and GUILD_MEDIA channels
+ default_forum_layout: objects.ForumLayoutType?, -- the default forum layout view used to display posts in GUILD_FORUM channels
+ default_thread_rate_limit_per_user: number?, -- the initial rate_limit_per_user to set on newly created threads in a channel. this field is copied to the thread at creation time and does not live update.
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+export type ModifyGuildChannelPositionsRequest = Request<{
+ id: objects.Snowflake, -- channel id
+ position: number?, -- sorting position of the channel (channels with the same position are sorted by id)
+ lock_permissions: boolean?, -- syncs the permission overwrites with the new parent, if moving to a new category
+ parent_id: objects.Snowflake?, -- the new parent ID for the channel that is moved
+}>
+
+-- https://discord.com/developers/docs/resources/guild#add-guild-member
+export type AddGuildMemberRequest = Request<{
+ access_token: string, -- an oauth2 access token granted with the guilds.join to the bot's application for the user you want to add to the guild
+ nick: string, -- value to set user's nickname to
+ roles: { objects.Snowflake }, -- array of role ids the member is assigned
+ mute: boolean, -- whether the user is muted in voice channels
+ deaf: boolean, -- whether the user is deafened in voice channels
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-member
+export type ModifyGuildMemberRequest = Request<{
+ nick: string, -- value to set user's nickname to
+ roles: { objects.Snowflake }, -- array of role ids the member is assigned
+ mute: boolean, -- whether the user is muted in voice channels. Will throw a 400 error if the user is not in a voice channel
+ deaf: boolean, -- whether the user is deafened in voice channels. Will throw a 400 error if the user is not in a voice channel
+ channel_id: objects.Snowflake, -- id of channel to move user to (if they are connected to voice)
+ communication_disabled_until: string?, -- when the user's timeout will expire and the user will be able to communicate in the guild again (up to 28 days in the future), set to null to remove timeout. Will throw a 403 error if the user has the ADMINISTRATOR permission or is the owner of the guild
+ flags: objects.GuildMemberFlags?, -- guild member flags
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-current-member
+export type ModifyCurrentMemberRequest = Request<{
+ nick: string, -- value to set user's nickname to
+}>
+
+-- https://discord.com/developers/docs/resources/guild#create-guild-ban
+export type CreateGuildBanRequest = Request<{
+ delete_message_days: number?, -- number of days to delete messages for (0-7) (deprecated)
+ delete_message_seconds: number?, -- number of seconds to delete messages for, between 0 and 604800 (7 days)
+}>
+
+-- https://discord.com/developers/docs/resources/guild#bulk-guild-ban
+export type BulkGuildBanRequest = Request<{
+ user_ids: { objects.Snowflake }, -- list of user ids to ban (max 200)
+ delete_message_seconds: number, -- number of seconds to delete messages for, between 0 and 604800 (7 days)
+}>
+
+-- https://discord.com/developers/docs/resources/guild#create-guild-role
+export type CreateGuildRoleRequest = Request<{
+ name: string, -- name of the role, max 100 characters
+ permissions: string, -- bitwise value of the enabled/disabled permissions
+ color: number, -- RGB color value
+ hoist: boolean, -- whether the role should be displayed separately in the sidebar
+ icon: string, -- the role's icon image (if the guild has the ROLE_ICONS feature)
+ unicode_emoji: string, -- the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature)
+ mentionable: boolean, -- whether the role should be mentionable
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
+export type ModifyGuildRolePositionsRequest = Request<{
+ id: objects.Snowflake, -- the target role id
+ position: number, -- sorting position of the role (roles with the same position are sorted by id)
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-role
+export type ModifyGuildRoleRequest = Request<{
+ name: string, -- name of the role, max 100 characters
+ permissions: string, -- bitwise value of the enabled/disabled permissions
+ color: number, -- RGB color value
+ hoist: boolean, -- whether the role should be displayed separately in the sidebar
+ icon: string, -- the role's icon image (if the guild has the ROLE_ICONS feature)
+ unicode_emoji: string, -- the role's unicode emoji as a standard emoji (if the guild has the ROLE_ICONS feature)
+ mentionabl: boolean, -- whether the role should be mentionable
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
+export type ModifyGuildMFALevelRequest = Request<{
+ level: objects.MFALevel, -- The updated MFA level
+}>
+
+-- https://discord.com/developers/docs/resources/guild#begin-guild-prune
+export type BeginGuildPruneRequest = Request<{
+ days: number, -- number of days to prune (1-30)
+ compute_prune_count: boolean, -- whether pruned is returned, discouraged for large guilds
+ include_ruoles: { objects.Snowflake }, -- role(s) to include
+ reason: string?, -- reason for the prune (deprecated)
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
+export type ModifyGuildWelcomeScreenRequest = Request<{
+ enabled: boolean, -- whether the welcome screen is enabled
+ welcome_channels: { objects.WelcomeScreenChannelObject }, -- channels linked in the welcome screen and their display options
+ description: string, -- the server description to show in the welcome screen
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-onboarding
+export type ModifyGuildOnboardingRequest = Request<{
+ prompts: { objects.OnboardingPromptObject }, -- Prompts shown during onboarding and in customize community
+ default_channel_ids: { objects.Snowflake }, -- Channel IDs that members get opted into automatically
+ enabled: boolean, -- Whether onboarding is enabled in the guild
+ mode: objects.OnboardingMode, -- Current mode of onboarding
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
+export type ModifyCurrentUserVoiceStateRequest = Request<{
+ channel_id: objects.Snowflake?, -- the id of the channel the user is currently in
+ suppress: boolean?, -- toggles the user's suppress state
+ request_to_speak_timestamp: string?, -- sets the user's request to speak
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-user-voice-state
+export type ModifyUserVoiceStateRequest = Request<{
+ channel_id: objects.Snowflake?, -- the id of the channel the user is currently in
+ suppress: boolean?, -- toggles the user's suppress state
+}>
+
+-- https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
+export type CreateGuildScheduledEventRequest = Request<{
+ channel_id: objects.Snowflake?, -- the channel id of the scheduled event.
+ entity_metadata: objects.GuildScheduledEventEntityMetadata, -- the entity metadata of the scheduled event
+ name: string, -- the name of the scheduled event
+ privacy_level: objects.PrivacyLevel, -- the privacy level of the scheduled event
+ scheduled_start_time: string, -- the time to schedule the scheduled event
+ scheduled_end_time: string?, -- the time when the scheduled event is scheduled to end
+ description: string?, -- the description of the scheduled event
+ entity_type: objects.GuildScheduledEventEntityType, -- the entity type of the scheduled event
+ image: string?, -- the cover image of the scheduled event
+}>
+
+-- https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
+export type ModifyGuildScheduledEventRequest = Request<{
+ channel_id: objects.Snowflake?, -- the channel id of the scheduled event.
+ entity_metadata: objects.GuildScheduledEventEntityMetadata, -- the entity metadata of the scheduled event
+ name: string, -- the name of the scheduled event
+ privacy_level: objects.PrivacyLevel, -- the privacy level of the scheduled event
+ scheduled_start_time: string, -- the time to schedule the scheduled event
+ scheduled_end_time: string?, -- the time when the scheduled event is scheduled to end
+ description: string?, -- the description of the scheduled event
+ entity_type: objects.GuildScheduledEventEntityType, -- the entity type of the scheduled event
+ status: objects.GuildScheduledEventStatus?, -- the status of the scheduled event
+ image: string?, -- the cover image of the scheduled event
+}>
+
+-- https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
+export type CreateGuildFromGuildTemplateRequest = Request<{
+ name: string, -- name of the guild (2-100 characters)
+ icon: string?, -- base64 128x128 image for the guild icon
+}>
+
+-- https://discord.com/developers/docs/resources/guild-template#create-guild-template
+export type CreateGuildTemplateRequest = Request<{
+ name: string, -- name of the template (1-100 characters)
+ description: string?, -- description for the template (0-120 characters)
+}>
+
+-- https://discord.com/developers/docs/resources/guild-template#modify-guild-template
+export type ModifyGuildTemplateRequest = Request<{
+ name: string?, -- name of the template (1-100 characters)
+ description: string?, -- description for the template (0-120 characters)
+}>
+
+-- https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
+export type CreateStageInstanceRequest = Request<{
+ channel_id: objects.Snowflake, -- The id of the Stage channel
+ topic: string, -- The topic of the Stage instance (1-120 characters)
+ privacy_level: objects.PrivacyLevel?, -- The privacy level of the Stage instance (default GUILD_ONLY)
+ send_start_notification: boolean?, -- Notify @everyone that a Stage instance has started
+ guild_scheduled_event_id: objects.Snowflake?, -- The guild scheduled event associated with this Stage instance
+}>
+
+-- https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
+export type ModifyStageInstanceRequest = Request<{
+ topic: string, -- The topic of the Stage instance (1-120 characters)
+ privacy_level: objects.PrivacyLevel, -- The privacy level of the Stage instance
+}>
+
+-- https://discord.com/developers/docs/resources/sticker#create-guild-sticker
+export type CreateGuildStickerRequest = Request<{
+ name: string, -- name of the sticker (2-30 characters)
+ description: string, -- description of the sticker (empty or 2-100 characters)
+ tags: { string }, -- autocomplete/suggestion tags for the sticker (max 200 characters)
+ file: string, -- the sticker file to upload, must be a PNG, APNG, GIF, or Lottie JSON file, max 512 KiB
+}>
+
+-- https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
+export type ModifyGuildStickerRequest = Request<{
+ name: string, -- name of the sticker (2-30 characters)
+ description: string?, -- description of the sticker (2-100 characters)
+ tags: string, -- autocomplete/suggestion tags for the sticker (max 200 characters)
+}>
+
+-- https://discord.com/developers/docs/resources/user#modify-current-user
+export type ModifyCurrentUserRequest = Request<{
+ username: string, -- user's username, if changed may cause the user's discriminator to be randomized.
+ avatar: string?, -- if passed, modifies the user's avatar
+ banner: string?, -- if passed, modifies the user's banner
+}>
+
+-- https://discord.com/developers/docs/resources/user#create-dm
+export type CreateDMRequest = Request<{
+ recipient_id: objects.Snowflake, -- the recipient to open a DM channel with
+}>
+
+-- https://discord.com/developers/docs/resources/user#create-group-dm
+export type CreateGroupDMRequest = Request<{
+ access_tokens: { string }, -- access tokens of users that have granted your app the gdm.join scope
+ nicks: { [objects.Snowflake]: string }, -- a dictionary of user ids to their respective nicknames
+}>
+
+-- https://discord.com/developers/docs/resources/user#update-current-user-application-role-connection
+export type UpdateCurrentUserApplicationRoleConnectionRequest = Request<{
+ platform_name: string?, -- the vanity name of the platform a bot has connected (max 50 characters)
+ platform_username: string?, -- the username on the platform a bot has connected (max 100 characters)
+ metadata: objects.ApplicationRoleConnectionMetadataObject?, -- object mapping application role connection metadata keys to their string-ified value (max 100 characters) for the user on the platform a bot has connected
+}>
+
+-- https://discord.com/developers/docs/resources/webhook#create-webhook
+export type CreateWebhookRequest = Request<{
+ name: string, -- name of the webhook (1-80 characters)
+ avatar: string?, -- image for the default webhook avatar
+}>
+
+-- https://discord.com/developers/docs/resources/webhook#modify-webhook
+export type ModifyWebhookRequest = Request<{
+ name: string,
+ avatar: string,
+ channel_id: objects.Snowflake,
+}>
+
+-- https://discord.com/developers/docs/resources/webhook#execute-webhook
+export type ExecuteWebhookRequest = Request<{
+ content: string, -- the message contents (up to 2000 characters)
+ username: string, -- override the default username of the webhook
+ avatar_url: string, -- override the default avatar of the webhook
+ tts: boolean, -- true if this is a TTS message
+ embeds: { objects.EmbedObject }, -- embedded rich content
+ allowed_mentions: objects.AllowedMentionObject, -- allowed mentions for the message
+ components: { objects.ComponentObjects }, -- the components to include with the message
+ -- files: { },
+ -- payload_json: string,
+ attachments: { objects.AttachmentObject }, -- attachment objects with filename and description
+ flags: number, -- message flags combined as a bitfield (only SUPPRESS_EMBEDS and SUPPRESS_NOTIFICATIONS can be set can be set)
+ thread_name: string, -- name of thread to create (requires the webhook channel to be a forum or media channel)
+ applied_tags: { objects.Snowflake }, -- array of tag ids to apply to the thread (requires the webhook channel to be a forum or media channel)
+ poll: objects.PollObject, -- discord poll
+}>
+
+-- https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook
+export type ExecuteSlackCompatibleWebhookRequest = Request<{
+ -- lol i dont want to look into block kit.. please use execute webhook request
+ -- if that's not an option, feel free to contribute; https://api.slack.com/block-kit
+}>
+
+-- https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
+export type ExecuteGithubCompatibleWebhookRequest = Request<{
+ -- ok, likewise with the slack comment, feel free to contribute; https://docs.github.com/en/webhooks/webhook-events-and-payloads
+}>
+
+-- https://discord.com/developers/docs/resources/webhook#edit-webhook-message
+export type EditWebhookMessageRequest = Request<{
+ content: string, -- the message contents (up to 2000 characters)
+ embeds: { objects.EmbedObject }, -- embedded rich content
+ allowed_mentions: objects.AllowedMentionObject, -- allowed mentions for the message
+ components: { objects.ComponentObjects }, -- the components to include with the message
+ -- files: { },
+ -- payload_json: string,
+ attachments: objects.AttachmentObject, -- attached files to keep and possible descriptions for new files
+}>
+
+-- https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+export type EditChannelPermissionsRequest = Request<{
+ allow: string?, -- the bitwise value of all allowed permissions (default "0")
+ deny: string?, -- the bitwise value of all disallowed permissions (default "0")
+ type: number, -- 0 for a role or 1 for a member
+}>
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-widget
+export type ModifyGuildWidgetRequest = Request
+
+-- https://discord.com/developers/docs/resources/channel#crosspost-message
+export type CrosspostMessageRequest = Request
+
+-- https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+export type CreateGlobalApplicationCommandRequest = Request<{
+ name: string, -- Name of command, 1-32 characters
+ name_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the name field. Values follow the same restrictions as name
+ description: string?, -- 1-100 character description for CHAT_INPUT commands
+ description_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the description field. Values follow the same restrictions as description
+ options: { objects.ApplicationCommandOptionObject }?, -- the parameters for the command, max of 25
+ default_member_permissions: string?, -- Set of permissions represented as a bit set
+ dm_permission: boolean?, -- Deprecated (use contexts instead); Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
+ default_permission: boolean, -- Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true
+ integration_types: { objects.IntegrationType }?, -- Installation context(s) where the command is available
+ contexts: { objects.InteractionContextType }?, -- Interaction context(s) where the command can be used
+ type: objects.ApplicationCommandType?, -- Type of command, defaults 1 if not set
+ nsfw: boolean?, -- Indicates whether the command is age-restricted
+}>
+
+-- https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+export type EditGlobalApplicationCommandRequest = Request<{
+ name: string, -- Name of command, 1-32 characters
+ name_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the name field. Values follow the same restrictions as name
+ description: string?, -- 1-100 character description for CHAT_INPUT commands
+ description_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the description field. Values follow the same restrictions as description
+ options: { objects.ApplicationCommandOptionObject }?, -- the parameters for the command, max of 25
+ default_member_permissions: string?, -- Set of permissions represented as a bit set
+ dm_permission: boolean?, -- Deprecated (use contexts instead); Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
+ default_permission: boolean, -- Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true
+ integration_types: { objects.IntegrationType }?, -- Installation context(s) where the command is available
+ contexts: { objects.InteractionContextType }?, -- Interaction context(s) where the command can be used
+ nsfw: boolean?, -- Indicates whether the command is age-restricted
+}>
+
+-- https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+export type CreateGuildApplicationCommandRequest = Request<{
+ name: string, -- Name of command, 1-32 characters
+ name_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the name field. Values follow the same restrictions as name
+ description: string?, -- 1-100 character description for CHAT_INPUT commands
+ description_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the description field. Values follow the same restrictions as description
+ options: { objects.ApplicationCommandOptionObject }?, -- the parameters for the command, max of 25
+ default_member_permissions: string?, -- Set of permissions represented as a bit set
+ dm_permission: boolean?, -- Deprecated (use contexts instead); Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
+ default_permission: boolean, -- Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true
+ integration_types: { objects.IntegrationType }?, -- Installation context(s) where the command is available
+ contexts: { objects.InteractionContextType }?, -- Interaction context(s) where the command can be used
+ type: objects.ApplicationCommandType?, -- Type of command, defaults 1 if not set
+ nsfw: boolean?, -- Indicates whether the command is age-restricted
+}>
+
+-- https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+export type EditGuildApplicationCommandRequest = Request<{
+ name: string, -- Name of command, 1-32 characters
+ name_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the name field. Values follow the same restrictions as name
+ description: string?, -- 1-100 character description for CHAT_INPUT commands
+ description_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the description field. Values follow the same restrictions as description
+ options: { objects.ApplicationCommandOptionObject }?, -- the parameters for the command, max of 25
+ default_member_permissions: string?, -- Set of permissions represented as a bit set
+ dm_permission: boolean?, -- Deprecated (use contexts instead); Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
+ default_permission: boolean, -- Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true
+ integration_types: { objects.IntegrationType }?, -- Installation context(s) where the command is available
+ contexts: { objects.InteractionContextType }?, -- Interaction context(s) where the command can be used
+ nsfw: boolean?, -- Indicates whether the command is age-restricted
+}>
+
+-- https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+export type BulkOverwriteGlobalApplicationCommandsRequest = Request<{ objects.ApplicationCommandObject }>
+
+-- https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+export type BulkOverwriteGuildApplicationCommandsRequest = Request<
+ {
+ {
+ id: objects.Snowflake?, -- ID of the command, if known
+ name: string, -- Name of command, 1-32 characters
+ name_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the name field. Values follow the same restrictions as name
+ description: string?, -- 1-100 character description for CHAT_INPUT commands
+ description_localizations: { [objects.LanguageLocales]: string }?, -- Localization dictionary for the description field. Values follow the same restrictions as description
+ options: { objects.ApplicationCommandOptionObject }?, -- the parameters for the command, max of 25
+ default_member_permissions: string?, -- Set of permissions represented as a bit set
+ dm_permission: boolean?, -- Deprecated (use contexts instead); Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible.
+ default_permission: boolean, -- Replaced by default_member_permissions and will be deprecated in the future. Indicates whether the command is enabled by default when the app is added to a guild. Defaults to true
+ integration_types: { objects.IntegrationType }?, -- Installation context(s) where the command is available
+ contexts: { objects.InteractionContextType }?, -- Interaction context(s) where the command can be used
+ type: objects.ApplicationCommandType?, -- Type of command, defaults 1 if not set
+ nsfw: boolean?, -- Indicates whether the command is age-restricted
+ }
+ }
+>
+
+-- https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+export type EditApplicationCommandPermissionsRequest = Request<{
+ permissions: { objects.GuildApplicationCommandPermissionObject },
+}>
+
+-- [[ Responses ]] --
+
+-- https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
+export type GetCurrentUserVoiceStateResponse = Response
+
+-- https://discord.com/developers/docs/resources/voice#get-user-voice-state
+export type GetUserVoiceStateResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands
+export type GetGlobalApplicationCommandsResponse = Response<{ objects.ApplicationCommandObject }>
+
+-- https://discord.com/developers/docs/interactions/application-commands#create-global-application-command
+export type CreateGlobalApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
+export type GetGlobalApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command
+export type EditGlobalApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command
+export type DeleteGlobalApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands
+export type BulkOverwriteGlobalApplicationCommandsResponse = Response<{ objects.ApplicationCommandObject }>
+
+-- https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands
+export type GetGuildApplicationCommandsResponse = Response<{ objects.ApplicationCommandObject }>
+
+-- https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command
+export type CreateGuildApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command
+export type GetGuildApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
+export type EditGuildApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command
+export type DeleteGuildApplicationCommandResponse = Response
+
+-- https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands
+export type BulkOverwriteGuildApplicationCommandsResponse = Response<{ objects.ApplicationCommandObject }>
+
+-- https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions
+export type GetGuildApplicationCommandPermissionsResponse = Response<
+ { objects.GuildApplicationCommandPermissionsObject }
+>
+
+-- https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions
+export type GetApplicationCommandPermissionsResponse = Response<{ objects.GuildApplicationCommandPermissionsObject }>
+
+-- https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions
+export type EditApplicationCommandPermissionsResponse = Response
+
+-- https://discord.com/developers/docs/resources/application#get-current-application
+export type GetCurrentApplicationResponse = Response<{ objects.ApplicationObject }>
+
+-- https://discord.com/developers/docs/resources/application#edit-current-application
+export type EditCurrentApplicationResponse = Response<{ objects.ApplicationObject }>
+
+-- https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records
+export type GetApplicationRoleConnectionMetadataRecordsResponse = Response<
+ objects.ApplicationRoleConnectionMetadataObject
+>
+
+-- https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records
+export type UpdateApplicationRoleConnectionMetadataRecordsResponse = Response<
+ objects.ApplicationRoleConnectionMetadataObject
+>
+
+-- https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
+export type GetGuildAuditLogResponse = Response
+
+-- https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild
+export type ListAutoModerationRulesForGuildResponse = Response<{ objects.AutomoderationRuleObject }>
+
+-- https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule
+export type GetAutoModerationRuleResponse = Response
+
+-- https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
+export type CreateAutoModerationRuleResponse = Response
+
+-- https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
+export type ModifyAutoModerationRuleResponse = Response
+
+-- https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule
+export type DeleteAutoModerationRuleResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#get-channel
+export type GetChannelResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#modify-channel
+export type ModifyChannelResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#deleteclose-channel
+export type DeleteCloseChannelResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#get-channel-messages
+export type GetChannelMessagesResponse = Response<{ objects.MessageObject }>
+
+-- https://discord.com/developers/docs/resources/channel#get-channel-message
+export type GetChannelMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#create-message
+export type CreateMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#crosspost-message
+export type CrosspostMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#create-reaction
+export type CreateReactionResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#delete-own-reaction
+export type DeleteOwnReactionResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#delete-user-reaction
+export type DeleteUserReactionResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#get-reactions
+export type GetReactionsResponse = Response<{ objects.UserObject }>
+
+-- https://discord.com/developers/docs/resources/channel#delete-all-reactions
+export type DeleteAllReactionsResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
+export type DeleteAllReactionsForEmojiResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#edit-message
+export type EditMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#delete-message
+export type DeleteMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#bulk-delete-messages
+export type BulkDeleteMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#edit-channel-permissions
+export type EditChannelPermissionsResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#get-channel-invites
+export type GetChannelInvitesResponse = Response<{ objects.InviteObject & objects.InviteMetadataObject }>
+
+-- https://discord.com/developers/docs/resources/channel#create-channel-invite
+export type CreateChannelInviteResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#delete-channel-permission
+export type DeleteChannelPermissionResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#follow-announcement-channel
+export type FollowAnnouncementChannelResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
+export type TriggerTypingIndicatorResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#get-pinned-messages
+export type GetPinnedMessagesResponse = Response<{ objects.MessageObject }>
+
+-- https://discord.com/developers/docs/resources/channel#pin-message
+export type PinMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#unpin-message
+export type UnpinMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
+export type GroupDMAddRecipientResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
+export type GroupDMRemoveRecipientResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-from-message
+export type StartThreadFromMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-without-message
+export type StartThreadWithoutMessageResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
+export type StartThreadInForumOrMediaChannelResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#join-thread
+export type JoinThreadResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#add-thread-member
+export type AddThreadMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#leave-thread
+export type LeaveThreadResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#remove-thread-member
+export type RemoveThreadMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#get-thread-member
+export type GetThreadMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/channel#list-thread-members
+export type ListThreadMembersResponse = Response<{ objects.ThreadMemberObject }>
+
+-- https://discord.com/developers/docs/resources/channel#list-public-archived-threads
+export type ListPublicArchivedThreadsResponse = Response<{
+ threads: { objects.ChannelObject }, -- the public, archived threads
+ members: { objects.ThreadMemberObject }, -- a thread member object for each returned thread the current user has joined
+ has_more: boolean, -- whether there are potentially additional threads that could be returned on a subsequent call
+}>
+
+-- https://discord.com/developers/docs/resources/channel#list-private-archived-threads
+export type ListPrivateArchivedThreadsResponse = Response<{
+ threads: { objects.ChannelObject }, -- the public, archived threads
+ members: { objects.ThreadMemberObject }, -- a thread member object for each returned thread the current user has joined
+ has_more: boolean, -- whether there are potentially additional threads that could be returned on a subsequent call
+}>
+
+-- https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
+export type ListJoinedPrivateArchivedThreadsResponse = Response<{
+ threads: { objects.ChannelObject }, -- the public, archived threads
+ members: { objects.ThreadMemberObject }, -- a thread member object for each returned thread the current user has joined
+ has_more: boolean, -- whether there are potentially additional threads that could be returned on a subsequent call
+}>
+
+-- https://discord.com/developers/docs/resources/emoji#list-guild-emojis
+export type ListGuildEmojisResponse = Response<{ objects.EmojiObject }>
+
+-- https://discord.com/developers/docs/resources/emoji#get-guild-emoji
+export type GetGuildEmojiResponse = Response
+
+-- https://discord.com/developers/docs/resources/emoji#create-guild-emoji
+export type CreateGuildEmojiResponse = Response
+
+-- https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
+export type ModifyGuildEmojiResponse = Response
+
+-- https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
+export type DeleteGuildEmojiResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#create-guild
+export type CreateGuildResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#get-guild
+export type GetGuildResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#get-guild
+export type GetGuildPreviewResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild
+export type ModifyGuildResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#delete-guild
+export type DeleteGuildResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#get-guild-channels
+export type GetGuildChannelsResponse = Response<{ objects.ChannelObject }>
+
+-- https://discord.com/developers/docs/resources/guild#create-guild-channel
+export type CreateGuildChannelResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
+export type ModifyGuildChannelPositionsResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#list-active-guild-threads
+export type ListActiveGuildThreadsResponse = Response<{
+ threads: { objects.ChannelObject }, -- the active threads
+ members: { objects.ThreadMemberObject }, -- a thread member object for each returned thread the current user has joined
+}>
+
+-- https://discord.com/developers/docs/resources/guild#get-guild-member
+export type GetGuildMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#list-guild-members
+export type ListGuildMembersResponse = Response<{ objects.GuildMemberObject }>
+
+-- https://discord.com/developers/docs/resources/guild#search-guild-members
+export type SearchGuildMembersResponse = Response<{ objects.GuildMemberObject }>
+
+-- https://discord.com/developers/docs/resources/guild#add-guild-member
+export type AddGuildMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#modify-guild-member
+export type ModifyGuildMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#modify-current-member
+export type ModifyCurrentMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#add-guild-member-role
+export type AddGuildMemberRoleResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#remove-guild-member-role
+export type RemoveGuildMemberRoleResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#remove-guild-member
+export type RemoveGuildMemberResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#get-guild-bans
+export type GetGuildBansResponse = Response<{ objects.BanObject }>
+
+-- https://discord.com/developers/docs/resources/guild#get-guild-ban
+export type GetGuildBanResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#create-guild-ban
+export type CreateGuildBanResponse = Response
+
+-- https://discord.com/developers/docs/resources/guild#remove-guild-ban
+export type RemoveGuildBanResponse = Response