[Feature] IF modal radio buttons, and checkboxes#3232
Merged
Misha-133 merged 20 commits intoApr 26, 2026
Merged
Conversation
# Conflicts: # src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/CheckboxBuilder.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/CheckboxGroupBuilder.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/CheckboxGroupOptionProperties.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/RadioGroupBuilder.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/Builders/RadioGroupOptionProperties.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/CheckboxComponent.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/CheckboxGroupComponent.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/CheckboxGroupOption.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/RadioGroupComponent.cs # src/Discord.Net.Core/Entities/Interactions/MessageComponents/RadioGroupOption.cs # src/Discord.Net.Rest/API/Common/CheckboxComponent.cs # src/Discord.Net.Rest/API/Common/CheckboxGroupComponent.cs # src/Discord.Net.Rest/API/Common/RadioGroupComponent.cs # src/Discord.Net.Rest/Extensions/MessageComponentExtension.cs
…, and radio group
Misha-133
reviewed
Apr 20, 2026
Misha-133
left a comment
Member
There was a problem hiding this comment.
Looks good overall, gonna try running it a bit later
Misha-133
approved these changes
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds checkbox, checkbox group, and radio group component support to interaction framework.
Checkbox group and radio group can be instanciated using enums, flags enums, and enum arrays for type safety. Default selections can be populated with instance values. In case of arrays, when instance value is empty, default option states are used from attribute declerations. As with select menus,
[HideAttribute]can be used to selectively display enum properties to users, this can be further customized by creating custom[HideArttributes]and overriding the predicate method to determine options to be displayed during runtime.[ModalRadioGroupOptionAttribute]and[ModalCheckboxGroupOptionAttribute]can be used to declaratively add options to radio group, and checkbox group components respectively. Type conversion between string values and other types are offloaded to TypeReaders as with select menus. Additional metadata can be attached to enum options using the[EnumOptionAttribute](renamed from[SelectMenuOptionAttribute]). Checkbox component can be used on bool properties.Breaking Changes:
[SelectMenuOptionAttribute]renamed to[EnumOptionAttribute]