Skip to content
Functiongatewayv0.7.5Decorator

RegisterEvent

Registers an event handler class with one or more Discord.js events.

Associates the decorated class with the provided Discord client events for automatic registration and execution when those events are emitted.

Supply any number of event tuples. Each tuple can include per event options.

RegisterEvent<Defs>(
    defs: Defs
): <
    HandlerCtor extends Constructor<
        EventHandler<Defs[number][0]>
    >
>(
    constructor: HandlerCtor
) => void

Defs

Defs

defs

defs: Defs

One or more tuples of [event, options]