- [`Bot API 4`.`0` (July 26, 2018)](https://core.telegram.org/bots/api-changelog#july-26-2018)
- Added [Telegram Passport](https://telegram.org/blog/passport)
- Added bot methods:
- New `pytgbot.api_types.receivable.passport` containing:
`PassportData`, `PassportFile`, `EncryptedPassportElement` and `EncryptedCredentials`
- New `pytgbot.api_types.sendable.passport` containing:
`PassportElementError`, `PassportElementErrorDataField`, `PassportElementErrorFrontSide`, `PassportElementErrorReverseSide`, `PassportElementErrorSelfie`, `PassportElementErrorFile` and `PassportElementErrorFiles`
- More Changes:
- `api_types.receivable.media`:
- `MessageEntity` added `"cashtag"` as possible entity type.
- Added `thumb` parameter to `Audio`.
- Added `vcard` parameter to `Contact`.
- Added `foursquare_type` parameter to `Venue`.
- Added `Animation` class.
- `api_types.receivable.passport`:
- Added, see above.
- `api_types.receivable.updates`:
- Added parameters `animation` and `passport_data` to `Message`.
- `api_types.sendable.inline`:
- Added `foursquare_type` parameter to `InlineQueryResultVenue` and `InputVenueMessageContent`.
- Added `vcard` parameter to `InlineQueryResultContact` and `InputContactMessageContent`.
- `api_types.sendable.input_media`:
- `InputMedia`: Created `caption` field, this is contained in all subclasses.
- `InputMediaPhoto`:
- moved the `caption` into the superclass.
- fixed `parse_mode` not working in `from_array(...)`
- `InputMediaVideo`:
- moved the `caption` into the superclass.
- fixed `parse_mode` not working in `from_array(...)`
- added `thumb` parameter.
- Added new `InputMediaAnimation`.
- Added new `InputMediaAudio`.
- Added new `InputMediaDocument`.
- `api_types.receivable.passport`:
- Added, see above.
- `bot.Bot`:
- Added `thumb` parameter to `send_audio(...)`, `send_video(...)`, `send_video_note(...)` and `send_video_note(...)`.
- Added `foursquare_type` parameter to `send_venue(...)`.
- Added `vcard` parameter to `send_contact(...)`.
- Added new `send_animation(...)` function.
- Added new `edit_message_media(...)` function.
- Added new `set_passport_data_errors(...)` function.
- Documentation changes:
- `bot.Bot.set_webhook`: Returns True, only on success.
- `bot.Bot.send_media_group`: Instead of generic `InputMedia`, now only accepts `InputMediaPhoto` or `InputMediaVideo`
- `api_types.sendable.reply_markup.InlineKeyboardButton` can now use `tg://` urls, too.
- Also, while at it
- Fixed `'live_period' in inlinequeryresultlocation_instance` wrongly returning `False`
- Fixed `InputFileFromBlob` and `InputFileFromURL`: Reworked that whole `InputFile` piece, which should fix [6](https://github.com/luckydonald/pytgbot/issues/6).
- Fixed `certificate` argument in `Bot.set_webhook(...)` not working.
- Therefore in `_do_fileupload(...)`, the file can be set to be optional (`_file_is_optional=True`).
- Added `get_request_media(...)` method to `InputMedia`, to allow sending easier. Is very similar to `InputFile.get_request_files(...)`.
- Fixed `Bot.send_media_group(...)` now supporting `InputMediaPhoto` and `InputMediaVideo` elements, so sending files is actually possible.
- Fixed `Bot.edit_message_media(...)` now supporting `InputMedia` elements, so sending files is actually possible.