Releases: tg-bot-api/bot-api-base
Releases · tg-bot-api/bot-api-base
Release list
WebApp Support - 1.8.0 - 2022-05-18
Added
-
WebApp
- Added class
WebAppInfoType. ClassesInlineKeyboardButtonTypeandKeyboardButtonTypeextended with parameterwebApp;
- Added class
-
MenuButton
- Added class
MenuButtonType; - Added classes
GetChatMenuButtonMethodandSetChatMenuButtonMethodfor setting chat menu button and getting info about it; - Added class
SetChatMenuButtonNormalizerfor normalize data fromSetChatMenuButtonMethodbefore making request;
- Added class
Symfony 6 - 1.7.1 - 2022-05-18
Merge pull request #60 from gusaln/feature/add-support-for-symfony-6.x Add support for symfony 6.x components
Bot API 5.0 - November 4, 2020
Added
-
Run Your Own Bot API Server Usage
- You can pass url as 4th param in bot api
$bot = new \TgBotApi\BotApiBase\BotApi('<bot key>', $apiClient, new \TgBotApi\BotApiBase\BotApiNormalizer(), '<your-domain>');
- Added the method
logOut(LogOutMethod), which can be used to log out from the cloud Bot API server before launching your bot locally. You must log out the bot before running it locally, otherwise there is no guarantee that the bot will receive all updates. - Added the method
close(CloseMethod), which can be used to close the bot instance before moving it from one local server to another.
- You can pass url as 4th param in bot api
-
Webhooks
- Added the parameter
ipAddressto the classSetWebhookMethod, allowing to bypass DNS resolving and use the specified fixed IP address to send webhook requests. - Added the field
ipAddressto the classWebhookInfoType, containing the current IP address used for webhook connections creation. - Added the ability to drop all pending updates when changing webhook URL using the parameter
dropPendingUpdatesto the classSetWebhookMethodand toDeleteWebhookMethod.
- Added the parameter
-
Working with Groups
- The
getChatrequest now returns the identifier of the linked chat for supergroups and channels, i.e. the discussion group identifier for a channel and vice versa in thelinkedChatIdproperty. - The
getChatrequest now returns the location to which the supergroup is connected (seeChatType::$location). Added the classChatLocationTypeto represent the location. - Added the parameter
onlyIfBannedto the classUnbanChatMemberMethodto allow safe unban.
- The
-
Working with Files
- Added the property
fileNameto the classesAudioTypeandVideoType, containing the name of the original file. - Added the ability to disable server-side file content type detection using the property
disableContentTypeDetectionin theSendDocumentMethodand the class inputMediaDocument.
- Added the property
-
Multiple Pinned Messages
- Added the parameter
messageIdto theUnpinChatMessageMethodto allow unpinning of the specific pinned message. - Added the method
UnpinAllChatMessagesMethod, which can be used to unpin all pinned messages in a chat.
- Added the parameter
-
File Albums
- Added support for sending and receiving audio and document albums in the
SendMediaGroupMethod.
- Added support for sending and receiving audio and document albums in the
-
Live Locations
- Added the field
livePeriodto the classLocationType, representing a maximum period for which the live location can be updated. - Added support for live location heading: added the field
headingto the classesLocationType,InlineQueryResultLocationType,InputLocationMessageContentType,SendLocationMethodandEditMessageLiveLocationMethod. - Added support for proximity alerts in live locations: added the field
proximityAlertRadiusto the classesLocationType,InlineQueryResultLocationType,InputLocationMessageContentType,SendLocationMethodandEditMessageLiveLocationMethod. - Added the type
ProximityAlertTriggeredand the fieldproximityAlertTriggeredto the class Message. - Added possibility to specify the horizontal accuracy of a location. Added the field
horizontalAccuracyto the classesLocationType,InlineQueryResultLocationType,InputLocationMessageContentType,SendLocationMethodandEditMessageLiveLocationMethod.
- Added the field
-
Anonymous Admins
- Added the field
senderChatto the classMessageType, containing the sender of a message which is a chat (group or channel). For backward compatibility in non-channel chats, the field from in such messages will contain the user 777000 for messages automatically forwarded to the discussion group and the user 1087968824 (@GroupAnonymousBot) for messages from anonymous group administrators. - Added the field
isAnonymousto the classChatMemberType, which can be used to distinguish anonymous chat administrators. - Added the parameter
isAnonymousto thePromoteChatMemberMethod, which allows to promote anonymous chat administrators. The bot itself should have theisAnonymousright to do this. Despite the fact that bots can have theisAnonymousright, they will never appear as anonymous in the chat. Bots can use the right only for passing to other administrators. - Added the custom title of an anonymous message sender to the class
MessageTypeasauthorSignature.
- Added the field
-
And More
- Added the method
BotApi::copyMessageandCopyMessageMethod, which sends a copy of any message. - Maximum poll question length increased to 300.
- Added the ability to manually specify text entities (property
entitiesorcaptionEntities) instead of specifying theparseModein the classesInputMediaPhotoTypeInputMediaVideoTypeInputMediaAnimationTypeInputMediaAudioTypeInputMediaDocumentTypeInlineQueryResultPhotoTypeInlineQueryResultGifTypeInlineQueryResultMpeg4GifTypeInlineQueryResultVideoTypeInlineQueryResultAudioTypeInlineQueryResultVoiceTypeInlineQueryResultDocumentTypeInlineQueryResultCachedPhotoTypeInlineQueryResultCachedGifTypeInlineQueryResultCachedMpeg4GifTypeInlineQueryResultCachedVideoTypeInlineQueryResultCachedAudioTypeInlineQueryResultCachedVoiceTypeInlineQueryResultCachedDocumentTypeInputTextMessageContentTypeSendMessageMethodSendPhotoMethodSendVideoMethodSendAnimationMethodSendAudioMethodSendDocumentMethodSendVoiceMethodSendPollMethodEditMessageTextMethodEditMessageCaptionMethod
- Added the fields
googlePlaceIdandgooglePlaceTypeto the classesVenueType,InlineQueryResultVenueType,InputVenueMessageContentTypeand to the methodsSendVenueMethodto support Google Places as a venue API provider. - Added the field
allowSendingWithoutReplyto allow sending messages not a as reply if the replied-to message has already been deleted to following classes:sendMessageMethodsendPhotoMethodsendVideoMethodSendAnimationMethodSendAudioMethodSendDocumentMethodSendStickerMethodSendVideoNoteMethodSendVoiceMethodSendLocationMethodSendVenueMethodSendContactMethodSendPollMethodSendDiceMethodSendInvoiceMethodSendGameMethodSendMediaGroupMethod
- Added the method
-
And Last but bot Least
- Supported the new football and slot machine animations for the random dice. Choose between different animations (dice, darts, basketball, football, slot machine) by specifying the emoji parameter in the method sendDice.
Bot API 4.9 (June 4, 2020) + fixed EditMessageMediaMethod normalization
Fixed
- fixed EditMessageMediaMethod normalization (#33).
Bot API 4.9 (June 4, 2020) + bugfixes
Fixed
- fixed phpdocumentor/reflection-docblock version #33.
Bot API 4.9 (June 4, 2020)
Added
- Added the new field
viaBotto theMessageTypeclass.
You can now know which bot was used to send a message. - Supported video thumbnails for inline GIF and MPEG4 animations (Updated comments in classes).
- Supported the new basketball animation for the random dice.
Choose between different animations (dice, darts, basketball)
by specifying the emoji parameter in theSendDiceMethod.
Added to the class new factory methodSendDiceMethod::createWithBasketball
and new constantSendDiceMethod::EMOJI_BASKETBALL.
Bot API 4.8 (bugfix from April 28, 2020)
Fixed
- fixed SendInvoiceMethod normalization #33.
Bot API 4.8 (April 24, 2020)
Added
- Supported explanations for Quizzes 2.0. Add explanations by specifying the parameters explanation and
explanationParseModein the methodSendPollMethod. - Added the fields explanation and
explanationEntitiesto thePollTypeclass. - Supported timed polls that automatically close at a certain date and time. Set up by specifying the parameter
openPeriodorcloseDatein theSendPollMethod. - Added the fields
openPeriodandcloseDateto thePollTypeclass. - Supported the new darts animation for the dice mini-game. Choose between the default dice animation and darts animation by specifying the parameter
emojiin theSendDiceMethod. Added two factory methodscreateWithDiceandcreateWithDartsforSendDiceMethod. - Added the field
emojito theDiceTypeclass.
Bot API 4.7 (March 30, 2020)
Added
- Added the method
sendDicesend(SendDiceMethod)for sending a dice message, which will have a random value from 1 to 6.
(Yes, we're aware of the “proper” singular of die. But it's awkward, and we decided to help it change One dice at a time!) - Added the field
diceto theMessageTypeobject. - Added the method
getMyCommandsfor getting the current list of the bot's commands. - Added the method
setMyCommandsset(SetMyCommandMethod)for changing the list of the bot's commands
through the Bot API instead of @Botfather. - Added the ability to create animated sticker sets by specifying the
parametertgsStickerinstead ofpngStickerin the classCreateNewStickerSetMethod. - Added the ability to add animated stickers to sets created by the bot by specifying
the parametertgsStickerinstead ofpngStickerin the classAddStickerToSetMethod. - Added the field
thumbto theStickerSetTypeobject. - Added the ability to change thumbnails of sticker sets created by the bot
using the methodsetStickerSetThumbset(SetStickerSetThumbMethod).
Deprecated
AddStickerToSetMethod::create()- please usecreateStaticorcreateAnimatedmethodsCreateNewStickerSetMethod::create()- please usecreateStaticorcreateAnimatedmethods
Bot API 4.6 (bugfixes from 2020-03-07)
added absent field to MessageType