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); const set = remix.settingsMgr.getServer(guildId);
if (set) { if (set) {
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 channels = new Set(
(Array.isArray(raw) ? raw : raw ? [raw] : []) arr.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
.filter(id => id && id !== "none" && String(id).replace(/\D/g, "") !== channelId)
); );
remove247ChannelMode(set, channelId, channels);
set.set("stay_247", channels.size > 0 ? [...channels] : "none"); set.set("stay_247", channels.size > 0 ? [...channels] : "none");
remove247ChannelMode(set, channelId, channels);
} }
} 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);
+2 -1
View File
@@ -160,8 +160,9 @@ export class Locale {
if (typeof value !== "string") return key; if (typeof value !== "string") return key;
for (const [placeholder, val] of Object.entries(replacements)) { for (const [placeholder, val] of Object.entries(replacements)) {
const escaped = placeholder.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
value = value.replace( value = value.replace(
new RegExp(`\\{\\{${placeholder}\\}\\}`, "g"), new RegExp(`\\{\\{${escaped}\\}\\}`, "g"),
String(val ?? "") String(val ?? "")
); );
} }
+5
View File
@@ -5,6 +5,11 @@
}, },
"subcommand": { "subcommand": {
"invalid": "أمر فرعي غير صالح. جرّب أحد الخيارات التالية: `$previousCmd <$cmdlist>`" "invalid": "أمر فرعي غير صالح. جرّب أحد الخيارات التالية: `$previousCmd <$cmdlist>`"
},
"option": {
"invalidChoice": "قيمة غير صالحة '{{$currValue}}'. يجب أن يكون الخيار `{{$optionName}}` أحد الخيارات التالية:\n{{$choices}}\nالشكل: `$previousCmd <{{$type}}>`",
"invalidChannel": "قيمة غير صالحة '{{$currValue}}'. يجب أن يكون الخيار `{{$optionName}}` إشارة قناة أو معرف أو اسم.\nالشكل: `$previousCmd <{{$type}}>`",
"invalidType": "قيمة غير صالحة '{{$currValue}}'. يجب أن يكون الخيار `{{$optionName}}` من النوع `{{$type}}`.\nالشكل: `$previousCmd <{{$type}}>`"
} }
}, },
"cmdHandler": { "cmdHandler": {
+5
View File
@@ -5,6 +5,11 @@
}, },
"subcommand": { "subcommand": {
"invalid": "فەرمانی لاوەکی نادروست. یەکێک لەم هەڵبژاردانەی خوارەوە تاقی بکەرەوە: `$previousCmd <$cmdlist>`" "invalid": "فەرمانی لاوەکی نادروست. یەکێک لەم هەڵبژاردانەی خوارەوە تاقی بکەرەوە: `$previousCmd <$cmdlist>`"
},
"option": {
"invalidChoice": "بەهای نادروست '{{$currValue}}'. هەڵبژاردەی `{{$optionName}}` دەبێت یەکێک بێت لەمانەی خوارەوە:\n{{$choices}}\nشێواز: `$previousCmd <{{$type}}>`",
"invalidChannel": "بەهای نادروست '{{$currValue}}'. هەڵبژاردەی `{{$optionName}}` دەبێت باسی کەناڵ، ID، یان ناو بێت.\nشێواز: `$previousCmd <{{$type}}>`",
"invalidType": "بەهای نادروست '{{$currValue}}'. هەڵبژاردەی `{{$optionName}}` دەبێت جۆری `{{$type}}` بێت.\nشێواز: `$previousCmd <{{$type}}>`"
} }
}, },
"cmdHandler": { "cmdHandler": {
+5
View File
@@ -5,6 +5,11 @@
}, },
"subcommand": { "subcommand": {
"invalid": "Ungültiger Unterbefehl. Versuche eine der folgenden Optionen: `$previousCmd <$cmdlist>`" "invalid": "Ungültiger Unterbefehl. Versuche eine der folgenden Optionen: `$previousCmd <$cmdlist>`"
},
"option": {
"invalidChoice": "Ungültiger Wert '{{$currValue}}'. Die Option `{{$optionName}}` muss eine der folgenden sein:\n{{$choices}}\nSchema: `$previousCmd <{{$type}}>`",
"invalidChannel": "Ungültiger Wert '{{$currValue}}'. Die Option `{{$optionName}}` muss eine Kanalerwähnung, ID oder Name sein.\nSchema: `$previousCmd <{{$type}}>`",
"invalidType": "Ungültiger Wert '{{$currValue}}'. Die Option `{{$optionName}}` muss vom Typ `{{$type}}` sein.\nSchema: `$previousCmd <{{$type}}>`"
} }
}, },
"cmdHandler": { "cmdHandler": {
+5
View File
@@ -5,6 +5,11 @@
}, },
"subcommand": { "subcommand": {
"invalid": "Subcomando inválido. Tente uma das seguintes opções: `$previousCmd <$cmdlist>`" "invalid": "Subcomando inválido. Tente uma das seguintes opções: `$previousCmd <$cmdlist>`"
},
"option": {
"invalidChoice": "Valor inválido '{{$currValue}}'. A opção `{{$optionName}}` deve ser uma das seguintes:\n{{$choices}}\nEsquema: `$previousCmd <{{$type}}>`",
"invalidChannel": "Valor inválido '{{$currValue}}'. A opção `{{$optionName}}` deve ser uma menção de canal, ID ou nome.\nEsquema: `$previousCmd <{{$type}}>`",
"invalidType": "Valor inválido '{{$currValue}}'. A opção `{{$optionName}}` deve ser do tipo `{{$type}}`.\nEsquema: `$previousCmd <{{$type}}>`"
} }
}, },
"cmdHandler": { "cmdHandler": {