mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-12-23 00:03:09 +02:00
fixes
This commit is contained in:
parent
fad1abf579
commit
b4238e26a1
@ -194,25 +194,31 @@ module.exports = class extends Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await client.prisma.user.update({
|
if (!message.author.bot) {
|
||||||
data: { messageCount: { increment: 1 } },
|
await client.prisma.user.upsert({
|
||||||
where: { id: message.author.id },
|
create: {
|
||||||
});
|
id: message.author.id,
|
||||||
|
messageCount: 1,
|
||||||
|
},
|
||||||
|
update: { messageCount: { increment: 1 } },
|
||||||
|
where: { id: message.author.id },
|
||||||
|
});
|
||||||
|
|
||||||
const data = { lastMessageAt: new Date() };
|
const data = { lastMessageAt: new Date() };
|
||||||
if (
|
if (
|
||||||
ticket.firstResponseAt === null &&
|
ticket.firstResponseAt === null &&
|
||||||
await isStaff(message.guild, message.author.id)
|
await isStaff(message.guild, message.author.id)
|
||||||
) data.firstResponseAt = new Date();
|
) data.firstResponseAt = new Date();
|
||||||
ticket = await client.prisma.ticket.update({
|
ticket = await client.prisma.ticket.update({
|
||||||
data,
|
data,
|
||||||
where: { id: ticket.id },
|
where: { id: ticket.id },
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: staff status alert, working hours alerts
|
// TODO: if (!message.author.bot) staff status alert, working hours alerts
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: auto tag
|
// TODO: if (!message.author.bot) auto tag
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user