node-tlg
NodeJS API for the TDLib. It helps you build your own Telegram Client. Full support Secret Chat feature.
Installation
- Build the binary (https://github.com/tdlib/td#building)
npm i tlg
Usage
const Client = { const client = apiId: 999999 apiHash: '7cb3e46a69d2e69753744e216eb4e613' try await client await client await client await client client catche console }
Examples
See examples/ folder.
Requirements
- TDLib binary (
libtdjson.so
on Linux,libtdjson.dylib
on macOS,tdjson.dll
on Windows) - NodeJs version >= 10.0.0
Building for Linux Debian 9.5
apt-get updateapt-get install cmake gperf ccache libssl-dev zlib1g-dev libreadline-dev clang ninja-build git clone https://github.com/tdlib/td.gitcd td mkdir buildcd build CXX=clang++ CC=clang cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..ninja cp libtdjson.so /path/to/your-app-folder