(id)
| 44 | |
| 45 | // Function to check if a stickcmd exists by id |
| 46 | async function inStickCmd(id) { |
| 47 | try { |
| 48 | const data = loadStickcmdData(); |
| 49 | |
| 50 | // Check if any command with the given id exists |
| 51 | for (const cmd in data) { |
| 52 | if (data[cmd].id === id) { |
| 53 | return true; |
| 54 | } |
| 55 | } |
| 56 | return false; |
| 57 | } catch (error) { |
| 58 | console.error('Error while checking if stickcmd exists:', error); |
| 59 | return false; |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | // Function to delete a stickcmd |
| 64 | async function deleteCmd(cmd) { |
nothing calls this directly
no test coverage detected