-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command localizations don't use camelcase when creating a command with slashcommand builder #9084
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@schblondie is attempting to deploy a commit to the discordjs Team on Vercel. A member of the Team first needs to authorize it. |
Builders is not solely used with discord.js, which makes this pull request incorrect. In addition, changing the casing in discord.js is also wrong, as we are receiving that data from Discord. |
if ('nameLocalizations' in data) { | ||
/** | ||
* The name localizations for this command | ||
* @type {?Object<Locale, string>} | ||
*/ | ||
this.nameLocalizations = data.name_localizations; | ||
this.nameLocalizations = data.nameLocalizations; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Discord API data comes with camel-cased keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is true, I apologize.
But when you compare line 78 with line 88 you can see that the this.nameLocalized
is also in correct camel case even when getting the non camel case value data.name_localized
I adjusted the code making sure it doesn't conflict with the Discord API.Now only the SlashCommandBuilder & ContextMenuBuilder Data is in |
Please describe the changes this PR makes and why it should be merged:
See #9083
Status and versioning classification: