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

Function warningsCommand

commands/warnings.js:14–26  ·  view source on GitHub ↗
(sock, chatId, mentionedJidList)

Source from the content-addressed store, hash-verified

12}
13
14async function warningsCommand(sock, chatId, mentionedJidList) {
15 const warnings = loadWarnings();
16
17 if (mentionedJidList.length === 0) {
18 await sock.sendMessage(chatId, { text: 'Please mention a user to check warnings.' });
19 return;
20 }
21
22 const userToCheck = mentionedJidList[0];
23 const warningCount = warnings[userToCheck] || 0;
24
25 await sock.sendMessage(chatId, { text: `User has ${warningCount} warning(s).` });
26}
27
28module.exports = warningsCommand;

Callers

nothing calls this directly

Calls 1

loadWarningsFunction · 0.85

Tested by

no test coverage detected