Event Handler
Events in addons must be in an array, which allows you to add multiple events. Each event must have a name, an ID, a once property as a boolean (true or false), and an asynchronous execute method.
events: [
{
name: 'eventName',
id: "UniqueVariable", // Required
once: false,
async execute(properties, client) {
// Event code goes here
// properties contains the event properties (like message, channel, interaction) depending on eventName
// client is the Discord client instance
}
}
]
Last updated