Class LinkButtonProperties
public class LinkButtonProperties : ICustomizableButtonProperties, IButtonProperties, IActionRowComponentProperties, IJsonSerializable<IActionRowComponentProperties>, IComponentSectionAccessoryComponentProperties, IComponentProperties, IJsonSerializable<IComponentSectionAccessoryComponentProperties>
- Inheritance
-
LinkButtonProperties
- Implements
- Inherited Members
Constructors
LinkButtonProperties(string, EmojiProperties)
public LinkButtonProperties(string url, EmojiProperties emoji)
Parameters
urlstringUrl of the button.
emojiEmojiPropertiesEmoji that appears on the button.
LinkButtonProperties(string, string)
public LinkButtonProperties(string url, string label)
Parameters
LinkButtonProperties(string, string, EmojiProperties)
public LinkButtonProperties(string url, string label, EmojiProperties emoji)
Parameters
urlstringUrl of the button.
labelstringText that appears on the button (max 80 characters).
emojiEmojiPropertiesEmoji that appears on the button.
Properties
ComponentType
Type of the component.
[JsonPropertyName("type")]
public ComponentType ComponentType { get; }
Property Value
Disabled
Whether the button is disabled.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("disabled")]
public bool Disabled { get; set; }
Property Value
Emoji
Emoji that appears on the button.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("emoji")]
public EmojiProperties? Emoji { get; set; }
Property Value
Id
Unique identifier for the component. Auto populated through increment if not provided.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("id")]
public int? Id { get; set; }
Property Value
- int?
Label
Text that appears on the button (max 80 characters).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("label")]
public string? Label { get; set; }
Property Value
Style
Style of the button.
[JsonPropertyName("style")]
public ButtonStyle Style { get; }
Property Value
Url
Url of the button.
[JsonPropertyName("url")]
public string Url { get; set; }
Property Value
Methods
WithDisabled(bool)
Whether the button is disabled.
public LinkButtonProperties WithDisabled(bool disabled = true)
Parameters
disabledbool
Returns
WithEmoji(EmojiProperties?)
Emoji that appears on the button.
public LinkButtonProperties WithEmoji(EmojiProperties? emoji)
Parameters
emojiEmojiProperties
Returns
WithId(int?)
Unique identifier for the component. Auto populated through increment if not provided.
public LinkButtonProperties WithId(int? id)
Parameters
idint?
Returns
WithLabel(string?)
Text that appears on the button (max 80 characters).
public LinkButtonProperties WithLabel(string? label)
Parameters
labelstring
Returns
WithUrl(string)
Url of the button.
public LinkButtonProperties WithUrl(string url)
Parameters
urlstring