TypeError:member.guild.channels.get不是函数

时间:2020-03-27 09:44:10

标签: discord.js

该如何解决“ TypeError:member.guild.channels.get不是函数”

client.on('guildMemberRemove', member => {
member.guild.channels.get('692319439542157435').send('**' + member.user.username + '**, has left the server');
})

1 个答案:

答案 0 :(得分:1)

member.guild.channels.cache.get('692319439542157435')(适用于不和谐v12)。

client.on('guildMemberRemove', member => {
    member.guild.channels.cache.get('692319439542157435').send('**' + member.user.username + '**, has left the server');
})