This commit is contained in:
DevAndromeda 2021-08-05 14:32:09 +05:45
commit 6b68c24d22
3 changed files with 4 additions and 2 deletions

View file

@ -25,7 +25,7 @@ jobs:
- name: Deprecate old releases - name: Deprecate old releases
run: npm deprecate discord-player@"~5.0.0-dev" "outdated version" || true run: npm deprecate discord-player@"~5.0.0-dev" "outdated version" || true
env: env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
- name: Publish - name: Publish
run: | run: |

View file

@ -500,4 +500,4 @@ class Player extends EventEmitter<PlayerEvents> {
} }
} }
export { Player }; export { Player };

View file

@ -169,6 +169,8 @@ class Queue<T = unknown> {
this._streamTime = 0; this._streamTime = 0;
if (resource && resource.metadata) this.previousTracks.push(resource.metadata); 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.tracks.length && this.repeatMode === QueueRepeatMode.OFF) {
if (this.options.leaveOnEnd) this.destroy(); if (this.options.leaveOnEnd) this.destroy();
this.player.emit("queueEnd", this); this.player.emit("queueEnd", this);