Application Commands API does not return localization

Is this intended ?
await rest.get(Routes.applicationCommands(applicationId))
await rest.get(Routes.applicationCommands(applicationId))
leaves descriptionLocalized and descriptionLocalization undefined.
11 Replies
d.js toolkit
d.js toolkit3d 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
d.js docs
d.js docs3d ago
:discord: Application Commands - Get Global Application Commands GET /applications/\application.id/commands Fetch all of the global commands for your application. Returns an array of application command objects. read more
Syjalo
Syjalo3d ago
There's with_localizations option Also descriptionLocalized and descriptionLocalization are not things, since this is a raw API call. Use snake_case
Krauti
KrautiOP3d ago
Where ist this option
d.js docs
d.js docs3d ago
:propertysignature: RequestData#query [email protected] Query string parameters to append to the called endpoint
Syjalo
Syjalo3d ago
You set it as a query param
d.js docs
d.js docs3d ago
:method: REST#get() [email protected] Runs a get request from the api
Krauti
KrautiOP2d ago
Ah Alright i will try
let urlParam = new URLSearchParams()
urlParam.set('with_localizations', "true")
let commands: ApplicationCommand[] = await rest.get(Routes.applicationCommands(applicationId), {query: urlParam})
let urlParam = new URLSearchParams()
urlParam.set('with_localizations', "true")
let commands: ApplicationCommand[] = await rest.get(Routes.applicationCommands(applicationId), {query: urlParam})
same result
monbrey
monbrey2d ago
Did you also consider this part
Krauti
KrautiOP2d ago
yeah i did. now i get informations. oh f me i thought that as ApplicationCommand would checkout since i saw most attributes match what would be the right type for consuming this api?
d.js docs
d.js docs2d ago
:dtypes: v10: RESTPutAPIApplicationCommandsResult read more

Did you find this page helpful?