diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index 20fc969..da8118d 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -25,7 +25,7 @@ jobs: - name: Deprecate old releases run: npm deprecate discord-player@"~5.0.0-dev" "outdated version" || true env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.npm_token }} - name: Publish run: | diff --git a/src/Player.ts b/src/Player.ts index 7db8d73..b50886c 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -500,4 +500,4 @@ class Player extends EventEmitter { } } -export { Player }; +export { Player }; \ No newline at end of file diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index aa18865..fabe0b3 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -169,6 +169,8 @@ class Queue { this._streamTime = 0; if (resource && resource.metadata) this.previousTracks.push(resource.metadata); + this.player.emit("trackEnd", this, resource.metadata); + if (!this.tracks.length && this.repeatMode === QueueRepeatMode.OFF) { if (this.options.leaveOnEnd) this.destroy(); this.player.emit("queueEnd", this);