MCPcopy Create free account
hub / github.com/Slayer128/Carltech-Bot / addUserToBanList

Function addUserToBanList

lib/banUser.js:28–37  ·  view source on GitHub ↗
(jid)

Source from the content-addressed store, hash-verified

26
27// Function to add a user to the ban list
28async function addUserToBanList(jid) {
29 try {
30 const data = loadBanUserData();
31 data[jid] = true; // Add the user to the ban list
32 saveBanUserData(data);
33 console.log(`JID ${jid} added to the banned user list.`);
34 } catch (error) {
35 console.error("Error while adding the banned user:", error);
36 }
37}
38
39// Function to check if a user is banned
40async function isUserBanned(jid) {

Callers 1

6b.jsFile · 0.85

Calls 2

loadBanUserDataFunction · 0.85
saveBanUserDataFunction · 0.85

Tested by

no test coverage detected