diff --git a/src/builders.ts b/src/builders.ts index 49343cd..41cc9d7 100644 --- a/src/builders.ts +++ b/src/builders.ts @@ -98,21 +98,6 @@ class CommandHandlerMixin { } } -/** - * Discord.js builders are not designed to be grouped together in a collection. - * This union represents any possible end value for an individual command's - * builder. - */ -export type SlashCommandBuilderReturn = - | SlashCommandBuilder - | Omit - | SlashCommandSubcommandsOnlyBuilder; - -type SlashCommandSubcommandsOnlyBuilder = Omit - | keyof MoreOptionsMixin ->; - // NOTE: it's important that Discord's built-ins are the last Mixin in the list! // Otherwise, we run the risk of stepping on field initialization. diff --git a/src/registry.ts b/src/registry.ts index 5437018..60bcb6c 100644 --- a/src/registry.ts +++ b/src/registry.ts @@ -11,15 +11,15 @@ import { BaseInteraction, ChatInputCommandInteraction, CommandInteraction, + ContextMenuCommandBuilder as DiscordContextMenuCommandBuilder, ContextMenuCommandInteraction, DiscordAPIError, - ContextMenuCommandBuilder as DiscordContextMenuCommandBuilder, - SlashCommandBuilder as DiscordSlashCommandBuilder, REST, + RESTPostAPIChatInputApplicationCommandsJSONBody, + RESTPostAPIContextMenuApplicationCommandsJSONBody, Routes, + SlashCommandBuilder as DiscordSlashCommandBuilder, Snowflake, - RESTPostAPIContextMenuApplicationCommandsJSONBody, - RESTPostAPIChatInputApplicationCommandsJSONBody, } from 'discord.js'; import { @@ -29,14 +29,12 @@ import { Handler, resolveBuilder, SlashCommandBuilder, - SlashCommandBuilderReturn, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, } from './builders'; import { API_VERSION } from './constants'; -/** A top-level command builder. */ -type TopLevelBuilder = SlashCommandBuilderReturn | ContextMenuCommandBuilder; +type TopLevelBuilder = ContextMenuCommandBuilder | SlashCommandBuilder /** Optional parameters for registering commands. */ interface RegisterOpts {