Третий коммит, добавление share, share_kb, а также ADMIN_ID

This commit is contained in:
2025-07-22 13:50:14 +03:00
parent 849feb7beb
commit b98123f4dc
1479 changed files with 323549 additions and 11 deletions

View File

@@ -0,0 +1,71 @@
from .bot_command_scope_type import BotCommandScopeType
from .chat_action import ChatAction
from .chat_boost_source_type import ChatBoostSourceType
from .chat_member_status import ChatMemberStatus
from .chat_type import ChatType
from .content_type import ContentType
from .currency import Currency
from .dice_emoji import DiceEmoji
from .encrypted_passport_element import EncryptedPassportElement
from .inline_query_result_type import InlineQueryResultType
from .input_media_type import InputMediaType
from .input_paid_media_type import InputPaidMediaType
from .input_profile_photo_type import InputProfilePhotoType
from .input_story_content_type import InputStoryContentType
from .keyboard_button_poll_type_type import KeyboardButtonPollTypeType
from .mask_position_point import MaskPositionPoint
from .menu_button_type import MenuButtonType
from .message_entity_type import MessageEntityType
from .message_origin_type import MessageOriginType
from .owned_gift_type import OwnedGiftType
from .paid_media_type import PaidMediaType
from .parse_mode import ParseMode
from .passport_element_error_type import PassportElementErrorType
from .poll_type import PollType
from .reaction_type_type import ReactionTypeType
from .revenue_withdrawal_state_type import RevenueWithdrawalStateType
from .sticker_format import StickerFormat
from .sticker_type import StickerType
from .story_area_type_type import StoryAreaTypeType
from .topic_icon_color import TopicIconColor
from .transaction_partner_type import TransactionPartnerType
from .transaction_partner_user_transaction_type_enum import (
TransactionPartnerUserTransactionTypeEnum,
)
from .update_type import UpdateType
__all__ = (
"BotCommandScopeType",
"ChatAction",
"ChatBoostSourceType",
"ChatMemberStatus",
"ChatType",
"ContentType",
"Currency",
"DiceEmoji",
"EncryptedPassportElement",
"InlineQueryResultType",
"InputMediaType",
"InputPaidMediaType",
"InputProfilePhotoType",
"InputStoryContentType",
"KeyboardButtonPollTypeType",
"MaskPositionPoint",
"MenuButtonType",
"MessageEntityType",
"MessageOriginType",
"OwnedGiftType",
"PaidMediaType",
"ParseMode",
"PassportElementErrorType",
"PollType",
"ReactionTypeType",
"RevenueWithdrawalStateType",
"StickerFormat",
"StickerType",
"StoryAreaTypeType",
"TopicIconColor",
"TransactionPartnerType",
"TransactionPartnerUserTransactionTypeEnum",
"UpdateType",
)

View File

@@ -0,0 +1,17 @@
from enum import Enum
class BotCommandScopeType(str, Enum):
"""
This object represents the scope to which bot commands are applied.
Source: https://core.telegram.org/bots/api#botcommandscope
"""
DEFAULT = "default"
ALL_PRIVATE_CHATS = "all_private_chats"
ALL_GROUP_CHATS = "all_group_chats"
ALL_CHAT_ADMINISTRATORS = "all_chat_administrators"
CHAT = "chat"
CHAT_ADMINISTRATORS = "chat_administrators"
CHAT_MEMBER = "chat_member"

View File

@@ -0,0 +1,32 @@
from enum import Enum
class ChatAction(str, Enum):
"""
This object represents bot actions.
Choose one, depending on what the user is about to receive:
- typing for text messages,
- upload_photo for photos,
- record_video or upload_video for videos,
- record_voice or upload_voice for voice notes,
- upload_document for general files,
- choose_sticker for stickers,
- find_location for location data,
- record_video_note or upload_video_note for video notes.
Source: https://core.telegram.org/bots/api#sendchataction
"""
TYPING = "typing"
UPLOAD_PHOTO = "upload_photo"
RECORD_VIDEO = "record_video"
UPLOAD_VIDEO = "upload_video"
RECORD_VOICE = "record_voice"
UPLOAD_VOICE = "upload_voice"
UPLOAD_DOCUMENT = "upload_document"
CHOOSE_STICKER = "choose_sticker"
FIND_LOCATION = "find_location"
RECORD_VIDEO_NOTE = "record_video_note"
UPLOAD_VIDEO_NOTE = "upload_video_note"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class ChatBoostSourceType(str, Enum):
"""
This object represents a type of chat boost source.
Source: https://core.telegram.org/bots/api#chatboostsource
"""
PREMIUM = "premium"
GIFT_CODE = "gift_code"
GIVEAWAY = "giveaway"

