Skip to content

Telebot V2.1

Compare
Choose a tag to compare
@demget demget released this 13 Jun 11:04
· 181 commits to v2 since this release
59629fe

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