mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-17 17:23:08 +02:00
fix referencing messages
This commit is contained in:
parent
f7b5031aab
commit
4469aa4920
@ -492,6 +492,7 @@ module.exports = class TicketManager {
|
|||||||
} catch {
|
} catch {
|
||||||
this.client.log.verbose('Failed to fetch member %s of %s', message.author.id, message.guild.id);
|
this.client.log.verbose('Failed to fetch member %s of %s', message.author.id, message.guild.id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
await channel.send({
|
await channel.send({
|
||||||
embeds: [
|
embeds: [
|
||||||
new ExtendedEmbedBuilder()
|
new ExtendedEmbedBuilder()
|
||||||
@ -515,7 +516,7 @@ module.exports = class TicketManager {
|
|||||||
.setDescription(message.content.substring(0, 1000) + (message.content.length > 1000 ? '...' : '')),
|
.setDescription(message.content.substring(0, 1000) + (message.content.length > 1000 ? '...' : '')),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -595,7 +596,8 @@ module.exports = class TicketManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (category.guild.archive && message) {
|
if (category.guild.archive && message) {
|
||||||
const row = await this.archiver.saveMessage(ticket.id, message, true);
|
let row = await this.client.prisma.archivedMessage.findUnique({ where: { id: message.id } });
|
||||||
|
if (!row) row = await this.archiver.saveMessage(ticket.id, message, true);
|
||||||
if (row) {
|
if (row) {
|
||||||
await this.client.prisma.ticket.update({
|
await this.client.prisma.ticket.update({
|
||||||
data: { referencesMessageId: row.id },
|
data: { referencesMessageId: row.id },
|
||||||
|
Loading…
Reference in New Issue
Block a user