To transmit data from the user back to the bot, the Web App can call the method. You can send a web_app type KeyboardButton that opens a Web App from the specified URL. For even more flexibility, bots can utilize the full power of HTML5 to create user-friendly input interfaces. Users can interact with bots using custom keyboards, buttons under bot messages, as well as by sending freeform text messages or any of the attachment types supported by Telegram: photos and videos, files, locations, contacts and polls. This makes it possible for the bot to produce a response without communicating with any external servers. TL DR: Web Apps launched from a web_app type keyboard button can send data back to the bot in a service message using. For example, when users switch between Day and Night modes or use various custom themes. Web Apps always receive data about the user's current color theme in real time, so you can adjust the appearance of your interfaces to match it. Added the events backButtonClicked, settingsButtonClicked, invoiceClosed.Added the fields chat, can_send_after to the class WebAppInitData.Added the method offClick to the class MainButton.Added the field secondary_bg_color to the class ThemeParams.Added the fields version, headerColor, backgroundColor, BackButton, HapticFeedback and the methods isVersionAtLeast, setHeaderColor, setBackgroundColor, openLink, openTelegramLink, openInvoice to the class WebApp.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. Added the ability to use bots added to the attachment menu in group, supergroup and channel chats.Added the field is_premium to the class WebAppUser.Added the field isClosingConfirmationEnabled and the methods enableClosingConfirmation, disableClosingConfirmation, showPopup, showAlert, showConfirm to the class WebApp.Added the events qrTextReceived, clipboardTextReceived.Added the field platform, the optional parameter options to the method openLink and the methods showScanQrPopup, closeScanQrPopup, readTextFromClipboard to the class WebApp.To see a Web App in action, try our sample changes December 30, 2022
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |