Class SelectMenuOptionBuilder
Represents a class used to build Discord.SelectMenuOption's.
Assembly: Discord.Net.Core.dll​
View Source​
public class SelectMenuOptionBuilder
Properties​
Label​
Gets or sets the label of the current select menu.
View Source​
public string Label { get; set; }
Value​
Gets or sets the value of the current select menu.
View Source​
public string Value { get; set; }
Description​
Gets or sets this menu options description.
View Source​
public string Description { get; set; }
Emote​
Gets or sets the emote of this option.
View Source​
public IEmote Emote { get; set; }
IsDefault​
Gets or sets the whether or not this option will render selected by default.
View Source​
public bool? IsDefault { get; set; }
Fields​
MaxSelectLabelLength​
The maximum length of a Discord.SelectMenuOption.Label.
View Source​
public const int MaxSelectLabelLength = 100
MaxDescriptionLength​
The maximum length of a Discord.SelectMenuOption.Description.
View Source​
public const int MaxDescriptionLength = 100
MaxSelectValueLength​
The maximum length of a Discord.SelectMenuOption.Value.
View Source​
public const int MaxSelectValueLength = 100
Methods​
WithLabel(String)​
Sets the field label.
View Source​
public SelectMenuOptionBuilder WithLabel(string label)
Returns​
Discord.SelectMenuOptionBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.String | label | The value to set the field label to. |
WithValue(String)​
Sets the field value.
View Source​
public SelectMenuOptionBuilder WithValue(string value)
Returns​
Discord.SelectMenuOptionBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.String | value | The value to set the field value to. |
WithDescription(String)​
Sets the field description.
View Source​
public SelectMenuOptionBuilder WithDescription(string description)
Returns​
Discord.SelectMenuOptionBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.String | description | The value to set the field description to. |
WithEmote(IEmote)​
Sets the field emote.
View Source​
public SelectMenuOptionBuilder WithEmote(IEmote emote)
Returns​
Discord.SelectMenuOptionBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
Discord.IEmote | emote | The value to set the field emote to. |
WithDefault(Boolean)​
Sets the field default.
View Source​
public SelectMenuOptionBuilder WithDefault(bool isDefault)
Returns​
Discord.SelectMenuOptionBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.Boolean | isDefault | The value to set the field default to. |
Build()​
Builds a Discord.SelectMenuOption.
View Source​
public SelectMenuOption Build()
Returns​
Discord.SelectMenuOption: The newly built Discord.SelectMenuOption.