Skip to content

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

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

feat: Support select in modals #1321

wants to merge 11 commits into from

Conversation

Jiralite
Copy link
Member

@Jiralite Jiralite commented Aug 7, 2025

Copy link

vercel bot commented Aug 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-api-types ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 11:03am

Qjuh
Qjuh previously requested changes Aug 7, 2025
Comment on lines 1929 to 1948
export type APIStringSelectComponent = APIStringSelectComponentInActionRow | APIStringSelectComponentInModal;

export interface APIStringSelectComponentInActionRow extends APIBaseSelectMenuComponent<ComponentType.StringSelect> {
/**
* Specified choices in a select menu; max 25
*/
options: APISelectMenuOption[];
}

export interface APIStringSelectComponentInModal extends APIBaseSelectMenuComponent<ComponentType.StringSelect> {
/**
* Specified choices in a select menu; max 25
*/
options: APISelectMenuOption[];
/**
* Whether this component is required
*/
required?: boolean;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export interface APILabelComponent extends APIBaseComponent<ComponentType.Label> {
label: string;
description?: string;
component: APIComponentInModalLabel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably do APIComponentInLabel, not InModalLabel, should discord ever make this component work outside modals too

Comment on lines +1708 to +1710
/**
* Labels for use in modals.
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not document this like this. You shouldn't make assumptions about where components will be allowed in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use discord doc strings unless we don't have them, sooo... what shall it be? :D

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for cv2 I just didn't write doc strings until the discord docs were out lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants