diff --git a/typings/index.d.ts b/typings/index.d.ts index 0c051bac905e..927aa263bf55 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -2881,14 +2881,30 @@ export interface ApplicationAsset { type: 'BIG' | 'SMALL'; } -export interface ApplicationCommandData { +export interface BaseApplicationCommandData { name: string; - description?: string; - type?: ApplicationCommandType | ApplicationCommandTypes; - options?: ApplicationCommandOptionData[]; defaultPermission?: boolean; } +export interface UserApplicationCommandData extends BaseApplicationCommandData { + type: 'USER' | ApplicationCommandTypes.USER; +} + +export interface MessageApplicationCommandData extends BaseApplicationCommandData { + type: 'MESSAGE' | ApplicationCommandTypes.MESSAGE; +} + +export interface ChatInputApplicationCommandData extends BaseApplicationCommandData { + description: string; + type: 'CHAT_INPUT' | ApplicationCommandTypes.CHAT_INPUT; + options?: ApplicationCommandOptionData[]; +} + +export type ApplicationCommandData = + | UserApplicationCommandData + | MessageApplicationCommandData + | ChatInputApplicationCommandData; + export interface ApplicationCommandOptionData { type: ApplicationCommandOptionType | ApplicationCommandOptionTypes; name: string;