I recently updated my discord.js version from v12 to v13.3.1 and the 'guildMemberAdd' event stopped working, although I enabled PRESENCE INTENT as well as SERVER MEMBERS INTENT on my application.
const Discord = require('discord.js');
const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.GUILDS] });
client.once('ready', () => {
console.log(client.user.tag + ' is online!');
});
client.on("guildMemberAdd", guildMember => {
let welcomeRole = guildMember.guild.roles.cache.find(role => role.name === 'member');
guildMember.roles.add(welcomeRole);
});