I am making a discord bot using node.js and discord.js, and I am currently trying to make it so that when a user joins the discord server, a custom welcome message is sent. Here is my code:
bot.on("guildMemberAdd" ,(message, member) => {
message.channel.send("Welcome")
});
This is the error is get:
message.channel.send("Welcome")
^
TypeError: Cannot read property 'send' of undefined
Thanks for your help.