Skip to content

Releases

8.0.2

Choose a tag to compare

@Netkas Netkas released this 30 Dec 00:28

This update introduces some quality of life improvements.

Added

  • Added containsMedia method to Message object to check if the message contains media.
  • Add support for handling callback query events

8.0.1

Choose a tag to compare

@Netkas Netkas released this 04 Dec 18:42

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

Choose a tag to compare

@Netkas Netkas released this 29 Nov 05:42

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_app to 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

6.6.0

Choose a tag to compare

@Netkas Netkas released this 11 Apr 01:03

This 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 via TgBotLib\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 > StickerFormat to represent a sticker format ("static", "animated" or "video")
  • Added method \TgBotLib\Bot > uploadStickerFile() to upload a sticker file with a sticker for later use in createNewStickerSet and addStickerToSet methods (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 > StickerSet to 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 in TgBotLib\Objects\Telegram > Poll
  • Renamed thumb field in TgBotLib\Objects\Telegram > Animation to thumbnail
  • Renamed thumb field in TgBotLib\Objects\Telegram > Audio to thumbnail
  • Renamed thumb field in TgBotLib\Objects\Telegram > Document to thumbnail
  • Renamed thumb field in TgBotLib\Objects\Telegram > Sticker to thumbnail
  • Renamed thumb field in TgBotLib\Objects\Telegram > Video to thumbnail
  • Renamed thumb field in TgBotLib\Objects\Telegram > VideoNote to thumbnail

Fixed

  • Fixed TgBotLib\Objects\Telegram > Sticker > toArray() to properly return the premium_animation field

6.5.2

Choose a tag to compare

@Netkas Netkas released this 03 Mar 06:24

Added

  • Added dependency net.nosial.tempfile to 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.

6.5.1

Choose a tag to compare

@Netkas Netkas released this 03 Mar 06:23

Fixed

  • Added a null-safe check for Poll's explanation_entities field. #1

6.5.0

Choose a tag to compare

@Netkas Netkas released this 03 Mar 06:22

Added

  • First Release