feat: feedback, start of close requests

This commit is contained in:
Isaac
2023-01-13 20:48:37 +00:00
parent d7e1b05586
commit 8bf01aa520
16 changed files with 293 additions and 59 deletions

View File

@@ -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);
}
};

View File

@@ -228,7 +228,5 @@ module.exports = class ForceCloseSlashCommand extends SlashCommand {
});
}
}
// TODO: close (reason)
}
};

View File

@@ -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]--;

View File

@@ -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: {