(id)
| 80 | |
| 81 | // Function to get the cmd by id |
| 82 | async function getCmdById(id) { |
| 83 | try { |
| 84 | const data = loadStickcmdData(); |
| 85 | |
| 86 | // Search for the cmd by id |
| 87 | for (const cmd in data) { |
| 88 | if (data[cmd].id === id) { |
| 89 | return cmd; |
| 90 | } |
| 91 | } |
| 92 | return null; // Return null if not found |
| 93 | } catch (error) { |
| 94 | console.error('Error while getting the cmd by id:', error); |
| 95 | return null; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | // Function to get all stickcmds |
| 100 | async function getAllStickCmds() { |
nothing calls this directly
no test coverage detected