Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

94
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!