From 04b7f66871dc3adffd2c38fd711d328c3ff1c7b0 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sun, 18 Aug 2024 14:41:51 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Autoplay=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/providers/DiscordMusicPlayer.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/providers/DiscordMusicPlayer.ts b/src/providers/DiscordMusicPlayer.ts index 7e6ffc9..7a76be2 100644 --- a/src/providers/DiscordMusicPlayer.ts +++ b/src/providers/DiscordMusicPlayer.ts @@ -257,13 +257,13 @@ export class DiscordMusicPlayerInstance { this.discordPlayer.play(resource); this.nekoPlayer.startCurrentStream(); this.events.emit('playing', new PlayerPlayingEvent(this)); + }); - this.discordPlayer.on('stateChange', (oldState, newState) => { - console.log('State change', oldState.status, newState.status); - if (oldState.status === 'playing' && newState.status === 'idle') { - this.nekoPlayer.endCurrentStream(); - } - }); + this.discordPlayer.on('stateChange', (oldState, newState) => { + console.log('State change', oldState.status, newState.status); + if (oldState.status === 'playing' && newState.status === 'idle') { + this.nekoPlayer.endCurrentStream(); + } }); }