From 17dd3f23fb0ce883bd549449ead559427793a983 Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Mon, 9 Nov 2020 18:00:34 -0500 Subject: [PATCH] Fix --- commands/random-res/acrostic.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/commands/random-res/acrostic.js b/commands/random-res/acrostic.js index 4bd0af9c..e4295dd0 100644 --- a/commands/random-res/acrostic.js +++ b/commands/random-res/acrostic.js @@ -35,7 +35,10 @@ module.exports = class AcrosticCommand extends Command { run(msg, { word }) { const results = []; for (const letter of word) { - if (letter === ' ') results.push(' '); + if (letter === ' ') { + results.push(' '); + continue; + } const filteredWords = words.filter(wrd => wrd.startsWith(letter.toLowerCase())); const chosen = filteredWords[Math.floor(Math.random() * filteredWords.length)]; results.push(`**${letter.toUpperCase()}**${chosen.slice(1)}`);