Class FileUploadComponentBuilder
- Namespace
- Discord.Interactions.Builders
- Assembly
- Discord.Net.Interactions.dll
Represents a builder for creating FileUploadComponentInfo.
public class FileUploadComponentBuilder : InputComponentBuilder<FileUploadComponentInfo, FileUploadComponentBuilder>, IInputComponentBuilder, IModalComponentBuilder
- Inheritance
-
FileUploadComponentBuilder
- Implements
- Inherited Members
Constructors
FileUploadComponentBuilder(ModalBuilder)
Initializes a new FileUploadComponentBuilder.
public FileUploadComponentBuilder(ModalBuilder modal)
Parameters
modalModalBuilder
Properties
FileTypes
Gets the allowed file types for this component.
public IReadOnlyCollection<string> FileTypes { get; }
Property Value
Instance
protected override FileUploadComponentBuilder Instance { get; }
Property Value
MaxValues
Gets and sets the maximum number of files that can be uploaded.
public int MaxValues { get; set; }
Property Value
MinValues
Gets and sets the minimum number of files that can be uploaded.
public int MinValues { get; set; }
Property Value
Methods
AddFileType(string)
Adds a file type to FileTypes.
public FileUploadComponentBuilder AddFileType(string fileType)
Parameters
fileTypestringThe file type to add.
Returns
- FileUploadComponentBuilder
The builder instance.
WithMaxValues(int)
Sets MinValues.
public FileUploadComponentBuilder WithMaxValues(int maxValues)
Parameters
Returns
- FileUploadComponentBuilder
The builder instance.
WithMinValues(int)
Sets MinValues.
public FileUploadComponentBuilder WithMinValues(int minValues)
Parameters
Returns
- FileUploadComponentBuilder
The builder instance.