(jid)
| 49 | |
| 50 | // Function to remove a user from the ban list |
| 51 | async function removeUserFromBanList(jid) { |
| 52 | try { |
| 53 | const data = loadBanUserData(); |
| 54 | if (data.hasOwnProperty(jid)) { |
| 55 | delete data[jid]; // Remove the user from the ban list |
| 56 | saveBanUserData(data); |
| 57 | console.log(`JID ${jid} removed from the banned user list.`); |
| 58 | } else { |
| 59 | console.log(`JID ${jid} is not in the banned user list.`); |
| 60 | } |
| 61 | } catch (error) { |
| 62 | console.error("Error while removing the banned user:", error); |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | module.exports = { |
| 67 | addUserToBanList, |
no test coverage detected