我没有更改代码中的任何内容。在上周('guildMemberAdd')工作。 但是今天它已经停止工作。请帮忙!
client.on('guildMemberAdd', async member =>{
console.log('1')
try {
const channel = client.channels.cache.get(requireNew('./data/config.json').memberAddChannel)
const avatar = new Discord.MessageAttachment(member.user.displayAvatarURL());
const img = new Discord.MessageAttachment(requireNew('./data/config.json').welcomeImg)
if (!channel) return;
channel.send(`<@${member.user.id}>, ${requireNew('./data/config.json').welcomeMsg}`,[avatar,img]);
member.roles.add(requireNew('./data/config.json').baseRole);
member.user.send("Here text");
} catch (err) {
console.log(err);
}
});