lots of stuff noo need to say it lol

This commit is contained in:
NoLogicAlan committed 2026-05-09 15:32:14 +03:00
1 parent 584ca05e2d
commit 7458df401e
9 files changed
+355 -58

No files matched your search

+20
View File
@@ -799,6 +799,15 @@ export class GatewayHandler {
channels.delete(cleanOld);
channels.add(cleanId);
set.set("stay_247", [...channels]);
// Also migrate the per-channel mode from old → new channel
const modes = set.get("stay_247_modes");
if (modes && typeof modes === "object" && !Array.isArray(modes) && modes[cleanOld]) {
modes[cleanId] = modes[cleanOld];
delete modes[cleanOld];
set.set("stay_247_modes", modes);
}
logger.voice247(`[247] Updated stay_247: ${cleanOld} → ${cleanId}`);
}
}
@@ -843,6 +852,17 @@ export class GatewayHandler {
logger.voice247(`[247] Channel ${cleanOld} mode='${mode}' — not rejoining.`);
channels.delete(cleanOld);
set.set("stay_247", channels.size > 0 ? [...channels] : "none");
// Also clean up the per-channel mode entry
const modes = set.get("stay_247_modes");
if (modes && typeof modes === "object" && !Array.isArray(modes)) {
delete modes[cleanOld];
set.set("stay_247_modes", modes);
}
if (channels.size === 0) set.set("stay_247_mode", "off");
else {
const first = [...channels][0];
set.set("stay_247_mode", modes?.[first] ?? "auto");
}
}
}
}
+2 -1
View File
@@ -396,7 +396,8 @@ export class RecoveryManager {
.setColor(getGlobalColor())
.setDescription(
`Left channel <#${activeChannelId}> because of inactivity.\n` +
`If you want me to stay in voice, use \`${prefix}247 on/auto\``
`If you want me to stay in voice, use \`${prefix}247 on\` or \`${prefix}247 auto\`\n` +
`💡 Use \`${prefix}247\` to view and manage all saved channels.`
)
.toJSON();
if (typeof ch?.send === "function") ch.send({ embeds: [embed] }).catch(() => {});