【发布时间】:2017-05-21 18:33:11
【问题描述】:
我一直在制作一个不和谐机器人,并想让它向特定的“欢迎”频道发送消息。不幸的是,我一直无法这样做。我试过了。
const welcomeChannel = bot.channels.get("name", "welcome")
welcomeChannel.sendMessage("Welcome\n"+member.user.username);
但是在这个“welcomeChannel 未定义”中。
编辑:
我尝试过使用
const welcomeChannel = bot.channels.get("id", "18NUMBERIDHERE")
welcomeChannel.sendMessage("Welcome\n"+member.user.username);
但这仍然是未定义的,奇怪的是
【问题讨论】:
-
这能回答你的问题吗? Discord Bot can't find channel by name or id
标签: javascript discord discord.js bots