From be5d8bc2ecb1ca34894728a84a6d846b4fb7a3dc Mon Sep 17 00:00:00 2001 From: Chris Ham Date: Mon, 22 Jan 2018 17:07:54 -0800 Subject: [PATCH] fix parseLines function --- main.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/main.js b/main.js index f0e7ca6..4f2b038 100755 --- a/main.js +++ b/main.js @@ -166,17 +166,16 @@ function joinVoiceChannel(msg) }); } -// Read/parse text quotes from the "database" -function parseQuotes(filePath) +// Read/parse text lines from a file +function parseLines(filePath) { - let commands = []; + let lines = []; let data = fs.readFileSync(filePath, 'utf-8'); - let commandLines = data.toString().split('\n'); - let commandParts; - commandLines.forEach(function(line) { + let splitLines = data.toString().split('\n'); + splitLines.forEach(function(line) { if (line.length > 0) { - commands.push(line); + lines.push(line); } }); - return commands; + return lines; } \ No newline at end of file