Setting up Events
A simple way to setup your discord.js events. All you need to do is set the property name as the event name, and then pass in the parameters needed for the events in the execute function, and set up the rest of the events functionality in it. You can name the event file as anything you want.
Properties
name string
This is the name of the Discord client event. You can find the full list of Discord event names in the enum Events documentation
once boolean
If this Discord event should run once or whenever it is called. For example, you would need this property if you are using the ready event.
async execute(client, ...args)
This is the method used to execute and handle the Discord event trigger. The first argument is always the Discord Client object.
Info
This is an example of using Events.GuildMemberUpdate execute function.