im creating a bot for my discord server and am attempting to log messages onto a text file. I stored all the information i need about the message in a var named logger and am attempting to use node to append my log file.
I tried adding \n to the end of the variable but kept getting a syntax error that pointed to the "\" and said invalid or unexpected token
var logger = (message.author.username + "> " + message.content \n)
fs.appendFile('msgs.json', logger, (err) => {
if (err) throw err;
})
I would like each entry to be on a different line