nyx Typedoc
    Preparing search index...

    Interface CommandManager<Types, ClientEventMap, ApplicationCommand>

    An object that holds methods for interacting with the bot's commands.

    interface CommandManager<
        Types extends InteractionTypes = InteractionTypes,
        ClientEventMap extends
            Record<keyof ClientEventMap & string, unknown[]> = Record<
            string,
            unknown[],
        >,
        ApplicationCommand = APIApplicationCommand,
    > {
        addCommands(
            ...commands: TopLevelCommand<Types>[],
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
        autocomplete(
            interaction: Types["AutocompleteInteraction"],
            meta?: Metadata,
        ): Awaitable<boolean>;
        deploy(): Awaitable<void>;
        editCommands(
            ...commands: TopLevelCommand<Types>[],
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
        execute(
            source: CommandExecutableInteraction<Types>,
            meta?: Metadata,
        ): Awaitable<boolean>;
        getCustomIdCodec(): CommandCustomIdCodec;
        getDeployer(): ReadonlyCommandDeployer<Types, ApplicationCommand>;
        getEventBus(): EventBus<CommandEventArgs<Types>>;
        getExecutor(): CommandExecutor<Types>;
        getMetadataFactory(): MetadataFactory;
        getRepository(): ReadonlyCommandRepository<Types>;
        getResolver(): CommandResolver<Types>;
        getSubscriptions(): CommandSubscriptionsContainer<ClientEventMap>;
        onStart(): Awaitable<void>;
        onStop(): Awaitable<void>;
        removeCommands(
            ...commands: TopLevelCommand<Types>[],
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
        setCommands(
            ...commands: TopLevelCommand<Types>[],
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
        setCustomIdCodec(codec: CommandCustomIdCodec): this;
        setDeployer(deployer: CommandDeployer<Types, ApplicationCommand>): this;
        setEventBus(
            eventBus: EventBus<CommandEventArgs<Types>>,
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
        setExecutor(executor: CommandExecutor<Types>): this;
        setRepository(repository: ReadonlyCommandRepository<Types>): this;
        setResolver(resolver: CommandResolver<Types>): this;
        setSubscriptions(
            subscriptions: CommandSubscriptionsContainer<ClientEventMap>,
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
        subscribe(
            ...subscribers: EventSubscriber<
                CommandEventArgs<Types>,
                "commandAdd" | "commandRemove" | "commandRun" | "commandAutocomplete",
            >[],
        ): Awaitable<CommandManager<Types, ClientEventMap, ApplicationCommand>>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index