Not seeing routes on docs

Hi, The docs and guide use this piece of code for registering slash commands:
await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
await rest.put(Routes.applicationCommands(CLIENT_ID), { body: commands });
Yet the docs have no class Routes, and my IDE (Webstorm) keeps flagging it as an unknown type. Am I missing something?
4 Replies
d.js toolkit
d.js toolkit12mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
cdub
cdubOP12mo ago
14.14.1
monbrey
monbrey12mo ago
These come from the discord-api-types module: https://discord-api-types.dev/api/discord-api-types-v10#Routes However theyre included with discord.js Webstorm really hates discord.js for some reason
cdub
cdubOP12mo ago
oh how awesome! Thank you!
Want results from more Discord servers?
Add your server