✨ Rename events and always emit trackStart event
This commit is contained in:
parent
f134eb0ca0
commit
46c2bb9dc6
1 changed files with 3 additions and 6 deletions
|
@ -543,10 +543,10 @@ class Player extends EventEmitter {
|
||||||
this.queues.delete(queue.guildID)
|
this.queues.delete(queue.guildID)
|
||||||
// Emit stop event
|
// Emit stop event
|
||||||
if (queue.stopped) {
|
if (queue.stopped) {
|
||||||
return queue.emit('stop')
|
return queue.emit('musicStopped')
|
||||||
}
|
}
|
||||||
// Emit end event
|
// Emit end event
|
||||||
return queue.emit('end')
|
return queue.emit('queueEnded')
|
||||||
}
|
}
|
||||||
// if the track needs to be the next one
|
// if the track needs to be the next one
|
||||||
if (!queue.repeatMode && !firstPlay) queue.tracks.shift()
|
if (!queue.repeatMode && !firstPlay) queue.tracks.shift()
|
||||||
|
@ -554,10 +554,7 @@ class Player extends EventEmitter {
|
||||||
// Reset lastSkipped state
|
// Reset lastSkipped state
|
||||||
queue.lastSkipped = false
|
queue.lastSkipped = false
|
||||||
this._playYTDLStream(track, queue, false).then(() => {
|
this._playYTDLStream(track, queue, false).then(() => {
|
||||||
// Emit trackChanged event
|
this.emit('trackStart', queue.firstMessage, track, queue)
|
||||||
if (!firstPlay) {
|
|
||||||
queue.emit('trackStart', queue.firstMessage, track, queue)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue