mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-02 08:50:09 +00:00
fix(APIApplicationCommandAutocompleteInteraction): make options field required (#332)
This commit is contained in:
@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
|
||||
APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
|
||||
>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
|
||||
APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
|
||||
>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
|
||||
APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
|
||||
>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
|
||||
> &
|
||||
Required<
|
||||
Pick<
|
||||
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
|
||||
APIBaseInteraction<
|
||||
InteractionType.ApplicationCommandAutocomplete,
|
||||
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
|
||||
>,
|
||||
'data'
|
||||
>
|
||||
>;
|
||||
|
||||
@@ -2,7 +2,7 @@ import { expectType } from 'tsd';
|
||||
import {
|
||||
APIApplicationCommandInteraction,
|
||||
APIApplicationCommandInteractionData,
|
||||
APIChatInputApplicationCommandInteractionData,
|
||||
APIApplicationCommandAutocompleteInteraction,
|
||||
APIDMInteraction,
|
||||
APIGuildInteraction,
|
||||
APIInteraction,
|
||||
@@ -40,7 +40,7 @@ if (interaction.type === InteractionType.MessageComponent) {
|
||||
}
|
||||
|
||||
if (interaction.type === InteractionType.ApplicationCommandAutocomplete) {
|
||||
expectType<APIChatInputApplicationCommandInteractionData>(interaction.data);
|
||||
expectType<APIApplicationCommandAutocompleteInteraction['data']>(interaction.data);
|
||||
}
|
||||
|
||||
if (interaction.type === InteractionType.ModalSubmit) {
|
||||
|
||||
Reference in New Issue
Block a user