[Feature] Modal refactoring & select menu support (#3172)

* add missing xmldoc + new component type

* add API models

* label builder

* most POG commit ever

* another pog commit (add file upload component)

* add a constructor & missing extension methods

* refactor modal builder

* Fix build errors

* Add xml docs and fluent methods to new components

* Fix naming

* Set default value of `FileUploadComponentBuilder.IsRequired` to `true`

* xmldoc fixes

* Support receiving modal interactions with new components & implement resolved data

* Add missing text display methods to modal builder

* Update src/Discord.Net.Rest/API/Common/FileUploadComponent.cs

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>

---------

Co-authored-by: Quin Lynch <49576606+quinchs@users.noreply.github.com>
Co-authored-by: d4n <dan3436@hotmail.com>
This commit is contained in:
Mihail Gribkov
2025-11-09 13:57:57 +03:00
committed by GitHub
parent ca6c9bcff7
commit a4760144a5
34 changed files with 1636 additions and 176 deletions

View File

@@ -62,6 +62,12 @@ namespace Discord.Net.Converters
case ComponentType.Container:
messageComponent = new API.ContainerComponent();
break;
case ComponentType.Label:
messageComponent = new API.LabelComponent();
break;
case ComponentType.FileUpload:
messageComponent = new API.FileUploadComponent();
break;
default:
throw new JsonSerializationException($"Unknown component type value '{typeProperty}' while deserializing message component");
}