(jid)
| 57 | |
| 58 | // Function to remove a sudo number (jid) from the list |
| 59 | async function removeSudoNumber(jid) { |
| 60 | try { |
| 61 | const data = loadSudoData(); |
| 62 | |
| 63 | // Check if the jid exists in the sudo list |
| 64 | if (data[jid]) { |
| 65 | delete data[jid]; // Remove the jid |
| 66 | saveSudoData(data); |
| 67 | console.log(`Phone number ${jid} removed from the authorized list.`); |
| 68 | } else { |
| 69 | console.log(`Phone number ${jid} is not in the authorized list.`); |
| 70 | } |
| 71 | } catch (error) { |
| 72 | console.error("Error removing the phone number from the authorized list:", error); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | // Function to get all sudo numbers (jids) |
| 77 | async function getAllSudoNumbers() { |
no test coverage detected