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

Function removeGroupFromBanList

lib/banGroup.js:51–64  ·  view source on GitHub ↗
(groupeJid)

Source from the content-addressed store, hash-verified

49
50// Function to remove a group from the ban list
51async function removeGroupFromBanList(groupeJid) {
52 try {
53 const data = loadBanGroupData();
54 if (data.hasOwnProperty(groupeJid)) {
55 delete data[groupeJid]; // Remove the group from the ban list
56 saveBanGroupData(data);
57 console.log(`Group JID ${groupeJid} removed from the banned list.`);
58 } else {
59 console.log(`Group JID ${groupeJid} is not in the banned list.`);
60 }
61 } catch (error) {
62 console.error("Error while removing the banned group:", error);
63 }
64}
65
66module.exports = {
67 addGroupToBanList,

Callers 1

6b.jsFile · 0.85

Calls 2

loadBanGroupDataFunction · 0.85
saveBanGroupDataFunction · 0.85

Tested by

no test coverage detected