Class DiscordLinkButtonComponent
Represents a link button. Clicking a link button does not send an interaction.
Namespace: DisCatSharp.Entities
Assembly: DisCatSharp.dll
Syntax
public class DiscordLinkButtonComponent : DiscordComponent
Constructors
| Improve this Doc View SourceDiscordLinkButtonComponent()
Initializes a new instance of the DiscordLinkButtonComponent class.
Declaration
public DiscordLinkButtonComponent()
DiscordLinkButtonComponent(String, String, Boolean, DiscordComponentEmoji)
Constructs a new DiscordLinkButtonComponent. This type of button does not send back and interaction when pressed.
Declaration
public DiscordLinkButtonComponent(string url, string label, bool disabled = false, DiscordComponentEmoji emoji = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | url | The url to set the button to. |
System.String | label | The text to display on the button. Can be left blank if |
System.Boolean | disabled | Whether or not this button can be pressed. |
DiscordComponentEmoji | emoji | The emoji to set with this button. This is required if |
Properties
| Improve this Doc View SourceDisabled
Whether this button can be pressed.
Declaration
public bool Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Emoji
The emoji to add to the button. Can be used in conjunction with a label, or as standalone. Must be added if label is not specified.
Declaration
public DiscordComponentEmoji Emoji { get; set; }
Property Value
Type | Description |
---|---|
DiscordComponentEmoji |
Label
The text to add to this button. If this is not specified, Emoji must be.
Declaration
public string Label { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Url
The url to open when pressing this button.
Declaration
public string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceDisable()
Disables this component.
Declaration
public DiscordLinkButtonComponent Disable()
Returns
Type | Description |
---|---|
DiscordLinkButtonComponent | The current component. |
Enable()
Enables this component if it was disabled before.
Declaration
public DiscordLinkButtonComponent Enable()
Returns
Type | Description |
---|---|
DiscordLinkButtonComponent | The current component. |