Minor API changes.

pull/111/head
Ian Byrd 7 years ago
parent b831116da3
commit a2d28e604d
No known key found for this signature in database
GPG Key ID: 598F598CA3B8055F

@ -66,6 +66,8 @@ type InlineButton struct {
URL string `json:"url,omitempty"`
Data string `json:"callback_data,omitempty"`
InlineQuery string `json:"switch_inline_query,omitempty"`
Action func(*Callback)
}
// CallbackUnique returns InlineButto.Unique.

@ -128,6 +128,8 @@ type ReplyButton struct {
Contact bool `json:"request_contact,omitempty"`
Location bool `json:"request_location,omitempty"`
Action func(*Callback)
}
// InlineKeyboardMarkup represents an inline keyboard that appears

@ -6,6 +6,10 @@ import (
"github.com/pkg/errors"
)
var (
ErrCouldNotUpdate = errors.New("getUpdates() failed")
)
// Poller is a provider of Updates.
//
// All pollers must implement Poll(), which accepts bot
@ -90,7 +94,7 @@ func (p *LongPoller) Poll(b *Bot, dest chan Update, stop chan struct{}) {
updates, err := b.getUpdates(p.LastUpdateID+1, p.Timeout)
if err != nil {
b.debug(errors.Wrap(err, "getUpdates() failed"))
b.debug(ErrCouldNotUpdate)
continue
}

Loading…
Cancel
Save