mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
feat(rest,types)!: User apps GA (#3696)
* User apps GA * Apply code-review suggettions Without some re-wording of the already confusing Discord usage of context/type term --------- Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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<Record<`${DiscordApplicationIntegrationType}`, DiscordApplicationIntegrationTypeConfiguration>>
|
||||
/** 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<Record<DiscordApplicationIntegrationType, string>>
|
||||
authorizing_integration_owners: Partial<Record<`${DiscordApplicationIntegrationType}`, string>>
|
||||
/** 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
|
||||
/**
|
||||
|
||||
@@ -466,9 +466,21 @@ export interface CreateSlashApplicationCommand {
|
||||
options?: Camelize<DiscordApplicationCommandOption[]>
|
||||
/** 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
|
||||
|
||||
Reference in New Issue
Block a user