Class ButtonComponent
- Namespace
- Discord
- Assembly
- Discord.Net.Core.dll
Represents a IMessageComponent Button.
public class ButtonComponent : IMessageComponent
- Inheritance
-
ButtonComponent
- Implements
- Inherited Members
Properties
CustomId
Gets the custom id of the component if possible; otherwise null.
public string CustomId { get; }
Property Value
Emote
Gets the IEmote displayed with this button.
public IEmote Emote { get; }
Property Value
IsDisabled
Gets whether this button is disabled or not.
public bool IsDisabled { get; }
Property Value
Label
Gets the label of the button, this is the text that is shown.
public string Label { get; }
Property Value
SkuId
Gets the id of the sku associated with the current button.
public ulong? SkuId { get; }
Property Value
Remarks
Style
Gets the ButtonStyle of this button, example buttons with each style can be found Here.
public ButtonStyle Style { get; }
Property Value
Type
Gets the ComponentType of this Message Component.
public ComponentType Type { get; }
Property Value
Url
Gets the URL for a Link button.
public string Url { get; }
Property Value
Remarks
You cannot have a button with a URL and a CustomId.
Methods
ToBuilder()
Turns this button into a button builder.
public ButtonBuilder ToBuilder()
Returns
- ButtonBuilder
A newly created button builder with the same properties as this button.