all repos — telegram-bot-api @ 752bd45f4c279b358afae7b359284e9dd834a3bd

Golang bindings for the Telegram Bot API

fix readme for updateschan changes
Syfaro syfaro@foxpaw.in
Fri, 31 Jul 2015 13:44:37 -0400
commit

752bd45f4c279b358afae7b359284e9dd834a3bd

parent

196f515db776397f82c925f1b26c1ad62a16b7d8

1 files changed, 5 insertions(+), 2 deletions(-)

jump to
M README.mdREADME.md

@@ -34,9 +34,12 @@

u := tgbotapi.NewUpdate(0) u.Timeout = 60 - updates, err := bot.UpdatesChan(u) + err = bot.UpdatesChan(u) + if err != nil { + log.Panic(err) + } - for update := range updates { + for update := range bot.Updates { log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text) msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text)