#Problem saving to file using fs | NO ERRORS

11 messages · Page 1 of 1 (latest)

stable musk
#

for some reason theres a problem with this: js let jsonString = JSON.stringify(config, null, 2); fs.writeFileSync("commands/ai/config.json", jsonString, "utf-8"); its not saving to the file

desert merlinBOT
#
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
  • Marked as resolved by OP
lost pivot
stable musk
stable musk
lost pivot
stable musk
lost pivot
stable musk
stable musk
#

turns out the file is being changed but for some reason the config isnt changing. but whne i print the config it is changed how its supposed to be. might be a problem with JSON