https://github.com/devalecs/tgo
Telegram bot API Client written in Golang
https://github.com/devalecs/tgo
api bot client golang telegram
Last synced: 5 months ago
JSON representation
Telegram bot API Client written in Golang
- Host: GitHub
- URL: https://github.com/devalecs/tgo
- Owner: devalecs
- License: mit
- Created: 2017-01-28T22:51:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-29T23:01:14.000Z (over 9 years ago)
- Last Synced: 2025-10-01T05:25:10.966Z (9 months ago)
- Topics: api, bot, client, golang, telegram
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 26
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Telegram bot API Client written in Golang
[](https://travis-ci.org/devalecs/tgo)
[](https://godoc.org/github.com/devalecs/tgo)
**GetUpdatesChan example**
```go
package main
import "gopkg.in/devalecs/tgo.v1"
func main() {
c := tgo.NewClient("yourTelegramBotAPIToken")
updatesChan := c.GetUpdatesChan(tgo.GetUpdatesParams{
Timeout: 60,
})
for update := range updatesChan {
if update.Message == nil {
continue
}
c.SendMessage(tgo.SendMessageParams{
ChatID: update.Message.Chat.ID,
Text: "Pong",
})
}
}
```