📅  最后修改于: 2022-03-11 14:59:11.737000             🧑  作者: Mango
// 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()
}