mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-12-03 03:12:51 +08:00
fix(audio): fade out on stop command
This commit is contained in:
1 parent
a0f0b49a4e
commit
7896c9c9bf
2 files changed
+21
-2
No files matched your search
+4
-2
@@ -1547,11 +1547,13 @@ export class BotInstance extends EventEmitter {
|
||||
private cmdStop(): string {
|
||||
// Read the current song BEFORE queue.clear() so we can tell whether the
|
||||
// sidecar needs stopping.
|
||||
if (this.queue.current()?.platform === "spotify") {
|
||||
const isSpotify = this.queue.current()?.platform === "spotify";
|
||||
if (isSpotify) {
|
||||
this.spotifyController.stop();
|
||||
}
|
||||
this.currentSourceIsSpotify = false;
|
||||
this.player.stop();
|
||||
if (isSpotify) this.player.stop();
|
||||
else this.player.stopWithFade();
|
||||
this.jellyfinReporter?.onStop();
|
||||
this.autoPaused = false;
|
||||
this.queue.clear();
|
||||
|
||||
Reference in new issue
Block a user