MCPcopy Create free account
hub / github.com/Xchristech2/Zenitsu-Bot / incrementMessageCount

Function incrementMessageCount

commands/topmembers.js:18–32  ·  view source on GitHub ↗
(groupId, userId)

Source from the content-addressed store, hash-verified

16}
17
18function incrementMessageCount(groupId, userId) {
19 const messageCounts = loadMessageCounts();
20
21 if (!messageCounts[groupId]) {
22 messageCounts[groupId] = {};
23 }
24
25 if (!messageCounts[groupId][userId]) {
26 messageCounts[groupId][userId] = 0;
27 }
28
29 messageCounts[groupId][userId] += 1;
30
31 saveMessageCounts(messageCounts);
32}
33
34function topMembers(sock, chatId, isGroup) {
35 if (!isGroup) {

Callers

nothing calls this directly

Calls 2

loadMessageCountsFunction · 0.85
saveMessageCountsFunction · 0.85

Tested by

no test coverage detected