A modal requires the ModalInterface class!
import { ModalContext, ModalInterface } from "discord-interactionhandler-js";class Modal extends ModalInterface { get custom_id() { return "modal_1"; } async run(ctx: ModalContext) { }} Copy
import { ModalContext, ModalInterface } from "discord-interactionhandler-js";class Modal extends ModalInterface { get custom_id() { return "modal_1"; } async run(ctx: ModalContext) { }}
This function set the custom id!
The function must be return a string!
"" Copy
""
This function is executed when the modal is called!
This function can be used in to send a error message in discord!
The function returns the error reply!
A modal requires the ModalInterface class!
Example