How do i make my bot welcome users when they join the guild?

I wanna make it so that my bot can welcome users when they join the guild, and a need to make it toggleable. Any pointers?
8 Replies
d.js toolkit
d.js toolkit17mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Post the full error stack trace, not just the top part! - Show your code! - Explain what exactly your issue is. - Not a discord.js issue? Check out #useful-servers.
TheRealGodSpeedy
TheRealGodSpeedyOP17mo ago
Node: 18.00 D.js: 14.11
gendii_
gendii_17mo ago
you can list to guildMemberAdd to know when a new member joins the guild
TheRealGodSpeedy
TheRealGodSpeedyOP17mo ago
oh ok
d.js docs
d.js docs17mo ago
event (event) Client#guildMemberAdd Emitted whenever a user joins a guild.
TheRealGodSpeedy
TheRealGodSpeedyOP17mo ago
i have a question tho if i were to make it toggleable by, say, the guild owner, then i would need to use a command and my commands are in different files then the main bot file so how would i "link" the two files?
gendii_
gendii_17mo ago
there's more of a js problem, better ask in #other-js-ts
TheRealGodSpeedy
TheRealGodSpeedyOP17mo ago
k
Want results from more Discord servers?
Add your server