Creating a join/leave message
How would I create one? I'm trying to use guildMemberAdd
70 Replies
• 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.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
wdym
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ok
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
good point
wait
when am i passing client
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i already had it open
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
huh
wait so what should i be doing?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
im getting client
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
but then i wont need to define it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ah
yeah nvm
bc i copied the code from ym ready.js
*my
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i did it
should i also pass client from index as well?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ah ok
so
now
i do
channel.send(embed)
right?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yeah
i was shortening it
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
wait
wouldnt EMBEDS neeto be in an array?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
cool
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
uh
crap
can i do
member.client.interactions?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
then how would i get channel?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
k
and
quick question
if i wanted to dynamiclly include a user's username in teh welcome msg
i would need to update it
in the file right?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
bc i have all my embeds in a JSON
so
i would do
const embed = EMBEDS.WELCOME;
embed = {"description": "Welcome to the server $(username here)");
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ah ok
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
i18n?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ah o
k
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Thanks for the help 🙂
actually one last question
how would i mention the user
w/o that above?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
how would i get teh id
*the
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ye
nvm
member.id
im stupid
ty
didnt rk
*work
i used my alt
to leave and join the server
but the whole file was never run
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ah
where would i put it?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
nvm
perfect
ty
and
and for userLeave
should i make a new file
or use the same file?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
ok
tysm
should i make a folder with join/leave/banned?
and how would i add a role to when a user joins?
member.roles.add(role);
?
and could i do const role = member.interaction.options.getRole('905893175774822441');
?
ah