Skip to content

Commit

Permalink
chore: add combine keyboard method docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed Feb 5, 2024
1 parent 05ebac1 commit cf86dca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/keyboards/inline-keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
);
```
11 changes: 11 additions & 0 deletions docs/keyboards/keyboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
```

0 comments on commit cf86dca

Please sign in to comment.