discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.44k stars 3.97k forks source link

AutocompleteInteraction does not define context or authorizingIntegrationOwners #10516

Closed kevinlul closed 1 month ago

kevinlul commented 1 month ago

Which package is this bug report for?

discord.js

Issue description

According to Discord documentation, authorizing_integration_owners is available for all interactions like id or type. context is nullable but nothing suggests that it is not present for autocomplete interactions as a rule. In Discord.js, these fields are only available for CommandInteraction and not AutocompleteInteraction.

Code sample

function onCommand(interaction: ChatInputCommandInteraction) {
    interaction.authorizingIntegrationOwners;
    interaction.context;
}

function onAutocomplete(interaction: AutocompleteInteraction) {
    interaction.authorizingIntegrationOwners; // Property 'authorizingIntegrationOwners' does not exist on type 'AutocompleteInteraction<CacheType>'.ts(2339)
    interaction.context; // Property 'context' does not exist on type 'AutocompleteInteraction<CacheType>'.ts(2339)
}

Versions

discord.js 14.16.2

Issue priority

Low (slightly annoying)

Which partials do you have configured?

Not applicable

Which gateway intents are you subscribing to?

Not applicable

I have tested this issue on a development release

No response