!whohas fix

This commit is contained in:
Sage Vaillancourt 2023-08-03 11:57:27 -04:00
parent fdc811d49b
commit 969a6b900b
1 changed files with 1 additions and 1 deletions

View File

@ -2028,7 +2028,7 @@ command(
const achName = args.join(' ') const achName = args.join(' ')
const matcher = fuzzyMatcher(achName) const matcher = fuzzyMatcher(achName)
const achievement = Object.entries(achievements) const achievement = Object.entries(achievements)
.find(([name, ach]) => [name, ach.name].some(matcher.test)) .find(([name, ach]) => [name, ach.name].some(n => matcher.test(n)))
if (!achievement || !user.achievements[achievement[0]]) { if (!achievement || !user.achievements[achievement[0]]) {
return say(`You don't have any achievement matching '${achName}'`) return say(`You don't have any achievement matching '${achName}'`)
} }