(jid)
| 59 | |
| 60 | // Function to reset the warning count for a user (jid) |
| 61 | async function resetWarnCountByJID(jid) { |
| 62 | try { |
| 63 | const data = loadWarnData(); |
| 64 | |
| 65 | // Reset the warn_count to 0 for the specified jid |
| 66 | if (data[jid]) { |
| 67 | data[jid].warn_count = 0; |
| 68 | saveWarnData(data); |
| 69 | console.log(`Le warn_count de l'utilisateur ${jid} a été réinitialisé à 0.`); |
| 70 | } else { |
| 71 | console.log(`Utilisateur ${jid} non trouvé.`); |
| 72 | } |
| 73 | } catch (error) { |
| 74 | console.error("Erreur lors de la réinitialisation du warn_count :", error); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | module.exports = { |
| 79 | ajouterUtilisateurAvecWarnCount, |
nothing calls this directly
no test coverage detected