From b5d14b0414a8d1634287587fb22115cfa02ff7e5 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 14 Dec 2017 15:45:14 +0000 Subject: [PATCH] Filter --- commands/games/google-feud.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/commands/games/google-feud.js b/commands/games/google-feud.js index a786f9ef..56bce11d 100644 --- a/commands/games/google-feud.js +++ b/commands/games/google-feud.js @@ -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()); } };