eilvelia / tdl

Node.js bindings to TDLib 🥒
MIT License
411 stars 53 forks source link

[Question] Event list ? #137

Closed KaKi87 closed 5 months ago

KaKi87 commented 1 year ago

Hello,

The README mentions two events, update and error :

https://github.com/Bannerets/tdl/blob/1e1401e3ad63514c262958de010797ededc58d8f/README.md?plain=1#L162-L175

Would it be possible to write an exhaustive list ?

Thanks

eilvelia commented 5 months ago

Since tdl v8.0.0, all events except update, error, close are removed, and close is documented.

(edit: reworded)

KaKi87 commented 5 months ago

Then now to listen to messages ?

And how are errors now handled ?

Thanks

eilvelia commented 5 months ago

I meant "other [than update or error]", sorry, so update, error, and close are now left. (The other ones were too advanced / deprecated.)

KaKi87 commented 5 months ago

Okay, but then how to receive messages ?

Thanks

eilvelia commented 5 months ago

Using the update handler (and filtering for updateNewMessage) or the recently added client.iterUpdates.