Constructor DiscordTextInputComponent
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
DiscordTextInputComponent(DiscordTextInputComponent)
Constructs a new text component based on another text component.
public DiscordTextInputComponent(DiscordTextInputComponent other)
Parameters
otherDiscordTextInputComponentThe button to copy.
DiscordTextInputComponent(TextComponentStyle, string, string?, string?, int?, int?, bool, string?)
Constructs a new text input component with the specified options.
[DiscordDeprecated("Deprecated in favor of DiscordLabelComponent. Use overload without label in the new component.")]
public DiscordTextInputComponent(TextComponentStyle style, string label, string? customId = null, string? placeholder = null, int? minLength = null, int? maxLength = null, bool required = true, string? defaultValue = null)
Parameters
styleTextComponentStyleThe style of the text input component.
labelstringThe text to display before the text input component, up to 80 characters.
customIdstringThe Id to assign to the text input component. Max
100characters.placeholderstringThe placeholder for the text input component. Max
100characters.minLengthint?The minimal length of text input.
maxLengthint?The maximal length of text input.
requiredboolWhether this text input component should be required.
defaultValuestringPre-filled value for text input component. Max
4000characters.
Exceptions
- ArgumentException
Is thrown when no label is set.
DiscordTextInputComponent(TextComponentStyle, string?, string?, int?, int?, bool, string?)
Constructs a new text input component with the specified options.
public DiscordTextInputComponent(TextComponentStyle style, string? customId = null, string? placeholder = null, int? minLength = null, int? maxLength = null, bool required = true, string? defaultValue = null)
Parameters
styleTextComponentStyleThe style of the text input component.
customIdstringThe Id to assign to the text input component. Max
100characters.placeholderstringThe placeholder for the text input component. Max
100characters.minLengthint?The minimal length of text input.
maxLengthint?The maximal length of text input.
requiredboolWhether this text input component should be required.
defaultValuestringPre-filled value for text input component. Max
4000characters.