Interface ButtonBuilderDelegate
-
- All Superinterfaces:
ComponentBuilderDelegate
public interface ButtonBuilderDelegate extends ComponentBuilderDelegate
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Buttonbuild()Creates aButtoninstance with the given values.voidcopy(Button button)Copy a button's values into the builder.java.lang.StringgetCustomId()Get the button's component identifier.EmojigetEmoji()Get the button's emoji.java.lang.StringgetLabel()Get the button's label.ButtonStylegetStyle()Get the button's style.ComponentTypegetType()Get the button's type.java.lang.StringgetUrl()Get the button's clickable URL.java.lang.BooleanisDisabled()Get whether the button is disabled.voidsetCustomId(java.lang.String customId)Set the button's custom ID.voidsetDisabled(java.lang.Boolean isDisabled)Set the button to disabled.voidsetEmoji(java.lang.String unicode)Set the button's emoji based on a unicode character.voidsetEmoji(CustomEmoji emoji)Set the button's emoji to a custom emoji.voidsetEmoji(Emoji emoji)Set the button's emoji.voidsetLabel(java.lang.String label)Set the button's label.voidsetStyle(ButtonStyle style)Set the button's style.voidsetUrl(java.lang.String url)Set the button's URL.
-
-
-
Method Detail
-
getType
ComponentType getType()
Get the button's type.- Returns:
- Always
ComponentType.BUTTON
-
copy
void copy(Button button)
Copy a button's values into the builder.- Parameters:
button- The button to copy.
-
setEmoji
void setEmoji(CustomEmoji emoji)
Set the button's emoji to a custom emoji.- Parameters:
emoji- The custom emoji.
-
setEmoji
void setEmoji(java.lang.String unicode)
Set the button's emoji based on a unicode character.- Parameters:
unicode- The unicode emoji character.
-
setEmoji
void setEmoji(Emoji emoji)
Set the button's emoji.- Parameters:
emoji- The button's emoji.
-
getStyle
ButtonStyle getStyle()
Get the button's style.- Returns:
- The button's style.
-
getLabel
java.lang.String getLabel()
Get the button's label.- Returns:
- The button's label.
-
getCustomId
java.lang.String getCustomId()
Get the button's component identifier.- Returns:
- The button's component identifier.
-
getUrl
java.lang.String getUrl()
Get the button's clickable URL.- Returns:
- The button's clickable URL.
-
isDisabled
java.lang.Boolean isDisabled()
Get whether the button is disabled.- Returns:
- Whether the button is disabled.
-
getEmoji
Emoji getEmoji()
Get the button's emoji.- Returns:
- The button's emoji.
-
setStyle
void setStyle(ButtonStyle style)
Set the button's style.- Parameters:
style- The style of the button.
-
setLabel
void setLabel(java.lang.String label)
Set the button's label.- Parameters:
label- The button's label.
-
setCustomId
void setCustomId(java.lang.String customId)
Set the button's custom ID.- Parameters:
customId- The button's identifier.
-
setUrl
void setUrl(java.lang.String url)
Set the button's URL.- Parameters:
url- The button's clickable URL.
-
setDisabled
void setDisabled(java.lang.Boolean isDisabled)
Set the button to disabled.- Parameters:
isDisabled- Whether the button is disabled or not.
-
-