I made this command that should add args to a txt file, and it works well, there's only one thing left i wanna do, when it adds a new text to the txt it adds it right after the last text, is it possible to make it add the text under it instead?
This is what happens when i try to add something new, i want, in this case, the test 2 to be added under test:
const data = args.slice(0).join(" ");
fs.appendFile('test.txt', data + " ", (err) => {
console.log('File edited')
message.channel.send('test.txt updated')
data.split('\n')
this is the code i made, hope you can help