Functiongatewayv0.5.1
getConfirmation
Shows a confirm/cancel prompt with built-in Confirm and Cancel buttons and resolves to true only if the invoking user clicks confirm. A cancel click or a timeout resolves to false. Gate the action behind it with an early return. A failed prompt send throws into the fault boundary. A ModalHandler is excluded at compile time.
async getConfirmation(
handler: RepliableHandler<NonModalInteraction>,
prompt: string,
options?: DefaultConfirmOptions
): Promise<boolean>handler
handler: RepliableHandler<NonModalInteraction>The handler to prompt from, this inside a non-modal handler.
prompt
prompt: stringThe message shown above the Confirm and Cancel buttons.
options?
options?: DefaultConfirmOptionsEphemeral flag, timeout, the built-in buttons' labels and style, and the optional onConfirm/onCancel/onTimeout outcome replies that edit the prompt in place.