Builder Name localization error

Hello guys quick question: I try to localize my options of my slash commands and ran into the error
Error: Invalid string format
Error: Invalid string format
My code causing the error
.setNameLocalizations({
de: 'Beschreibung'
})
.setNameLocalizations({
de: 'Beschreibung'
})
Is it needed for the option name localization to be lowercase or am I doing something wrong I don't see yet?
7 Replies
d.js docs
d.js docs2y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
ShowCast
ShowCast2y ago
More useful infos: I am using sapphire in v3.1.0 The stacktrace:
Error: Invalid string format
at Object.run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\node_modules\@sapphire\shapeshift\dist\index.js:1281:64)
at C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\node_modules\@sapphire\shapeshift\dist\index.js:113:66
at Array.reduce (<anonymous>)
at StringValidator.parse (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\node_modules\@sapphire\shapeshift\dist\index.js:113:29)
at validateName (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:885:17)
at MixedClass.setNameLocalization (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:974:5)
at C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:984:59
at Array.forEach (<anonymous>)
at MixedClass.setNameLocalizations (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:984:36)
at C:\Users\paulh\Documents\Projects\discord-bot\dist\infrastructure\discord\repository\CommandRepository.js:83:14
Error: Invalid string format
at Object.run (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\node_modules\@sapphire\shapeshift\dist\index.js:1281:64)
at C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\node_modules\@sapphire\shapeshift\dist\index.js:113:66
at Array.reduce (<anonymous>)
at StringValidator.parse (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\node_modules\@sapphire\shapeshift\dist\index.js:113:29)
at validateName (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:885:17)
at MixedClass.setNameLocalization (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:974:5)
at C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:984:59
at Array.forEach (<anonymous>)
at MixedClass.setNameLocalizations (C:\Users\paulh\Documents\Projects\discord-bot\node_modules\@discordjs\builders\dist\index.js:984:36)
at C:\Users\paulh\Documents\Projects\discord-bot\dist\infrastructure\discord\repository\CommandRepository.js:83:14
npm list discord.js
discord-bot@1.0.0 C:\Users\paulh\Documents\Projects\discord-bot
`-- discord.js@13.10.2
discord-bot@1.0.0 C:\Users\paulh\Documents\Projects\discord-bot
`-- discord.js@13.10.2
node -v
v16.15.0
v16.15.0
chewie 🌈
chewie 🌈2y ago
"de": "Beschreibung" wait, actually
ShowCast
ShowCast2y ago
It works with or without quotes on the key 😄 But the problem is with "beschreibung" it works and with "Beschreibung" I get the error
chewie 🌈
chewie 🌈2y ago
oh yeah, the name needs to be lowercase
ShowCast
ShowCast2y ago
Alrighty Thanks for the quick answer!
chewie 🌈
chewie 🌈2y ago
just like the command name itself