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?
Code:
var bot = new Discord.Client(); bot.on("guildMemberAdd", (member) => { let channel = bot.channels.get('733415727637201029'); channel.send(`Hey ${member.user}, welcome to the server!`); });
you have to check intents
This might help solve the problem:
https://stackoverflow.com/questions/49759835/welcome-message-when-joining-discord-server-using-discord-js
@CodingRobot12 That still does nothing for me.
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.
try looking at this website: https://github.com/Exploit1337/discordjs-welcome-bot
@JollyJack8
@CodingRobot12 but how would I get the bot to actually say the message?
sorry I don't know myself but try this website:
https://github.com/Emonadeo/welcome-bot
@JollyJack8
@CodingRobot12 hm still nothing for me
client.on("guildMemberAdd", member => {
if (member.guild.id === "your server id") {
client.channels.cache
.get("your welcome channel id")
.send(
what does it say when someone joins and also tag the person that just joined with ${member}
);}
}); //if its still not working invite me to ur project or go to package.json and change discord.js13.1.0 to discord.js12.5.3