I signed up just a few moments ago because something was really bothering me: I have the following code:
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('guildMemberAdd', (member) => {
console.log('New member.')
const welcomeEmbed = new Discord.MessageEmbed()
.setImage(member.user.avatarURL())
.setColor('#e9fa2a')
.setAuthor("Mangoly Assistant")
.setTitle("New member in server")
.setDescription('Welcome <@${member.id}> to the server! If you are new, please be sure to check out or rules channel and some useful links. We are glad to be having you here, everyone wave hello! :wave:')
.setFooter('Created by kostis;#4464. || Mangoly Assistant')
client.channels.cache.get('825130442197434418').send(welcomeEmbed)
});
client.once('ready', () => {
console.log('Bot is ready')
})
client.login(nice try);
For some reason, when I leave and rejoin the server, the embed isn't sending at all to the channel. I am getting no errors in the console. Any ideas on what may have gone wrong? Thanks. :)