Discord-ts-app
  • README.md
  • GUIDE
    • Setup
    • Environment
    • Events
    • Commands
    • Middlewares
    • Modules
Powered by GitBook
On this page

Was this helpful?

  1. GUIDE

Events

Currently, the application does not offer a way to automatically generate event files. For this, you just have to create a typecript file in the App/Events/ folder and paste the code below :

import { Event, EventContext } from '@discord-ts-app/class-decorator'

@Event('ready') // 👈 Choose your event here
export default class Example implements EventContext {
	public async run(): Promise<void> {
		// Your code here
	}
}

That's it, nothing more is needed ! 😅

PreviousEnvironmentNextCommands

Last updated 4 years ago

Was this helpful?