2024-04-29 16:42:58 +03:00
|
|
|
# @mtcute/deno
|
2024-04-28 22:41:28 +03:00
|
|
|
|
|
|
|
📖 [API Reference](https://ref.mtcute.dev/modules/_mtcute_deno.html)
|
|
|
|
|
|
|
|
‼️ **Experimental** Deno support package for mtcute. Includes:
|
|
|
|
- SQLite storage (based on [`@db/sqlite`](https://jsr.io/@db/sqlite))
|
|
|
|
- TCP transport (based on Deno-native APIs)
|
|
|
|
- `TelegramClient` implementation using the above
|
|
|
|
- HTML and Markdown parsers
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
import { TelegramClient } from '@mtcute/deno'
|
|
|
|
|
|
|
|
const tg = new TelegramClient({
|
|
|
|
apiId: 12345,
|
|
|
|
apiHash: 'abcdef',
|
|
|
|
storage: 'my-account'
|
|
|
|
})
|
|
|
|
|
2024-07-26 06:46:18 +03:00
|
|
|
const self = await tg.start()
|
|
|
|
console.log(`✨ logged in as ${self.displayName}`)
|
2024-04-28 22:41:28 +03:00
|
|
|
```
|