Search Results for

    Show / Hide Table of Contents

    Interface IDiscordComponent

    Represents a discord components API model. Docs: https://discord.com/developers/docs/interactions/message-components#component-object

    Namespace: Color_Chan.Discord.Core.Common.Models
    Assembly: Color-Chan.Discord.Core.dll
    Syntax
    public interface IDiscordComponent

    Properties

    | Improve this Doc View Source

    ButtonStyle

    The style the button.

    Declaration
    DiscordButtonStyle? ButtonStyle { get; set; }
    Property Value
    Type Description
    System.Nullable<DiscordButtonStyle>
    | Improve this Doc View Source

    ChildComponents

    A list of child components.

    Declaration
    IEnumerable<IDiscordComponent> ChildComponents { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<IDiscordComponent>
    | Improve this Doc View Source

    CustomId

    A developer-defined identifier for the button, max 100 characters.

    Declaration
    string CustomId { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Disabled

    Whether the button is disabled, default false

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

    Emoji

    Partial emoji data. Name, id, and animated.

    Declaration
    IDiscordEmoji Emoji { get; set; }
    Property Value
    Type Description
    IDiscordEmoji
    | Improve this Doc View Source

    Label

    Text that appears on the button, max 80 characters.

    Declaration
    string Label { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    MaxValues

    The maximum number of items that can be chosen; default 1, max 25.

    Declaration
    int? MaxValues { get; set; }
    Property Value
    Type Description
    System.Nullable<Int32>
    | Improve this Doc View Source

    MinValues

    The minimum number of items that must be chosen; default 1, min 0, max 25.

    Declaration
    int? MinValues { get; set; }
    Property Value
    Type Description
    System.Nullable<Int32>
    | Improve this Doc View Source

    Placeholder

    Custom placeholder text if nothing is selected, max 100 characters.

    Declaration
    string Placeholder { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    SelectOptions

    The choices in the select, max 25.

    Declaration
    List<IDiscordSelectOption> SelectOptions { get; set; }
    Property Value
    Type Description
    List<IDiscordSelectOption>
    | Improve this Doc View Source

    Type

    The component type.

    Declaration
    DiscordComponentType Type { get; set; }
    Property Value
    Type Description
    DiscordComponentType
    | Improve this Doc View Source

    Url

    Url for link-style buttons.

    Declaration
    string Url { get; set; }
    Property Value
    Type Description
    String

    Methods

    | Improve this Doc View Source

    ToDataModel()

    Converts the model back to a discord data model so that it can be send to discord.

    Declaration
    DiscordComponentData ToDataModel()
    Returns
    Type Description
    DiscordComponentData

    The converted DiscordComponentData.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX