Add new chat methods for Bot API 2.1.

This commit is contained in:
Syfaro 2016-05-22 10:16:28 -05:00
parent 3ed6b6ac16
commit 217764ba45
5 changed files with 164 additions and 5 deletions

View file

@ -447,6 +447,10 @@ func ExampleNewBotAPI() {
updates, err := bot.GetUpdatesChan(u)
for update := range updates {
if update.Message == nil {
continue
}
log.Printf("[%s] %s", update.Message.From.UserName, update.Message.Text)
msg := tgbotapi.NewMessage(update.Message.Chat.ID, update.Message.Text)
@ -493,7 +497,7 @@ func ExampleAnswerInlineQuery() {
updates, err := bot.GetUpdatesChan(u)
for update := range updates {
if update.InlineQuery.Query == "" { // if no inline query, ignore it
if update.InlineQuery == nil { // if no inline query, ignore it
continue
}