Reputation: 326
I am making a discord.js bot and I want to make a welcome msg when someone joins the server.
Here is the basic layout I want:
input: &welcome_channel
get channel id.
input: &welcome_msg
then store this msg.
I have no idea how to get the channel and how to display the welcome message on said channel. Please help.
Upvotes: 0
Views: 402
Reputation: 467
Using the Discord.js library you can use the guildMemberAdd to run a function each time a user joins the server, this event also passes a GuildMember object, using it you should be able to get the server that the user has joined, if there is one the default welcome channel for that server.
Upvotes: 1