Localizations (stupid)

For it works this way when there would be another even simpler way ? Now:
const data = new SlashCommandBuilder()
.setName('dog')
.setNameLocalizations({
pl: 'pies',
de: 'hund',
})
.setDescription('Get a cute picture of a dog!')
.setDescriptionLocalizations({
pl: 'Słodkie zdjęcie pieska!',
de: 'Poste ein niedliches Hundebild!',
})
const data = new SlashCommandBuilder()
.setName('dog')
.setNameLocalizations({
pl: 'pies',
de: 'hund',
})
.setDescription('Get a cute picture of a dog!')
.setDescriptionLocalizations({
pl: 'Słodkie zdjęcie pieska!',
de: 'Poste ein niedliches Hundebild!',
})
After:
const data = new SlashCommandBuilder()
.setNameLocalizations({
pl: 'pies', default: true,
de: 'hund',
en: 'dog',

})
.setDescriptionLocalizations({
pl: 'Słodkie zdjęcie pieska!', default: true,
de: 'Poste ein niedliches Hundebild!',
de: 'Get a cute picture of a dog!',
})
const data = new SlashCommandBuilder()
.setNameLocalizations({
pl: 'pies', default: true,
de: 'hund',
en: 'dog',

})
.setDescriptionLocalizations({
pl: 'Słodkie zdjęcie pieska!', default: true,
de: 'Poste ein niedliches Hundebild!',
de: 'Get a cute picture of a dog!',
})
26 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Parogo_72
Parogo_722y ago
I dont get your issue .setName is the default
LucasB25
LucasB25OP2y ago
https://discordjs.guide/slash-commands/advanced-creation.html#localizations I’m talking about if the first and the original that is currently in place, the second would be the most logical way to do
Parogo_72
Parogo_722y ago
No, the second one doesnt make sense As we said, what will be the fallback value? What if their localization is es? What will be the name of the command
LucasB25
LucasB25OP2y ago
English, since this is the default. just force the use of the default en Then at this point the default lang of the bot must be used
Parogo_72
Parogo_722y ago
And which is that Enforcing people to use localization doesnt seem good either way, not everyone needs it
LucasB25
LucasB25OP2y ago
Either the creator’s original lang or the default lang in the directory app after I never said to force the localization but just suprimmer this line
Parogo_72
Parogo_722y ago
This just seems completely unnecessary and not djs related even. How is djs even supposed to get the author localization
LucasB25
LucasB25OP2y ago
If I’m not mistaken localization and based on the user’s language
Parogo_72
Parogo_722y ago
And in any case, that would only make everything more confusing You just said this You cant get that information when deploying commands And as explained above, changing that will only make everything more confusing for the developer Will only lead to issues regarding names appearing "wrongly"
LucasB25
LucasB25OP2y ago
I think the answer and all in all, the default lang would simply be the lang put on the front line of
Parogo_72
Parogo_722y ago
Thats not how objects work Objects arent arrays
LucasB25
LucasB25OP2y ago
or simply add to the same object
.setDescriptionLocalizations({
pl: 'Słodkie zdjęcie pieska!', default: true,
de: 'Poste ein niedliches Hundebild!',
})
.setDescriptionLocalizations({
pl: 'Słodkie zdjęcie pieska!', default: true,
de: 'Poste ein niedliches Hundebild!',
})
Parogo_72
Parogo_722y ago
At this point just use setDescription Seriously, I dont get your point
LucasB25
LucasB25OP2y ago
like what you can do with fields
Parogo_72
Parogo_722y ago
But those are not field And thats not how objects work For the second time Just adding a default property doesnt mean that it will reference the pl property
LucasB25
LucasB25OP2y ago
I know, it was just to compare visual example
Parogo_72
Parogo_722y ago
Im surprised that you think that that is easier to understand than the current way meguFace
LucasB25
LucasB25OP2y ago
It is not the story of simplicity of understanding but of adding line for nothing Especially since for the moment it doesn’t work with embeds
Parogo_72
Parogo_722y ago
What have embeds to do with this
LucasB25
LucasB25OP2y ago
I'm talking about Localizations
Parogo_72
Parogo_722y ago
What have embeds to do with this
LucasB25
LucasB25OP2y ago
I’m talking about the fact that we can’t use the Localizations system with embeds
Parogo_72
Parogo_722y ago
And how is that our issue? We cant implement something that the api doesnt support Also, if you want to change builder's method, ask discord to change how they want the command data to be sent Because name and description are required as different properties from localization
LucasB25
LucasB25OP2y ago
not so easy to tell them about this kind of request
Parogo_72
Parogo_722y ago
@discord.js/builders is just a simplier way to create those objects There is no reason to just invent things because we save lines of code Because that actually makes it messier and less readable And harder to mantain if something ever changes
Want results from more Discord servers?
Add your server