mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2025-09-06 02:01:26 +03:00
feat: feedback, start of close requests
This commit is contained in:
@@ -30,6 +30,8 @@ module.exports = class CloseSlashCommand extends SlashCommand {
|
||||
* @param {import("discord.js").ChatInputCommandInteraction} interaction
|
||||
*/
|
||||
async run(interaction) {
|
||||
|
||||
/** @type {import("client")} */
|
||||
const client = this.client;
|
||||
await client.tickets.beforeRequestClose(interaction);
|
||||
}
|
||||
};
|
@@ -228,7 +228,5 @@ module.exports = class ForceCloseSlashCommand extends SlashCommand {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: close (reason)
|
||||
}
|
||||
};
|
@@ -85,8 +85,8 @@ module.exports = class MoveSlashCommand extends SlashCommand {
|
||||
where: { id: ticket.id },
|
||||
});
|
||||
|
||||
const $oldCategory = client.tickets.$.categories[ticket.categoryId];
|
||||
const $newCategory = client.tickets.$.categories[newCategory.id];
|
||||
const $oldCategory = client.tickets.$count.categories[ticket.categoryId];
|
||||
const $newCategory = client.tickets.$count.categories[newCategory.id];
|
||||
|
||||
$oldCategory.total--;
|
||||
$oldCategory[ticket.createdById]--;
|
||||
|
@@ -44,7 +44,7 @@ module.exports = class TransferSlashCommand extends SlashCommand {
|
||||
|
||||
let ticket = await client.prisma.ticket.findUnique({ where: { id: interaction.channel.id } });
|
||||
const from = ticket.createdById;
|
||||
console.log(1)
|
||||
|
||||
ticket = await client.prisma.ticket.update({
|
||||
data: {
|
||||
createdBy: {
|
||||
|
Reference in New Issue
Block a user