Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

93
Visualizações
Discord.js search nearest result of an argument

Im not sure if this question has been posted yet but here is what i wanna make:

So im trying to make something that find the nearest result of an argument.(Discord.js v13) But i have no idea on how to make it,is there a Code or an API for this feature?

For example:

!find rock If Rock is in the bot list,then it will say something like "Rock is bla bla bla".If it is not in the bot it will say something like "Rock is unknown!Did you mean Rack , Dock , Etc if theres more on the bot."

another example: !find rok that is an typo so it will also do the same thing. "Rok is unknown!Did you mean Rock , Etc"

Would like to get some help on this!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This website is mostly for answering questions that have context like code snippets and additional context, so I suggest you do that next time.

For now, a few ways you might do this.

  • Save the items somewhere, like in a JSON file, or other database. A quick google search will show you how to do this.
  • You can look to see if the entry is in the database, but for other things like fuzzy search, you would want to use something like Minisearch or Fuse.js.
  • As in "did you mean" checking, I don't think it's necessary. If you are using fuzzy search and there are no results, there will be no did-you-means. If you are just looking at the JSON or db, you would need to use fuzzy search for DYMs.
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda