minor improvements

This commit is contained in:
Isaac
2023-01-30 17:10:02 +00:00
parent 5579362f26
commit bb3179f28f
4 changed files with 13 additions and 10 deletions

View File

@@ -131,10 +131,7 @@ async function logAdminEvent(client, {
async function logTicketEvent(client, {
userId, action, target, diff,
}) {
const ticket = await client.prisma.ticket.findUnique({
include: { guild: true },
where: { id: target.id },
});
const ticket = await client.tickets.getTicket(target.id);
if (!ticket) return;
/** @type {import("discord.js").Guild} */
const guild = client.guilds.cache.get(ticket.guild.id);