diff --git a/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java b/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java index 3640594..f417e6e 100644 --- a/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java +++ b/src/main/java/org/sadtech/bot/core/domain/BoxAnswer.java @@ -12,7 +12,7 @@ public class BoxAnswer { private Float aLong; private Integer stickerId; - public BoxAnswer() { + private BoxAnswer() { } diff --git a/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java b/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java index 236ccc9..43b0611 100644 --- a/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java +++ b/src/main/java/org/sadtech/bot/core/domain/keyboard/KeyBoardLine.java @@ -29,7 +29,7 @@ public class KeyBoardLine { } - public Builder setButtonKeyBoard(KeyBoardButton keyBoardButton) { + public Builder buttonKeyBoard(KeyBoardButton keyBoardButton) { KeyBoardLine.this.keyBoardButtons.add(keyBoardButton); return this; } diff --git a/src/main/java/org/sadtech/bot/core/service/KeyBoards.java b/src/main/java/org/sadtech/bot/core/service/KeyBoards.java index a9b54d7..4c04ed7 100644 --- a/src/main/java/org/sadtech/bot/core/service/KeyBoards.java +++ b/src/main/java/org/sadtech/bot/core/service/KeyBoards.java @@ -16,7 +16,7 @@ public class KeyBoards { public static KeyBoard keyBoardYesNo() { KeyBoardButton yesButton = KeyBoardButton.builder().color(ButtonColor.POSITIVE).label("Да").payload("{\"button\": \"yes\"}").build(); KeyBoardButton noButton = KeyBoardButton.builder().color(ButtonColor.NEGATIVE).label("Нет").payload("{\"button\": \"no\"}").build(); - KeyBoardLine keyBoardLine = KeyBoardLine.builder().setButtonKeyBoard(yesButton).setButtonKeyBoard(noButton).build(); + KeyBoardLine keyBoardLine = KeyBoardLine.builder().buttonKeyBoard(yesButton).buttonKeyBoard(noButton).build(); return KeyBoard.builder().lineKeyBoard(keyBoardLine).oneTime(true).build(); } @@ -24,7 +24,7 @@ public class KeyBoards { KeyBoard.Builder keyBoard = KeyBoard.builder().oneTime(true); for (String labelButton : labelButtons) { KeyBoardButton keyBoardButton = KeyBoardButton.builder().label(labelButton).payload("{\"button\": \"" + labelButton + "\"}").build(); - keyBoard.lineKeyBoard(KeyBoardLine.builder().setButtonKeyBoard(keyBoardButton).build()); + keyBoard.lineKeyBoard(KeyBoardLine.builder().buttonKeyBoard(keyBoardButton).build()); } return keyBoard.build(); } @@ -32,7 +32,7 @@ public class KeyBoards { public static KeyBoard verticalMenuButton(List keyBoardButtons) { KeyBoard.Builder keyBoard = KeyBoard.builder().oneTime(true); for (KeyBoardButton keyBoardButton : keyBoardButtons) { - keyBoard.lineKeyBoard(KeyBoardLine.builder().setButtonKeyBoard(keyBoardButton).build()); + keyBoard.lineKeyBoard(KeyBoardLine.builder().buttonKeyBoard(keyBoardButton).build()); } return keyBoard.build(); }