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

Function loadAliveData

lib/alive.js:6–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5// Load data from JSON file
6function loadAliveData() {
7 try {
8 const data = fs.readFileSync(filePath, 'utf8');
9 return JSON.parse(data);
10 } catch (err) {
11 return { id: 1, message: '', lien: '' }; // Default if file doesn't exist
12 }
13}
14
15// Save data to JSON file
16function saveAliveData(data) {

Callers 2

addOrUpdateDataInAliveFunction · 0.85
getDataFromAliveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected