(sock, chatId, mentionedJidList)
| 12 | } |
| 13 | |
| 14 | async 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 | |
| 28 | module.exports = warningsCommand; |
nothing calls this directly
no test coverage detected