A component requires the ComponentInterface class!

import { ComponentContext, ComponentInterface } from "discord-interactionhandler-js";

class Comp extends ComponentInterface {
get custom_id() {
return "comp_1";
}

async run(ctx: ComponentContext) {

}
}

Constructors

Accessors

Methods

Constructors

Accessors

Methods

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

    Parameters

    • interaction: any
    • error: string

    Returns any

    The function returns the error reply!