This commit is contained in:
NoLogicAlan committed 2026-05-24 16:18:29 +03:00
1 parent 1adf9b97fa
commit 52d3fbc9e0
6 files changed
+25 -4

No files matched your search

+3 -3
View File
@@ -1396,12 +1396,12 @@ export class GatewayHandler {
const set = remix.settingsMgr.getServer(guildId);
if (set) {
const raw = set.get("stay_247");
const arr = Array.isArray(raw) ? raw : raw ? [raw] : [];
const channels = new Set(
(Array.isArray(raw) ? raw : raw ? [raw] : [])
.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
);
remove247ChannelMode(set, channelId, channels);
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
remove247ChannelMode(set, channelId, channels);
}
} catch (cleanupErr) {
logger.warn(`[BootRecovery] Failed to auto-remove missing channel ${channelId} from 24/7:`, cleanupErr?.message);
+2 -1
View File
@@ -160,8 +160,9 @@ export class Locale {
if (typeof value !== "string") return key;
for (const [placeholder, val] of Object.entries(replacements)) {
const escaped = placeholder.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
value = value.replace(
new RegExp(`\\{\\{${placeholder}\\}\\}`, "g"),
new RegExp(`\\{\\{${escaped}\\}\\}`, "g"),
String(val ?? "")
);
}