staff notifications
This commit is contained in:
26
config.js
26
config.js
@@ -119,21 +119,7 @@ const CONFIG = {
|
||||
EMBED_COLOR_CLAIMED: parseInt(process.env.EMBED_COLOR_CLAIMED) || 0xFFFF00,
|
||||
EMBED_COLOR_ESCALATED: parseInt(process.env.EMBED_COLOR_ESCALATED) || 0xFF6600,
|
||||
EMBED_COLOR_INFO: parseInt(process.env.EMBED_COLOR_INFO) || 0x1e2124,
|
||||
STAFF_CATEGORIES: (() => {
|
||||
const raw = process.env.STAFF_CATEGORIES;
|
||||
const map = new Map();
|
||||
if (!raw || !String(raw).trim()) return map;
|
||||
for (const part of String(raw).split(',')) {
|
||||
const seg = part.trim();
|
||||
if (!seg) continue;
|
||||
const idx = seg.indexOf(':');
|
||||
if (idx === -1) continue;
|
||||
const userId = seg.slice(0, idx).trim();
|
||||
const categoryId = seg.slice(idx + 1).trim();
|
||||
if (userId && categoryId) map.set(userId, categoryId);
|
||||
}
|
||||
return map;
|
||||
})(),
|
||||
STAFF_CATEGORIES: new Map(), // deprecated – kept for staffChannel.js compat
|
||||
STAFF_EMOJIS: (() => {
|
||||
const raw = process.env.STAFF_EMOJIS;
|
||||
const map = new Map();
|
||||
@@ -150,10 +136,12 @@ const CONFIG = {
|
||||
return map;
|
||||
})(),
|
||||
CLAIMER_EMOJI_FALLBACK: process.env.CLAIMER_EMOJI_FALLBACK || '🎫',
|
||||
STAFF_T1_CATEGORY: process.env.STAFF_T1_CATEGORY || null,
|
||||
STAFF_T2_CATEGORY: process.env.STAFF_T2_CATEGORY || null,
|
||||
STAFF_T3_CATEGORY: process.env.STAFF_T3_CATEGORY || null,
|
||||
UNCLAIMED_CATEGORY_ID: process.env.UNCLAIMED_CATEGORY_ID || null
|
||||
ADMIN_ID: process.env.ADMIN_ID || null,
|
||||
STAFF_NOTIFICATION_CATEGORY_ID: process.env.STAFF_NOTIFICATION_CATEGORY_ID || null,
|
||||
UNCLAIMED_REMINDER_THRESHOLDS: (process.env.UNCLAIMED_REMINDER_THRESHOLDS || '1,2,4')
|
||||
.split(',')
|
||||
.map(s => parseInt(s.trim(), 10))
|
||||
.filter(n => !isNaN(n) && n > 0)
|
||||
};
|
||||
|
||||
/** Ticket category tags for /tag set – [emoji] [label] in dropdown; priority emoji always first in channel name, then tag emoji. */
|
||||
|
||||
Reference in New Issue
Block a user