F

showDialog

Opens a dialog with Discord's own alert: a title, an optional body and custom component, and action buttons, each of which closes the dialog before running its handler. On a Discord build without the alert it falls back to the system alert, which shows the title, body and buttons only.

function showDialog(options: AlertDialogProps): DialogHandle

Parameters

NameTypeDescription
optionsAlertDialogProps

The dialog's content and buttons.

Returns

DialogHandle

The dialog's key and a function that closes it.