DiscordMessageComponentButton class
Buttons are interactive components that render on messages. They can be clicked by users, and send an interaction to your app when clicked.
- Buttons must be sent inside an Action Row
- An Action Row can contain up to 5 buttons
- An Action Row containing buttons cannot also contain a select menu
- Inheritance
-
- Object
- DiscordMessageComponent
- DiscordMessageComponentButton
Constructors
- DiscordMessageComponentButton({required int style, String? label, DiscordEmoji? emoji, String? customId, String? url, bool? disabled})
-
DiscordMessageComponentButton.fromJson(Map<
String, dynamic> json) -
factory
Properties
- customId → String?
-
a developer-defined identifier for the button,
max 100 characters
final
- disabled → bool?
-
whether the button is disabled (default
false
)final - emoji → DiscordEmoji?
-
with the fields
name
,id
, andanimated
final - hashCode → int
-
The hash code for this object.
no setterinherited
- label → String?
-
text that appears on the button, max 80 characters
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → int
-
one of button styles
final
- styleAsEnum → DiscordMessageComponentButtonStyle
-
no setter
- type → int
-
The type of component
finalinherited
- typeAsEnum → DiscordMessageComponentType
-
no setterinherited
- url → String?
-
a url for link-style buttons
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- customIdEntry → const String
- disabledEntry → const String
- emojiEntry → const String
- labelEntry → const String
- styleEntry → const String
- urlEntry → const String