Search Results for

    Show / Hide Table of Contents

    Class DiscordComponentData

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

    Inheritance
    Object
    DiscordComponentData
    Implements
    IEquatable<DiscordComponentData>
    Inherited Members
    System.Object.Equals(System.Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Object.ToString()
    Namespace: Color_Chan.Discord.Core.Common.API.DataModels
    Assembly: Color-Chan.Discord.Core.dll
    Syntax
    public class DiscordComponentData : IEquatable<DiscordComponentData>

    Properties

    | Improve this Doc View Source

    ButtonStyle

    The style the button.

    Declaration
    [JsonPropertyName("style")]
    public DiscordButtonStyle? ButtonStyle { get; set; }
    Property Value
    Type Description
    System.Nullable<DiscordButtonStyle>
    | Improve this Doc View Source

    ChildComponents

    A list of child components.

    Declaration
    [JsonPropertyName("components")]
    public IEnumerable<DiscordComponentData> ChildComponents { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordComponentData>
    | Improve this Doc View Source

    CustomId

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

    Declaration
    [JsonPropertyName("custom_id")]
    public string CustomId { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Disabled

    Whether the button is disabled, default false

    Declaration
    [JsonPropertyName("disabled")]
    public 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
    [JsonPropertyName("emoji")]
    public DiscordEmojiData Emoji { get; set; }
    Property Value
    Type Description
    DiscordEmojiData
    | Improve this Doc View Source

    Label

    Text that appears on the button, max 80 characters.

    Declaration
    [JsonPropertyName("label")]
    public 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
    [JsonPropertyName("max_values")]
    public 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
    [JsonPropertyName("min_values")]
    public 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
    [JsonPropertyName("placeholder")]
    public string Placeholder { get; set; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    SelectOptions

    The choices in the select, max 25.

    Declaration
    [JsonPropertyName("options")]
    public IEnumerable<DiscordSelectOptionData> SelectOptions { get; set; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<DiscordSelectOptionData>
    | Improve this Doc View Source

    Type

    The component type.

    Declaration
    [JsonPropertyName("type")]
    public DiscordComponentType Type { get; set; }
    Property Value
    Type Description
    DiscordComponentType
    | Improve this Doc View Source

    Url

    Url for link-style buttons.

    Declaration
    [JsonPropertyName("url")]
    public string Url { get; set; }
    Property Value
    Type Description
    String

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX