nyx Typedoc
    Preparing search index...

    Interface CommandErrorHandler<Types>

    An object for handling errors caused by an object inside a bot.

    interface CommandErrorHandler<Types extends InteractionTypes = InteractionTypes> {
        clear(): void;
        getConsumers(): ReadonlyCollection<Constructor>;
        getFallbackConsumer(): ErrorConsumer<
            object,
            AnyExecutableCommand<Types>,
            CommandExecutionArgs<Types>,
        >;
        handle(
            error: object,
            erroredObject: AnyExecutableCommand,
            args: CommandExecutionArgs,
        ): Awaitable<void>;
        hasConsumer(error: object | AnyClass): boolean;
        removeConsumerOf(error: AnyClass): void;
        setConsumer<const ErrorType extends AnyClass>(
            error: ErrorType,
            consumer: ErrorConsumer<
                InstanceType<ErrorType>,
                AnyExecutableCommand<Types>,
                CommandExecutionArgs<Types>,
            >,
        ): void;
        setFallbackConsumer(
            consumer: ErrorConsumer<
                object,
                AnyExecutableCommand<Types>,
                CommandExecutionArgs<Types>,
            >,
        ): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index