MCPcopy Create free account
hub / github.com/Slayer128/Carltech-Bot / inStickCmd

Function inStickCmd

lib/stickcmd.js:46–61  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

44
45// Function to check if a stickcmd exists by id
46async 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
64async function deleteCmd(cmd) {

Callers

nothing calls this directly

Calls 1

loadStickcmdDataFunction · 0.85

Tested by

no test coverage detected