fix readme for updateschan changes
This commit is contained in:
parent
196f515db7
commit
752bd45f4c
1 changed files with 5 additions and 2 deletions
|
@ -34,9 +34,12 @@ func main() {
|
|||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue