[英]TypeError [ERR_INVALID_ARG_TYPE]: The "listener" argument must be of type function. Received undefined
At Object. (C:\Users\Hades\Downloads\Jaxxy\src\bot.js:51:8)在 Object。(C:\Users\Hades\Downloads\Jaxxy\src\bot.js:51:8)
My code for the specified command is我指定命令的代码是
client.on('guildMemberAdd'), member => {
const channel = member.guild.channels.cache.find(channel=> channel.name === "welcome");
if(!channel) return;
channel.send(`Welcome to Hades's Tavern,$(member), make sure to read the rules in #rules!`)
};
I'm on discord.js v12?我在 discord.js v12 上? Anyone has any clue?
有人有任何线索吗?
The closing parenthesis has to be after the arrow function's body:右括号必须在箭头函数的主体之后:
client.on('guildMemberAdd', member => {
const channel = member.guild.channels.cache.find(channel => channel.name === "welcome");
if (!channel) return;
channel.send(`Welcome to Hades's Tavern,$(member), make sure to read the rules in #rules!`)
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.