fix readme for updateschan changes

bot-api-6.1
Syfaro 2015-07-31 13:44:37 -04:00
parent 196f515db7
commit 752bd45f4c
1 changed files with 5 additions and 2 deletions

View File

@ -34,9 +34,12 @@ func main() {
u := tgbotapi.NewUpdate(0) u := tgbotapi.NewUpdate(0)
u.Timeout = 60 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) log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text)
msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text) msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text)