Skip to content

Updates: How to get updates #573

Answered by tdakkota
Kliton asked this question in Q&A
Nov 22, 2021 · 3 comments · 1 reply
Discussion options

You must be logged in to vote

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)

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ernado
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ernado
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
3 participants
Converted from issue

This discussion was converted from issue #572 on November 22, 2021 12:41.