Merge pull request #709 from recursiveribbons/keyboard-constructors

Added constructor for setting keyboard in the ReplyKeyboard types
This commit is contained in:
Ruben Bermudez 2019-12-31 03:28:57 +01:00 committed by GitHub
commit e4b4c07e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -29,6 +29,11 @@ public class InlineKeyboardMarkup implements ReplyKeyboard {
keyboard = new ArrayList<>();
}
public InlineKeyboardMarkup(List<List<InlineKeyboardButton>> keyboard) {
super();
this.keyboard = keyboard;
}
public List<List<InlineKeyboardButton>> getKeyboard() {
return keyboard;
}

View File

@ -43,6 +43,11 @@ public class ReplyKeyboardMarkup implements ReplyKeyboard {
keyboard = new ArrayList<>();
}
public ReplyKeyboardMarkup(List<KeyboardRow> keyboard) {
super();
this.keyboard = keyboard;
}
public List<KeyboardRow> getKeyboard() {
return keyboard;
}