This commit is contained in:
NoLogicAlan committed 2026-05-18 01:47:19 +03:00
1 parent e74edfd95d
commit 092dbc15a1
2 files changed
+16 -13

No files matched your search

+7 -4
View File
@@ -970,10 +970,13 @@ export class PlayerManager {
player.on("message", (m) => {
let ch = player.textChannel;
const guildId = cleanId(player._guildId ?? ch?.guildId ?? ch?.guild?.id ?? getMessageGuildId({ channel: ch }));
const raw = this.settings.getServer(guildId)?.get("songAnnouncements");
const disabled = raw === false || raw === 0 ||
["false","0","no","off","disable"].includes(String(raw).toLowerCase().trim());
if (disabled) return;
if (!m?.system) {
const raw = this.settings.getServer(guildId)?.get("songAnnouncements");
const disabled = raw === false || raw === 0 ||
["false","0","no","off","disable"].includes(String(raw).toLowerCase().trim());
if (disabled) return;
}
// If textChannel is not set (e.g. after reboot recovery via _spawnPlayer),
// resolve it from the saved announcementChannelId or guild channels