mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
hotfix
This commit is contained in:
1 parent
e84851d29a
commit
1adf9b97fa
1 file changed
+6
-4
@@ -1395,11 +1395,13 @@ export class GatewayHandler {
|
|||||||
try {
|
try {
|
||||||
const set = remix.settingsMgr.getServer(guildId);
|
const set = remix.settingsMgr.getServer(guildId);
|
||||||
if (set) {
|
if (set) {
|
||||||
remove247ChannelMode(set, channelId);
|
|
||||||
const raw = set.get("stay_247");
|
const raw = set.get("stay_247");
|
||||||
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
|
const channels = new Set(
|
||||||
const filtered = arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId);
|
(Array.isArray(raw) ? raw : raw ? [raw] : [])
|
||||||
set.set("stay_247", filtered.length > 0 ? filtered : "none");
|
.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
|
||||||
|
);
|
||||||
|
remove247ChannelMode(set, channelId, channels);
|
||||||
|
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
|
||||||
}
|
}
|
||||||
} catch (cleanupErr) {
|
} catch (cleanupErr) {
|
||||||
logger.warn(`[BootRecovery] Failed to auto-remove missing channel ${channelId} from 24/7:`, cleanupErr?.message);
|
logger.warn(`[BootRecovery] Failed to auto-remove missing channel ${channelId} from 24/7:`, cleanupErr?.message);
|
||||||
|
|||||||
Reference in new issue
Block a user