diff --git a/docs/keyboards/inline-keyboard.md b/docs/keyboards/inline-keyboard.md index 6e5c47b..e8d0c50 100644 --- a/docs/keyboards/inline-keyboard.md +++ b/docs/keyboards/inline-keyboard.md @@ -265,3 +265,19 @@ handler is ```ts (options: { index: number; rowIndex: number }) => T; ``` + +### combine + +Allows you to combine keyboards. Only keyboards are combined. You need to call the `.row()` method to line-break after combine. + +```ts +new InlineKeyboard() + .combine(new InlineKeyboard().text("first row", "payload")) + .row() + .combine( + new InlineKeyboard() + .text("second row", "payload") + .row() + .text("third row", "payload") + ); +``` diff --git a/docs/keyboards/keyboard.md b/docs/keyboards/keyboard.md index 66c5da0..748784d 100644 --- a/docs/keyboards/keyboard.md +++ b/docs/keyboards/keyboard.md @@ -276,3 +276,14 @@ handler is ```ts (options: { index: number; rowIndex: number }) => T; ``` + +### combine + +Allows you to combine keyboards. Only keyboards are combined. You need to call the `.row()` method to line-break after combine. + +```ts +new Keyboard() + .combine(new Keyboard().text("first")) + .row() + .combine(new Keyboard().text("second").row().text("third")); +```