v0.4
Ho-ho-ho! 🎅 tbot
v0.4 is coming to town! 🛷
Didn't expect a major release on New Year? Well, we too. Who could've thought that Telegram would release a new Bot API version today? Anyway, we're already ready for it!
Starting this version, you can use rustls
with tbot
! (!145) For those who don't know what it is, it's a complete TLS implementation in Rust — a bit less of C in your Rust bots :) It's not enabled by default though, so you have to enable it manually in your Cargo.toml:
tbot = { version = "0.4", default-features = false, features = ["rustls"] }
Let's get back to Bot API v4.5. One of the most important changes is MarkdownV2, which lets you strikethrough and underline text, and also nest formatting! (!152) We're going to implement a module to make it easier to work with markup, but for now you can use parameters::Text::MarkdownV2
to forget about the dark past of messing with the markdown parser.
You can now see admins' custom titles and set titles for those admins that your bot promoted (!151). Also, bots now can read the slow mode delay in supergroups (!150) so that you don't spam too much. And how could you live without unique file IDs you can't do anything with? (!149)
Aaand back to tbot
itself. We fixed a horrible typo in chat::member::Status::Administrator
and in some doc (!147), hopefully the compiler will point that to you if you used this enum and didn't spot the typo yourself. A more important change is that we've adopted is-macro
— a crate that generates is_*
, expect_*
and taking methods (those that try to match on a variant and return Some(T)
if successful or None
otherwise) for enums (!146, !156). Because of that, some is_*
methods changed their names a bit — check the docs if you run into some problems with this. We also boxed a few types in message::Kind
, so grab a few stars from the amazing night sky and put them in your code if you need to work with that type (!155).
Have you checkout out the updated readme on our homepage? In that readme, you can find a link to a list of projects that already build upon tbot. Very proud to see that our project is already used in bots with several thousand users 😊
So, it's already 2020 at my place. We wish you a Merry Christmas, we wish you a Merry Christmas, we wish you a Merry Christmas and a Happy New Year! Write all your bots in Rust