Kotlin Telegram Bot API Library (tgbotapi)
160 subscribers
17 photos
1 video
1 file
276 links
https://github.com/InsanusMokrassar/ktgbotapi

Channel with updates from Kotlin Multiplatform TelegramBotAPI library

DM: @InsanusMokrassar
Forum: @ktgbotapi_forum
Projects Releases: @inmodev
Support me: https://t.me/inmodev/431
Download Telegram
Version 0.37.0 is out and you may use Telegram Bot API 5.4 in your bots. Besides here:

• Improvements in Behaviour Builder FSM for more stype-strict using of states
• Dependencies updates
Deprecations removing

P. S. See Examples migration commit for help in migration
Forwarded from inmo.dev
InsanusMokrassar/TelegramBotAPI: 0.37.1

Common:
Version:
Serialization: 1.3.0 -> 1.3.1
Klock: 2.4.7 -> 2.4.8
MicroUtils: 0.8.1 -> 0.8.2
I have added several docker-oriented files in the template project. So, now it must be easier to create your projects from template and run your bot in the docker environment
Hello :) I plan to remove several functions in MicroUtils library which seems to be useless. Could you answer, which one of these functions do you use in your projects? (thank you :) )
Anonymous Poll
100%
safely {}
100%
safelyWithouExceptions {}
100%
safelySkippingExceptions {}
100%
launchWithoutExceptions {}
100%
safelyWithResult {}
0%
runCatchingSafely {}
0%
safelyWithContextExceptionHandler {}
0%
runCatchingSafelyWithoutExceptions {}
Hello :) with the new update of Bots API was introduced the field has_protected_content. I suppose, that this field will be added as additional interface PossiblyProtectedContentMessage, but when I tried to add it, I faced to the fact that all Possibly* interfaces could be extenders of ContentMessage instead of just Message. The problem here is that ContentMessage require generic parameter and result PossiblyReplyMessage could looks like:

* PossiblyReplyMessage when it extends ContentMessage<MessageContent>
* PossiblyReplyMessage<MessageContent> when it extends ContentMessage<T>

So, lets answer next question - what would be better?
Version 0.37.3 (0.37.2 was published with one critical issue, so, I published quick fix 0.37.3) is available in maven central. In two words:

• Update up to Telegram Bot API 5.5
• Fix of EntitiesBuilder#linkln
• Dependencies updates

Report on some issues or suggestions in comments or just in discussion group :) currently next update is planned for #511 Issue (about extension to make this library looks like common Telegram Bot API)
Forwarded from Telegram Info (Полян)
Bot API был обновлён до версии 5.6

Что нового:
Улучшена поддержка функций защищенного содержимого.
— В методы добавлен параметр protect_content: sendMessage, sendPhoto, sendVideo, sendAnimation, sendAudio, sendDocument, sendSticker, sendVideoNote, sendVoice, sendLocation, sendVenue, sendContact, sendPoll, sendDice, sendInvoice, sendGame, sendMediaGroup, copyMessage, forwardMessage.
— Добавлена поддержка «спойлеров», которые будут работать в версиях Telegram, выпущенных после 30 декабря 2021 года. Более старые клиенты будут отображать неподдерживаемое сообщение.
— Добавлен новый тип MessageEntity "spoiler".
— Добавлена возможность указывать объекты спойлера, используя параметры форматирования HTML и MarkdownV2.

Полный список изменений на официальном сайте.

#обновление #BotAPI
So, there are several news:

• Version 0.37.4 of tgbotapi has been released. It contains mostly improvements from this PR (thanks to madhead)
• New Telegram Bot API version 5.6 has been released too. In that release there are several protecting content improvements and opportunity to add and use spoilers
• That has happend - all necessary dependencies were updated up to Kotlin 1.6 and I've started 0.38.0 version. I plan to add there support for Telegram Bot API 5.6 and solve at least some parts of #511 issue
Besides, I wish you happy holidays, happy new year and bots without bugs 🎉
2🎉2
In case this library will be updated up to kotlin 1.6, will you be ready to migrate too?
Anonymous Poll
100%
Yes
0%
No
👍3
🔥4
Kotlin Telegram Bot API Library (tgbotapi) via @TGStat_Bot
Photo
Our humble statistic 😊 Thank you for your critics, support and help :)
0.38.0 version of update has been released :) here mainly update up to Kotlin 1.6, update up to Telegram Bot API 5.6 and several fixes
Forwarded from inmo.dev
InsanusMokrassar/TelegramBotAPI: 0.38.0

This update contains Telegram Bot API 5.6 implementation

This update contains migration onto Kotlin 1.6

This update has changed constructors of all CommonMessage implementations


Common:
Version:
Kotlin: 1.5.31 -> 1.6.10
Coroutines: 1.5.2 -> 1.6.0
Serialization: 1.3.1 -> 1.3.2
Klock: 2.4.8 -> 2.4.10
Ktor: 1.6.5 -> 1.6.7
MicroUtils: 0.8.7 -> 0.9.0
Core:
• Add SpoilerTextSource (as part of Telegram Bot API 5.6 update)
• Add support of protect_content as a field protectContent in all send message requests and parameter in all functions related to that requests (as part of Telegram Bot API 5.6 update)
ALL IMPLEMENTERS OF CommonMessage HAS CHANGED THEIR CONSTRUCTOR: NOW THEY GET hasProtectedContent instead of forwardable (inversed) field
ChannelContentMessageImpl
ChannelMediaGroupMessage
CommonMediaGroupMessage
GroupContentMessage implementers
ConnectedFromChannelGroupContentMessageImpl
UnconnectedFromChannelGroupContentMessageImpl
AnonymousGroupContentMessageImpl
CommonGroupContentMessageImpl
PrivateContentMessageImpl
👍2
0.38.1 PR is in work and I hope today I will release this version. Currently it is still in progress and you may offer some features to include in this update ☺️