Skip to content
/ tglib Public
forked from nodegin/tglib

TDLib (Telegram Database library) bindings for Node.js

Notifications You must be signed in to change notification settings

MJBaek/tglib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tglib

TDLib (Telegram Database library) bindings for Node.js


Getting started

  1. Build your own TDLib binary (https://github.com/tdlib/td#building)
  2. npm i -S tglib
  3. Use it!

Handling updates and errors

By default, tglib will handle the incoming updates internally. You can attach your own event listener for receiving updates and errors.


Fetch

Since TDLib is asynchronous, if you need to use some API like getChats, you need to add the @extra property to your query in client._send and filter the corresponding result in client._receive by matching the same @extra property that defined previously.

tglib provides an easy and convenient way to deal with these API called client.fetch, all you need to do is call the function and awaits for the result. tglib will take care of client._send and client._receive.


License

MIT

About

TDLib (Telegram Database library) bindings for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%