This commit is contained in:
Daniel Odendahl Jr
2017-12-14 15:45:14 +00:00
parent ce74bb5dbd
commit b5d14b0414
+3 -1
View File
@@ -66,6 +66,8 @@ module.exports = class GoogleFeudCommand extends Command {
});
const suggestions = JSON.parse(text)[1];
if (!suggestions.length) return null;
return suggestions.map(suggestion => suggestion.toLowerCase().replace(question.toLowerCase(), '').trim());
return suggestions
.filter(suggestion => suggestion !== question.toLowerCase())
.map(suggestion => suggestion.toLowerCase().replace(question.toLowerCase(), '').trim());
}
};