github tucnak/telebot v2.1.0
Telebot V2.1

latest releases: v3.3.3-beta, v3.3.2-beta, v3.3.1-beta...
3 years ago

Finally, a new Telebot v2.1 release with a lot of minor fixes, additions and new methods implementations.

Changelog

  • Practically full implemented Bot API 4.8
  • Started code coverage process (now it's about 30%)
  • A convenient way to handle Telegram errors
  • A lot of bug fixes

Errors

From this release, you will be able to easily check for specific Telegram errors. We have a bunch of pre-defined Bot API errors and their descriptions in errors.go file. The work is still in progress, so feel free to contribute and to add missed entries. All errors are prefixed with telebot: if it's telebot-related or with telegram: if it's an API response.

msg, err := b.Send(user, "Hello World!")
if err != nil {
    if err == tb.ErrBlockedByUser {
        // remove user from database
    }
    // ...
}

Fixes

  • Use b.Edit() to invoke editMessageLiveLocation method (#239)
  • OnPinned also fires on channel posts (#244)
  • Exposed Webhook API (#214, #265)
  • LongPoller is now stoppable (#266)
  • Fixed a typo in DeleteGroupPhoto method
  • A little more nil checks to prevent unexpected panics

Don't miss a new telebot release

NewReleases is sending notifications on new releases.