From 47723c75ad9a47bbb3e85664e29347d958bc5b63 Mon Sep 17 00:00:00 2001 From: Shadow Date: Tue, 3 Sep 2024 12:59:32 -0500 Subject: [PATCH] revert accidental component change --- packages/carbon/src/abstracts/BaseCommand.ts | 12 +++++++++++- packages/carbon/src/classes/Command.ts | 9 +-------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/carbon/src/abstracts/BaseCommand.ts b/packages/carbon/src/abstracts/BaseCommand.ts index b23cf91b..51410231 100644 --- a/packages/carbon/src/abstracts/BaseCommand.ts +++ b/packages/carbon/src/abstracts/BaseCommand.ts @@ -2,7 +2,11 @@ import { ApplicationCommandType, type RESTPostAPIApplicationCommandsJSONBody } from "discord-api-types/v10" -import { ApplicationIntegrationType, InteractionContextType } from "../index.js" +import { + ApplicationIntegrationType, + type BaseComponent, + InteractionContextType +} from "../index.js" /** * Represents the base data of a command that the user creates @@ -46,6 +50,12 @@ export abstract class BaseCommand { InteractionContextType.PrivateChannel ] + /** + * All the components that the command is able to use. + * You mount these here so the handler can access them + */ + components?: BaseComponent[] = [] + /** * All the paginators that the command is able to use. * You mount these here so the handler can access them diff --git a/packages/carbon/src/classes/Command.ts b/packages/carbon/src/classes/Command.ts index 7967e2ba..c28156bc 100644 --- a/packages/carbon/src/classes/Command.ts +++ b/packages/carbon/src/classes/Command.ts @@ -5,8 +5,7 @@ import { import { type AutocompleteInteraction, BaseCommand, - type CommandInteraction, - type BaseComponent + type CommandInteraction } from "../index.js" export type CommandOptions = APIApplicationCommandBasicOption[] @@ -26,12 +25,6 @@ export abstract class Command extends BaseCommand { */ type: ApplicationCommandType = ApplicationCommandType.ChatInput - /** - * All the components that the command is able to use. - * You mount these here so the handler can access them - */ - components?: BaseComponent[] = [] - /** * The function that is called when the command is ran * @param interaction The interaction that triggered the command