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:
@@ -23,7 +23,6 @@ const { sanitizeEmbedText, truncateEmbedDescription, truncateEmbedField, enforce
|
||||
const { setEmailRouting } = require('../services/guildSettings');
|
||||
const { enqueueRename, enqueueSend } = require('../services/channelQueue');
|
||||
const { runEscalation, runDeescalation } = require('./commands');
|
||||
const { trackInteraction, trackError } = require('./analytics');
|
||||
const { pendingCloses } = require('./pendingCloses');
|
||||
const { logError, logSystem } = require('../services/debugLog');
|
||||
|
||||
@@ -90,7 +89,7 @@ async function handleButton(interaction) {
|
||||
ephemeral: true
|
||||
});
|
||||
} catch (err) {
|
||||
trackError('email-routing-button', err, interaction);
|
||||
logError('email-routing-button', err, interaction).catch(() => {});
|
||||
await interaction.reply({
|
||||
content: 'Failed to update email routing.',
|
||||
ephemeral: true
|
||||
@@ -215,7 +214,7 @@ async function handleButton(interaction) {
|
||||
await interaction.deferReply();
|
||||
await runEscalation(interaction, ticket, 1, null);
|
||||
} catch (err) {
|
||||
trackError('escalate-button-tier2', err, interaction);
|
||||
logError('escalate-button-tier2', err, interaction).catch(() => {});
|
||||
await interaction.editReply({ content: 'Failed to escalate to tier 2.' }).catch(() =>
|
||||
interaction.followUp({ content: 'Failed to escalate to tier 2.', ephemeral: true }).catch(() => {})
|
||||
);
|
||||
@@ -238,7 +237,7 @@ async function handleButton(interaction) {
|
||||
await interaction.deferReply();
|
||||
await runEscalation(interaction, ticket, 2, null);
|
||||
} catch (err) {
|
||||
trackError('escalate-button-tier3', err, interaction);
|
||||
logError('escalate-button-tier3', err, interaction).catch(() => {});
|
||||
await interaction.editReply({ content: 'Failed to escalate to tier 3.' }).catch(() =>
|
||||
interaction.followUp({ content: 'Failed to escalate to tier 3.', ephemeral: true }).catch(() => {})
|
||||
);
|
||||
@@ -256,7 +255,7 @@ async function handleButton(interaction) {
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
await runDeescalation(interaction, ticket);
|
||||
} catch (err) {
|
||||
trackError('deescalate-button', err, interaction);
|
||||
logError('deescalate-button', err, interaction).catch(() => {});
|
||||
await interaction.editReply({ content: 'Failed to deescalate this ticket.' }).catch(() =>
|
||||
interaction.followUp({ content: 'Failed to deescalate this ticket.', ephemeral: true }).catch(() => {})
|
||||
);
|
||||
@@ -266,7 +265,6 @@ async function handleButton(interaction) {
|
||||
|
||||
// --- TAG DELETE CONFIRM ---
|
||||
if (interaction.customId.startsWith('confirm_delete_tag::')) {
|
||||
trackInteraction('buttons', 'confirm-delete-tag', interaction.user.tag);
|
||||
const tagName = interaction.customId.slice('confirm_delete_tag::'.length);
|
||||
|
||||
try {
|
||||
@@ -284,7 +282,7 @@ async function handleButton(interaction) {
|
||||
});
|
||||
}
|
||||
} catch (err) {
|
||||
trackError('tag-delete-confirm', err, interaction);
|
||||
logError('tag-delete-confirm', err, interaction).catch(() => {});
|
||||
await interaction.update({
|
||||
content: '❌ Failed to delete tag.',
|
||||
components: []
|
||||
|
||||
Reference in New Issue
Block a user