Listening Events
Updating seyfert config
Before starting this chapter we shall update seyfert.config.js
in order to tell seyfert where our events file will be.
Listening Event
Each event file shall export by default the createEvent
function so seyfert is able to load them
Let’s listen the botReady
event as first example
Let’s check another example with guildDelete
event:
Below is the current file tree of the project if you did follow the previous steps.
Directorysrc
Directorycommands
- ping.ts
Directoryevents
- botReady.ts
- guildDelete.ts
- index.ts
- package.json
- seyfert.config.js
- .env
- tsconfig.json