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) {

}
}

Constructors

Accessors

Methods

Constructors

Accessors

Methods

  • This function can be used in to send a error message in discord!

    Parameters

    • interaction: ModalSubmitInteraction<CacheType>
    • error: string

    Returns Promise<InteractionResponse<boolean>>

    The function returns the error reply!