mtcute/packages/bun
2024-04-21 04:53:09 +03:00
..
src fix(bun): handle backpressure for tcp connections 2024-03-29 20:45:43 +03:00
build.config.cjs feat: @mtcute/bun package for initial first-class bun support 2024-03-23 18:13:31 +03:00
package.json build: initial support for jsr building 2024-04-21 04:53:09 +03:00
README.md feat: @mtcute/bun package for initial first-class bun support 2024-03-23 18:13:31 +03:00
tsconfig.json feat: @mtcute/bun package for initial first-class bun support 2024-03-23 18:13:31 +03:00
typedoc.cjs feat: @mtcute/bun package for initial first-class bun support 2024-03-23 18:13:31 +03:00

@mtcute/bun

📖 API Reference

‼️ Experimental Bun support package for mtcute. Includes:

  • SQLite storage (based on bun:sqlite)
  • TCP transport (based on Bun-native APIs)
  • TelegramClient implementation using the above
  • HTML and Markdown parsers

Usage

import { TelegramClient } from '@mtcute/bun'

const tg = new TelegramClient({
    apiId: 12345,
    apiHash: 'abcdef',
    storage: 'my-account'
})

tg.run(async (user) => {
    console.log(`✨ logged in as ${user.displayName}`)
})