View File

@@ -0,0 +1,16 @@
from enum import Enum
class ChatMemberStatus(str, Enum):
"""
This object represents chat member status.
Source: https://core.telegram.org/bots/api#chatmember
"""
CREATOR = "creator"
ADMINISTRATOR = "administrator"
MEMBER = "member"
RESTRICTED = "restricted"
LEFT = "left"
KICKED = "kicked"

View File

@@ -0,0 +1,15 @@
from enum import Enum
class ChatType(str, Enum):
"""
This object represents a chat type
Source: https://core.telegram.org/bots/api#chat
"""
SENDER = "sender"
PRIVATE = "private"
GROUP = "group"
SUPERGROUP = "supergroup"
CHANNEL = "channel"

View File

@@ -0,0 +1,69 @@
from enum import Enum
class ContentType(str, Enum):
"""
This object represents a type of content in message
"""
UNKNOWN = "unknown"
ANY = "any"
TEXT = "text"
ANIMATION = "animation"
AUDIO = "audio"
DOCUMENT = "document"
PAID_MEDIA = "paid_media"
PHOTO = "photo"
STICKER = "sticker"
STORY = "story"
VIDEO = "video"
VIDEO_NOTE = "video_note"
VOICE = "voice"
CONTACT = "contact"
DICE = "dice"
GAME = "game"
POLL = "poll"
VENUE = "venue"
LOCATION = "location"
NEW_CHAT_MEMBERS = "new_chat_members"
LEFT_CHAT_MEMBER = "left_chat_member"
NEW_CHAT_TITLE = "new_chat_title"
NEW_CHAT_PHOTO = "new_chat_photo"
DELETE_CHAT_PHOTO = "delete_chat_photo"
GROUP_CHAT_CREATED = "group_chat_created"
SUPERGROUP_CHAT_CREATED = "supergroup_chat_created"
CHANNEL_CHAT_CREATED = "channel_chat_created"
MESSAGE_AUTO_DELETE_TIMER_CHANGED = "message_auto_delete_timer_changed"
MIGRATE_TO_CHAT_ID = "migrate_to_chat_id"
MIGRATE_FROM_CHAT_ID = "migrate_from_chat_id"
PINNED_MESSAGE = "pinned_message"
INVOICE = "invoice"
SUCCESSFUL_PAYMENT = "successful_payment"
REFUNDED_PAYMENT = "refunded_payment"
USERS_SHARED = "users_shared"
CHAT_SHARED = "chat_shared"
GIFT = "gift"
UNIQUE_GIFT = "unique_gift"
CONNECTED_WEBSITE = "connected_website"
WRITE_ACCESS_ALLOWED = "write_access_allowed"
PASSPORT_DATA = "passport_data"
PROXIMITY_ALERT_TRIGGERED = "proximity_alert_triggered"
BOOST_ADDED = "boost_added"
CHAT_BACKGROUND_SET = "chat_background_set"
FORUM_TOPIC_CREATED = "forum_topic_created"
FORUM_TOPIC_EDITED = "forum_topic_edited"
FORUM_TOPIC_CLOSED = "forum_topic_closed"
FORUM_TOPIC_REOPENED = "forum_topic_reopened"
GENERAL_FORUM_TOPIC_HIDDEN = "general_forum_topic_hidden"
GENERAL_FORUM_TOPIC_UNHIDDEN = "general_forum_topic_unhidden"
GIVEAWAY_CREATED = "giveaway_created"
GIVEAWAY = "giveaway"
GIVEAWAY_WINNERS = "giveaway_winners"
GIVEAWAY_COMPLETED = "giveaway_completed"
PAID_MESSAGE_PRICE_CHANGED = "paid_message_price_changed"
VIDEO_CHAT_SCHEDULED = "video_chat_scheduled"
VIDEO_CHAT_STARTED = "video_chat_started"
VIDEO_CHAT_ENDED = "video_chat_ended"
VIDEO_CHAT_PARTICIPANTS_INVITED = "video_chat_participants_invited"
WEB_APP_DATA = "web_app_data"
USER_SHARED = "user_shared"

View File

