Skip to content
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

[discord.js@dev] Using JSON structures do not accept camelCase. #7376

Closed
3061LRTAGSPKJMORMRT opened this issue Jan 31, 2022 · 0 comments · Fixed by #7424
Closed

[discord.js@dev] Using JSON structures do not accept camelCase. #7376

3061LRTAGSPKJMORMRT opened this issue Jan 31, 2022 · 0 comments · Fixed by #7424

Comments

@3061LRTAGSPKJMORMRT
Copy link

3061LRTAGSPKJMORMRT commented Jan 31, 2022

Which package is this bug report for?

discord.js

Issue description

Steps to reproduce bug:

  1. use the JSON way to create embeds, components or application commands
  2. use camelCase for properties, such as customId or minValues
  3. use the .send() method and place a .catch()
  4. execute the code

This may be because builders use snake_case but just reporting it to be sure

Code sample

message.reply({

  embeds: [{ 
    title: "Some title",
    description: "Some description",
    footer: { text: "some footer text", iconURL: message.member.displayAvatarURL() }    
  }],

  components: [
    { type: 1, components: [{ type: 2, label: "Button Label", style: 1, customId: "somecode" }] },
    { type: 1, components: [
      { type: 3, customId: "selectMenu", minValues: 2, options: [
        { label: "Label1", description: "Desc1", value: "l1" },
        { label: "Label2", description: "Desc2", value: "l2" }
      ] }
    ] }
  ]

})

Package version

14.0.0-dev.1643544396.388f535

Node.js version

16.9

Operating system

Windows 10

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

Not applicable (subpackage bug)

Which gateway intents are you subscribing to?

Not applicable (subpackage bug)

I have tested this issue on a development release

388f535

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants