Skip to content
This repository has been archived by the owner on Jan 17, 2025. It is now read-only.

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
teidesu committed Jun 26, 2024
1 parent f2aa118 commit 04417b5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
6 changes: 6 additions & 0 deletions guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ await tg.start()
deno run -A --unstable-ffi your-script.ts
```

Deno is also supported in `@mtcute/create-bot`, which is only available in npm:

```bash
deno run -A npm:@mtcute/create-bot my-awesome-bot
```

## Browser

For browsers, it is recommended to use [vite](https://vitejs.dev).
Expand Down
18 changes: 18 additions & 0 deletions guide/topics/raw-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,3 +178,21 @@ If `FormattedString` is passed (e.g. <code>md\`\*\*Hello!**\`</code>),
It returns a tuple containing text without any entities, and the entities
themselves (if applicable). If `text` was not provided, empty string
is returned.

## Fully custom requests

mtcute also allows you to send fully custom requests to the server.
This is useful if you want to use some undocumented or yet-unreleased APIs
and don't want to patch the library or use the TL schema override mechanism.

You can use the `mtcute.customRequest` pseudo-method for that:

```ts
const res = await tg.call({
_: 'mtcute.customRequest',
bytes: Buffer.from('11223344', 'hex'),
})
```

`bytes` will be send as-is to the server, and the response will be returned as a `Uint8Array`
for you to handle on your own (it might be useful to look into [`@mtcute/tl-runtime` package](https://ref.mtcute.dev/modules/_mtcute_tl_runtime.html))

0 comments on commit 04417b5

Please sign in to comment.