Skip to content

Commit

Permalink
chore: add code-group at keyboards usage and redirect to wrapper with…
Browse files Browse the repository at this point in the history
… file support
  • Loading branch information
kravetsone committed Feb 17, 2024
1 parent 0afcd62 commit e5461e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 10 additions & 3 deletions docs/keyboards/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ bun install @gramio/keyboards

## Usage

```ts twoslash
::: code-group

```ts twoslash [with GramIO]
import { Keyboard } from "gramio";

const keyboard = new Keyboard().text("first row").row().text("second row");
```

```ts twoslash [without GramIO]
import { Keyboard } from "@gramio/keyboards";

const keyboard = new Keyboard()
Expand All @@ -38,8 +46,7 @@ const keyboard = new Keyboard()
.toJSON();
```

> [!IMPORTANT]
> In gramio, you don't have to use the ".toJSON" method
:::

## Usage with Frameworks

Expand Down
4 changes: 4 additions & 0 deletions docs/types/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ api.sendMessage({
});
```

### With file upload support

See [files/usage-without-gramio](/files/usage-without-gramio)

## Generate types manually

Prerequire - [`rust`](https://www.rust-lang.org/)
Expand Down

0 comments on commit e5461e3

Please sign in to comment.