This commit is contained in:
NoLogicAlan committed 2026-05-24 17:31:20 +03:00
1 parent 27d7cc7c94
commit f86f0c5f8b
4 files changed
+32 -9

No files matched your search

+3 -5
View File
@@ -1395,13 +1395,11 @@ export class GatewayHandler {
try {
const set = remix.settingsMgr.getServer(guildId);
if (set) {
remove247ChannelMode(set, channelId);
const raw = set.get("stay_247");
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
const channels = new Set(
arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
);
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
remove247ChannelMode(set, channelId, channels);
const filtered = arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId);
set.set("stay_247", filtered.length > 0 ? filtered : "none");
}
} catch (cleanupErr) {
logger.warn(`[BootRecovery] Failed to auto-remove missing channel ${channelId} from 24/7:`, cleanupErr?.message);