Constructor DiscordButtonComponent
- Namespace
 - DSharpPlus.Entities
 
- Assembly
 - DSharpPlus.dll
 
DiscordButtonComponent(DiscordButtonComponent)
Constucts a new button based on another button.
public DiscordButtonComponent(DiscordButtonComponent other)
Parameters
otherDiscordButtonComponentThe button to copy.
DiscordButtonComponent(DiscordButtonStyle, string, string, bool, DiscordComponentEmoji)
Constructs a new button with the specified options.
public DiscordButtonComponent(DiscordButtonStyle style, string customId, string label, bool disabled = false, DiscordComponentEmoji emoji = null)
Parameters
styleDiscordButtonStyleThe style/color of the button.
customIdstringThe Id to assign to the button. This is sent back when a user presses it.
labelstringThe text to display on the button, up to 80 characters. Can be left blank if
emojiis set.disabledboolWhether this button should be initialized as being disabled. User sees a greyed out button that cannot be interacted with.
emojiDiscordComponentEmojiThe emoji to add to the button. This is required if
labelis empty or null.