Changelog History
-
v2.3.5
November 03, 2020 -
v2.3.4
September 01, 2020 -
v2.3.3
July 04, 2020 -
v2.3.2
June 18, 2020 -
v2.3.1
June 13, 2020 -
v2.3 Changes
June 10, 2020๐ Changelog
Bot API 4.9
โก๏ธ Special
ErrTrueResult
error for updating methodsExtended
b.Edit()
function:b.Edit(m, m.Text, newMarkup)b.Edit(m, "new \<b\>text\</b\>", tb.ModeHTML)b.Edit(m, &tb.ReplyMarkup{...})b.Edit(m, &tb.Photo{File: ...})b.Edit(m, tb.Location{42.1337, 69.4242})
0๏ธโฃ Default parse mode:
pref := tb.Settings{ Token: "", ParseMode: tb.ModeMarkdown, }b, \_ := tb.NewBot(pref)b.Send(to, "\*text\*") // default markdown modeb.Send(to, "\<b\>text\</b\>", tb.ModeHTML) // forced html mode
Verbose mode for upcoming requests:
pref := tb.Settings{ Token: "", Verbose: true, }b, \_ := tb.NewBot(pref)b.Notify(to, tb.Typing) [verbose] telebot: sent request Method: sendChatAction Params: { "action": "typing", "chat_id": "..." } Response: { "ok": true, "result": true }
๐ Fixes
-
v2.2 Changes
May 22, 2020๐ For this release, aside from Bot API implementation, we've prepared many new useful features.
๐ Changelog
- Completed Webhook, Games, Stickers and Payments APIs
- ๐ Synchronous mode and serverless support (#219)
- Keyboard constructors (#290)
- Special
ChatID
recipient type (#263)
Serverless
๐ฆ Now it's possible to use
telebot
together with serverless providers like AWS, Azure, etc... Thanks to one of the package's contributors, you can check out exhaustive example in examples/awslambdaechobot.๐
Synchronous
mode was added for these purposes:pref := tb.Settings{ Token: "", Synchronous: true, }b, err := tb.NewBot(pref)// ...
Keyboard constructors
โก๏ธ Use special helper functions and types to decrease boilerplate across the code. The new keyboards builder make theirs definition easier. Look into updated README
Keyboards
section for details.menu := &ReplyMarkup{ResizeReplyKeyboard: true}var ( // Reply buttons.btnHelp= menu.Text("โน Help") btnSettings = menu.Text("โ Settings") )menu.Reply( menu.Row(btnHelp), menu.Row(btnSettings), )b.Handle(&btnHelp, func(m \*tb.Message) {...})b.Handle(&btnSettings, func(m \*tb.Message) {...})
ChatID
typeIt was a bit confusing to work with specific chat IDs. You had to wrap integer into
&tb.Chat{}
every time you wanted to send a message. Imagine you have a config file with a bunch of defined group or channel IDs. Now you can use yourint64
values directly with functions which acceptsRecipient
interface.type Config struct { AdminGroup tb.ChatID `yaml:"admin_group_id"`AdsChannel tb.ChatID `yaml:"ads_channel_id"`}b.Send(conf.AdminGroup, "message")b.Send(conf.AdsChannel, "message")
๐ Fixes
- โ Added
OnAnimation
endpoint - ๐ Fixed regular expression for errors handling
- ๐
Action
fields were removed from Buttons b.Forward()
changed to takeEditable
instead of*Message
What's next?
๐ The one unimplemented Bot API section left for the future โ is Telegram Passport. Despite this, it's fair to say that
telebot
has full Bot API 4.8 support now.Our next goal โ Telebot V3. It's going to be a compound of the good things we have in V2, the best solutions inherent to Bot frameworks, and, finally, completely new features.
-
v2.1
April 26, 2020 -
v2.0.0
June 13, 2020 -
v1.0 Changes
September 12, 2017๐ Newer version of a better API is coming soon, watch v2