mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
lots of changes
This commit is contained in:
1 parent
ba225c914a
commit
6fa8f3b540
20 files changed
+296
-144
No files matched your search
@@ -810,9 +810,16 @@ export class PlayerManager {
|
||||
const pendingScrobble = this._pendingScrobbleTimers.get(activeChannelId);
|
||||
if (pendingScrobble) { clearTimeout(pendingScrobble.timer); this._pendingScrobbleTimers.delete(activeChannelId); }
|
||||
if (activeChannelId !== cleanChannelId) this.playerMap.delete(cleanChannelId);
|
||||
await msg.reply(mkEmbed(this._t(msg, "responses._common.successfullyLeft")));
|
||||
await player.leave();
|
||||
// Leave the voice channel BEFORE confirming to the user.
|
||||
// Previously, the reply was sent first, which meant the user saw "successfully left"
|
||||
// even if player.leave() subsequently threw an error.
|
||||
try {
|
||||
await player.leave();
|
||||
} catch (e) {
|
||||
logger.warn("[PlayerManager] leave() error (non-fatal):", e.message);
|
||||
}
|
||||
player.destroy();
|
||||
await msg.reply(mkEmbed(this._t(msg, "responses._common.successfullyLeft")));
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in new issue
Block a user