(groupId, userId)
| 161 | } |
| 162 | |
| 163 | async function resetWarningCount(groupId, userId) { |
| 164 | try { |
| 165 | const data = loadUserGroupData(); |
| 166 | if (data.warnings && data.warnings[groupId] && data.warnings[groupId][userId]) { |
| 167 | data.warnings[groupId][userId] = 0; |
| 168 | saveUserGroupData(data); |
| 169 | } |
| 170 | return true; |
| 171 | } catch (error) { |
| 172 | console.error('Error resetting warning count:', error); |
| 173 | return false; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | // Add sudo check function |
| 178 | async function isSudo(userId) { |
no test coverage detected