So I have been trying to figure this out for a while now, but I haven't been able to get it to work. I'm trying to use a discord.js bot command to take a random line from a text file and send it on chat, but I haven't been able to figure it out. Also, would it be easier to use .JSON for this task? Thanks in advance. I tried this Grabbing a random line from file but it still wouldn't work
if (msg.content === "give random data") {
//print out a random line from a .txt file
}