Class DiscordComponentData
Represents a discord components API model. Docs: https://discord.com/developers/docs/interactions/message-components#component-object
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
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 SourceButtonStyle
The style the button.
Declaration
[JsonPropertyName("style")]
public DiscordButtonStyle? ButtonStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DiscordButtonStyle> |
ChildComponents
A list of child components.
Declaration
[JsonPropertyName("components")]
public IEnumerable<DiscordComponentData> ChildComponents { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<DiscordComponentData> |
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 |
Disabled
Whether the button is disabled, default false
Declaration
[JsonPropertyName("disabled")]
public bool? Disabled { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Boolean> |
Emoji
Partial emoji data. Name, id, and animated.
Declaration
[JsonPropertyName("emoji")]
public DiscordEmojiData Emoji { get; set; }
Property Value
Type | Description |
---|---|
DiscordEmojiData |
Label
Text that appears on the button, max 80 characters.
Declaration
[JsonPropertyName("label")]
public string Label { get; set; }
Property Value
Type | Description |
---|---|
String |
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> |
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> |
Placeholder
Custom placeholder text if nothing is selected, max 100 characters.
Declaration
[JsonPropertyName("placeholder")]
public string Placeholder { get; set; }
Property Value
Type | Description |
---|---|
String |
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> |
Type
The component type.
Declaration
[JsonPropertyName("type")]
public DiscordComponentType Type { get; set; }
Property Value
Type | Description |
---|---|
DiscordComponentType |
Url
Url for link-style buttons.
Declaration
[JsonPropertyName("url")]
public string Url { get; set; }
Property Value
Type | Description |
---|---|
String |