【发布时间】:2018-09-20 10:32:46
【问题描述】:
我正在使用 node.js 和 discord.js 制作一个不和谐机器人,我目前正在尝试制作它,以便在用户加入不和谐服务器时发送自定义欢迎消息。这是我的代码:
bot.on("guildMemberAdd" ,(message, member) => {
message.channel.send("Welcome")
});
这是得到的错误:
message.channel.send("Welcome")
^
TypeError: Cannot read property 'send' of undefined
感谢您的帮助。
【问题讨论】:
-
好吧,您的消息似乎没有称为频道的属性
标签: javascript node.js discord discord.js