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

Function isSudo

lib/index.js:178–186  ·  view source on GitHub ↗
(userId)

Source from the content-addressed store, hash-verified

176
177// Add sudo check function
178async function isSudo(userId) {
179 try {
180 const data = loadUserGroupData();
181 return data.sudo && data.sudo.includes(userId);
182 } catch (error) {
183 console.error('Error checking sudo:', error);
184 return false;
185 }
186}
187
188// Manage sudo users
189async function addSudo(userJid) {

Callers 5

handleMessagesFunction · 0.85
unbanCommandFunction · 0.85
banCommandFunction · 0.85
isOwnerOrSudoFunction · 0.85
AntilinkFunction · 0.85

Calls 1

loadUserGroupDataFunction · 0.70

Tested by

no test coverage detected