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 toolkit2y 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
TheRealGodSpeedyOP2y ago
Node: 18.00 D.js: 14.11
gendii_
gendii_2y ago
you can list to guildMemberAdd to know when a new member joins the guild
TheRealGodSpeedy
TheRealGodSpeedyOP2y ago
oh ok
d.js docs
d.js docs2y ago
event (event) Client#guildMemberAdd Emitted whenever a user joins a guild.
TheRealGodSpeedy
TheRealGodSpeedyOP2y 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_2y ago
there's more of a js problem, better ask in #other-js-ts
TheRealGodSpeedy
TheRealGodSpeedyOP2y ago
k
Want results from more Discord servers?
Add your server