Constructor DiscordButtonComponent
- Namespace
- DSharpPlus.Entities
- Assembly
- DSharpPlus.dll
DiscordButtonComponent(DiscordButtonComponent)
Constucts a new button based on another button.
public DiscordButtonComponent(DiscordButtonComponent other)
Parameters
other
DiscordButtonComponentThe 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
style
DiscordButtonStyleThe style/color of the button.
customId
stringThe Id to assign to the button. This is sent back when a user presses it.
label
stringThe text to display on the button, up to 80 characters. Can be left blank if
emoji
is set.disabled
boolWhether this button should be initialized as being disabled. User sees a greyed out button that cannot be interacted with.
emoji
DiscordComponentEmojiThe emoji to add to the button. This is required if
label
is empty or null.