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
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: |

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;
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);