-
-
Notifications
You must be signed in to change notification settings - Fork 132
feat: Support select in modals #1321
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
dc2f2ee to
42bfca7
Compare
369800e to
277fe68
Compare
206e07c to
a307dd1
Compare
042d506 to
42dbad7
Compare
65ea7a5 to
a6c1edc
Compare
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.
Pull Request Overview
This PR adds support for select components in Discord modals by introducing a new Label component type and updating the modal component architecture. The changes allow string select components to be used within modals, addressing the limitations of the previous action row-only approach.
Key changes:
- Introduces a new
Labelcomponent type that can wrap modal components with descriptive text - Adds support for string select components in modals with a
requiredproperty - Deprecates the use of action rows in modals in favor of the new label-based approach
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| payloads/v9/channel.ts | Adds Label component type, updates modal component types, and modifies text input to support label wrapping |
| payloads/v10/channel.ts | Same changes as v9 for API version 10 compatibility |
| payloads/v9/_interactions/responses.ts | Updates modal response callback data to support new component types |
| payloads/v10/_interactions/responses.ts | Same response updates as v9 for API version 10 |
| payloads/v9/_interactions/modalSubmit.ts | Adds support for string select submission data in modal submit interactions |
| payloads/v10/_interactions/modalSubmit.ts | Same modal submit updates as v9 for API version 10 |
| deno/payloads/v9/channel.ts | Deno equivalent of the v9 channel changes |
| deno/payloads/v9/_interactions/responses.ts | Deno equivalent of the v9 response changes |
| deno/payloads/v9/_interactions/modalSubmit.ts | Deno equivalent of the v9 modal submit changes |
| deno/payloads/v10/channel.ts | Deno equivalent of the v10 channel changes |
| deno/payloads/v10/_interactions/responses.ts | Deno equivalent of the v10 response changes |
| deno/payloads/v10/_interactions/modalSubmit.ts | Deno equivalent of the v10 modal submit changes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
vladfrangu
left a comment
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.
I think you were meant to use APISelectMenuComponentInMessage?
Uh oh!
There was an error while loading. Please reload this page.