# EventMiddlewareOptions

`interface` in `gateway` · v0.7.5

<https://seedcord.org/docs/packages/gateway/0.7.5/interfaces/event-middleware-options>

Registration options for an event middleware.

```ts
interface EventMiddlewareOptions<
    Events extends NonEmptyTuple<ValidNonInteractionKeys>
>
```

## Properties

### events

```ts
readonly events?: 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.

### priority

```ts
readonly priority?: number
```

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