telebot
telebot copied to clipboard
Upgrade up to Bot API 6.0
April 16, 2022
Bot API 6.
- Added support for Web Apps, see the detailed manual here. (blog announcement)
- Added the class WebAppInfo and the fields web_app to the classes KeyboardButton and InlineKeyboardButton.
- Added the class SentWebAppMessage and the method answerWebAppQuery for sending an answer to a Web App query, which originated from an inline button of the 'web_app' type.
- Added the class WebAppData and the field web_app_data to the class Message.
- Added the class MenuButton and the methods setChatMenuButton and getChatMenuButton for managing the behavior of the bot's menu button in private chats.
- Added the class ChatAdministratorRights and the methods setMyDefaultAdministratorRights and getMyDefaultAdministratorRights for managing the bot's default administrator rights.
- Added support for t.me links that can be used to add the bot to groups and channels as an administrator.
- Added the field last_synchronization_error_date to the class WebhookInfo.
- Renamed the field can_manage_voice_chats to can_manage_video_chats in the class ChatMemberAdministrator. The old field will remain temporarily available.
- Renamed the parameter can_manage_voice_chats to can_manage_video_chats in the method promoteChatMember. The old parameter will remain temporarily available.
- Renamed the fields voice_chat_scheduled, voice_chat_started, voice_chat_ended, and voice_chat_participants_invited to video_chat_scheduled, video_chat_started, video_chat_ended, and video_chat_participants_invited in the class Message. The old fields will remain temporarily available.
JFYI, tried to use bot test environment, it does not work because of the URL construction. Telebot constructs URL as url := b.URL + "/bot" + b.Token + "/" + method
, but for test server it should be url := b.URL + "/bot" + b.Token + "/test/" + method
— note the test suffix.
JFYI, tried to use bot test environment, it does not work because of the URL construction. Telebot constructs URL as
url := b.URL + "/bot" + b.Token + "/" + method
, but for test server it should beurl := b.URL + "/bot" + b.Token + "/test/" + method
— note the test suffix.
@prokher
i guess you should set Settings.Offline
to true when using tele.NewBot(tele.Setting{...})
I am not sure what Settings.Offline
does, but it looks like it simply prevents a bot from connecting to the server. This is quite fine for testing, but for local development and debug I need to connect to Telegram test environment, like it is described in the documentation here: https://core.telegram.org/bots/webapps#using-bots-in-the-test-environment.
Yes sorry for wrong info
Hey guys.
Is migration to bot API v6 still under development?
still waiting
Bot API 6.1 and 6.2 will be included in the v3.1 release as well.