I have a simple discord bot used for tracking how much donations my team has donated. I save it into a coins.json file using this.
fs.writeFile("./coins.json", JSON.stringify(coins), (err) => {
if(err) console.log(err)
});
This worked for the last 2-3 days, but today it randomly stopped saving. I have tried running refresh in the console after I updated the contributions in discord and it just resets the coins.json file back to what it was.