我正在尝试对音乐机器人执行跳过命令,但出现此错误:
TypeError: Cannot read property 'end' of null
我的代码:
} else if (message.content.startsWith(`${prefix}skip`)) {
if (!message.member.voice.channel) return message.channel.send(":speaking_head: **You need to be in a voice channel to use this command.**");
if (!serverQueue) return message.channel.send(":warning: **There is nothing playing**");
serverQueue.connection.dispatcher.end()
message.channel.send("**Track skipped** :track_next:")
return undefined
}