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

Added support for select menus v2 #1540

Closed
wants to merge 6 commits into from
Closed

Conversation

areodot
Copy link
Contributor

@areodot areodot commented Sep 1, 2024

Select menus (v2) are here!

Added support for the second version of select menus discord/discord-api-docs#5543, as well as default_values for auto-populated select menus discord/discord-api-docs#6442

index.d.ts Outdated
Comment on lines 1597 to 1608
interface BaseSelectMenu extends SelectMenuBase {
type: Exclude<SelectMenuTypes, Constants["ComponentTypes"][keyof Pick<Constants["ComponentTypes"], "STRING_SELECT" | "CHANNEL_SELECT">]>;
}
interface SelectMenuBase {
custom_id: string;
disabled?: boolean;
default_values?: SelectDefaultValues[];
max_values?: number;
min_values?: number;
options: SelectMenuOptions[];
placeholder?: string;
type: Constants["ComponentTypes"]["SELECT_MENU"];
type: SelectMenuTypes;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm confused as to the reason you are handling the parent select menu interface this way.
Also please remember to sort interfaces in alphabetical order

@bsian03 bsian03 added the Discord label Sep 1, 2024
@bsian03
Copy link
Collaborator

bsian03 commented Sep 1, 2024

Also example file should be updated

@bsian03
Copy link
Collaborator

bsian03 commented Sep 1, 2024

I'd appreciate an explanation rather than silently changing typings. Can you message me on the discord serve? discord.gg/eris

…d' and 'non-resolved', removed the individual definitions for each of the select menu types and added a unified "ResolvedSelectMenus" interface
@areodot areodot requested a review from bsian03 September 1, 2024 15:29
@bsian03 bsian03 mentioned this pull request Sep 25, 2024
32 tasks
@areodot areodot deleted the branch abalabahaha:dev October 4, 2024 17:54
@areodot areodot closed this Oct 4, 2024
@areodot areodot deleted the dev branch October 4, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants