B
B
bsbak2021-02-07 14:40:00
API
bsbak, 2021-02-07 14:40:00

Golang how to read message from Telegram chat?

Good afternoon! Subscribed to the TG channel, you need to receive a new message from this channel when it appears! I can’t figure out how to implement this in Go, only bots, bots everywhere ... Can anyone provide an implementation example or a link, gist?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dvoeglazyi, 2021-11-13
@dvoeglazyi

Telegram has a Bot API, which, apparently, is not suitable in this case, because access is not through the bot account, right?
Telegram also has a Telegram API that allows you to work through a user account. It can work under the MTProto protocol. Telegram also provides its own C library TDLib for this API (I don't know how it works). Accordingly, option 2:

  • Binding C-lib TDLib for Golang
  • Work through MTProto in pure Golang

Both tasks have already been performed by someone - similar libraries can be found.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question