@@ -3,7 +3,7 @@ import config from "../../data/config.json"
33import client from "../../main"
44import Command from "../../utils/Command"
55import { BotEmoji , Character , CharacterFull , CommandSource , SendMessage , Skill , TalentTable , TalentValue } from "../../utils/Types"
6- import { addArg , Bookmarkable , Colors , createTable , findFuzzyBestCandidates , getLink , getLinkToGuide , PAD_END , PAD_START , paginator , sendMessage , simplePaginator , urlify } from "../../utils/Utils"
6+ import { addArg , Bookmarkable , Colors , createTable , findFuzzyBestCandidatesForAutocomplete , getLink , getLinkToGuide , PAD_END , PAD_START , paginator , sendMessage , simplePaginator , urlify } from "../../utils/Utils"
77
88
99const elementTypes = client . data . getCharacters ( )
@@ -76,13 +76,13 @@ Note: this command supports fuzzy search.`,
7676 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
7777 targets = [ ...elementTypes . filter ( elem => this . getElementIcons ( client . data . getCharacterByName ( "Traveler" ) ! ) . includes ( elem ) ) . map ( x => `-${ x . toLowerCase ( ) } ` ) , ...targets ]
7878
79- return await source . respond ( findFuzzyBestCandidates ( targets , lastWord , 20 ) . map ( value => {
79+ return await source . respond ( findFuzzyBestCandidatesForAutocomplete ( targets , lastWord , 20 ) . map ( value => {
8080 value = `${ args . join ( " " ) } ${ value } `
8181 return { name : value , value }
8282 } ) )
8383 }
8484
85- await source . respond ( findFuzzyBestCandidates ( targetNames , search , 20 ) . map ( value => {
85+ await source . respond ( findFuzzyBestCandidatesForAutocomplete ( targetNames , search , 20 ) . map ( value => {
8686 return { name : value , value }
8787 } ) )
8888 }
0 commit comments