MCPcopy Create free account
hub / github.com/GlobalTechInfo/MEGA-MD / saveStickerCommands

Function saveStickerCommands

plugins/setcmd.js:47–58  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

45 }
46}
47async function saveStickerCommands(data) {
48 if (HAS_DB) {
49 await store.saveSetting('global', 'stickerCommands', data);
50 }
51 else {
52 const dir = path.dirname(STICKER_FILE);
53 if (!fs.existsSync(dir)) {
54 fs.mkdirSync(dir, { recursive: true });
55 }
56 fs.writeFileSync(STICKER_FILE, JSON.stringify(data, null, 2));
57 }
58}
59export default {
60 command: 'setcmd',
61 aliases: ['addcmd'],

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected