mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-23 10:02:05 +02:00
Filter
This commit is contained in:
@@ -66,6 +66,8 @@ module.exports = class GoogleFeudCommand extends Command {
|
|||||||
});
|
});
|
||||||
const suggestions = JSON.parse(text)[1];
|
const suggestions = JSON.parse(text)[1];
|
||||||
if (!suggestions.length) return null;
|
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());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user