This commit is contained in:
Isaac 2022-08-08 23:43:22 +01:00
parent 25d70630a7
commit 5ed394f5c2
No known key found for this signature in database
GPG Key ID: F4EAABEB0FFCC06A
3 changed files with 5 additions and 3 deletions

View File

@ -166,7 +166,9 @@ log:
title: Ticket {verb}
verb:
create: created
claim: claimed
close: closed
unclaim: released
menus:
category:
placeholder: Select a ticket category

View File

@ -139,7 +139,7 @@ async function logTicketEvent(client, {
/** @type {import("discord.js").Guild} */
const guild = client.guilds.cache.get(ticket.guild.id);
const member = await guild.members.fetch(userId);
client.log.info.tickets(`${member.user.tag} ${action}d ticket ${target.id}`);
client.log.info.tickets(`${member.user.tag} ${client.i18n.getMessage('en-GB', `log.ticket.verb.${action}`)} ticket ${target.id}`);
if (!ticket.guild.logChannel) return;
const colour = action === 'create'
? 'Aqua' : action === 'close'

View File

@ -383,7 +383,7 @@ module.exports = class TicketManager {
if (message) data.referencesMessage = { connect: { id: referencesMessage } }; // only add if the message has been archived ^^
if (answers) data.questionAnswers = { createMany: { data: answers } };
const ticket = await this.client.prisma.ticket.create({ data });
interaction.editReply({
await interaction.editReply({
components: [],
embeds: [
new ExtendedEmbedBuilder({
@ -395,7 +395,7 @@ module.exports = class TicketManager {
.setDescription(getMessage('ticket.created.description', { channel: channel.toString() })),
],
});
await logTicketEvent(this.client, { // FIXME: remove await
await logTicketEvent(this.client, {
action: 'create',
target: {
id: ticket.id,