我一直在制作一个不和谐的机器人,并想让它向特定的“欢迎”频道发送消息。不幸的是,我一直无法这样做。我试过这个。
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);
但这仍然是未定义的,奇怪的是