@@ -0,0 +1,96 @@
from enum import Enum
class Currency(str, Enum):
"""
Currencies supported by Telegram Bot API
Source: https://core.telegram.org/bots/payments#supported-currencies
"""
AED = "AED"
AFN = "AFN"
ALL = "ALL"
AMD = "AMD"
ARS = "ARS"
AUD = "AUD"
AZN = "AZN"
BAM = "BAM"
BDT = "BDT"
BGN = "BGN"
BND = "BND"
BOB = "BOB"
BRL = "BRL"
BYN = "BYN"
CAD = "CAD"
CHF = "CHF"
CLP = "CLP"
CNY = "CNY"
COP = "COP"
CRC = "CRC"
CZK = "CZK"
DKK = "DKK"
DOP = "DOP"
DZD = "DZD"
EGP = "EGP"
ETB = "ETB"
EUR = "EUR"
GBP = "GBP"
GEL = "GEL"
GTQ = "GTQ"
HKD = "HKD"
HNL = "HNL"
HRK = "HRK"
HUF = "HUF"
IDR = "IDR"
ILS = "ILS"
INR = "INR"
ISK = "ISK"
JMD = "JMD"
JPY = "JPY"
KES = "KES"
KGS = "KGS"
KRW = "KRW"
KZT = "KZT"
LBP = "LBP"
LKR = "LKR"
MAD = "MAD"
MDL = "MDL"
MNT = "MNT"
MUR = "MUR"
MVR = "MVR"
MXN = "MXN"
MYR = "MYR"
MZN = "MZN"
NGN = "NGN"
NIO = "NIO"
NOK = "NOK"
NPR = "NPR"
NZD = "NZD"
PAB = "PAB"
PEN = "PEN"
PHP = "PHP"
PKR = "PKR"
PLN = "PLN"
PYG = "PYG"
QAR = "QAR"
RON = "RON"
RSD = "RSD"
RUB = "RUB"
SAR = "SAR"
SEK = "SEK"
SGD = "SGD"
THB = "THB"
TJS = "TJS"
TRY = "TRY"
TTD = "TTD"
TWD = "TWD"
TZS = "TZS"
UAH = "UAH"
UGX = "UGX"
USD = "USD"
UYU = "UYU"
UZS = "UZS"
VND = "VND"
YER = "YER"
ZAR = "ZAR"

View File

@@ -0,0 +1,16 @@
from enum import Enum
class DiceEmoji(str, Enum):
"""
Emoji on which the dice throw animation is based
Source: https://core.telegram.org/bots/api#dice
"""
DICE = "🎲"
DART = "🎯"
BASKETBALL = "🏀"
FOOTBALL = ""
SLOT_MACHINE = "🎰"
BOWLING = "🎳"

View File

@@ -0,0 +1,23 @@
from enum import Enum
class EncryptedPassportElement(str, Enum):
"""
This object represents type of encrypted passport element.
Source: https://core.telegram.org/bots/api#encryptedpassportelement
"""
PERSONAL_DETAILS = "personal_details"
PASSPORT = "passport"
DRIVER_LICENSE = "driver_license"
IDENTITY_CARD = "identity_card"
INTERNAL_PASSPORT = "internal_passport"
ADDRESS = "address"
UTILITY_BILL = "utility_bill"
BANK_STATEMENT = "bank_statement"
RENTAL_AGREEMENT = "rental_agreement"
PASSPORT_REGISTRATION = "passport_registration"
TEMPORARY_REGISTRATION = "temporary_registration"
PHONE_NUMBER = "phone_number"
EMAIL = "email"

View File

@@ -0,0 +1,23 @@
from enum import Enum
class InlineQueryResultType(str, Enum):
"""
Type of inline query result
Source: https://core.telegram.org/bots/api#inlinequeryresult
"""
AUDIO = "audio"
DOCUMENT = "document"
GIF = "gif"
MPEG4_GIF = "mpeg4_gif"
PHOTO = "photo"
STICKER = "sticker"
VIDEO = "video"
VOICE = "voice"
ARTICLE = "article"
CONTACT = "contact"
GAME = "game"
LOCATION = "location"
VENUE = "venue"

View File

@@ -0,0 +1,15 @@
from enum import Enum
class InputMediaType(str, Enum):
"""
This object represents input media type
Source: https://core.telegram.org/bots/api#inputmedia
"""
ANIMATION = "animation"
AUDIO = "audio"
DOCUMENT = "document"
PHOTO = "photo"
VIDEO = "video"

View File

@@ -0,0 +1,12 @@
from enum import Enum
class InputPaidMediaType(str, Enum):
"""
This object represents the type of a media in a paid message.
Source: https://core.telegram.org/bots/api#inputpaidmedia
"""
PHOTO = "photo"
VIDEO = "video"

