calendar-daysEvent 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
        }
    }
]

Each ID must be unique. Although the event loader does not require an ID as an option, if you do not provide one, it may result in the event not being loaded. This is important because many addons might have a messageCreate event, and to ensure that each messageCreate event is loaded correctly, each must have its own custom ID

Last updated