use of org.javacord.api.entity.message.component.ButtonStyle in project Javacord by BtoBastian.
the class ButtonBuilderDelegateImpl method copy.
@Override
public void copy(Button button) {
Optional<String> customId = button.getCustomId();
Optional<String> url = button.getUrl();
Optional<String> label = button.getLabel();
Optional<Emoji> emoji = button.getEmoji();
Optional<Boolean> isDisabled = button.isDisabled();
ButtonStyle style = button.getStyle();
this.setStyle(style);
customId.ifPresent(this::setCustomId);
url.ifPresent(this::setUrl);
label.ifPresent(this::setLabel);
emoji.ifPresent(this::setEmoji);
isDisabled.ifPresent(this::setDisabled);
}
Aggregations