mtcute/packages/deno/README.md

26 lines
610 B
Markdown
Raw Normal View History

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'
})
tg.run(async (user) => {
console.log(`✨ logged in as ${user.displayName}`)
})
```