Table of Contents

Class DiscordButtonComponent

Namespace
DSharpPlus.Entities
Assembly
DSharpPlus.dll

Represents a button that can be pressed. Fires ComponentInteractionCreatedEventArgs when pressed.

public sealed class DiscordButtonComponent : DiscordComponent
Inheritance
DiscordButtonComponent
Inherited Members

Constructors

DiscordButtonComponent(DiscordButtonComponent)

Constucts a new button based on another button.

DiscordButtonComponent(DiscordButtonStyle, string, string, bool, DiscordComponentEmoji)

Constructs a new button with the specified options.

Properties

Disabled

Whether this button can be pressed.

Emoji

The emoji to add to the button. Can be used in conjunction with a label, or as standalone. Must be added if label is not specified.

Label

The text to apply to the button. If this is not specified Emoji becomes required.

Style

The style of the button.

Methods

Disable()

Disables this component.

Enable()

Enables this component if it was disabled before.