fix(APIApplicationCommandAutocompleteInteraction): make options field required (#332)

This commit is contained in:
andre4ik3
2022-02-15 16:15:06 +03:00
committed by GitHub
parent a8f19e6a19
commit 5396daf0db
5 changed files with 18 additions and 6 deletions

View File

@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
> &
Required<
Pick<
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
>,
'data'
>
>;

View File

@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
> &
Required<
Pick<
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
>,
'data'
>
>;

View File

@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
> &
Required<
Pick<
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
>,
'data'
>
>;

View File

@@ -12,7 +12,10 @@ export type APIApplicationCommandAutocompleteInteraction = APIBaseInteraction<
> &
Required<
Pick<
APIBaseInteraction<InteractionType.ApplicationCommandAutocomplete, APIChatInputApplicationCommandInteractionData>,
APIBaseInteraction<
InteractionType.ApplicationCommandAutocomplete,
Required<Pick<APIChatInputApplicationCommandInteractionData, 'options'>>
>,
'data'
>
>;

View File

@@ -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) {