From 6c49544e7a1aad50353a93327e6f046032f8958a Mon Sep 17 00:00:00 2001 From: Isaac Date: Wed, 5 Oct 2022 18:15:53 +0100 Subject: [PATCH] count user messages --- src/listeners/client/messageCreate.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/listeners/client/messageCreate.js b/src/listeners/client/messageCreate.js index 3b393a8..bc45d18 100644 --- a/src/listeners/client/messageCreate.js +++ b/src/listeners/client/messageCreate.js @@ -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 &&