Search Results for

    Show / Hide Table of Contents

    Class DiscordLinkButtonComponent

    Represents a link button. Clicking a link button does not send an interaction.

    Inheritance
    System.Object
    DiscordComponent
    DiscordLinkButtonComponent
    Inherited Members
    DiscordComponent.Type
    DiscordComponent.CustomId
    Namespace: DisCatSharp.Entities
    Assembly: DisCatSharp.dll
    Syntax
    public class DiscordLinkButtonComponent : DiscordComponent

    Constructors

    | Improve this Doc View Source

    DiscordLinkButtonComponent()

    Initializes a new instance of the DiscordLinkButtonComponent class.

    Declaration
    public DiscordLinkButtonComponent()
    | Improve this Doc View Source

    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 emoji is set.

    System.Boolean disabled

    Whether or not this button can be pressed.

    DiscordComponentEmoji emoji

    The emoji to set with this button. This is required if label is null or empty.

    Properties

    | Improve this Doc View Source

    Disabled

    Whether this button can be pressed.

    Declaration
    public bool Disabled { get; set; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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 Source

    Disable()

    Disables this component.

    Declaration
    public DiscordLinkButtonComponent Disable()
    Returns
    Type Description
    DiscordLinkButtonComponent

    The current component.

    | Improve this Doc View Source

    Enable()

    Enables this component if it was disabled before.

    Declaration
    public DiscordLinkButtonComponent Enable()
    Returns
    Type Description
    DiscordLinkButtonComponent

    The current component.

    Extension Methods

    ReflectionUtilities.ToDictionary<T>(T)
    • Improve this Doc
    • View Source
    In This Article
    Back to top © 2021-2022 Aiko IT Systems