I am trying to edit a plain text file in javascript, that is in the same directory as the .js file. This is what I have right now:
var fs = require('file-system');
var userid = 247927078954074114;
fs.writeFile("./muted.txt", `${userid}\n`);
That works perfectly using the filesystem api, but what I want to do is edit the file and delete a specific user id within it. There are a bunch of user ids in the text file, and now that I can add them, I am trying to figure out how to delete one.