📅  最后修改于: 2022-03-11 15:03:44.482000             🧑  作者: Mango
client.on('guildMemberAdd', guildMember =>{
let welcomeRole = guildMember.guild.roles.cache.find(role => role.name === 'YOUR ROLE MEMBERS EXACT NAME');
guildMember.roles.add(welcomeRole);
guildMember.guild.channels.cache.get('WELCOME CHANNEL ID').send(`Welcome <@${guildMember.user.id}> to our server!`)
});