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

Unable to use select menus #580

Closed
3 tasks done
Cryptverse opened this issue Mar 16, 2023 · 10 comments
Closed
3 tasks done

Unable to use select menus #580

Cryptverse opened this issue Mar 16, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@Cryptverse
Copy link

Which package has the bugs?

The core library

Issue description

Simply just trying to use the string select menu.

Code sample

No response

Package version

2.11.5

Node.js version

16.18.1

Operating system

Linux

Priority this issue should have

Medium (should be fixed soon)

Checklist

  • I have searched the open issues for duplicates.
  • I have shared the entire traceback.
  • I am using a user token (and it isn't visible in the code).

Additional Information

No response

@Cryptverse Cryptverse added the bug Something isn't working label Mar 16, 2023
@aiko-chan-ai
Copy link
Owner

confirmed

@aiko-chan-ai
Copy link
Owner

fixed

@Cryptverse
Copy link
Author

You are amazing! Thank you, so much 😊.

@Cryptverse
Copy link
Author

Actually, I have updated to 2.12.0 and am still having this issue.

DiscordAPIError: Invalid Form Body
data: Must be 1 or fewer in length.

method: 'post',
  path: '/interactions',
  code: 50035,
  httpStatus: 400,
  captcha: null,
  requestData: {
    json: {
      type: 3,
      guild_id: '',
      channel_id: '',
      message_id: '',
      application_id: '',
      session_id: '',
      message_flags: 0,
      data: [Object],
      nonce: ''
    },
    files: []
  },
  retries: 0
}

@aiko-chan-ai
Copy link
Owner

wut ?

@Cryptverse
Copy link
Author

Cryptverse commented Mar 17, 2023

I'm just trying to select an option from the only menu in the message.

await message.selectMenu(['option']);

I have tried it in many ways where I specify the selectMenu itself or just use its ID and also using a number for its row. At first it always throws type errors. Such as "SELECT_MENU" is not a valid type. So, I tired to edit the src to include the types. Once I got all the correct types in all the correct places that I could see, I end up getting a DiscordAPIError: invalid form body. I tried digging into the data field of the request and it looked like it was just an array of errors and that is why it was greater than 1 in length.

@aiko-chan-ai
Copy link
Owner

i need to know about botId, raw message, command, code, ...

@Cryptverse
Copy link
Author

const botId = '270904126974590976';
const command = 'profile';
const selectMenuOption = 'cooldowns';
const rawMessage = 'Is this the raw message object?';

//await message.selectMenu([selectMenuOption]);

@aiko-chan-ai
Copy link
Owner

Raw msg object...

@Cryptverse
Copy link
Author

I have DMd on discord. If you still want to solve this issue, I will give you the details to reproduce this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants