Skip to content
← Back to Community
Discord.js Docs API
Profile icon
almostStatic

Using the Discord.JS Docs API (v1)

You need to send a GET request to the following URL:

https://djsdocs.sorta.moe/v1/main/stable/embed?q={query}
  • replace {query} with what you want to search for! This can either be args (user input, for extra info see the Official Discord.js Guide).

The request to the URL will return an embed object, which can be sent to the channel via <message>.channel.send({ embed: res }) (res is what you've assigned the fetched JSON to).

I understand this can get a bit complicated for people who aren't that good at coding, so I've constructed a function in the attached repl for a simple function that does this for you.

Remember, all you're doing is GETting something, then utilising JSON.parse() to convert it to JSON and send the lovely embed to a channel.

If you're confused hit me up in the comments below.

If you found this helpful, please don't forget to upvote! :D

Voters
Profile icon
Jichu
Profile icon
shinchanOP1
Profile icon
PixelNinja
Profile icon
almostStatic