hotfix spam end

This commit is contained in:
NoLogicAlan committed 2026-05-18 00:35:59 +03:00
1 parent 3a8c85becf
commit 288676937e
1 file changed
+4 -1
+4 -1
View File
@@ -353,6 +353,7 @@ export default class Player extends EventEmitter {
_currentPassthrough = null; _currentPassthrough = null;
_wasRadio = false; _wasRadio = false;
_radioAnnounced = false; _radioAnnounced = false;
_queueEndedSent = false;
// Active audio filter — { key, label, payload } or null // Active audio filter — { key, label, payload } or null
activeFilter = null; activeFilter = null;
@@ -2104,7 +2105,8 @@ export default class Player extends EventEmitter {
logger.voice247("[Player] 24/7 enabled, staying in channel"); logger.voice247("[Player] 24/7 enabled, staying in channel");
} }
if (!this._wasRadio) { if (!this._wasRadio && !this._queueEndedSent) {
this._queueEndedSent = true;
const prefix = (() => { const prefix = (() => {
try { try {
return this.settingsMgr?.getServer?.(this._guildId)?.get?.("prefix") return this.settingsMgr?.getServer?.(this._guildId)?.get?.("prefix")
@@ -2222,6 +2224,7 @@ export default class Player extends EventEmitter {
this.startedPlaying = Date.now(); this.startedPlaying = Date.now();
this._paused = false; this._paused = false;
this._pausedAt = null; this._pausedAt = null;
this._queueEndedSent = false;
if (songData.type !== "radio" || !this._radioAnnounced) { if (songData.type !== "radio" || !this._radioAnnounced) {
this.announceSong(songData); this.announceSong(songData);