From d4627357ad17c9e2c7f0acfe927de25a69dbf025 Mon Sep 17 00:00:00 2001 From: TTtie Date: Sun, 30 Jul 2023 21:54:52 +0200 Subject: [PATCH] fix(types): allow attachment command options in createCommand() and co. (#92) --- index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 81b20451..491f4bd2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -26,6 +26,7 @@ declare namespace Dysnomia { type ApplicationCommandOptionMinMaxValue = (ApplicationCommandOption & ApplicationCommandOptionsMinMaxValue); type ApplicationCommandOptionMinMaxLength = (ApplicationCommandOption & ApplicationCommandOptionsMinMaxLength); + type ApplicationCommandOptionsAttachment = ApplicationCommandOption<"ATTACHMENT">; type ApplicationCommandOptionsBoolean = ApplicationCommandOption<"BOOLEAN">; type ApplicationCommandOptionsChannel = ApplicationCommandOptionChannelTypes<"CHANNEL">; type ApplicationCommandOptionsInteger = ApplicationCommandOptionAutocomplete<"INTEGER"> | ApplicationCommandOptionChoices<"INTEGER"> | ApplicationCommandOptionMinMaxValue<"INTEGER">; @@ -36,7 +37,7 @@ declare namespace Dysnomia { type ApplicationCommandOptionsUser = ApplicationCommandOption<"USER">; type ApplicationCommandOptionsWithOptions = ApplicationCommandOptionsSubCommand | ApplicationCommandOptionsSubCommandGroup; - type ApplicationCommandOptionsWithValue = ApplicationCommandOptionsString | ApplicationCommandOptionsInteger | ApplicationCommandOptionsBoolean | ApplicationCommandOptionsUser | ApplicationCommandOptionsChannel | ApplicationCommandOptionsRole | ApplicationCommandOptionsMentionable | ApplicationCommandOptionsNumber; + type ApplicationCommandOptionsWithValue = ApplicationCommandOptionsString | ApplicationCommandOptionsInteger | ApplicationCommandOptionsBoolean | ApplicationCommandOptionsUser | ApplicationCommandOptionsChannel | ApplicationCommandOptionsRole | ApplicationCommandOptionsMentionable | ApplicationCommandOptionsNumber | ApplicationCommandOptionsAttachment; type ApplicationCommandStructure = ChatInputApplicationCommandStructure | MessageApplicationCommandStructure | UserApplicationCommandStructure; type ApplicationCommandStructureConversion = T extends ChatInputApplicationCommandStructure ? ChatInputApplicationCommand : T extends MessageApplicationCommandStructure ?