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

Function writeState

plugins/anticall.js:27–41  ·  view source on GitHub ↗
(enabled)

Source from the content-addressed store, hash-verified

25 }
26}
27async function writeState(enabled) {
28 try {
29 if (HAS_DB) {
30 await store.saveSetting('global', 'anticall', { enabled: !!enabled });
31 }
32 else {
33 if (!fs.existsSync('./data'))
34 fs.mkdirSync('./data', { recursive: true });
35 fs.writeFileSync(ANTICALL_PATH, JSON.stringify({ enabled: !!enabled }, null, 2));
36 }
37 }
38 catch (e) {
39 console.error('Error writing anticall state:', e);
40 }
41}
42export default {
43 command: 'anticall',
44 aliases: ['acall', 'callblock'],

Callers 1

handlerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected