MCPcopy Index your code
hub / github.com/Slayer128/Carltech-Bot / readDataFromFile

Function readDataFromFile

lib/antibot.js:8–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7// Function to read data from JSON file
8function readDataFromFile() {
9 try {
10 const data = fs.readFileSync(dataFilePath, 'utf-8');
11 return JSON.parse(data);
12 } catch (error) {
13 // If file doesn't exist or there's a read error, return an empty object
14 console.error('Error reading data from file:', error);
15 return {};
16 }
17}
18
19// Function to write data to JSON file
20function writeDataToFile(data) {

Callers 4

addOrUpdateJidStateFunction · 0.85
updateJidActionFunction · 0.85
checkJidStateFunction · 0.85
getJidActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected