Change visibility of UpdatesChannel, closes #76
This commit is contained in:
parent
99170e2de4
commit
3293f3ad84
3 changed files with 8 additions and 9 deletions
|
@ -485,10 +485,9 @@ func ExampleNewBotAPI() {
|
|||
|
||||
updates, err := bot.GetUpdatesChan(u)
|
||||
|
||||
//If you need to clear all the updates when bot just started:
|
||||
//Wait to gather all the new updates (choose the time conveniently)
|
||||
// Optional: wait for updates and clear them if you don't want to handle
|
||||
// a large backlog of old messages
|
||||
time.Sleep(time.Millisecond * 500)
|
||||
//discard all the updates preventing the spam after your server has been down
|
||||
updates.Clear()
|
||||
|
||||
for update := range updates {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue