strip: remove pattern/surge/chat alert monitoring + unused commands
- delete services/{patternChecker,patternStore,surgeChecker,chatAlertChecker,staffNotifications,staffChannel,notificationRegistry,notificationEnabled,staffPresence}.js
- remove /notification, /staffnotification, /tag, /priority
- /escalate: drop action param, always unclaim
- purge PATTERN_*, SURGE_*, CHAT_ALERT_*, STAFF_* env vars from config + .env.example
- drop StaffNotification model
- ~2500 LOC removed
- settings-site /internal/notifications/* endpoints gone (UI will 404 until trimmed)
This commit is contained in:
@@ -12,7 +12,7 @@ const {
|
||||
ContextMenuCommandBuilder,
|
||||
ApplicationCommandType
|
||||
} = require('discord.js');
|
||||
const { CONFIG, TICKET_TAGS } = require('../config');
|
||||
const { CONFIG } = require('../config');
|
||||
|
||||
async function registerCommands() {
|
||||
if (!CONFIG.CLIENT_ID || !CONFIG.DISCORD_GUILD_ID) return;
|
||||
@@ -22,7 +22,7 @@ async function registerCommands() {
|
||||
const commands = [
|
||||
new SlashCommandBuilder()
|
||||
.setName('escalate')
|
||||
.setDescription('Escalate this ticket to tier 2 or tier 3')
|
||||
.setDescription('Escalate this ticket to tier 2 or tier 3 (always unclaims)')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
|
||||
@@ -35,16 +35,6 @@ async function registerCommands() {
|
||||
{ name: 'Tier 2', value: '2' },
|
||||
{ name: 'Tier 3', value: '3' }
|
||||
)
|
||||
)
|
||||
.addStringOption(opt =>
|
||||
opt
|
||||
.setName('action')
|
||||
.setDescription('Unclaim ticket or keep current claimer')
|
||||
.setRequired(true)
|
||||
.addChoices(
|
||||
{ name: 'Unclaim', value: 'unclaim' },
|
||||
{ name: 'Keep', value: 'keep' }
|
||||
)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
@@ -128,19 +118,6 @@ async function registerCommands() {
|
||||
.setRequired(true)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('tag')
|
||||
.setDescription('Set ticket category (dropdown)')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
|
||||
.addStringOption(o =>
|
||||
o
|
||||
.setName('category')
|
||||
.setDescription('Ticket category tag')
|
||||
.setRequired(true)
|
||||
.addChoices(...(TICKET_TAGS || []).map(({ value, emoji, name }) => ({ name: `${emoji} ${name}`, value })))
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('response')
|
||||
.setDescription('Saved response tags (custom templates)')
|
||||
@@ -332,25 +309,6 @@ async function registerCommands() {
|
||||
.setRequired(false)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('priority')
|
||||
.setDescription('Set the priority of this ticket')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
|
||||
.addStringOption(opt =>
|
||||
opt
|
||||
.setName('level')
|
||||
.setDescription('Priority level')
|
||||
.setRequired(true)
|
||||
.addChoices(
|
||||
{ name: '🟢 Low', value: 'low' },
|
||||
{ name: '🟡 Normal', value: 'normal' },
|
||||
{ name: '🟠 Medium', value: 'medium' },
|
||||
{ name: '🔴 High', value: 'high' }
|
||||
)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('search')
|
||||
.setDescription('Search for tickets')
|
||||
@@ -384,52 +342,6 @@ async function registerCommands() {
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('notification')
|
||||
.setDescription('Manage your staff notification settings')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
|
||||
.addSubcommand(sub =>
|
||||
sub
|
||||
.setName('set')
|
||||
.setDescription('Set your notification cooldown (hours between alerts per ticket)')
|
||||
.addIntegerOption(opt =>
|
||||
opt
|
||||
.setName('hours')
|
||||
.setDescription('Cooldown in hours (1–6)')
|
||||
.setMinValue(1)
|
||||
.setMaxValue(6)
|
||||
.setRequired(true)
|
||||
)
|
||||
)
|
||||
.addSubcommand(sub =>
|
||||
sub
|
||||
.setName('add')
|
||||
.setDescription('Create a notification channel for a staff member')
|
||||
.addUserOption(opt =>
|
||||
opt.setName('member').setDescription('Staff member').setRequired(true)
|
||||
)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('staffnotification')
|
||||
.setDescription('Override notification cooldown for another staff member (admin only)')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.addUserOption(opt =>
|
||||
opt.setName('member').setDescription('Staff member').setRequired(true)
|
||||
)
|
||||
.addIntegerOption(opt =>
|
||||
opt
|
||||
.setName('hours')
|
||||
.setDescription('Cooldown in hours (1–6)')
|
||||
.setMinValue(1)
|
||||
.setMaxValue(6)
|
||||
.setRequired(true)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('closetimer')
|
||||
.setDescription('Set the force-close countdown duration')
|
||||
|
||||
Reference in New Issue
Block a user