diff --git a/packages/rest/src/types.ts b/packages/rest/src/types.ts index 78c3810c6..2a0f29c8a 100644 --- a/packages/rest/src/types.ts +++ b/packages/rest/src/types.ts @@ -53,7 +53,7 @@ import type { CamelizedDiscordVoiceRegion, CamelizedDiscordWebhook, CamelizedDiscordWelcomeScreen, - // Type is required for typedoc + // Type required for typedoc // eslint-disable-next-line @typescript-eslint/no-unused-vars ChannelTypes, CreateApplicationCommand, @@ -76,7 +76,13 @@ import type { CreateStageInstance, CreateTemplate, DeleteWebhookMessageOptions, + // Type required for typedoc + // eslint-disable-next-line @typescript-eslint/no-unused-vars + DiscordApplicationIntegrationType, DiscordBulkBan, + // Type required for typedoc + // eslint-disable-next-line @typescript-eslint/no-unused-vars + DiscordInteraction, EditApplication, EditAutoModerationRuleOptions, EditBotMemberOptions, @@ -2486,6 +2492,9 @@ export interface RestManager { * - Needing to be able to see the contents of the channel that the message is in. (`READ_MESSAGES` permission.) * - Requiring the `MESSAGE_CONTENT` intent. * + * Apps are limited to 5 followup messages per interaction if it was initiated from a user-installed app and isn't installed in the server + * You can check if it was initiated from a user-installed app that isn't installed in the server by checking if {@link DiscordInteraction.authorizing_integration_owners | authorizingIntegrationOwners} only contains {@link DiscordApplicationIntegrationType.UserInstall | UserInstall}. + * * Fires a _Message Create_ event. * * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message} diff --git a/packages/types/src/discord.ts b/packages/types/src/discord.ts index f5a2eaa13..3cdf99ec2 100644 --- a/packages/types/src/discord.ts +++ b/packages/types/src/discord.ts @@ -383,12 +383,7 @@ export interface DiscordApplication { tags?: string[] /** settings for the application's default in-app authorization link, if enabled */ install_params?: DiscordInstallParams - /** - * Default scopes and permissions for each supported installation context. - * - * @remarks - * This is currently in preview. - */ + /** Default scopes and permissions for each supported installation context. */ integration_types_config?: Partial> /** the application's default custom authorization link, if enabled */ custom_install_url?: string @@ -1617,7 +1612,7 @@ export interface DiscordMessageInteractionMetadata { /** User who triggered the interaction */ user: DiscordUser /** IDs for installation context(s) related to an interaction */ - authorizing_integration_owners: Partial> + authorizing_integration_owners: Partial> /** ID of the original response message, present only on follow-up messages */ original_response_message_id?: string /** ID of the message that contained interactive component, present only on messages created from component interactions */ @@ -2389,17 +2384,19 @@ export interface DiscordCreateApplicationCommand { /** Set of permissions represented as a bit set */ default_member_permissions?: string | null /** - * Installation context(s) where the command is available + * Installation contexts where the command is available * * @remarks - * This is currently in preview. + * This value is available only for globally-scoped commands + * Defaults to the application configured contexts */ integration_types?: DiscordApplicationIntegrationType[] /** - * Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included. + * Interaction context(s) where the command can be used * * @remarks - * This is currently in preview. + * This value is available only for globally-scoped commands + * By default, all interaction context types included for new commands. */ contexts?: DiscordInteractionContextType[] | null /** diff --git a/packages/types/src/discordeno.ts b/packages/types/src/discordeno.ts index 3d69c4b90..d2270990d 100644 --- a/packages/types/src/discordeno.ts +++ b/packages/types/src/discordeno.ts @@ -466,9 +466,21 @@ export interface CreateSlashApplicationCommand { options?: Camelize /** Set of permissions represented as a bit set */ defaultMemberPermissions?: PermissionStrings[] - /** Installation context(s) where the command is available */ + /** + * Integration types where the command is available + * + * @remarks + * This value is available only for globally-scoped commands + * Defaults to the application configured contexts + */ integrationTypes?: DiscordApplicationIntegrationType[] - /** Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands. */ + /** + * Interaction context types where the command is available. + * + * @remarks + * This value is available only for globally-scoped commands + * By default, all interaction context types are included for new commands + */ contexts?: DiscordInteractionContextType[] /** * Indicates whether the command is available in DMs with the app, only for globally-scoped commands. By default, commands are visible. @@ -1309,12 +1321,7 @@ export interface EditApplication { roleConnectionsVerificationUrl?: string /** Settings for the app's default in-app authorization link, if enabled */ installParams?: DiscordInstallParams - /** - * Default scopes and permissions for each supported installation context. - * - * @remarks - * This is currently in preview. - */ + /** Default scopes and permissions for each supported installation context. */ integrationTypesConfig?: DiscordApplicationIntegrationType /** * App's public flags