TDLib bindings for Node.js.
Paper Plane is a package for easing the interaction with TDLib through Node.js. It's completely asynchrounus, blazing fast and reliable, so you can build a Telegram client with no worries of MTProto or Telegram API.
npm i -S tg-paper-plane
Note: TDlib library (libtdjson.so
) must be installed on your machine.
A fully functioning but simple client is available at example/
directory. Before using it, make sure you have an app in Telegram Development Tools. Set TD_API_ID
and TD_API_HASH
environment variables. You can get these for your own from Telegram account tools.
TDlib has a complete documentation of methods, types and everything else in the library.
- Added a
Promise.race
for async queries, so it won't return continuousTime out
responses.
fetch
function now handles errors correctly.
- Fixed a minor typo with
this.fetching
which caused the whole client to stop working :)
- Added encryptionKey parameter to class constructor, so the class can be used for encrypted databases, too. Also,
authorizationWaitEncryptionKey
is automatically handled by Paper Plane.
- Call
this.resolver
when an AuthReady received from TDlib.
- Removed Babel from dependencies,
- Set Node.js required version to
>=8.0.0
, - Added JSDoc comments for each function in class,
- Updated example,
- and squished a few bugs.