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 docs3y 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
ShowCastOP3y 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
[email protected] C:\Users\paulh\Documents\Projects\discord-bot
[email protected] C:\Users\paulh\Documents\Projects\discord-bot
node -v
v16.15.0
v16.15.0
chewie
chewie3y ago
"de": "Beschreibung" wait, actually
ShowCast
ShowCastOP3y 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
chewie3y ago
oh yeah, the name needs to be lowercase
ShowCast
ShowCastOP3y ago
Alrighty Thanks for the quick answer!
chewie
chewie3y ago
just like the command name itself
Want results from more Discord servers?
Add your server