JSON file not reloaded after changes made


#1

Hi, so I’m currently trying to make a logging system for my Discord bot using JSON, but when a change is made onto the JSON file, the bot see the change in the file only after refreshing the bot with the console.

And to be sure that code was been written to the JSON file, I used a npm module to detect any changes from the file, and it detect it, and by reading the JSON file with the eval command it see the changes made in the file, but acts like it didn’t changed.

If someone has a solution, i’ll take it. Thank you :slight_smile:

If you didn’t find this very clear, let me know and I’ll try to better explain it to you ^^


#2

It would also be useful to know how you’re making the changes to the JSON file. Let us know the project name too and we’ll take a look. If your project is private, either make it public temporarily or DM me a join link so we can view the code. Thanks.