(cmd)
| 62 | |
| 63 | // Function to delete a stickcmd |
| 64 | async function deleteCmd(cmd) { |
| 65 | try { |
| 66 | const data = loadStickcmdData(); |
| 67 | |
| 68 | // Check if the stickcmd exists |
| 69 | if (data[cmd]) { |
| 70 | delete data[cmd]; // Remove the stickcmd |
| 71 | saveStickcmdData(data); |
| 72 | console.log(`Stickcmd ${cmd} has been removed.`); |
| 73 | } else { |
| 74 | console.log(`Stickcmd ${cmd} does not exist.`); |
| 75 | } |
| 76 | } catch (error) { |
| 77 | console.error('Error while deleting the stickcmd:', error); |
| 78 | } |
| 79 | } |
| 80 | |
| 81 | // Function to get the cmd by id |
| 82 | async function getCmdById(id) { |
nothing calls this directly
no test coverage detected