【发布时间】:2021-03-28 10:23:39
【问题描述】:
您好,我有点卡在这里,我试图让我的机器人加入 VC,但它返回:
(node:847) UnhandledPromiseRejectionWarning: TypeError: channel.join is not a function
我们将不胜感激:)
client.on("ready", () => {
const channel = client.channels.cache.get("757004209701912587");
if (!channel) return console.error("The channel does not exist!");
channel.join().then(connection => {
// Yay, it worked!
console.log("Successfully connected.");
}).catch(e => {
// Oh no, it errored! Let's log it to console :)
console.error(e);
});
});
【问题讨论】:
标签: javascript discord discord.js