# RegisterEvent

`function` in `seedcord` · v0.15.0

<https://docs.seedcord.org/packages/seedcord/0.15.0/functions/register-event>

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.

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

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.

Parameters.

- `defs` `Defs` — One or more tuples of [event, options]

Returns `<HandlerCtor extends Constructor<EventHandler<Defs[number][0]>>>(constructor: HandlerCtor) => void`.
