|
|
|
@ -5,6 +5,7 @@ func (bot *BotAPI) UpdatesChan(config UpdateConfig) (chan Update, error) { |
|
|
|
|
bot.Updates = make(chan Update, 100) |
|
|
|
|
|
|
|
|
|
go func() { |
|
|
|
|
for { |
|
|
|
|
updates, err := bot.GetUpdates(config) |
|
|
|
|
if err != nil { |
|
|
|
|
panic(err) |
|
|
|
@ -17,6 +18,7 @@ func (bot *BotAPI) UpdatesChan(config UpdateConfig) (chan Update, error) { |
|
|
|
|
|
|
|
|
|
bot.Updates <- update |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}() |
|
|
|
|
|
|
|
|
|
return bot.Updates, nil |
|
|
|
|