mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-12 00:04:48 +02:00
Fix
This commit is contained in:
@@ -19,7 +19,7 @@ module.exports = class HorseInfoCommand extends Command {
|
||||
validate: horse => {
|
||||
const valid = horses.filter(h => h.name.toLowerCase().includes(horse.toLowerCase()));
|
||||
if (valid.length > 1) return 'Multiple horses found. Please be more specific.';
|
||||
return Boolean(horses.length);
|
||||
return Boolean(valid.length);
|
||||
},
|
||||
parse: horse => horses.find(h => h.name.toLowerCase().includes(horse.toLowerCase()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user