Repository navigation
|
There are apis for getting updates of client? I haven't found any example |
Answered by
ghost
Nov 22, 2021
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) |
0 replies
Answer selected by
ernado
|
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 |
0 replies
|
I think i found out: |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You need to set an
UpdateHandlerfield in client options (telegram.Options).Also, there is an
tg.UpdateDispatchertype 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)