This commit is contained in:
Dragon Fire
2020-11-09 17:59:26 -05:00
parent 313d176ef0
commit fd756459a0
+1 -1
View File
@@ -35,7 +35,7 @@ module.exports = class AcrosticCommand extends Command {
run(msg, { word }) {
const results = [];
for (const letter of word) {
const filteredWords = wordList.filter(wrd => wrd.startsWith(letter.toLowerCase()));
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)}`);
}