Skip to content
Interfacegatewayv0.7.5

EventMiddlewareOptions

Registration options for an event middleware.

interface EventMiddlewareOptions<
    Events extends NonEmptyTuple<ValidNonInteractionKeys>
>

Properties

events

Restrict this middleware to certain Discord client events. The middleware's EventMiddleware generic must list the same events, or applying the decorator is a compile error. Omit it to run on every event.

readonly events?: Events

priority

Lower runs earlier. Two middleware sharing a priority run in registration order.

readonly priority?: number

Default:0