2018-10-01 23:29:46 +02:00
|
|
|
#!/usr/bin/env python
|
2015-08-11 21:58:17 +02:00
|
|
|
#
|
|
|
|
# A library that provides a Python interface to the Telegram Bot API
|
2024-02-19 20:06:25 +01:00
|
|
|
# Copyright (C) 2015-2024
|
2016-01-05 14:12:03 +01:00
|
|
|
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
|
2015-08-11 21:58:17 +02:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Lesser Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Lesser Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Lesser Public License
|
|
|
|
# along with this program. If not, see [http://www.gnu.org/licenses/].
|
2015-08-28 17:19:30 +02:00
|
|
|
"""A library that provides a Python interface to the Telegram Bot API"""
|
2015-07-07 21:50:36 +02:00
|
|
|
|
2021-12-05 09:42:14 +01:00
|
|
|
__author__ = "devs@python-telegram-bot.org"
|
2024-02-08 17:12:00 +01:00
|
|
|
__all__ = (
|
2021-12-05 09:42:14 +01:00
|
|
|
"Animation",
|
|
|
|
"Audio",
|
|
|
|
"Bot",
|
|
|
|
"BotCommand",
|
|
|
|
"BotCommandScope",
|
|
|
|
"BotCommandScopeAllChatAdministrators",
|
|
|
|
"BotCommandScopeAllGroupChats",
|
|
|
|
"BotCommandScopeAllPrivateChats",
|
|
|
|
"BotCommandScopeChat",
|
|
|
|
"BotCommandScopeChatAdministrators",
|
|
|
|
"BotCommandScopeChatMember",
|
|
|
|
"BotCommandScopeDefault",
|
2023-03-25 11:47:26 +01:00
|
|
|
"BotDescription",
|
2023-05-07 13:44:34 +02:00
|
|
|
"BotName",
|
2023-03-25 11:47:26 +01:00
|
|
|
"BotShortDescription",
|
2021-12-05 09:42:14 +01:00
|
|
|
"CallbackGame",
|
|
|
|
"CallbackQuery",
|
|
|
|
"Chat",
|
2022-05-03 18:21:50 +02:00
|
|
|
"ChatAdministratorRights",
|
2024-02-08 17:12:00 +01:00
|
|
|
"ChatBoost",
|
2024-03-02 10:56:15 +01:00
|
|
|
"ChatBoostAdded",
|
2024-02-08 17:12:00 +01:00
|
|
|
"ChatBoostRemoved",
|
|
|
|
"ChatBoostSource",
|
|
|
|
"ChatBoostSourceGiftCode",
|
|
|
|
"ChatBoostSourceGiveaway",
|
|
|
|
"ChatBoostSourcePremium",
|
|
|
|
"ChatBoostUpdated",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ChatInviteLink",
|
|
|
|
"ChatJoinRequest",
|
|
|
|
"ChatLocation",
|
|
|
|
"ChatMember",
|
|
|
|
"ChatMemberAdministrator",
|
2024-01-08 18:35:32 +01:00
|
|
|
"ChatMemberBanned",
|
|
|
|
"ChatMemberLeft",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ChatMemberMember",
|
2024-01-08 18:35:32 +01:00
|
|
|
"ChatMemberOwner",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ChatMemberRestricted",
|
|
|
|
"ChatMemberUpdated",
|
|
|
|
"ChatPermissions",
|
|
|
|
"ChatPhoto",
|
2023-02-08 11:47:21 +01:00
|
|
|
"ChatShared",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ChosenInlineResult",
|
|
|
|
"Contact",
|
|
|
|
"Credentials",
|
|
|
|
"DataCredentials",
|
|
|
|
"Dice",
|
|
|
|
"Document",
|
|
|
|
"EncryptedCredentials",
|
|
|
|
"EncryptedPassportElement",
|
2024-02-08 17:12:00 +01:00
|
|
|
"ExternalReplyInfo",
|
2021-12-05 09:42:14 +01:00
|
|
|
"File",
|
|
|
|
"FileCredentials",
|
|
|
|
"ForceReply",
|
2022-11-22 10:43:50 +01:00
|
|
|
"ForumTopic",
|
|
|
|
"ForumTopicClosed",
|
|
|
|
"ForumTopicCreated",
|
2023-01-01 17:00:49 +01:00
|
|
|
"ForumTopicEdited",
|
2022-11-22 10:43:50 +01:00
|
|
|
"ForumTopicReopened",
|
2021-12-05 09:42:14 +01:00
|
|
|
"Game",
|
|
|
|
"GameHighScore",
|
2023-01-01 17:00:49 +01:00
|
|
|
"GeneralForumTopicHidden",
|
|
|
|
"GeneralForumTopicUnhidden",
|
2024-02-08 17:12:00 +01:00
|
|
|
"Giveaway",
|
|
|
|
"GiveawayCompleted",
|
|
|
|
"GiveawayCreated",
|
|
|
|
"GiveawayWinners",
|
2021-12-05 09:42:14 +01:00
|
|
|
"IdDocumentData",
|
2024-02-08 17:12:00 +01:00
|
|
|
"InaccessibleMessage",
|
2021-12-05 09:42:14 +01:00
|
|
|
"InlineKeyboardButton",
|
|
|
|
"InlineKeyboardMarkup",
|
|
|
|
"InlineQuery",
|
|
|
|
"InlineQueryResult",
|
|
|
|
"InlineQueryResultArticle",
|
|
|
|
"InlineQueryResultAudio",
|
|
|
|
"InlineQueryResultCachedAudio",
|
|
|
|
"InlineQueryResultCachedDocument",
|
|
|
|
"InlineQueryResultCachedGif",
|
|
|
|
"InlineQueryResultCachedMpeg4Gif",
|
|
|
|
"InlineQueryResultCachedPhoto",
|
|
|
|
"InlineQueryResultCachedSticker",
|
|
|
|
"InlineQueryResultCachedVideo",
|
|
|
|
"InlineQueryResultCachedVoice",
|
|
|
|
"InlineQueryResultContact",
|
|
|
|
"InlineQueryResultDocument",
|
|
|
|
"InlineQueryResultGame",
|
|
|
|
"InlineQueryResultGif",
|
|
|
|
"InlineQueryResultLocation",
|
|
|
|
"InlineQueryResultMpeg4Gif",
|
|
|
|
"InlineQueryResultPhoto",
|
|
|
|
"InlineQueryResultVenue",
|
|
|
|
"InlineQueryResultVideo",
|
|
|
|
"InlineQueryResultVoice",
|
2024-01-08 18:35:32 +01:00
|
|
|
"InlineQueryResultsButton",
|
2021-12-05 09:42:14 +01:00
|
|
|
"InputContactMessageContent",
|
|
|
|
"InputFile",
|
|
|
|
"InputInvoiceMessageContent",
|
|
|
|
"InputLocationMessageContent",
|
|
|
|
"InputMedia",
|
|
|
|
"InputMediaAnimation",
|
|
|
|
"InputMediaAudio",
|
|
|
|
"InputMediaDocument",
|
|
|
|
"InputMediaPhoto",
|
|
|
|
"InputMediaVideo",
|
|
|
|
"InputMessageContent",
|
2023-03-25 11:47:26 +01:00
|
|
|
"InputSticker",
|
2021-12-05 09:42:14 +01:00
|
|
|
"InputTextMessageContent",
|
|
|
|
"InputVenueMessageContent",
|
|
|
|
"Invoice",
|
|
|
|
"KeyboardButton",
|
|
|
|
"KeyboardButtonPollType",
|
2023-02-08 11:47:21 +01:00
|
|
|
"KeyboardButtonRequestChat",
|
2024-02-08 17:12:00 +01:00
|
|
|
"KeyboardButtonRequestUsers",
|
2021-12-05 09:42:14 +01:00
|
|
|
"LabeledPrice",
|
2024-02-08 17:12:00 +01:00
|
|
|
"LinkPreviewOptions",
|
2021-12-05 09:42:14 +01:00
|
|
|
"Location",
|
|
|
|
"LoginUrl",
|
|
|
|
"MaskPosition",
|
2024-02-08 17:12:00 +01:00
|
|
|
"MaybeInaccessibleMessage",
|
2022-05-03 18:21:50 +02:00
|
|
|
"MenuButton",
|
|
|
|
"MenuButtonCommands",
|
|
|
|
"MenuButtonDefault",
|
|
|
|
"MenuButtonWebApp",
|
2021-12-05 09:42:14 +01:00
|
|
|
"Message",
|
|
|
|
"MessageAutoDeleteTimerChanged",
|
|
|
|
"MessageEntity",
|
|
|
|
"MessageId",
|
2024-02-08 17:12:00 +01:00
|
|
|
"MessageOrigin",
|
|
|
|
"MessageOriginChannel",
|
|
|
|
"MessageOriginChat",
|
|
|
|
"MessageOriginHiddenUser",
|
|
|
|
"MessageOriginUser",
|
|
|
|
"MessageReactionCountUpdated",
|
|
|
|
"MessageReactionUpdated",
|
2021-12-05 09:42:14 +01:00
|
|
|
"OrderInfo",
|
|
|
|
"PassportData",
|
|
|
|
"PassportElementError",
|
|
|
|
"PassportElementErrorDataField",
|
|
|
|
"PassportElementErrorFile",
|
|
|
|
"PassportElementErrorFiles",
|
|
|
|
"PassportElementErrorFrontSide",
|
|
|
|
"PassportElementErrorReverseSide",
|
|
|
|
"PassportElementErrorSelfie",
|
|
|
|
"PassportElementErrorTranslationFile",
|
|
|
|
"PassportElementErrorTranslationFiles",
|
|
|
|
"PassportElementErrorUnspecified",
|
|
|
|
"PassportFile",
|
|
|
|
"PersonalDetails",
|
|
|
|
"PhotoSize",
|
|
|
|
"Poll",
|
|
|
|
"PollAnswer",
|
|
|
|
"PollOption",
|
|
|
|
"PreCheckoutQuery",
|
|
|
|
"ProximityAlertTriggered",
|
2024-02-08 17:12:00 +01:00
|
|
|
"ReactionCount",
|
|
|
|
"ReactionType",
|
|
|
|
"ReactionTypeCustomEmoji",
|
|
|
|
"ReactionTypeEmoji",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ReplyKeyboardMarkup",
|
|
|
|
"ReplyKeyboardRemove",
|
2024-02-08 17:12:00 +01:00
|
|
|
"ReplyParameters",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ResidentialAddress",
|
|
|
|
"SecureData",
|
|
|
|
"SecureValue",
|
2022-05-03 18:21:50 +02:00
|
|
|
"SentWebAppMessage",
|
2021-12-05 09:42:14 +01:00
|
|
|
"ShippingAddress",
|
|
|
|
"ShippingOption",
|
|
|
|
"ShippingQuery",
|
|
|
|
"Sticker",
|
|
|
|
"StickerSet",
|
2023-09-03 13:43:44 +02:00
|
|
|
"Story",
|
2021-12-05 09:42:14 +01:00
|
|
|
"SuccessfulPayment",
|
2023-05-07 13:44:34 +02:00
|
|
|
"SwitchInlineQueryChosenChat",
|
2021-12-05 09:42:14 +01:00
|
|
|
"TelegramObject",
|
2024-02-08 17:12:00 +01:00
|
|
|
"TextQuote",
|
2021-12-05 09:42:14 +01:00
|
|
|
"Update",
|
|
|
|
"User",
|
2024-02-08 17:12:00 +01:00
|
|
|
"UserChatBoosts",
|
2021-12-05 09:42:14 +01:00
|
|
|
"UserProfilePhotos",
|
2024-02-08 17:12:00 +01:00
|
|
|
"UsersShared",
|
2021-12-05 09:42:14 +01:00
|
|
|
"Venue",
|
|
|
|
"Video",
|
2022-05-03 18:21:50 +02:00
|
|
|
"VideoChatEnded",
|
|
|
|
"VideoChatParticipantsInvited",
|
|
|
|
"VideoChatScheduled",
|
|
|
|
"VideoChatStarted",
|
2021-12-05 09:42:14 +01:00
|
|
|
"VideoNote",
|
|
|
|
"Voice",
|
2022-05-03 18:21:50 +02:00
|
|
|
"WebAppData",
|
|
|
|
"WebAppInfo",
|
2021-12-05 09:42:14 +01:00
|
|
|
"WebhookInfo",
|
2023-01-01 17:00:49 +01:00
|
|
|
"WriteAccessAllowed",
|
2024-01-08 18:35:32 +01:00
|
|
|
"__bot_api_version__",
|
|
|
|
"__bot_api_version_info__",
|
|
|
|
"__version__",
|
|
|
|
"__version_info__",
|
|
|
|
"constants",
|
|
|
|
"error",
|
|
|
|
"helpers",
|
|
|
|
"request",
|
|
|
|
"warnings",
|
2021-12-05 09:42:14 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-11-11 18:18:42 +01:00
|
|
|
from . import _version, constants, error, helpers, request, warnings
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._bot import Bot
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._botcommand import BotCommand
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._botcommandscope import (
|
|
|
|
BotCommandScope,
|
|
|
|
BotCommandScopeAllChatAdministrators,
|
|
|
|
BotCommandScopeAllGroupChats,
|
|
|
|
BotCommandScopeAllPrivateChats,
|
|
|
|
BotCommandScopeChat,
|
|
|
|
BotCommandScopeChatAdministrators,
|
|
|
|
BotCommandScopeChatMember,
|
|
|
|
BotCommandScopeDefault,
|
|
|
|
)
|
2023-03-25 11:47:26 +01:00
|
|
|
from ._botdescription import BotDescription, BotShortDescription
|
2023-05-07 13:44:34 +02:00
|
|
|
from ._botname import BotName
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._callbackquery import CallbackQuery
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._chat import Chat
|
2022-05-03 18:21:50 +02:00
|
|
|
from ._chatadministratorrights import ChatAdministratorRights
|
2024-02-08 17:12:00 +01:00
|
|
|
from ._chatboost import (
|
|
|
|
ChatBoost,
|
2024-03-02 10:56:15 +01:00
|
|
|
ChatBoostAdded,
|
2024-02-08 17:12:00 +01:00
|
|
|
ChatBoostRemoved,
|
|
|
|
ChatBoostSource,
|
|
|
|
ChatBoostSourceGiftCode,
|
|
|
|
ChatBoostSourceGiveaway,
|
|
|
|
ChatBoostSourcePremium,
|
|
|
|
ChatBoostUpdated,
|
|
|
|
UserChatBoosts,
|
|
|
|
)
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._chatinvitelink import ChatInviteLink
|
|
|
|
from ._chatjoinrequest import ChatJoinRequest
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._chatlocation import ChatLocation
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._chatmember import (
|
2021-07-01 17:45:19 +02:00
|
|
|
ChatMember,
|
|
|
|
ChatMemberAdministrator,
|
2022-05-05 09:27:54 +02:00
|
|
|
ChatMemberBanned,
|
|
|
|
ChatMemberLeft,
|
2021-07-01 17:45:19 +02:00
|
|
|
ChatMemberMember,
|
2022-05-05 09:27:54 +02:00
|
|
|
ChatMemberOwner,
|
2021-07-01 17:45:19 +02:00
|
|
|
ChatMemberRestricted,
|
|
|
|
)
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._chatmemberupdated import ChatMemberUpdated
|
|
|
|
from ._chatpermissions import ChatPermissions
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._choseninlineresult import ChosenInlineResult
|
|
|
|
from ._dice import Dice
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._files.animation import Animation
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._files.audio import Audio
|
|
|
|
from ._files.chatphoto import ChatPhoto
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._files.contact import Contact
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._files.document import Document
|
|
|
|
from ._files.file import File
|
|
|
|
from ._files.inputfile import InputFile
|
|
|
|
from ._files.inputmedia import (
|
|
|
|
InputMedia,
|
|
|
|
InputMediaAnimation,
|
|
|
|
InputMediaAudio,
|
|
|
|
InputMediaDocument,
|
|
|
|
InputMediaPhoto,
|
|
|
|
InputMediaVideo,
|
|
|
|
)
|
2023-03-25 11:47:26 +01:00
|
|
|
from ._files.inputsticker import InputSticker
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._files.location import Location
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._files.photosize import PhotoSize
|
|
|
|
from ._files.sticker import MaskPosition, Sticker, StickerSet
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._files.venue import Venue
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._files.video import Video
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._files.videonote import VideoNote
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._files.voice import Voice
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._forcereply import ForceReply
|
2023-01-01 17:00:49 +01:00
|
|
|
from ._forumtopic import (
|
|
|
|
ForumTopic,
|
|
|
|
ForumTopicClosed,
|
|
|
|
ForumTopicCreated,
|
|
|
|
ForumTopicEdited,
|
|
|
|
ForumTopicReopened,
|
|
|
|
GeneralForumTopicHidden,
|
|
|
|
GeneralForumTopicUnhidden,
|
|
|
|
)
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._games.callbackgame import CallbackGame
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._games.game import Game
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._games.gamehighscore import GameHighScore
|
2024-02-08 17:12:00 +01:00
|
|
|
from ._giveaway import Giveaway, GiveawayCompleted, GiveawayCreated, GiveawayWinners
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._inline.inlinekeyboardbutton import InlineKeyboardButton
|
|
|
|
from ._inline.inlinekeyboardmarkup import InlineKeyboardMarkup
|
|
|
|
from ._inline.inlinequery import InlineQuery
|
|
|
|
from ._inline.inlinequeryresult import InlineQueryResult
|
|
|
|
from ._inline.inlinequeryresultarticle import InlineQueryResultArticle
|
|
|
|
from ._inline.inlinequeryresultaudio import InlineQueryResultAudio
|
|
|
|
from ._inline.inlinequeryresultcachedaudio import InlineQueryResultCachedAudio
|
|
|
|
from ._inline.inlinequeryresultcacheddocument import InlineQueryResultCachedDocument
|
|
|
|
from ._inline.inlinequeryresultcachedgif import InlineQueryResultCachedGif
|
|
|
|
from ._inline.inlinequeryresultcachedmpeg4gif import InlineQueryResultCachedMpeg4Gif
|
|
|
|
from ._inline.inlinequeryresultcachedphoto import InlineQueryResultCachedPhoto
|
|
|
|
from ._inline.inlinequeryresultcachedsticker import InlineQueryResultCachedSticker
|
|
|
|
from ._inline.inlinequeryresultcachedvideo import InlineQueryResultCachedVideo
|
|
|
|
from ._inline.inlinequeryresultcachedvoice import InlineQueryResultCachedVoice
|
|
|
|
from ._inline.inlinequeryresultcontact import InlineQueryResultContact
|
|
|
|
from ._inline.inlinequeryresultdocument import InlineQueryResultDocument
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._inline.inlinequeryresultgame import InlineQueryResultGame
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._inline.inlinequeryresultgif import InlineQueryResultGif
|
|
|
|
from ._inline.inlinequeryresultlocation import InlineQueryResultLocation
|
|
|
|
from ._inline.inlinequeryresultmpeg4gif import InlineQueryResultMpeg4Gif
|
|
|
|
from ._inline.inlinequeryresultphoto import InlineQueryResultPhoto
|
2023-05-07 13:44:34 +02:00
|
|
|
from ._inline.inlinequeryresultsbutton import InlineQueryResultsButton
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._inline.inlinequeryresultvenue import InlineQueryResultVenue
|
|
|
|
from ._inline.inlinequeryresultvideo import InlineQueryResultVideo
|
|
|
|
from ._inline.inlinequeryresultvoice import InlineQueryResultVoice
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._inline.inputcontactmessagecontent import InputContactMessageContent
|
|
|
|
from ._inline.inputinvoicemessagecontent import InputInvoiceMessageContent
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._inline.inputlocationmessagecontent import InputLocationMessageContent
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._inline.inputmessagecontent import InputMessageContent
|
|
|
|
from ._inline.inputtextmessagecontent import InputTextMessageContent
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._inline.inputvenuemessagecontent import InputVenueMessageContent
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._keyboardbutton import KeyboardButton
|
|
|
|
from ._keyboardbuttonpolltype import KeyboardButtonPollType
|
2024-02-25 10:34:47 +01:00
|
|
|
from ._keyboardbuttonrequest import KeyboardButtonRequestChat, KeyboardButtonRequestUsers
|
2024-02-08 17:12:00 +01:00
|
|
|
from ._linkpreviewoptions import LinkPreviewOptions
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._loginurl import LoginUrl
|
|
|
|
from ._menubutton import MenuButton, MenuButtonCommands, MenuButtonDefault, MenuButtonWebApp
|
2024-02-08 17:12:00 +01:00
|
|
|
from ._message import InaccessibleMessage, MaybeInaccessibleMessage, Message
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._messageautodeletetimerchanged import MessageAutoDeleteTimerChanged
|
|
|
|
from ._messageentity import MessageEntity
|
|
|
|
from ._messageid import MessageId
|
2024-02-08 17:12:00 +01:00
|
|
|
from ._messageorigin import (
|
|
|
|
MessageOrigin,
|
|
|
|
MessageOriginChannel,
|
|
|
|
MessageOriginChat,
|
|
|
|
MessageOriginHiddenUser,
|
|
|
|
MessageOriginUser,
|
|
|
|
)
|
|
|
|
from ._messagereactionupdated import MessageReactionCountUpdated, MessageReactionUpdated
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._passport.credentials import (
|
|
|
|
Credentials,
|
|
|
|
DataCredentials,
|
|
|
|
EncryptedCredentials,
|
|
|
|
FileCredentials,
|
|
|
|
SecureData,
|
|
|
|
SecureValue,
|
Bot API 4.0 (#1168)
Telegram Passport (#1174):
- Add full support for telegram passport.
- New types: PassportData, PassportFile, EncryptedPassportElement, EncryptedCredentials, PassportElementError, PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile and PassportElementErrorFiles.
- New bot method: set_passport_data_errors
- New filter: Filters.passport_data
- Field passport_data field on Message
- PassportData is automagically decrypted when you specify your private key when creating Updater or Bot.
- PassportFiles is also automagically decrypted as you download/retrieve them.
- See new passportbot.py example for details on how to use, or go to our telegram passport wiki page for more info
- NOTE: Passport decryption requires new dependency `cryptography`.
Inputfile rework (#1184):
- Change how Inputfile is handled internally
- This allows support for specifying the thumbnails of photos and videos using the thumb= argument in the different send_ methods.
- Also allows Bot.send_media_group to actually finally send more than one media.
- Add thumb to Audio, Video and Videonote
- Add Bot.edit_message_media together with InputMediaAnimation, InputMediaAudio, and inputMediaDocument.
Other Bot API 4.0 changes:
- Add forusquare_type to Venue, InlineQueryResultVenue, InputVenueMessageContent, and Bot.send_venue. (#1170)
- Add vCard support by adding vcard field to Contact, InlineQueryResultContact, InputContactMessageContent, and Bot.send_contact. (#1166)
- Support new message entities: CASHTAG and PHONE_NUMBER. (#1179)
- Cashtag seems to be things like $USD and $GBP, but it seems telegram doesn't currently send them to bots.
- Phone number also seems to have limited support for now
- Add Bot.send_animation, add width, height, and duration to Animation, and add Filters.animation. (#1172)
Co-authored-by: Jasmin Bom <jsmnbom@gmail.com>
Co-authored-by: code1mountain <32801117+code1mountain@users.noreply.github.com>
Co-authored-by: Eldinnie <pieter.schutz+github@gmail.com>
Co-authored-by: mathefreak1 <mathefreak@hi2.in>
2018-08-29 14:18:58 +02:00
|
|
|
)
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._passport.data import IdDocumentData, PersonalDetails, ResidentialAddress
|
|
|
|
from ._passport.encryptedpassportelement import EncryptedPassportElement
|
|
|
|
from ._passport.passportdata import PassportData
|
2021-10-10 15:10:21 +02:00
|
|
|
from ._passport.passportelementerrors import (
|
Bot API 4.0 (#1168)
Telegram Passport (#1174):
- Add full support for telegram passport.
- New types: PassportData, PassportFile, EncryptedPassportElement, EncryptedCredentials, PassportElementError, PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile and PassportElementErrorFiles.
- New bot method: set_passport_data_errors
- New filter: Filters.passport_data
- Field passport_data field on Message
- PassportData is automagically decrypted when you specify your private key when creating Updater or Bot.
- PassportFiles is also automagically decrypted as you download/retrieve them.
- See new passportbot.py example for details on how to use, or go to our telegram passport wiki page for more info
- NOTE: Passport decryption requires new dependency `cryptography`.
Inputfile rework (#1184):
- Change how Inputfile is handled internally
- This allows support for specifying the thumbnails of photos and videos using the thumb= argument in the different send_ methods.
- Also allows Bot.send_media_group to actually finally send more than one media.
- Add thumb to Audio, Video and Videonote
- Add Bot.edit_message_media together with InputMediaAnimation, InputMediaAudio, and inputMediaDocument.
Other Bot API 4.0 changes:
- Add forusquare_type to Venue, InlineQueryResultVenue, InputVenueMessageContent, and Bot.send_venue. (#1170)
- Add vCard support by adding vcard field to Contact, InlineQueryResultContact, InputContactMessageContent, and Bot.send_contact. (#1166)
- Support new message entities: CASHTAG and PHONE_NUMBER. (#1179)
- Cashtag seems to be things like $USD and $GBP, but it seems telegram doesn't currently send them to bots.
- Phone number also seems to have limited support for now
- Add Bot.send_animation, add width, height, and duration to Animation, and add Filters.animation. (#1172)
Co-authored-by: Jasmin Bom <jsmnbom@gmail.com>
Co-authored-by: code1mountain <32801117+code1mountain@users.noreply.github.com>
Co-authored-by: Eldinnie <pieter.schutz+github@gmail.com>
Co-authored-by: mathefreak1 <mathefreak@hi2.in>
2018-08-29 14:18:58 +02:00
|
|
|
PassportElementError,
|
|
|
|
PassportElementErrorDataField,
|
|
|
|
PassportElementErrorFile,
|
|
|
|
PassportElementErrorFiles,
|
|
|
|
PassportElementErrorFrontSide,
|
|
|
|
PassportElementErrorReverseSide,
|
2018-09-01 16:58:08 +02:00
|
|
|
PassportElementErrorSelfie,
|
|
|
|
PassportElementErrorTranslationFile,
|
|
|
|
PassportElementErrorTranslationFiles,
|
|
|
|
PassportElementErrorUnspecified,
|
|
|
|
)
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._passport.passportfile import PassportFile
|
|
|
|
from ._payment.invoice import Invoice
|
|
|
|
from ._payment.labeledprice import LabeledPrice
|
|
|
|
from ._payment.orderinfo import OrderInfo
|
|
|
|
from ._payment.precheckoutquery import PreCheckoutQuery
|
|
|
|
from ._payment.shippingaddress import ShippingAddress
|
|
|
|
from ._payment.shippingoption import ShippingOption
|
|
|
|
from ._payment.shippingquery import ShippingQuery
|
|
|
|
from ._payment.successfulpayment import SuccessfulPayment
|
|
|
|
from ._poll import Poll, PollAnswer, PollOption
|
|
|
|
from ._proximityalerttriggered import ProximityAlertTriggered
|
2024-02-08 17:12:00 +01:00
|
|
|
from ._reaction import ReactionCount, ReactionType, ReactionTypeCustomEmoji, ReactionTypeEmoji
|
|
|
|
from ._reply import ExternalReplyInfo, ReplyParameters, TextQuote
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._replykeyboardmarkup import ReplyKeyboardMarkup
|
|
|
|
from ._replykeyboardremove import ReplyKeyboardRemove
|
|
|
|
from ._sentwebappmessage import SentWebAppMessage
|
2024-02-25 10:34:47 +01:00
|
|
|
from ._shared import ChatShared, UsersShared
|
2023-09-03 13:43:44 +02:00
|
|
|
from ._story import Story
|
2023-05-07 13:44:34 +02:00
|
|
|
from ._switchinlinequerychosenchat import SwitchInlineQueryChosenChat
|
2022-05-05 09:27:54 +02:00
|
|
|
from ._telegramobject import TelegramObject
|
|
|
|
from ._update import Update
|
|
|
|
from ._user import User
|
|
|
|
from ._userprofilephotos import UserProfilePhotos
|
2022-11-11 18:18:42 +01:00
|
|
|
from ._videochat import (
|
|
|
|
VideoChatEnded,
|
|
|
|
VideoChatParticipantsInvited,
|
|
|
|
VideoChatScheduled,
|
|
|
|
VideoChatStarted,
|
|
|
|
)
|
|
|
|
from ._webappdata import WebAppData
|
|
|
|
from ._webappinfo import WebAppInfo
|
|
|
|
from ._webhookinfo import WebhookInfo
|
2023-01-01 17:00:49 +01:00
|
|
|
from ._writeaccessallowed import WriteAccessAllowed
|
2022-05-14 15:50:12 +02:00
|
|
|
|
|
|
|
#: :obj:`str`: The version of the `python-telegram-bot` library as string.
|
|
|
|
#: To get detailed information about the version number, please use :data:`__version_info__`
|
|
|
|
#: instead.
|
2023-02-02 18:55:07 +01:00
|
|
|
__version__: str = _version.__version__
|
2022-05-14 15:50:12 +02:00
|
|
|
#: :class:`typing.NamedTuple`: A tuple containing the five components of the version number:
|
|
|
|
#: `major`, `minor`, `micro`, `releaselevel`, and `serial`.
|
|
|
|
#: All values except `releaselevel` are integers.
|
|
|
|
#: The release level is ``'alpha'``, ``'beta'``, ``'candidate'``, or ``'final'``.
|
|
|
|
#: The components can also be accessed by name, so ``__version_info__[0]`` is equivalent to
|
|
|
|
#: ``__version_info__.major`` and so on.
|
|
|
|
#:
|
|
|
|
#: .. versionadded:: 20.0
|
2023-02-02 18:55:07 +01:00
|
|
|
__version_info__: _version.Version = _version.__version_info__
|
2022-05-14 15:50:12 +02:00
|
|
|
#: :obj:`str`: Shortcut for :const:`telegram.constants.BOT_API_VERSION`.
|
|
|
|
#:
|
|
|
|
#: .. versionchanged:: 20.0
|
|
|
|
#: This constant was previously named ``bot_api_version``.
|
2023-02-02 18:55:07 +01:00
|
|
|
__bot_api_version__: str = _version.__bot_api_version__
|
2022-05-14 15:50:12 +02:00
|
|
|
#: :class:`typing.NamedTuple`: Shortcut for :const:`telegram.constants.BOT_API_VERSION_INFO`.
|
|
|
|
#:
|
|
|
|
#: .. versionadded:: 20.0
|
2023-02-02 18:55:07 +01:00
|
|
|
__bot_api_version_info__: constants._BotAPIVersion = _version.__bot_api_version_info__
|