Events allow developers to perform setup or teardown tasks, such as registering or unregistering a webhook in a third-party system or validating a user’s connections. Event files MUST:
  • Live in src/events
  • Have a .event.ts suffix.
  • Contain an export default async function that:
    • Takes a { connection: Connection } argument
    • Returns void
The arguments passed to the handler function depend on the type of event and are documented below.

Available Events: