Functionseedcordv0.10.6Decorator
Confirmable
Wraps a repliable handler method with an interactive confirmation flow.
Displays a prompt, waits for a follow-up component interaction, and conditionally executes the original method based on the user's decision. The decorator supports both classic action rows + embed/content and ComponentV2 containers.
Confirmable<TComponent>(
question: ConfirmableQuestionInput,
options: ConfirmableOptions<TComponent>
): <TArgs extends unknown[]>(
_target: RepliableInteractionHandler,
_propertyKey: string,
descriptor: TypedPropertyDescriptor<
(...args: TArgs) => Promise<void>
>
) => TypedPropertyDescriptor<
(...args: TArgs) => Promise<void>
>Confirmable<TComponent>(
question: ConfirmableQuestionInput,
options: ConfirmableOptions<TComponent>
): <TArgs extends unknown[]>(
_target: RepliableInteractionHandler,
_propertyKey: string,
descriptor: TypedPropertyDescriptor<
(...args: TArgs) => Promise<void>
>
) => TypedPropertyDescriptor<
(...args: TArgs) => Promise<void>
>TComponent
Message component type that should resolve the confirmation.
TComponentTComponentMessage component type that should resolve the confirmation.
question
question: ConfirmableQuestionInputquestion: ConfirmableQuestionInputStatic string or lazy factory that resolves the prompt question.
options
options: ConfirmableOptions<TComponent>options: ConfirmableOptions<TComponent>Confirmation flow configuration.