Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions packages/discord.js/src/structures/AutocompleteInteraction.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ class AutocompleteInteraction extends BaseInteraction {
*/
this.commandGuildId = data.data.guild_id ?? null;

/* eslint-disable max-len */
/**
* Mapping of installation contexts that the interaction was authorized for the related user or guild ids
* @type {APIAuthorizingIntegrationOwnersMap}
* @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-authorizing-integration-owners-object}
*/
this.authorizingIntegrationOwners = data.authorizing_integration_owners;
/* eslint-enable max-len */

/**
* Context where the interaction was triggered from
* @type {?InteractionContextType}
*/
this.context = data.context ?? null;

/**
* Whether this interaction has already received a response
* @type {boolean}
Expand Down
2 changes: 2 additions & 0 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1197,12 +1197,14 @@ export class ChatInputCommandInteraction<Cached extends CacheType = CacheType> e

export class AutocompleteInteraction<Cached extends CacheType = CacheType> extends BaseInteraction<Cached> {
public type: InteractionType.ApplicationCommandAutocomplete;
public authorizingIntegrationOwners: APIAuthorizingIntegrationOwnersMap;
public get command(): ApplicationCommand | ApplicationCommand<{ guild: GuildResolvable }> | null;
public channelId: Snowflake;
public commandId: Snowflake;
public commandName: string;
public commandType: ApplicationCommandType.ChatInput;
public commandGuildId: Snowflake | null;
public context: InteractionContextType | null;
public responded: boolean;
public options: Omit<
CommandInteractionOptionResolver<Cached>,
Expand Down