I've been making a discord bot in Discord.js and I'm trying to make a welcome command. I'm trying to send a message to a specific channel in my server. I don't know how to do this since the update in discord.js because I've done this before. Can you help me?
Here is a chunk of my code:
bot.on('guildMemberAdd', (member) => {
let embed = new Discord.MessageEmbed()
.setColor(0xcccccc)
.setThumbnail(member.user.avatarURL)
.setTitle("Welcome " + member.user.tag + "!")
.setDescription("Hello, welcome to this server!")
.addField("Welcome", "imageurl")
.setFooter("Server Name")
bot.channels.find('XXXXX').send(embed)
})