Ask coding questions

← Back to all posts
Discord.js Bot Welcome Message Isn't Working

Hi there. I am trying to make a welcome message for my discord.js bot, but the code I have down below doesn't work. Any ideas on how to fix it?


var bot = new Discord.Client();

 bot.on("guildMemberAdd", (member) => {

    let channel = bot.channels.get('733415727637201029');

    channel.send(`Hey ${member.user}, welcome to the server!`); 
BeydleDroid (0)

you have to check intents


@CodingRobot12 That still does nothing for me.

CodingRobot12 (182)

For your discord bot, are you trying to make a welcome message if the person adds the bot to a server or if a person comes into the server @JollyJack8


@CodingRobot12 If they come into a server.


@CodingRobot12 but how would I get the bot to actually say the message?


@CodingRobot12 hm still nothing for me