MCPcopy
hub / github.com/mruniquehacker/Knightbot-MD / resetWarningCount

Function resetWarningCount

lib/index.js:163–175  ·  view source on GitHub ↗
(groupId, userId)

Source from the content-addressed store, hash-verified

161}
162
163async 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
178async function isSudo(userId) {

Callers 2

AntilinkFunction · 0.85
handleBadwordDetectionFunction · 0.85

Calls 2

loadUserGroupDataFunction · 0.70
saveUserGroupDataFunction · 0.70

Tested by

no test coverage detected