Pytgbot

Latest version: v5.7

Safety actively analyzes 714919 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 9

4.0.0

- [`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.

3.6.0

- [`Bot API 3`.`6` (February 13, 2018)](https://core.telegram.org/bots/api-changelog#february-13-2018)
- Added `connected_website` attribute to the `Update` class.
- Added `parse_mode` attribute all stuff that has captions, in the bot functions and the sendable inline objects.
- Also added `supports_streaming` to `Bot.send_video(...)` and `sendable.inputmedia.InputMediaVideo`.

3.5.2

- Added `username` and `id` property to the `Bot` class.
This is basically the implementation used in [Teleflask](https://github.com/luckydonald/Teleflask) already, but calling it `id` and not `user_id` as it is a bot, not a user.
- Added `__str__` class, so that `str(bot)` displays as `Bot(username="luckybot", id=108721382)`

3.5.1

- Fixed `InputFileFromDisk`.
- Usage of `InputFile` with `file_blob` is now **deprecated**.
Use `InputFileFromBlob` instead.

3.5.0

Updated official API changes of
- [`Bot API 3`.`4` (October 11, 2017)](https://core.telegram.org/bots/api-changelog#october-11-2017)
- [`Bot API 3`.`5` (November 17, 2017)](https://core.telegram.org/bots/api-changelog#november-17-2017)

3.3.1

- Removed doubled `WebhookInfo` classes at two different places. They are now the same.
- Fixed importing `Message` in `pytgbot.api_types.receivable.peer.Chat`.

Page 5 of 9

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.