Bot API 6.1 (June 20, 2022)
Bot API 6.1
Media in Descriptions
- Added support for photos and videos in the 'What can this bot do?' section (shown on the bot's start screen). Use BotFather to set up media.
Web App Improvements
- Added the fields
version,headerColor,backgroundColor,BackButton,HapticFeedbackand the methodsisVersionAtLeast,setHeaderColor,setBackgroundColor,openLink,openTelegramLink,openInvoiceto the classWebApp. - Added the field
secondary_bg_colorto the classThemeParams. - Added the method
offClickto the classMainButton. - Added the fields
chat,can_send_afterto the classWebAppInitData. - Added the events
backButtonClicked,settingsButtonClicked,invoiceClosed.
Join Requests & Payments
- Added the fields
join_to_send_messagesandjoin_by_requestto the classChat. - Added the ability to process join requests which were created without an invite link. Bots will receive a “
chat_join_request” update as usual. - Added the method
createInvoiceLinkto generate an HTTP link for an invoice.
Telegram Premium Support (more info)
- The maximum value of the field
file_sizein the classesAnimation,Audio,Document,Video,Voice, andFilecan no longer be stored in a signed 32-bit integer type. This change is necessary to support 4GB files uploaded by premium accounts. - Added the field
is_premiumto the classUser. - Added the field
premium_animationto the classSticker.
Attachment Menu Integration
- Added the field
added_to_attachment_menuto the classUser. - Bots integrated in the attachment menu can now be used in groups, supergroups and channels.
- Added support for t.me links that can be used to select the chat in which the attachment menu with the bot will be opened.
Other Changes
- Added the parameter
secret_tokento the methodsetWebhook. - As previously announced, only HTTPS links are now allowed in
login_urlinline keyboard buttons.
I think we may release this as v18.1
How to use HapticFeedback?
How to use HapticFeedback?
Just figured it out!
window.Telegram.WebApp.impactOccurred("medium")
Which link I have to pass to - openInvoice(url[, callback])
May someone give an example of those parameters
Resolved by #1147.
Which link I have to pass to - openInvoice(url[, callback])
May someone give an example of those parameters
The link created by this method - https://core.telegram.org/bots/api#createinvoicelink