🐛 Fix skip method
This commit is contained in:
parent
ed13b2c40a
commit
df6be94fb3
1 changed files with 2 additions and 2 deletions
|
@ -513,7 +513,7 @@ class Player {
|
||||||
// Get guild queue
|
// Get guild queue
|
||||||
const queue = this.queues.find((g) => g.guildID === guildID)
|
const queue = this.queues.find((g) => g.guildID === guildID)
|
||||||
if (!queue) return reject(new Error('Not playing'))
|
if (!queue) return reject(new Error('Not playing'))
|
||||||
const currentTrack = queue.tracks[0]
|
const currentTrack = queue.playing
|
||||||
// End the dispatcher
|
// End the dispatcher
|
||||||
queue.voiceConnection.dispatcher.end()
|
queue.voiceConnection.dispatcher.end()
|
||||||
queue.lastSkipped = true
|
queue.lastSkipped = true
|
||||||
|
@ -836,7 +836,7 @@ class Player {
|
||||||
// Get guild queue
|
// Get guild queue
|
||||||
const queue = this.queues.find((g) => g.guildID === guildID)
|
const queue = this.queues.find((g) => g.guildID === guildID)
|
||||||
// If there isn't any music in the queue
|
// If there isn't any music in the queue
|
||||||
if (queue.tracks.length < 2 && !firstPlay && !queue.repeatMode) {
|
if (queue.tracks.length < 1 && !firstPlay && !queue.repeatMode) {
|
||||||
// Leave the voice channel
|
// Leave the voice channel
|
||||||
if (this.options.leaveOnEnd && !queue.stopped) queue.voiceConnection.channel.leave()
|
if (this.options.leaveOnEnd && !queue.stopped) queue.voiceConnection.channel.leave()
|
||||||
// Remove the guild from the guilds list
|
// Remove the guild from the guilds list
|
||||||
|
|
Loading…
Reference in a new issue