strip: remove /backup /export /search /stats /fix-stale-tickets + analytics module
- delete handlers/analytics.js
- remove trackInteraction calls; replace trackError with logError().catch(() => {})
- remove 5 slash commands from register.js
- remove BACKUP_EXPORT_CHANNEL_ID from config + schema + .env.example
This commit is contained in:
@@ -277,71 +277,6 @@ async function registerCommands() {
|
||||
)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('backup')
|
||||
.setDescription('Export full ticket list to a .txt file in the backup/export channel')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('export')
|
||||
.setDescription('Export tickets (optional filter and limit) to a .txt file in the backup/export channel')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator)
|
||||
.addStringOption(opt =>
|
||||
opt
|
||||
.setName('status')
|
||||
.setDescription('Filter by status')
|
||||
.setRequired(false)
|
||||
.addChoices(
|
||||
{ name: 'Open', value: 'open' },
|
||||
{ name: 'Closed', value: 'closed' }
|
||||
)
|
||||
)
|
||||
.addIntegerOption(opt =>
|
||||
opt
|
||||
.setName('limit')
|
||||
.setDescription('Max number of tickets to export (default 500)')
|
||||
.setMinValue(1)
|
||||
.setMaxValue(5000)
|
||||
.setRequired(false)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('search')
|
||||
.setDescription('Search for tickets')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages)
|
||||
.addStringOption(opt =>
|
||||
opt
|
||||
.setName('query')
|
||||
.setDescription('Search query (email, subject, or ticket number)')
|
||||
.setMinLength(2)
|
||||
.setMaxLength(100)
|
||||
.setRequired(true)
|
||||
)
|
||||
.addStringOption(opt =>
|
||||
opt
|
||||
.setName('status')
|
||||
.setDescription('Filter by status')
|
||||
.setRequired(false)
|
||||
.addChoices(
|
||||
{ name: 'Open', value: 'open' },
|
||||
{ name: 'Closed', value: 'closed' },
|
||||
{ name: 'All', value: 'all' }
|
||||
)
|
||||
),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('stats')
|
||||
.setDescription('View bot statistics and analytics')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('closetimer')
|
||||
.setDescription('Set the force-close countdown duration')
|
||||
@@ -456,13 +391,6 @@ async function registerCommands() {
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.ManageMessages),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('fix-stale-tickets')
|
||||
.setDescription('Admin only: backfill lastActivity on open tickets where it is null (sets to createdAt).')
|
||||
.setContexts([InteractionContextType.Guild])
|
||||
.setIntegrationTypes([ApplicationIntegrationType.GuildInstall])
|
||||
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
|
||||
|
||||
new SlashCommandBuilder()
|
||||
.setName('signature')
|
||||
.setDescription('Set your personal email signature (valediction, display name, tagline)')
|
||||
|
||||
Reference in New Issue
Block a user