phase 9 notification toggles (per-alert, per-category, master; default-disabled)

This commit is contained in:
2026-04-18 23:51:59 +00:00
parent 39a5482516
commit 8a45b59b28
12 changed files with 520 additions and 33 deletions

View File

@@ -13,6 +13,7 @@ const { CONFIG, parseThresholdString } = require('../config');
const { increment } = require('./patternStore');
const { enqueueSend } = require('./channelQueue');
const { assertKeysRegistered } = require('./notificationRegistry');
const { isEnabled } = require('./notificationEnabled');
// Alert key this module drives. Registered to fail fast on drift.
const UNCLAIMED_ALERT_KEYS = ['unclaimed_reminder'];
@@ -60,6 +61,7 @@ async function notifyStaffOfReply(guild, ticket, message) {
* threshold) into every staff notification channel.
*/
async function notifyAllStaffUnclaimed(client) {
if (!isEnabled('unclaimed_reminder')) return;
const rawThresholds = (CONFIG.NOTIFICATION_THRESHOLDS && CONFIG.NOTIFICATION_THRESHOLDS.unclaimed_reminder) || [];
const thresholds = rawThresholds
.map(parseThresholdString)