-
8.0.2 Stable
released this
2024-12-29 23:32:26 +00:00 | 6 commits to master since this release[8.0.2] - 2024-12-09
This update introduces some quality of life improvements.
Added
- Added
containsMediamethod toMessageobject to check if the message contains media. - Add support for handling callback query events
[8.0.1] - 2024-12-04
This update introduces bug fixes and improvements
Changed
- Refactor PollingBot to use PsyncLib for updates
- Refactor optional parameters in method signatures
- Improve command check with method existence validation
Fixed
- Reposition debug log for event handler execution.
- Improve command check with method existence validation
- Allow nullable type for MessageEntity type
- Encode arrays as JSON in SendAudio parameters
- Refactor fromArray method for null data handling
[8.0.0] - 2024-11-29
This is a new major update which makes the previous versions of this library deprecated
Added
- Added unit tests
- Added
can_connect_to_business&has_main_web_appto User object
Changed
- Refactored the way HTTP requests are handled & methods are called
- Refactor enums to use native PHP 8.1 syntax
- Moved Types to their own namespace
- Refactored all Objects & Methods to use a different system
- Refactored the event system to allow for more event types
Downloads
-
Source code (ZIP)
4 downloads
-
Source code (TAR.GZ)
5 downloads
- Added
-
6.7.0 Stable
released this
2023-08-10 18:33:28 +00:00 | 511 commits to master since this releaseThis update accompanies the release of the Telegram Bot API 6.7.
Additionally, this update includes some bug fixes and improvements such as the ability for some objects to be treated as
input objects for methods that require input objects.Added
- Added object
\TgBotLib\Objects\Telegram\InputMessageContent\InputTextMessageContentto represent the content of a text message to be sent as the result of an inline query. - Added object
\TgBotLib\Objects\Telegram\InputMessageContent\InputLocationMessageContentto represent the content of a location message to be sent as the result of an inline query. - Added object
\TgBotLib\Objects\Telegram\InputMessageContent\InputVenueMessageContentto represent the content of a venue message to be sent as the result of an inline query. - Added object
\TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContentto represent the content of a contact message to be sent as the result of an inline query. - Added object
\TgBotLib\Objects\Telegram\InputMessageContent\InputInvoiceMessageContentto represent the content of an invoice message to be sent as the result of an inline query. - Added new exception class
NotImplementedExceptionto represent the case when a method is not implemented yet or the method is not applicable to the current object. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultArticle, see InlineQueryResultArticle for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultPhoto, see InlineQueryResultPhoto for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultGif, see InlineQueryResultGif for more information. - Added abstract class
\TgBotLib\Abstracts\ThumbnailMimeTypeto represent the mime type of thumbnail, photo, or a file / sticker thumbnail. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultMpeg4Gif, see InlineQueryResultMpeg4Gif for more information. - Added field
via_chat_folder_invite_linkto\TgBotLib\Objects\Telegram\ChatMemberUpdatedto represent the invite link, which was used by the user to join the chat; for joining by invite link events only. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVideo, see InlineQueryResultVideo for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultAudio, see InlineQueryResultAudio for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVoice, see InlineQueryResultVoice for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultDocument, see InlineQueryResultDocument for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultLocation, see InlineQueryResultLocation for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultVenue, see InlineQueryResultVenue for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultContact, see InlineQueryResultContact for more information. - Added object
\TgBotLib\Objects\Telegram\InlineQueryResult\InlineQueryResultGame, see InlineQueryResultGame for more information. - Added class
\TgBotLib\Objects\Telegram\InlineQueryResultwhich is the base class for all inline query results, additionally added\TgBotLib\Abstracts\InlineQueryResultTypeto represent the type of inline query result object. - Added method
\TgBotLib\Bot::answerWebAppQueryto answer a callback query sent from a web app, which returns the newly added\TgBotLib\Objects\Telegram\SentWebAppMessageobject on success. - Implemented Telegram's currency API
\TgBotLib\Classes\Utilities::getCurrencyto get basic information about the currency of the specified country, see Telegram's currency API for more information.
Changed
- Refactored InputMessageContent types to its own namespace so InputMessageContent can always return the correct InputMessageContent object type when calling
fromArray() - Added methods
\TgBotLib\Objects\Telegram\InlineKeyboardButton::setUrl,\TgBotLib\Objects\Telegram\InlineKeyboardButton::setText,\TgBotLib\Objects\Telegram\InlineKeyboardButton::setCallbackData,
\TgBotLib\Objects\Telegram\InlineKeyboardButton::setWebApp,\TgBotLib\Objects\Telegram\InlineKeyboardButton::setLoginUrl,
\TgBotLib\Objects\Telegram\InlineKeyboardButton::setSwitchInlineQuery,\TgBotLib\Objects\Telegram\InlineKeyboardButton::setSwitchInlineQueryCurrentChat,
\TgBotLib\Objects\Telegram\InlineKeyboardButton::setCallbackGame,\TgBotLib\Objects\Telegram\InlineKeyboardButton::setPay
to\TgBotLib\Objects\Telegram\InlineKeyboardButton - Added methods
\TgBotLib\Objects\Telegram\InlineKeyboardMarkup::removeRow&\TgBotLib\Objects\Telegram\InlineKeyboardMarkup::addRowto\TgBotLib\Objects\Telegram\InlineKeyboardMarkup - Added method
\TgBotLib\Objects\Telegram\WebAppInfo::setUrlto\TgBotLib\Objects\Telegram\WebAppInfo - Added methods
\TgBotLib\Classes\Validate::url,\TgBotLib\Classes\Validate::length, &\TgBotLib\Classes\Validate::isHttpsto\TgBotLib\Classes\Validate - Updated documentation for
\TgBotLib\Bot::editMessageMedia - Renamed namespace from
\TgBotLib\Abstractsto\TgBotLib\Enums - Updated class type to
final classin\TgBotLib\Enums > BotCommandScopeType - Updated class type to
final classin\TgBotLib\Enums > ChatActionType - Updated class type to
final classin\TgBotLib\Enums > ChatMemberStatus - Updated class type to
final classin\TgBotLib\Enums > ChatType - Updated class type to
final classin\TgBotLib\Enums > EventType - Updated class type to
final classin\TgBotLib\Enums > InlineQueryResultType - Updated class type to
final classin\TgBotLib\Enums > InputMediaType - Updated class type to
final classin\TgBotLib\Enums > InputButtonType - Updated class type to
final classin\TgBotLib\Enums > MessageEntityType - Updated class type to
final classin\TgBotLib\Enums > PassportElementType - Updated class type to
final classin\TgBotLib\Enums > PollType - Updated class type to
final classin\TgBotLib\Enums > StickerFormat - Updated class type to
final classin\TgBotLib\Enums > StickerType - Updated class type to
final classin\TgBotLib\Enums > ThumbnailMimeType - Updated class type to
final classin\TgBotLib\Enums > UpdateEventType - Updated method
\TgBotLib > Bot > handleGetUpdates()to handle exceptions - Updated README.md to reflect the new changes with TamerLib 2.+
Fixed
- Fixed type in
\TgBotLib\Objects\Telegram > Message > fromArray()whereforum_topic_createdis being parsed for
forum_topic_edited instead offorum_topic_edited
Downloads
-
Source code (ZIP)
4 downloads
-
Source code (TAR.GZ)
3 downloads
-
net.nosial.tgbotlib.ncc
6 downloads ·
2023-08-10 18:33:28 +00:00 · 0 B
- Added object
-
6.6.0 Stable
released this
2023-04-11 01:01:27 +00:00 | 579 commits to master since this releaseThis update accompanies the release of the Telegram Bot API 6.6.
Added
- Added the ability to set different bot descriptions for different user languages using the method
\TgBotLib\Bot > setMyDescription()
see setMyDescription for more information. - Added the ability to get the current bot description in the given language as the class BotDescription
using the method\TgBotLib\Bot > getMyDescription()see getMyDescription for more information. - Added the ability to set different bot short descriptions for different user languages using the method
\TgBotLib\Bot > setMyShortDescription()
see setMyShortDescription for more information. - Added the ability to get the current bot short description in the given language as the class BotShortDescription
using the method\TgBotLib\Bot > getMyShortDescription()see getMyShortDescription for more information. - Added method
\TgBotLib\Bot > sendSticker()to send a sticker to a chat. See sendSticker for more information. - Added method
\TgBotLib\Bot > createNewStickerSet()to create a new sticker set owned by a user. See createNewStickerSet for more information. - Added the field needs_repainting to the Sticker class
which can be obtained viaTgBotLib\Objects\Telegram > Sticker > needsRepainting() - Added method
\TgBotLib\Bot > addStickerToSet()to add a new sticker to a set created by the bot.
See addStickerToSet for more information. - Added abstract class
\TgBotLib\Abstracts > StickerFormatto represent a sticker format ("static", "animated" or "video") - Added method
\TgBotLib\Bot > uploadStickerFile()to upload a sticker file with a sticker for later use increateNewStickerSetandaddStickerToSetmethods (can be used multiple times).
See uploadStickerFile for more information. - Added method
\TgBotLib\Bot > setCustomEmojiStickerSetThumbnail()to set the thumbnail of a sticker set.
See setCustomEmojiStickerSetThumbnail for more information. - Added object
\TgBotLib\Objects\Telegram > StickerSetto represent a sticker set. - Added method
\TgBotLib\Bot > setStickerSetThumbnail()to set the thumbnail of a sticker set.
See setStickerSetThumbnail for more information. - Added method
\TgBotLib\Bot > setStickerSetTitle()to set the title of a sticker set.
See setStickerSetTitle for more information. - Added method
\TgBotLib\Bot > deleteStickerSet()to delete a sticker set.
See deleteStickerSet for more information. - Added method
\TgBotLib\Bot > setStickerEmojiList()to set the list of emojis for a sticker set.
See setStickerEmojiList for more information. - Added method
\TgBotLib\Bot > setStickerKeywords()to set the list of emojis for a sticker set.
See setStickerKeywords for more information. - Added method
\TgBotLib\Bot > setStickerMaskPosition()to change the mask position of a mask sticker.
See setStickerMaskPosition for more information.
Changed
- Removed unused
__destruct()method from\TgBotLib\Bot - Added proper construction for
PollOption[]objects inTgBotLib\Objects\Telegram > Poll - Renamed
thumbfield inTgBotLib\Objects\Telegram > Animationtothumbnail - Renamed
thumbfield inTgBotLib\Objects\Telegram > Audiotothumbnail - Renamed
thumbfield inTgBotLib\Objects\Telegram > Documenttothumbnail - Renamed
thumbfield inTgBotLib\Objects\Telegram > Stickertothumbnail - Renamed
thumbfield inTgBotLib\Objects\Telegram > Videotothumbnail - Renamed
thumbfield inTgBotLib\Objects\Telegram > VideoNotetothumbnail
Fixed
- Fixed
TgBotLib\Objects\Telegram > Sticker > toArray()to properly return thepremium_animationfield
Downloads
-
Source code (ZIP)
5 downloads
-
Source code (TAR.GZ)
4 downloads
- Added the ability to set different bot descriptions for different user languages using the method
-
6.5.2 Stable
released this
2023-02-27 00:25:54 +00:00 | 624 commits to master since this releaseAdded
- Added dependency
net.nosial.tempfileto create temporary files when uploading content from memory. - Added
\TgBotLib\Abstracts > ChatActionType - Added logging events to
\TgBotLib\Bot > handleUpdate()
Fixed
- Fixed file uploads when trying to upload content from memory.
Downloads
-
Source code (ZIP)
4 downloads
-
Source code (TAR.GZ)
4 downloads
- Added dependency
-
6.5.1 Stable
released this
2023-02-23 17:56:57 +00:00 | 636 commits to master since this releaseFixed
- Added a null-safe check for
Poll'sexplanation_entitiesfield. #1
Downloads
-
Source code (ZIP)
5 downloads
-
Source code (TAR.GZ)
3 downloads
- Added a null-safe check for
-
6.5.0 Stable
released this
2023-02-21 02:51:22 +00:00 | 639 commits to master since this releaseAdded
- First Release
Downloads
-
Source code (ZIP)
6 downloads
-
Source code (TAR.GZ)
5 downloads