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} title: Ticket {verb}
verb: verb:
create: created create: created
claim: claimed
close: closed close: closed
unclaim: released
menus: menus:
category: category:
placeholder: Select a ticket category placeholder: Select a ticket category

View File

@ -139,7 +139,7 @@ async function logTicketEvent(client, {
/** @type {import("discord.js").Guild} */ /** @type {import("discord.js").Guild} */
const guild = client.guilds.cache.get(ticket.guild.id); const guild = client.guilds.cache.get(ticket.guild.id);
const member = await guild.members.fetch(userId); 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; if (!ticket.guild.logChannel) return;
const colour = action === 'create' const colour = action === 'create'
? 'Aqua' : action === 'close' ? '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 (message) data.referencesMessage = { connect: { id: referencesMessage } }; // only add if the message has been archived ^^
if (answers) data.questionAnswers = { createMany: { data: answers } }; if (answers) data.questionAnswers = { createMany: { data: answers } };
const ticket = await this.client.prisma.ticket.create({ data }); const ticket = await this.client.prisma.ticket.create({ data });
interaction.editReply({ await interaction.editReply({
components: [], components: [],
embeds: [ embeds: [
new ExtendedEmbedBuilder({ new ExtendedEmbedBuilder({
@ -395,7 +395,7 @@ module.exports = class TicketManager {
.setDescription(getMessage('ticket.created.description', { channel: channel.toString() })), .setDescription(getMessage('ticket.created.description', { channel: channel.toString() })),
], ],
}); });
await logTicketEvent(this.client, { // FIXME: remove await await logTicketEvent(this.client, {
action: 'create', action: 'create',
target: { target: {
id: ticket.id, id: ticket.id,