Releases: apimorphism/telegramium
Telegramium-9.74.0
OpenEnum
The Telegram Bot API is not versioned, which means bots and libraries must try to be forward-compatible. Specifically for enumerations, this implies that bots should always anticipate new values being added. Handling these values depends on the bot's business logic. Some apps may simply ignore unknown values, while others might respond with "This message is not supported", save the message for manual processing later, or throw a request handling error.
Telegramium introduces OpenEnum
, a wrapper for Telegram Bot API enumerations with two cases: Known
and Unknown
. This type allows unknown values to be explicitly handled (similar to Option
or Either
), enabling bots using Telegramium to be more robust, improve error handling, and degrade gracefully in light of frequent Telegram Bot API updates.
Telegramium-8.74.0
Telegramium-8.74.0 supports all methods and entities of Telegram Bot API v7.4.
Excerpt from the Bot API official announcement for the version 7.4
- Telegram Stars: To accept payments for digital goods and services, starting with Bot API 7.4, you can use the sendInvoice or createInvoiceLink methods with the
currency
field set to "XTR" and theprovider_token
field left empty. To refund payments, you can use the refundStarPayment method. - Support for visual effects, which bots can attach to messages via the new
message_effect_id
parameter. - Support for expandable blockquote text entities.
- Captions that can be shown above the respective media via the new
show_caption_above_media
parameter.
Telegramium-8.73.0
Telegramium-8.73.0 supports all methods and entities of Telegram Bot API v7.3.
Excerpt from the Bot API official announcement for the version 7.3
Telegram Business
- Messages sent on behalf of a business account now support
url
,login_url
, andcallback_game
inline buttons.
Live Locations
- Added support for live locations that can be edited indefinitely.
- Bots can now edit live periods via the new
live_period
parameter.
General
- Added support for custom emoji in Polls.
- Added the field
via_join_request
to ChatMemberUpdated, for users whose join request was approved. - Bots can now detect service messages about background changes in chats via the new
chat_background_set
field in Message.
https://core.telegram.org/bots/api-changelog#may-6-2024
Note: The method getChat now returns the new ChatFullInfo class, which has been split out from Chat.
Telegramium-8.72.0
Telegramium-8.72.0 supports all methods and entities of Telegram Bot API v7.2.
Excerpt from the Bot API official announcement for the version 7.2
Telegram Business
- Bots can now manage private chats of Telegram Business subscribers who connect them to their account – check out BusinessConnection.
- Connected bots will receive updates about new messages, message edits and deletions in business chats they manage.
- Added the parameter
business_connection_id
to most send methods – to send messages on behalf of business users. - Bots can now see business account details, such as their intro, opening hours and location.
Request Names, Usernames and Photos
- Bots can now request names, usernames and photos via new fields in the KeyboardButtonRequestUsers class.
- Likewise, bots can now use KeyboardButtonRequestChat to request chats' titles, usernames and photos.
Stickers
- Introduced support for mixed-format sticker packs.
- Regular sticker sets now support up to 120 stickers.
- Bots can now upload WEBM stickers using sendSticker.
- Simplified sticker replacement via the new replaceStickerInSet method.
General
Telegramium-8.70.0
Telegramium-8.70.0 supports all methods and entities of Telegram Bot API v7.0.
Excerpt from the Bot API official announcement for the version 7.0
Reactions
- Introducing full reaction support for bots.
- Bots can now react to messages with setMessageReaction.
- Message reactions now generate updates for bots.
- Added the
available_reactions
field to the class Chat.
Replies 2.0
- Bots can now reply to messages in other chats or topics.
- Added the ExternalReplyInfo class, to track replies across chats.
- The new class ReplyParameters replaces individual reply options in all relevant methods and lets bots quote parts of any message.
- The new field
quote
of the class Message lets bots detect incoming quoted text.
Link Preview Customization
- Bots can now set a custom URL to generate link previews in outgoing messages.
- Added support for custom size and position of link previews.
- Added the class LinkPreviewOptions to support these new options.
Batch Actions
- Bots can now delete multiple messages in a single request via deleteMessages.
- Bots can now forward or copy multiple messages in a single request via the respective forwardMessages and copyMessages methods.
Boosts & Giveaways
- Added support for Giveaway messages, allowing bots to detect their creation and completion.
- Added updates about chat boost changes via the new classes ChatBoostUpdated and ChatBoostRemoved.
- Bots can now see if a boost came from a premium sub, a gift code, or a giveaway, as well as check all active user boosts via getUserChatBoosts.
General
- Blockquotes are now supported in MarkdownV2 and HTML parse modes.
- Web Apps won't close when calling
openTelegramLink
. - Web Apps can now toggle the visibility and on-click behavior of the Settings Button.
- Bots can now request multiple users, see KeyboardButtonRequestUsers.
- The class Chat has new fields holding profile and background colors, custom emoji, and more.
https://core.telegram.org/bots/api-changelog#december-29-2023
Telegramium-8.69.0
Telegramium-8.69.0 supports all methods and entities of Telegram Bot API v6.9.
Excerpt from the Bot API official announcement for the version 6.9
Mini Apps
- Added support for free Cloud Storage, hosted by Telegram.
- Mini Apps can now set any header color with setHeaderColor.
- Added the requestContact method, to ask the user's phone number.
- Added the requestWriteAccess method, to obtain permission to text the user.
Stories
- Bots can now assign the
can_post_stories
,can_edit_stories
andcan_delete_stories
privileges to other admins. - Added the respective fields to ChatMemberAdministrator, ChatAdministratorRights and parameters promoteChatMember.
https://core.telegram.org/bots/api-changelog#september-22-2023
Telegramium-8.68.0
Telegramium-8.68.0 supports all methods and entities of Telegram Bot API v6.8.
Excerpt from the Bot API official announcement for the version 6.8
- Bots can now detect forwarded stories via an empty Story object in the new
story
field of the Message class. - Added support for chat voters in non-anonymous Polls via the new field
voter_chat
in PollAnswer. - Added the field
emoji_status_expiration_date
to the Chat class.
Telegramium-8.67.2
telegramium.bots.high.messageentities.MessageEntities
is a utility class to work with styled messages using message entities. Compose your message's text using different formatting options like plain text, bold, italics, links, mentions, hashtags and more.
This class automatically takes care of calculating text offsets and lengths required by the Telegram API.
import telegramium.bots.high.messageentities.*
val msgEntities = MessageEntities()
.bold("Hello, ")
.mention("@user")
.plain("! Welcome to our ")
.textLink("website", "https://example.com")
.lineBreak()
.plain("Enjoy your stay.")
Methods.sendMessage(
chatId,
// Hello, @user! Welcome to our website\nEnjoy your stay.
text = msgEntities.toPlainText(),
// List(BoldMessageEntity(0, 7), MentionMessageEntity(7, 5), TextLinkMessageEntity(29, 7, "https://example.com"))
entities = msgEntities.toTelegramEntities()
)
Telegramium-8.67.1
#348 Support self-signed certificates for WebhookBot
Now you can run webhook bots using self-signed SSL certificates.
Telegramium-8.67.0
This release introduces significant breaking changes.
Fix #395: Use Long for chat_id on all methods.
Full Changelog: 7.67.1...8.67.0