View File

@@ -0,0 +1,12 @@
from enum import Enum
class InputProfilePhotoType(str, Enum):
"""
This object represents input profile photo type
Source: https://core.telegram.org/bots/api#inputprofilephoto
"""
STATIC = "static"
ANIMATED = "animated"

View File

@@ -0,0 +1,12 @@
from enum import Enum
class InputStoryContentType(str, Enum):
"""
This object represents input story content photo type.
Source: https://core.telegram.org/bots/api#inputstorycontentphoto
"""
PHOTO = "photo"
VIDEO = "video"

View File

@@ -0,0 +1,12 @@
from enum import Enum
class KeyboardButtonPollTypeType(str, Enum):
"""
This object represents type of a poll, which is allowed to be created and sent when the corresponding button is pressed.
Source: https://core.telegram.org/bots/api#keyboardbuttonpolltype
"""
QUIZ = "quiz"
REGULAR = "regular"

View File

@@ -0,0 +1,14 @@
from enum import Enum
class MaskPositionPoint(str, Enum):
"""
The part of the face relative to which the mask should be placed.
Source: https://core.telegram.org/bots/api#maskposition
"""
FOREHEAD = "forehead"
EYES = "eyes"
MOUTH = "mouth"
CHIN = "chin"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class MenuButtonType(str, Enum):
"""
This object represents an type of Menu button
Source: https://core.telegram.org/bots/api#menubuttondefault
"""
DEFAULT = "default"
COMMANDS = "commands"
WEB_APP = "web_app"

View File

@@ -0,0 +1,29 @@
from enum import Enum
class MessageEntityType(str, Enum):
"""
This object represents type of message entity
Source: https://core.telegram.org/bots/api#messageentity
"""
MENTION = "mention"
HASHTAG = "hashtag"
CASHTAG = "cashtag"
BOT_COMMAND = "bot_command"
URL = "url"
EMAIL = "email"
PHONE_NUMBER = "phone_number"
BOLD = "bold"
ITALIC = "italic"
UNDERLINE = "underline"
STRIKETHROUGH = "strikethrough"
SPOILER = "spoiler"
BLOCKQUOTE = "blockquote"
EXPANDABLE_BLOCKQUOTE = "expandable_blockquote"
CODE = "code"
PRE = "pre"
TEXT_LINK = "text_link"
TEXT_MENTION = "text_mention"
CUSTOM_EMOJI = "custom_emoji"

View File

@@ -0,0 +1,14 @@
from enum import Enum
class MessageOriginType(str, Enum):
"""
This object represents origin of a message.
Source: https://core.telegram.org/bots/api#messageorigin
"""
USER = "user"
HIDDEN_USER = "hidden_user"
CHAT = "chat"
CHANNEL = "channel"

View File

@@ -0,0 +1,12 @@
from enum import Enum
class OwnedGiftType(str, Enum):
"""
This object represents owned gift type
Source: https://core.telegram.org/bots/api#ownedgift
"""
REGULAR = "regular"
UNIQUE = "unique"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class PaidMediaType(str, Enum):
"""
This object represents the type of a media in a paid message.
Source: https://core.telegram.org/bots/api#paidmedia
"""
PHOTO = "photo"
PREVIEW = "preview"
VIDEO = "video"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class ParseMode(str, Enum):
"""
Formatting options
Source: https://core.telegram.org/bots/api#formatting-options
"""
MARKDOWN_V2 = "MarkdownV2"
MARKDOWN = "Markdown"
HTML = "HTML"

View File

@@ -0,0 +1,19 @@
from enum import Enum
class PassportElementErrorType(str, Enum):
"""
This object represents a passport element error type.
Source: https://core.telegram.org/bots/api#passportelementerror
"""
DATA = "data"
FRONT_SIDE = "front_side"
REVERSE_SIDE = "reverse_side"
SELFIE = "selfie"
FILE = "file"
FILES = "files"
TRANSLATION_FILE = "translation_file"
TRANSLATION_FILES = "translation_files"
UNSPECIFIED = "unspecified"

View File

