-
There are apis for getting updates of client? I haven't found any example |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
You need to set an Also, there is an Echo bot example: https://github.com/gotd/td/blob/main/examples/bot-echo/main.go#L37-L47 Also look at gap resolver example: https://github.com/gotd/td/blob/main/examples/updates-gap-recover/main.go Similiar question: #463 (comment) |
Beta Was this translation helpful? Give feedback.
-
Thanks @tdakkota The problem that i had is that i'm saving the update pts etc on my database ( postgres ) because i'm checking updates every 5 minutes. So i need a method that gives me all the updates since a certain point. There is this kind of method in the lib? Thank you |
Beta Was this translation helpful? Give feedback.
-
I think i found out:
|
Beta Was this translation helpful? Give feedback.
You need to set an
UpdateHandler
field in client options (telegram.Options
).Also, there is an
tg.UpdateDispatcher
type for dispatching updates by type.Echo bot example: https://github.com/gotd/td/blob/main/examples/bot-echo/main.go#L37-L47
Also look at gap resolver example: https://github.com/gotd/td/blob/main/examples/updates-gap-recover/main.go
Similiar question: #463 (comment)