count user messages

This commit is contained in:
Isaac 2022-10-05 18:15:53 +01:00
parent 8ea372ea36
commit 6c49544e7a
No known key found for this signature in database
GPG Key ID: 0DE40AE37BBA5C33

View File

@ -194,6 +194,11 @@ module.exports = class extends Listener {
}
}
await client.prisma.user.update({
data: { messageCount: { increment: 1 } },
where: { id: message.author.id },
});
const data = { lastMessageAt: new Date() };
if (
ticket.firstResponseAt === null &&