@@ -0,0 +1,12 @@
from enum import Enum
class PollType(str, Enum):
"""
This object represents poll type
Source: https://core.telegram.org/bots/api#poll
"""
REGULAR = "regular"
QUIZ = "quiz"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class ReactionTypeType(str, Enum):
"""
This object represents reaction type.
Source: https://core.telegram.org/bots/api#reactiontype
"""
EMOJI = "emoji"
CUSTOM_EMOJI = "custom_emoji"
PAID = "paid"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class RevenueWithdrawalStateType(str, Enum):
"""
This object represents a revenue withdrawal state type
Source: https://core.telegram.org/bots/api#revenuewithdrawalstate
"""
FAILED = "failed"
PENDING = "pending"
SUCCEEDED = "succeeded"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class StickerFormat(str, Enum):
"""
Format of the sticker
Source: https://core.telegram.org/bots/api#createnewstickerset
"""
STATIC = "static"
ANIMATED = "animated"
VIDEO = "video"

View File

@@ -0,0 +1,13 @@
from enum import Enum
class StickerType(str, Enum):
"""
The part of the face relative to which the mask should be placed.
Source: https://core.telegram.org/bots/api#maskposition
"""
REGULAR = "regular"
MASK = "mask"
CUSTOM_EMOJI = "custom_emoji"

View File

@@ -0,0 +1,15 @@
from enum import Enum
class StoryAreaTypeType(str, Enum):
"""
This object represents input profile photo type
Source: https://core.telegram.org/bots/api#storyareatype
"""
LOCATION = "location"
SUGGESTED_REACTION = "suggested_reaction"
LINK = "link"
WEATHER = "weather"
UNIQUE_GIFT = "unique_gift"

View File

@@ -0,0 +1,16 @@
from enum import Enum
class TopicIconColor(int, Enum):
"""
Color of the topic icon in RGB format.
Source: https://github.com/telegramdesktop/tdesktop/blob/991fe491c5ae62705d77aa8fdd44a79caf639c45/Telegram/SourceFiles/data/data_forum_topic.cpp#L51-L56
"""
BLUE = 0x6FB9F0
YELLOW = 0xFFD67E
VIOLET = 0xCB86DB
GREEN = 0x8EEE98
ROSE = 0xFF93B2
RED = 0xFB6F5F

View File

@@ -0,0 +1,17 @@
from enum import Enum
class TransactionPartnerType(str, Enum):
"""
This object represents a type of transaction partner.
Source: https://core.telegram.org/bots/api#transactionpartner
"""
FRAGMENT = "fragment"
OTHER = "other"
USER = "user"
TELEGRAM_ADS = "telegram_ads"
TELEGRAM_API = "telegram_api"
AFFILIATE_PROGRAM = "affiliate_program"
CHAT = "chat"

View File

@@ -0,0 +1,15 @@
from enum import Enum
class TransactionPartnerUserTransactionTypeEnum(str, Enum):
"""
This object represents type of the transaction that were made by partner user.
Source: https://core.telegram.org/bots/api#transactionpartneruser
"""
INVOICE_PAYMENT = "invoice_payment"
PAID_MEDIA_PAYMENT = "paid_media_payment"
GIFT_PURCHASE = "gift_purchase"
PREMIUM_PURCHASE = "premium_purchase"
BUSINESS_ACCOUNT_TRANSFER = "business_account_transfer"

View File

@@ -0,0 +1,33 @@
from enum import Enum
class UpdateType(str, Enum):
"""
This object represents the complete list of allowed update types
Source: https://core.telegram.org/bots/api#update
"""
MESSAGE = "message"
EDITED_MESSAGE = "edited_message"
CHANNEL_POST = "channel_post"
EDITED_CHANNEL_POST = "edited_channel_post"
BUSINESS_CONNECTION = "business_connection"
BUSINESS_MESSAGE = "business_message"
EDITED_BUSINESS_MESSAGE = "edited_business_message"
DELETED_BUSINESS_MESSAGES = "deleted_business_messages"
MESSAGE_REACTION = "message_reaction"
MESSAGE_REACTION_COUNT = "message_reaction_count"
INLINE_QUERY = "inline_query"
CHOSEN_INLINE_RESULT = "chosen_inline_result"
CALLBACK_QUERY = "callback_query"
SHIPPING_QUERY = "shipping_query"
PRE_CHECKOUT_QUERY = "pre_checkout_query"
PURCHASED_PAID_MEDIA = "purchased_paid_media"
POLL = "poll"
POLL_ANSWER = "poll_answer"
MY_CHAT_MEMBER = "my_chat_member"
CHAT_MEMBER = "chat_member"
CHAT_JOIN_REQUEST = "chat_join_request"
CHAT_BOOST = "chat_boost"
REMOVED_CHAT_BOOST = "removed_chat_boost"