The description of the piece
Whether or not this piece is disabled
The event to listen to
The name of the piece
Whether or not to run this event only once
The pool this piece is part of
A function that runs at the bot startup once
A function that reloads the file
Generated using TypeDoc
Creating events
⚠ Note: if you want to run something AFTER the bot is ready, please use the
moonlightReady
event instead of simply usingready
An event is arguably one of the most important things your bot will listen to.
To get started with events, just add a file in your
events
folder and use the following example for JavaScript:or the following for TypeScript: