feat(player): add %previous, %replay, livekit skip guard, and nodelink auto-reconnect (#11, #13, #18, #19, #23)

This commit is contained in:
NoLogicAlan committed 2026-10-27 02:58:26 +03:00
1 parent 53d0990ebe
commit e33fbb2fdb
14 files changed
+348 -31

No files matched your search

+4 -4
View File
@@ -827,9 +827,9 @@ class Player extends EventEmitter {
async resumePlaybackAfterNodeReconnect() {
if (this._destroyed || this.leaving || !this._voiceConn) return false;
const current = this.queue?.getCurrent();
if (!current || !this._audioBridge?.playing) return false;
if (!current || this._paused) return false;
const posMs = this.computePosition();
const posMs = Math.max(0, this.computePosition());
logger.player(`[Player:${this._guildId}] Node reconnected — resuming "${current.title}" at ${Math.round(posMs / 1000)}s`);
try {
@@ -1061,8 +1061,8 @@ class Player extends EventEmitter {
/** @private Stop the audio bridge if currently playing. */
_bridgeStop() {
if (this._audioBridge?.playing) {
this._audioBridge.stop();
if (this._audioBridge) {
try { this._audioBridge.stop(); } catch (_) {}
}
}