underctrl-io / commandkit

Only focus on what matters - Let CommandKit handle your commands and events in your Discord.js projects!
https://commandkit.js.org
MIT License
86 stars 11 forks source link

Feedback for “guildMembersAdd” #77

Open zihan-ban opened 2 months ago

zihan-ban commented 2 months ago

I wanna have a welcome bot. But I dont know how guildMembersAdd works

notunderctrl commented 2 months ago

You can create a new folder inside your events folder with the name of the event you want to handle. For example, for the "guildMemberAdd" event, you'd create a "guildMemberAdd" folder inside the events folder.

Inside this folder you can create files (name doesn't matter) which export a default function. Then every time the event is emitted, that function will be called.

You can read more here: https://commandkit.js.org/guide/event-file-setup