0.6.0 ā€¢ Published 12 months ago

@mtcute/client v0.6.0

Weekly downloads
-
License
MIT
Repository
-
Last release
12 months ago

@mtcute/client

šŸ“– API Reference

High-level Telegram client implementation over the @mtcute/core base library.

Features

  • Updates handling: Implements proper updates handling, including ordering and gap recovery (learn more)
  • Wrapper classes: Easy-to-use classes that wrap the complex TL objects and provide a clean interface
  • High-level methods: Methods that wrap the low-level API calls and provide a clean interface
  • Tree-shaking: Only import the methods you need, and the rest will not be included into the bundle
  • Web support: Works in the browser with no additional configuration

Usage

import { TelegramClient } from '@mtcute/client'

const tg = new TelegramClient({
    apiId: 12345,
    apiHash: '0123456789abcdef0123456789abcdef',
    // ... + supports all options from @mtcute/core ...
})

tg.start({
    phone: '+1234567890',
    password: () => prompt('Enter password'),
    code: () => prompt('Enter code'),
}, (user) => {
    console.log(`Logged in as ${user.displayName}`)
})

Note: for web, prefer BaseTelegramClient over TelegramClient, as it is tree-shakeable ā€“ learn more

0.5.0

12 months ago

0.6.0

12 months ago

0.4.0

12 months ago

0.3.0

1 year ago

0.2.2

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago