changes
This commit is contained in:
@@ -706,8 +706,7 @@ async function handleTicketModal(interaction) {
|
||||
.setTitle("We got your ticket.")
|
||||
.setDescription("We'll be with you as soon as possible.")
|
||||
.setColor(5763719)
|
||||
.setThumbnail("https://indifferentbroccoli.com/img/broccoli_shadow_square.png")
|
||||
.setFooter({ text: "indifferent broccoli tickets (:|)", iconURL: "https://i.ibb.co/sJdytfFM/Untitled-design-6.png" });
|
||||
.setThumbnail("https://indifferentbroccoli.com/img/broccoli_shadow_square.png");
|
||||
|
||||
const infoEmbed = new EmbedBuilder()
|
||||
.setColor(5763719)
|
||||
|
||||
@@ -1156,6 +1156,24 @@ async function handleCommand(interaction) {
|
||||
}
|
||||
}
|
||||
|
||||
// /fix-stale-tickets
|
||||
if (interaction.commandName === 'fix-stale-tickets') {
|
||||
if (interaction.user.id !== CONFIG.ADMIN_ID) {
|
||||
return interaction.reply({ content: 'You do not have permission to run this command.', ephemeral: true });
|
||||
}
|
||||
await interaction.deferReply({ ephemeral: true });
|
||||
try {
|
||||
const result = await Ticket.updateMany(
|
||||
{ status: 'open', lastActivity: null },
|
||||
[{ $set: { lastActivity: '$createdAt' } }]
|
||||
);
|
||||
await interaction.editReply(`Fixed ${result.modifiedCount} ticket(s).`);
|
||||
} catch (err) {
|
||||
console.error('fix-stale-tickets:', err);
|
||||
await interaction.editReply('❌ Failed to backfill tickets.').catch(() => {});
|
||||
}
|
||||
}
|
||||
|
||||
// /stats
|
||||
if (interaction.commandName === 'stats') {
|
||||
trackInteraction('commands', 'stats', interaction.user.tag);
|
||||
|
||||
Reference in New Issue
Block a user