Functionseedcordv0.13.0
getConfirmation
Shows a confirm/cancel prompt with built-in Confirm and Cancel buttons and resolves to truetrue only if the invoking user clicks confirm. A cancel click or a timeout resolves to falsefalse. Gate the action behind it with an early return. Never throws, a swallowed send resolves to falsefalse. Not usable from a ModalHandlerModalHandler, the interactioninteraction parameter excludes a modal submit at compile time.
async getConfirmation(
interaction: NonModalInteraction,
prompt: string,
options?: DefaultConfirmOptions
): Promise<boolean>async getConfirmation(
interaction: NonModalInteraction,
prompt: string,
options?: DefaultConfirmOptions
): Promise<boolean>interaction
interaction: NonModalInteractioninteraction: NonModalInteractionThe repliable interaction to prompt on, this.eventthis.event inside a non-modal handler.
prompt
options?
options?: DefaultConfirmOptionsoptions?: DefaultConfirmOptionsEphemeral flag, timeout, the built-in buttons' labels and style, and the optional onConfirmonConfirm/onCancelonCancel/onTimeoutonTimeout outcome replies that edit the prompt in place.