Fix additional conflicts manually.

This commit is contained in:
2026-10-20 16:30:59 +00:00
parent c3a831f198
commit 27481e6e04
2 changed files with 15 additions and 15 deletions
+5 -6
View File
@@ -1,5 +1,6 @@
import { ButtonInteraction, Client, MessageFlags, ChannelType } from 'discord.js';
import { Button } from '../types';
import { closeTicket } from '../utils';
class CloseModTicketButton implements Button<Client> {
id = 'close-mod-ticket';
@@ -22,14 +23,12 @@ class CloseModTicketButton implements Button<Client> {
components: []
});
await channel.send('This ticket has been closed by staff.');
if (!await closeTicket(context, channel, 'This ticket has been closed by staff.')) {
await interaction.editReply({ content: 'An error occurred while trying to close this ticket.' });
return;
}
await interaction.editReply({ content: 'Ticket closed.' });
await channel.edit({
archived: true,
locked: true
});
} catch (error: Error | any) {
await interaction.editReply({ content: error.message }).catch(() => {});
}