mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fix
This commit is contained in:
parent
25d70630a7
commit
5ed394f5c2
@ -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
|
||||||
|
@ -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'
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user