Skip to main content

First Event Module

We will dissect a basic event module.


TLDR: event modules are event listeners. there are three types EventType.Discord, EventType.Sern, EventType.External

exports.default = eventModule({
type: EventType.Sern,
plugins : [],
name: 'module.activate',
execute(event) {

Like command modules, the type property denotes what kind of event it is, which can be found here.

To view what each of these properties mean in depth, visit the official documentation.


In version 2 & 3, any dependency that you have passed into makeDependencies can be registered here as well.

await makeDependencies({ 
build: root => root.add({
eventlistener: single(() => new EventEmitter())
export default eventModule({ 
type: EventType.External,
emitter: 'eventlistener',
execute: (args) => {
console.log('Got event from eventlistener: ', args);