📌  相关文章
📜  Bot 离开频道不活动 discord.js - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:11.737000             🧑  作者: Mango

代码示例1
// Assuming 'message' is the message with the command
let { channelID } = message.member.voice // Get the user's voice channel ID
if (channelID) {
  // Find an existing connection to that channel
  let connection = client.voice.connections.find(conn => conn.channel.id == channelID)
  if (connection) // If you find one, use .disconnect()
    connection.disconnect()
}