mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix
This commit is contained in:
parent
25d70630a7
commit
5ed394f5c2
@ -166,7 +166,9 @@ log:
|
||||
title: Ticket {verb}
|
||||
verb:
|
||||
create: created
|
||||
claim: claimed
|
||||
close: closed
|
||||
unclaim: released
|
||||
menus:
|
||||
category:
|
||||
placeholder: Select a ticket category
|
||||
|
@ -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'
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user