• 6.7.0 0dbf477f7b

    6.7.0 Stable

    netkas released this 2023-08-10 18:33:28 +00:00 | 505 commits to master since this release

    This 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\InputTextMessageContent to represent the content of a text message to be sent as the result of an inline query.
    • Added object \TgBotLib\Objects\Telegram\InputMessageContent\InputLocationMessageContent to represent the content of a location message to be sent as the result of an inline query.
    • Added object \TgBotLib\Objects\Telegram\InputMessageContent\InputVenueMessageContent to represent the content of a venue message to be sent as the result of an inline query.
    • Added object \TgBotLib\Objects\Telegram\InputMessageContent\InputContactMessageContent to represent the content of a contact message to be sent as the result of an inline query.
    • Added object \TgBotLib\Objects\Telegram\InputMessageContent\InputInvoiceMessageContent to represent the content of an invoice message to be sent as the result of an inline query.
    • Added new exception class NotImplementedException to 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\ThumbnailMimeType to 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_link to \TgBotLib\Objects\Telegram\ChatMemberUpdated to 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\InlineQueryResult which is the base class for all inline query results, additionally added \TgBotLib\Abstracts\InlineQueryResultType to represent the type of inline query result object.
    • Added method \TgBotLib\Bot::answerWebAppQuery to answer a callback query sent from a web app, which returns the newly added \TgBotLib\Objects\Telegram\SentWebAppMessage object on success.
    • Implemented Telegram's currency API \TgBotLib\Classes\Utilities::getCurrency to 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::addRow to \TgBotLib\Objects\Telegram\InlineKeyboardMarkup
    • Added method \TgBotLib\Objects\Telegram\WebAppInfo::setUrl to \TgBotLib\Objects\Telegram\WebAppInfo
    • Added methods \TgBotLib\Classes\Validate::url, \TgBotLib\Classes\Validate::length, & \TgBotLib\Classes\Validate::isHttps to \TgBotLib\Classes\Validate
    • Updated documentation for \TgBotLib\Bot::editMessageMedia
    • Renamed namespace from \TgBotLib\Abstracts to \TgBotLib\Enums
    • Updated class type to final class in \TgBotLib\Enums > BotCommandScopeType
    • Updated class type to final class in \TgBotLib\Enums > ChatActionType
    • Updated class type to final class in \TgBotLib\Enums > ChatMemberStatus
    • Updated class type to final class in \TgBotLib\Enums > ChatType
    • Updated class type to final class in \TgBotLib\Enums > EventType
    • Updated class type to final class in \TgBotLib\Enums > InlineQueryResultType
    • Updated class type to final class in \TgBotLib\Enums > InputMediaType
    • Updated class type to final class in \TgBotLib\Enums > InputButtonType
    • Updated class type to final class in \TgBotLib\Enums > MessageEntityType
    • Updated class type to final class in \TgBotLib\Enums > PassportElementType
    • Updated class type to final class in \TgBotLib\Enums > PollType
    • Updated class type to final class in \TgBotLib\Enums > StickerFormat
    • Updated class type to final class in \TgBotLib\Enums > StickerType
    • Updated class type to final class in \TgBotLib\Enums > ThumbnailMimeType
    • Updated class type to final class in \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() where forum_topic_created is being parsed for
      forum_topic_edited instead of forum_topic_edited
    Downloads