You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to search across a Commands array. Internally should be adjusted for that too.
In any case this could be kept as it is since it's possible to do something in the lines of:
bot.filter(Context.has.filterQuery("::bot_command")).use(async(ctx)=>{letsuggestedCommandfor(constcommandsof[userCommands,adminCommands]){constsearch=ctx.getNearestCommand(commands)if(search){suggestedCommand=search}}if(suggestedCommand){returnctx.reply(`Hmm... I don't know that command. Did you mean ${suggestedCommand}?`,);}awaitctx.reply("Oops... I don't know that command :/");});
But this is not ideal since fuzzySearch does not expose its returned value similarityThreshold. That could be exposed and let users do whatever logic they want or managed internally and return the most similar command.
Also prefix of the best match should be exposed too
The text was updated successfully, but these errors were encountered:
Since the plugin allows to organize commands into multiple and diverse Commands instances, would make sense to allow
to search across a Commands array. Internally should be adjusted for that too.
In any case this could be kept as it is since it's possible to do something in the lines of:
But this is not ideal since
fuzzySearch
does not expose its returned valuesimilarityThreshold
. That could be exposed and let users do whatever logic they want or managed internally and return the most similar command.Also prefix of the best match should be exposed too
The text was updated successfully, but these errors were encountered: