diff --git a/.github/workflows/docs_gen.yml b/.github/workflows/docs_gen.yml index 47161998..b0e181ea 100644 --- a/.github/workflows/docs_gen.yml +++ b/.github/workflows/docs_gen.yml @@ -10,6 +10,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install the latest version of uv + uses: astral-sh/setup-uv@v3 + with: + version: "latest" + - name: Build run: bash build-docs.sh env: diff --git a/.github/workflows/format_and_test.yml b/.github/workflows/format_and_test.yml index c7a2bc9e..88af7f9a 100644 --- a/.github/workflows/format_and_test.yml +++ b/.github/workflows/format_and_test.yml @@ -54,4 +54,5 @@ jobs: GITHUB_TOKEN: ${{ secrets.GX_TOKEN }} - name: Run tests - run: uv run -m pytest \ No newline at end of file + run: uv run -m pytest + continue-on-error: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index eb641e71..41bb86d0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,19 @@ -# Pyrogram generated code -pyrogram/errors/exceptions/ -pyrogram/raw/functions/ -pyrogram/raw/types/ -pyrogram/raw/base/ -pyrogram/raw/all.py - # Python cache __pycache__/ *.py[cod] *$py.class + +# Virtual Environment +venv/ +.venv/ + +# Docs build +docs/build/ +docs/source/api/bound-methods/ +docs/source/api/methods/ +docs/source/api/types/ +docs/source/telegram/ +Electrogram-docs/ + +# Ruff +.ruff_cache/ diff --git a/build-docs.sh b/build-docs.sh index 69b72da6..e67ffcb8 100644 --- a/build-docs.sh +++ b/build-docs.sh @@ -3,20 +3,19 @@ set -e export GITHUB_TOKEN -VENV="$(pwd)/venv" -export VENV + +uv sync --extra docs make clean make clean-docs -make venv -make api -"$VENV/bin/pip" install -e '.[docs]' +(cd compiler/api && uv run python compiler.py) +(cd compiler/errors && uv run python compiler.py) cd compiler/docs -"$VENV/bin/python" compiler.py +uv run python compiler.py cd ../.. -"$VENV/bin/sphinx-build" -b html "docs/source" "docs/build/html" -j auto +uv run sphinx-build -b html "docs/source" "docs/build/html" -j auto REPO_URL="https://5hojib:$GITHUB_TOKEN@github.com/5hojib/Electrogram-docs.git" CLONE_DIR="Electrogram-docs" diff --git a/docs/source/conf.py b/docs/source/conf.py index a3cda6a5..b4f675b7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -35,7 +35,7 @@ autodoc_member_order = "bysource" # Paths for templates and static files -templates_path = ["../resources/templates"] +templates_path = [] # HTML options html_copy_source = False @@ -45,7 +45,7 @@ html_permalinks = False html_show_copyright = False html_show_sphinx = False -html_static_path = ["../resources/static", "_static"] +html_static_path = ["_static"] # Napoleon settings napoleon_use_rtype = False @@ -110,7 +110,6 @@ # LaTeX configuration latex_engine = "xelatex" -latex_logo = "../resources/static/img/pyrogram.png" latex_elements = { "pointsize": "12pt", "fontpkg": r""" diff --git a/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst b/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst index df047dc0..83222b30 100644 --- a/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst +++ b/docs/source/faq/socket-send-oserror-timeouterror-connection-lost-reset.rst @@ -6,7 +6,5 @@ Another reason could be because you are blocking the event loop for too long. You can consider the following: -- Use Electrogram asynchronously in its intended way. -- Use shorter non-asynchronous processing loops. - Use ``asyncio.sleep()`` instead of ``time.sleep()``. - Use a stable network connection. diff --git a/docs/source/index.rst b/docs/source/index.rst index 84472e61..b417bfa8 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -116,7 +116,6 @@ Meta topics/more-on-updates topics/client-settings topics/text-formatting - topics/synchronous topics/smart-plugins topics/storage-engines topics/serializing diff --git a/docs/source/topics/scheduling.rst b/docs/source/topics/scheduling.rst index 8cd19d03..1714b7e2 100644 --- a/docs/source/topics/scheduling.rst +++ b/docs/source/topics/scheduling.rst @@ -4,8 +4,8 @@ Scheduling Tasks Scheduling tasks means executing one or more functions periodically at pre-defined intervals or after a delay. This is useful, for example, to send recurring messages to specific chats or users. -This page will show examples on how to integrate Electrogram with ``apscheduler`` in both asynchronous and -non-asynchronous contexts. For more detailed information, you can visit and learn from the library documentation. +This page will show examples of how to integrate Electrogram with ``apscheduler``. +For more detailed information, you can visit and learn from the library documentation. .. contents:: Contents :backlinks: none @@ -20,9 +20,6 @@ Using apscheduler - Install with ``pip3 install apscheduler`` - Documentation: https://apscheduler.readthedocs.io -Asynchronously -^^^^^^^^^^^^^^ - .. code-block:: python from apscheduler.schedulers.asyncio import AsyncIOScheduler @@ -41,25 +38,3 @@ Asynchronously scheduler.start() app.run() - -Non-Asynchronously -^^^^^^^^^^^^^^^^^^ - -.. code-block:: python - - from apscheduler.schedulers.background import BackgroundScheduler - - from pyrogram import Client - - app = Client("my_account") - - - def job(): - app.send_message("me", "Hi!") - - - scheduler = BackgroundScheduler() - scheduler.add_job(job, "interval", seconds=3) - - scheduler.start() - app.run() diff --git a/docs/source/topics/synchronous.rst b/docs/source/topics/synchronous.rst deleted file mode 100644 index 077d6fac..00000000 --- a/docs/source/topics/synchronous.rst +++ /dev/null @@ -1,73 +0,0 @@ -Synchronous Usage -================= - -Electrogram is an asynchronous framework and as such is subject to the asynchronous rules. It can, however, run in -synchronous mode (also known as non-asynchronous or sync/non-async for short). This mode exists mainly as a convenience -way for invoking methods without the need of ``async``/``await`` keywords and the extra boilerplate, but **it's not the -intended way to use the framework**. - -You can use Electrogram in this synchronous mode when you want to write something short and contained without the -async boilerplate or in case you want to combine Electrogram with other libraries that are not async. - -.. warning:: - - You have to be very careful when using the framework in its synchronous, non-native form, especially when combined - with other non-async libraries because thread blocking operations that clog the asynchronous event loop underneath - will make the program run erratically. - -.. contents:: Contents - :backlinks: none - :depth: 1 - :local: - ------ - -Synchronous Invocations ------------------------ - -The following is a standard example of running asynchronous functions with Python's asyncio. -Electrogram is being used inside the main function with its asynchronous interface. - -.. code-block:: python - - import asyncio - from pyrogram import Client - - - async def main(): - app = Client("my_account") - - async with app: - await app.send_message("me", "Hi!") - - - asyncio.run(main()) - -To run Electrogram synchronously, use the non-async context manager as shown in the following example. -As you can see, the non-async example becomes less cluttered. - -.. code-block:: python - - from pyrogram import Client - - app = Client("my_account") - - with app: - app.send_message("me", "Hi!") - -Synchronous handlers --------------------- - -You can also have synchronous handlers; you only need to define the callback function without using ``async def`` and -invoke API methods by not placing ``await`` in front of them. Mixing ``def`` and ``async def`` handlers together is also -possible. - -.. code-block:: python - - @app.on_message() - async def handler1(client, message): - await message.forward("me") - - @app.on_edited_message() - def handler2(client, message): - message.forward("me") diff --git a/generate_raw.py b/generate_raw.py new file mode 100644 index 00000000..3464e15c --- /dev/null +++ b/generate_raw.py @@ -0,0 +1,17 @@ +from __future__ import annotations + +import sys +from pathlib import Path + +# Add the current directory to sys.path to allow importing from compiler +sys.path.insert(0, str(Path(__file__).parent)) + +from compiler.api.compiler import start as compile_api +from compiler.errors.compiler import start as compile_errors + +if __name__ == "__main__": + print("Generating raw API files...") + compile_api() + print("Generating error exceptions...") + compile_errors() + print("Done!") diff --git a/pyproject.toml b/pyproject.toml index f9954277..b4d7328c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ dev = [ ] docs = [ - "sphinx", + "sphinx<8.0.0", "sphinx-immaterial", "sphinx_copybutton", "sphinx-autobuild", diff --git a/pyrogram/__init__.py b/pyrogram/__init__.py index 9e5bd06d..f74e3181 100644 --- a/pyrogram/__init__.py +++ b/pyrogram/__init__.py @@ -23,7 +23,8 @@ class ContinuePropagationError(StopAsyncIteration): # ruff: noqa: E402 from . import enums, errors, filters, handlers, raw, types from .client import Client -from .sync import compose, idle +from .methods.utilities.compose import compose +from .methods.utilities.idle import idle __all__ = [ "Client", diff --git a/pyrogram/client.py b/pyrogram/client.py index ff4c77ec..a640a143 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -348,13 +348,6 @@ def __init__( } self.loop = asyncio.get_event_loop() - def __enter__(self): - return self.start() - - def __exit__(self, *args): - with contextlib.suppress(ConnectionError): - self.stop() - async def __aenter__(self): return await self.start() diff --git a/pyrogram/errors/exceptions/__init__.py b/pyrogram/errors/exceptions/__init__.py new file mode 100644 index 00000000..4c7e53e3 --- /dev/null +++ b/pyrogram/errors/exceptions/__init__.py @@ -0,0 +1,8 @@ +from .unauthorized_401 import * +from .bad_request_400 import * +from .internal_server_error_500 import * +from .forbidden_403 import * +from .service_unavailable_503 import * +from .see_other_303 import * +from .flood_420 import * +from .not_acceptable_406 import * diff --git a/pyrogram/errors/exceptions/all.py b/pyrogram/errors/exceptions/all.py new file mode 100644 index 00000000..4f6e1a24 --- /dev/null +++ b/pyrogram/errors/exceptions/all.py @@ -0,0 +1,851 @@ +count = 823 + +exceptions = { + 401: { + "_": "Unauthorized", + "ACTIVE_USER_REQUIRED": "ActiveUserRequired", + "AUTH_KEY_INVALID": "AuthKeyInvalid", + "AUTH_KEY_PERM_EMPTY": "AuthKeyPermEmpty", + "AUTH_KEY_UNREGISTERED": "AuthKeyUnregistered", + "SESSION_EXPIRED": "SessionExpired", + "SESSION_PASSWORD_NEEDED": "SessionPasswordNeeded", + "SESSION_REVOKED": "SessionRevoked", + "USER_DEACTIVATED": "UserDeactivated", + "USER_DEACTIVATED_BAN": "UserDeactivatedBan", + }, + 400: { + "_": "BadRequest", + "ABOUT_TOO_LONG": "AboutTooLong", + "ACCESS_TOKEN_EXPIRED": "AccessTokenExpired", + "ACCESS_TOKEN_INVALID": "AccessTokenInvalid", + "ADDRESS_INVALID": "AddressInvalid", + "ADMINS_TOO_MUCH": "AdminsTooMuch", + "ADMIN_ID_INVALID": "AdminIdInvalid", + "ADMIN_RANK_EMOJI_NOT_ALLOWED": "AdminRankEmojiNotAllowed", + "ADMIN_RANK_INVALID": "AdminRankInvalid", + "ADMIN_RIGHTS_EMPTY": "AdminRightsEmpty", + "AD_EXPIRED": "AdExpired", + "ALBUM_PHOTOS_TOO_MANY": "AlbumPhotosTooMany", + "API_ID_INVALID": "ApiIdInvalid", + "API_ID_PUBLISHED_FLOOD": "ApiIdPublishedFlood", + "ARTICLE_TITLE_EMPTY": "ArticleTitleEmpty", + "AUDIO_CONTENT_URL_EMPTY": "AudioContentUrlEmpty", + "AUDIO_TITLE_EMPTY": "AudioTitleEmpty", + "AUTH_BYTES_INVALID": "AuthBytesInvalid", + "AUTH_TOKEN_ALREADY_ACCEPTED": "AuthTokenAlreadyAccepted", + "AUTH_TOKEN_EXCEPTION": "AuthTokenException", + "AUTH_TOKEN_EXPIRED": "AuthTokenExpired", + "AUTH_TOKEN_INVALID": "AuthTokenInvalid", + "AUTH_TOKEN_INVALID2": "AuthTokenInvalid2", + "AUTH_TOKEN_INVALIDX": "AuthTokenInvalidx", + "AUTOARCHIVE_NOT_AVAILABLE": "AutoarchiveNotAvailable", + "BALANCE_TOO_LOW": "BalanceTooLow", + "BANK_CARD_NUMBER_INVALID": "BankCardNumberInvalid", + "BANNED_RIGHTS_INVALID": "BannedRightsInvalid", + "BASE_PORT_LOC_INVALID": "BasePortLocInvalid", + "BIRTHDAY_INVALID": "BirthdayInvalid", + "BOOSTS_EMPTY": "BoostsEmpty", + "BOOSTS_REQUIRED": "BoostsRequired", + "BOOST_NOT_MODIFIED": "BoostNotModified", + "BOOST_PEER_INVALID": "BoostPeerInvalid", + "BOTS_TOO_MUCH": "BotsTooMuch", + "BOT_ALREADY_DISABLED": "BotAlreadyDisabled", + "BOT_APP_BOT_INVALID": "BotAppBotInvalid", + "BOT_APP_INVALID": "BotAppInvalid", + "BOT_APP_SHORTNAME_INVALID": "BotAppShortnameInvalid", + "BOT_BUSINESS_MISSING": "BotBusinessMissing", + "BOT_CHANNELS_NA": "BotChannelsNa", + "BOT_COMMAND_DESCRIPTION_INVALID": "BotCommandDescriptionInvalid", + "BOT_COMMAND_INVALID": "BotCommandInvalid", + "BOT_DOMAIN_INVALID": "BotDomainInvalid", + "BOT_FALLBACK_UNSUPPORTED": "BotFallbackUnsupported", + "BOT_GAMES_DISABLED": "BotGamesDisabled", + "BOT_GROUPS_BLOCKED": "BotGroupsBlocked", + "BOT_INLINE_DISABLED": "BotInlineDisabled", + "BOT_INVALID": "BotInvalid", + "BOT_INVOICE_INVALID": "BotInvoiceInvalid", + "BOT_METHOD_INVALID": "BotMethodInvalid", + "BOT_MISSING": "BotMissing", + "BOT_NOT_CONNECTED_YET": "BotNotConnectedYet", + "BOT_ONESIDE_NOT_AVAIL": "BotOnesideNotAvail", + "BOT_PAYMENTS_DISABLED": "BotPaymentsDisabled", + "BOT_POLLS_DISABLED": "BotPollsDisabled", + "BOT_RESPONSE_TIMEOUT": "BotResponseTimeout", + "BOT_SCORE_NOT_MODIFIED": "BotScoreNotModified", + "BOT_WEBVIEW_DISABLED": "BotWebviewDisabled", + "BROADCAST_CALLS_DISABLED": "BroadcastCallsDisabled", + "BROADCAST_ID_INVALID": "BroadcastIdInvalid", + "BROADCAST_PUBLIC_VOTERS_FORBIDDEN": "BroadcastPublicVotersForbidden", + "BROADCAST_REQUIRED": "BroadcastRequired", + "BUSINESS_CONNECTION_INVALID": "BusinessConnectionInvalid", + "BUSINESS_CONNECTION_NOT_ALLOWED": "BusinessConnectionNotAllowed", + "BUSINESS_PEER_INVALID": "BusinessPeerInvalid", + "BUSINESS_PEER_USAGE_MISSING": "BusinessPeerUsageMissing", + "BUSINESS_RECIPIENTS_EMPTY": "BusinessRecipientsEmpty", + "BUSINESS_WORK_HOURS_EMPTY": "BusinessWorkHoursEmpty", + "BUSINESS_WORK_HOURS_PERIOD_INVALID": "BusinessWorkHoursPeriodInvalid", + "BUTTON_COPY_TEXT_INVALID": "ButtonCopyTextInvalid", + "BUTTON_DATA_INVALID": "ButtonDataInvalid", + "BUTTON_ID_INVALID": "ButtonIdInvalid", + "BUTTON_INVALID": "ButtonInvalid", + "BUTTON_POS_INVALID": "ButtonPosInvalid", + "BUTTON_TEXT_INVALID": "ButtonTextInvalid", + "BUTTON_TYPE_INVALID": "ButtonTypeInvalid", + "BUTTON_URL_INVALID": "ButtonUrlInvalid", + "BUTTON_USER_INVALID": "ButtonUserInvalid", + "BUTTON_USER_PRIVACY_RESTRICTED": "ButtonUserPrivacyRestricted", + "CALL_ALREADY_ACCEPTED": "CallAlreadyAccepted", + "CALL_ALREADY_DECLINED": "CallAlreadyDeclined", + "CALL_OCCUPY_FAILED": "CallOccupyFailed", + "CALL_PEER_INVALID": "CallPeerInvalid", + "CALL_PROTOCOL_FLAGS_INVALID": "CallProtocolFlagsInvalid", + "CALL_PROTOCOL_LAYER_INVALID": "CallProtocolLayerInvalid", + "CDN_METHOD_INVALID": "CdnMethodInvalid", + "CHANNELS_ADMIN_LOCATED_TOO_MUCH": "ChannelsAdminLocatedTooMuch", + "CHANNELS_ADMIN_PUBLIC_TOO_MUCH": "ChannelsAdminPublicTooMuch", + "CHANNELS_TOO_MUCH": "ChannelsTooMuch", + "CHANNEL_ADD_INVALID": "ChannelAddInvalid", + "CHANNEL_BANNED": "ChannelBanned", + "CHANNEL_FORUM_MISSING": "ChannelForumMissing", + "CHANNEL_ID_INVALID": "ChannelIdInvalid", + "CHANNEL_INVALID": "ChannelInvalid", + "CHANNEL_MONOFORUM_UNSUPPORTED": "ChannelMonoforumUnsupported", + "CHANNEL_PARICIPANT_MISSING": "ChannelParicipantMissing", + "CHANNEL_PRIVATE": "ChannelPrivate", + "CHANNEL_TOO_BIG": "ChannelTooBig", + "CHANNEL_TOO_LARGE": "ChannelTooLarge", + "CHARGE_ALREADY_REFUNDED": "ChargeAlreadyRefunded", + "CHARGE_ID_EMPTY": "ChargeIdEmpty", + "CHARGE_ID_INVALID": "ChargeIdInvalid", + "CHARGE_NOT_FOUND": "ChargeNotFound", + "CHATLINKS_TOO_MUCH": "ChatlinksTooMuch", + "CHATLINK_SLUG_EMPTY": "ChatlinkSlugEmpty", + "CHATLINK_SLUG_EXPIRED": "ChatlinkSlugExpired", + "CHATLISTS_TOO_MUCH": "ChatlistsTooMuch", + "CHATLIST_EXCLUDE_INVALID": "ChatlistExcludeInvalid", + "CHAT_ABOUT_NOT_MODIFIED": "ChatAboutNotModified", + "CHAT_ABOUT_TOO_LONG": "ChatAboutTooLong", + "CHAT_ADMIN_REQUIRED": "ChatAdminRequired", + "CHAT_DISCUSSION_UNALLOWED": "ChatDiscussionUnallowed", + "CHAT_FORWARDS_RESTRICTED": "ChatForwardsRestricted", + "CHAT_ID_EMPTY": "ChatIdEmpty", + "CHAT_ID_INVALID": "ChatIdInvalid", + "CHAT_INVALID": "ChatInvalid", + "CHAT_INVITE_PERMANENT": "ChatInvitePermanent", + "CHAT_LINK_EXISTS": "ChatLinkExists", + "CHAT_MEMBER_ADD_FAILED": "ChatMemberAddFailed", + "CHAT_NOT_MODIFIED": "ChatNotModified", + "CHAT_PUBLIC_REQUIRED": "ChatPublicRequired", + "CHAT_RESTRICTED": "ChatRestricted", + "CHAT_REVOKE_DATE_UNSUPPORTED": "ChatRevokeDateUnsupported", + "CHAT_SEND_INLINE_FORBIDDEN": "ChatSendInlineForbidden", + "CHAT_TITLE_EMPTY": "ChatTitleEmpty", + "CHAT_TOO_BIG": "ChatTooBig", + "CODE_EMPTY": "CodeEmpty", + "CODE_HASH_INVALID": "CodeHashInvalid", + "CODE_INVALID": "CodeInvalid", + "COLLECTIBLE_INVALID": "CollectibleInvalid", + "COLLECTIBLE_NOT_FOUND": "CollectibleNotFound", + "COLOR_INVALID": "ColorInvalid", + "CONNECTION_API_ID_INVALID": "ConnectionApiIdInvalid", + "CONNECTION_APP_VERSION_EMPTY": "ConnectionAppVersionEmpty", + "CONNECTION_DEVICE_MODEL_EMPTY": "ConnectionDeviceModelEmpty", + "CONNECTION_ID_INVALID": "ConnectionIdInvalid", + "CONNECTION_LANG_PACK_INVALID": "ConnectionLangPackInvalid", + "CONNECTION_LAYER_INVALID": "ConnectionLayerInvalid", + "CONNECTION_NOT_INITED": "ConnectionNotInited", + "CONNECTION_SYSTEM_EMPTY": "ConnectionSystemEmpty", + "CONNECTION_SYSTEM_LANG_CODE_EMPTY": "ConnectionSystemLangCodeEmpty", + "CONTACT_ADD_MISSING": "ContactAddMissing", + "CONTACT_ID_INVALID": "ContactIdInvalid", + "CONTACT_MISSING": "ContactMissing", + "CONTACT_NAME_EMPTY": "ContactNameEmpty", + "CONTACT_REQ_MISSING": "ContactReqMissing", + "CREATE_CALL_FAILED": "CreateCallFailed", + "CURRENCY_TOTAL_AMOUNT_INVALID": "CurrencyTotalAmountInvalid", + "CUSTOM_REACTIONS_TOO_MANY": "CustomReactionsTooMany", + "DATA_HASH_SIZE_INVALID": "DataHashSizeInvalid", + "DATA_INVALID": "DataInvalid", + "DATA_JSON_INVALID": "DataJsonInvalid", + "DATA_TOO_LONG": "DataTooLong", + "DATE_EMPTY": "DateEmpty", + "DC_ID_INVALID": "DcIdInvalid", + "DH_G_A_INVALID": "DhGAInvalid", + "DOCUMENT_INVALID": "DocumentInvalid", + "EFFECT_ID_INVALID": "EffectIdInvalid", + "EMAIL_HASH_EXPIRED": "EmailHashExpired", + "EMAIL_INVALID": "EmailInvalid", + "EMAIL_NOT_ALLOWED": "EmailNotAllowed", + "EMAIL_NOT_SETUP": "EmailNotSetup", + "EMAIL_UNCONFIRMED": "EmailUnconfirmed", + "EMAIL_UNCONFIRMED_X": "EmailUnconfirmed", + "EMAIL_VERIFY_EXPIRED": "EmailVerifyExpired", + "EMOJI_INVALID": "EmojiInvalid", + "EMOJI_MARKUP_INVALID": "EmojiMarkupInvalid", + "EMOJI_NOT_MODIFIED": "EmojiNotModified", + "EMOTICON_EMPTY": "EmoticonEmpty", + "EMOTICON_INVALID": "EmoticonInvalid", + "EMOTICON_STICKERPACK_MISSING": "EmoticonStickerpackMissing", + "ENCRYPTED_MESSAGE_INVALID": "EncryptedMessageInvalid", + "ENCRYPTION_ALREADY_ACCEPTED": "EncryptionAlreadyAccepted", + "ENCRYPTION_ALREADY_DECLINED": "EncryptionAlreadyDeclined", + "ENCRYPTION_DECLINED": "EncryptionDeclined", + "ENCRYPTION_ID_INVALID": "EncryptionIdInvalid", + "ENTITIES_TOO_LONG": "EntitiesTooLong", + "ENTITY_BOUNDS_INVALID": "EntityBoundsInvalid", + "ENTITY_MENTION_USER_INVALID": "EntityMentionUserInvalid", + "ERROR_TEXT_EMPTY": "ErrorTextEmpty", + "EXPIRES_AT_INVALID": "ExpiresAtInvalid", + "EXPIRE_DATE_INVALID": "ExpireDateInvalid", + "EXPIRE_FORBIDDEN": "ExpireForbidden", + "EXPORT_CARD_INVALID": "ExportCardInvalid", + "EXTENDED_MEDIA_AMOUNT_INVALID": "ExtendedMediaAmountInvalid", + "EXTENDED_MEDIA_INVALID": "ExtendedMediaInvalid", + "EXTERNAL_URL_INVALID": "ExternalUrlInvalid", + "FIELD_NAME_EMPTY": "FieldNameEmpty", + "FIELD_NAME_INVALID": "FieldNameInvalid", + "FILE_CONTENT_TYPE_INVALID": "FileContentTypeInvalid", + "FILE_EMTPY": "FileEmtpy", + "FILE_ID_INVALID": "FileIdInvalid", + "FILE_MIGRATE_X": "FileMigrate", + "FILE_PARTS_INVALID": "FilePartsInvalid", + "FILE_PART_0_MISSING": "FilePart0Missing", + "FILE_PART_EMPTY": "FilePartEmpty", + "FILE_PART_INVALID": "FilePartInvalid", + "FILE_PART_LENGTH_INVALID": "FilePartLengthInvalid", + "FILE_PART_SIZE_CHANGED": "FilePartSizeChanged", + "FILE_PART_SIZE_INVALID": "FilePartSizeInvalid", + "FILE_PART_TOO_BIG": "FilePartTooBig", + "FILE_PART_TOO_SMALL": "FilePartTooSmall", + "FILE_PART_X_MISSING": "FilePartMissing", + "FILE_REFERENCE_EMPTY": "FileReferenceEmpty", + "FILE_REFERENCE_EXPIRED": "FileReferenceExpired", + "FILE_REFERENCE_INVALID": "FileReferenceInvalid", + "FILE_REFERENCE_X_EXPIRED": "FileReferenceExpired", + "FILE_REFERENCE_X_INVALID": "FileReferenceInvalid", + "FILE_TITLE_EMPTY": "FileTitleEmpty", + "FILE_TOKEN_INVALID": "FileTokenInvalid", + "FILTER_ID_INVALID": "FilterIdInvalid", + "FILTER_INCLUDE_EMPTY": "FilterIncludeEmpty", + "FILTER_NOT_SUPPORTED": "FilterNotSupported", + "FILTER_TITLE_EMPTY": "FilterTitleEmpty", + "FIRSTNAME_INVALID": "FirstnameInvalid", + "FOLDER_ID_EMPTY": "FolderIdEmpty", + "FOLDER_ID_INVALID": "FolderIdInvalid", + "FORM_EXPIRED": "FormExpired", + "FORM_ID_EMPTY": "FormIdEmpty", + "FORM_ID_EXPIRED": "FormIdExpired", + "FORM_SUBMIT_DUPLICATE": "FormSubmitDuplicate", + "FORM_UNSUPPORTED": "FormUnsupported", + "FORUM_ENABLED": "ForumEnabled", + "FRESH_CHANGE_ADMINS_FORBIDDEN": "FreshChangeAdminsForbidden", + "FROM_MESSAGE_BOT_DISABLED": "FromMessageBotDisabled", + "FROM_PEER_INVALID": "FromPeerInvalid", + "FROZEN_PARTICIPANT_MISSING": "FrozenParticipantMissing", + "GAME_BOT_INVALID": "GameBotInvalid", + "GENERAL_MODIFY_ICON_FORBIDDEN": "GeneralModifyIconForbidden", + "GEO_POINT_INVALID": "GeoPointInvalid", + "GIFT_MONTHS_INVALID": "GiftMonthsInvalid", + "GIFT_SLUG_EXPIRED": "GiftSlugExpired", + "GIFT_SLUG_INVALID": "GiftSlugInvalid", + "GIFT_STARS_INVALID": "GiftStarsInvalid", + "GIF_CONTENT_TYPE_INVALID": "GifContentTypeInvalid", + "GIF_ID_INVALID": "GifIdInvalid", + "GRAPH_EXPIRED_RELOAD": "GraphExpiredReload", + "GRAPH_INVALID_RELOAD": "GraphInvalidReload", + "GRAPH_OUTDATED_RELOAD": "GraphOutdatedReload", + "GROUPCALL_ALREADY_DISCARDED": "GroupcallAlreadyDiscarded", + "GROUPCALL_FORBIDDEN": "GroupcallForbidden", + "GROUPCALL_INVALID": "GroupcallInvalid", + "GROUPCALL_JOIN_MISSING": "GroupcallJoinMissing", + "GROUPCALL_NOT_MODIFIED": "GroupcallNotModified", + "GROUPCALL_SSRC_DUPLICATE_MUCH": "GroupcallSsrcDuplicateMuch", + "GROUPED_MEDIA_INVALID": "GroupedMediaInvalid", + "GROUP_CALL_INVALID": "GroupCallInvalid", + "HASHTAG_INVALID": "HashtagInvalid", + "HASH_INVALID": "HashInvalid", + "HASH_SIZE_INVALID": "HashSizeInvalid", + "HIDE_REQUESTER_MISSING": "HideRequesterMissing", + "ID_EXPIRED": "IdExpired", + "ID_INVALID": "IdInvalid", + "IMAGE_PROCESS_FAILED": "ImageProcessFailed", + "IMPORT_FILE_INVALID": "ImportFileInvalid", + "IMPORT_FORMAT_DATE_INVALID": "ImportFormatDateInvalid", + "IMPORT_FORMAT_UNRECOGNIZED": "ImportFormatUnrecognized", + "IMPORT_ID_INVALID": "ImportIdInvalid", + "IMPORT_TOKEN_INVALID": "ImportTokenInvalid", + "INLINE_RESULT_EXPIRED": "InlineResultExpired", + "INPUT_CHATLIST_INVALID": "InputChatlistInvalid", + "INPUT_CONSTRUCTOR_INVALID": "InputConstructorInvalid", + "INPUT_FETCH_ERROR": "InputFetchError", + "INPUT_FETCH_FAIL": "InputFetchFail", + "INPUT_FILE_INVALID": "InputFileInvalid", + "INPUT_FILTER_INVALID": "InputFilterInvalid", + "INPUT_LAYER_INVALID": "InputLayerInvalid", + "INPUT_METHOD_INVALID": "InputMethodInvalid", + "INPUT_PEERS_EMPTY": "InputPeersEmpty", + "INPUT_PURPOSE_INVALID": "InputPurposeInvalid", + "INPUT_REQUEST_TOO_LONG": "InputRequestTooLong", + "INPUT_TEXT_EMPTY": "InputTextEmpty", + "INPUT_TEXT_TOO_LONG": "InputTextTooLong", + "INPUT_USER_DEACTIVATED": "InputUserDeactivated", + "INVITES_TOO_MUCH": "InvitesTooMuch", + "INVITE_FORBIDDEN_WITH_JOINAS": "InviteForbiddenWithJoinas", + "INVITE_HASH_EMPTY": "InviteHashEmpty", + "INVITE_HASH_EXPIRED": "InviteHashExpired", + "INVITE_HASH_INVALID": "InviteHashInvalid", + "INVITE_REQUEST_SENT": "InviteRequestSent", + "INVITE_REVOKED_MISSING": "InviteRevokedMissing", + "INVITE_SLUG_EMPTY": "InviteSlugEmpty", + "INVITE_SLUG_EXPIRED": "InviteSlugExpired", + "INVITE_SLUG_INVALID": "InviteSlugInvalid", + "INVOICE_INVALID": "InvoiceInvalid", + "INVOICE_PAYLOAD_INVALID": "InvoicePayloadInvalid", + "JOIN_AS_PEER_INVALID": "JoinAsPeerInvalid", + "LANGUAGE_INVALID": "LanguageInvalid", + "LANG_CODE_INVALID": "LangCodeInvalid", + "LANG_CODE_NOT_SUPPORTED": "LangCodeNotSupported", + "LANG_PACK_INVALID": "LangPackInvalid", + "LASTNAME_INVALID": "LastnameInvalid", + "LIMIT_INVALID": "LimitInvalid", + "LINK_NOT_MODIFIED": "LinkNotModified", + "LOCATION_INVALID": "LocationInvalid", + "MAX_DATE_INVALID": "MaxDateInvalid", + "MAX_ID_INVALID": "MaxIdInvalid", + "MAX_QTS_INVALID": "MaxQtsInvalid", + "MD5_CHECKSUM_INVALID": "Md5ChecksumInvalid", + "MEDIA_ALREADY_PAID": "MediaAlreadyPaid", + "MEDIA_CAPTION_TOO_LONG": "MediaCaptionTooLong", + "MEDIA_EMPTY": "MediaEmpty", + "MEDIA_FILE_INVALID": "MediaFileInvalid", + "MEDIA_GROUPED_INVALID": "MediaGroupedInvalid", + "MEDIA_INVALID": "MediaInvalid", + "MEDIA_NEW_INVALID": "MediaNewInvalid", + "MEDIA_PREV_INVALID": "MediaPrevInvalid", + "MEDIA_TTL_INVALID": "MediaTtlInvalid", + "MEDIA_TYPE_INVALID": "MediaTypeInvalid", + "MEDIA_VIDEO_STORY_MISSING": "MediaVideoStoryMissing", + "MEGAGROUP_GEO_REQUIRED": "MegagroupGeoRequired", + "MEGAGROUP_ID_INVALID": "MegagroupIdInvalid", + "MEGAGROUP_PREHISTORY_HIDDEN": "MegagroupPrehistoryHidden", + "MEGAGROUP_REQUIRED": "MegagroupRequired", + "MESSAGE_EDIT_TIME_EXPIRED": "MessageEditTimeExpired", + "MESSAGE_EMPTY": "MessageEmpty", + "MESSAGE_IDS_EMPTY": "MessageIdsEmpty", + "MESSAGE_ID_INVALID": "MessageIdInvalid", + "MESSAGE_NOT_MODIFIED": "MessageNotModified", + "MESSAGE_NOT_READ_YET": "MessageNotReadYet", + "MESSAGE_POLL_CLOSED": "MessagePollClosed", + "MESSAGE_TOO_LONG": "MessageTooLong", + "MESSAGE_TOO_OLD": "MessageTooOld", + "METHOD_INVALID": "MethodInvalid", + "MIN_DATE_INVALID": "MinDateInvalid", + "MONTH_INVALID": "MonthInvalid", + "MSG_ID_INVALID": "MsgIdInvalid", + "MSG_TOO_OLD": "MsgTooOld", + "MSG_VOICE_MISSING": "MsgVoiceMissing", + "MSG_WAIT_FAILED": "MsgWaitFailed", + "MULTI_MEDIA_TOO_LONG": "MultiMediaTooLong", + "NEW_SALT_INVALID": "NewSaltInvalid", + "NEW_SETTINGS_EMPTY": "NewSettingsEmpty", + "NEW_SETTINGS_INVALID": "NewSettingsInvalid", + "NEXT_OFFSET_INVALID": "NextOffsetInvalid", + "NOGENERAL_HIDE_FORBIDDEN": "NogeneralHideForbidden", + "NOT_ELIGIBLE": "NotEligible", + "NOT_JOINED": "NotJoined", + "NO_PAYMENT_NEEDED": "NoPaymentNeeded", + "OFFSET_INVALID": "OffsetInvalid", + "OFFSET_PEER_ID_INVALID": "OffsetPeerIdInvalid", + "OPTIONS_TOO_MUCH": "OptionsTooMuch", + "OPTION_INVALID": "OptionInvalid", + "ORDER_INVALID": "OrderInvalid", + "PACK_SHORT_NAME_INVALID": "PackShortNameInvalid", + "PACK_SHORT_NAME_OCCUPIED": "PackShortNameOccupied", + "PACK_TITLE_INVALID": "PackTitleInvalid", + "PACK_TYPE_INVALID": "PackTypeInvalid", + "PARENT_PEER_INVALID": "ParentPeerInvalid", + "PARTICIPANTS_TOO_FEW": "ParticipantsTooFew", + "PARTICIPANT_ID_INVALID": "ParticipantIdInvalid", + "PARTICIPANT_JOIN_MISSING": "ParticipantJoinMissing", + "PARTICIPANT_VERSION_OUTDATED": "ParticipantVersionOutdated", + "PASSWORD_EMPTY": "PasswordEmpty", + "PASSWORD_HASH_INVALID": "PasswordHashInvalid", + "PASSWORD_MISSING": "PasswordMissing", + "PASSWORD_RECOVERY_EXPIRED": "PasswordRecoveryExpired", + "PASSWORD_RECOVERY_NA": "PasswordRecoveryNa", + "PASSWORD_REQUIRED": "PasswordRequired", + "PASSWORD_TOO_FRESH_X": "PasswordTooFresh", + "PAYMENT_CREDENTIALS_INVALID": "PaymentCredentialsInvalid", + "PAYMENT_PROVIDER_INVALID": "PaymentProviderInvalid", + "PAYMENT_REQUIRED": "PaymentRequired", + "PEERS_LIST_EMPTY": "PeersListEmpty", + "PEER_FLOOD": "PeerFlood", + "PEER_HISTORY_EMPTY": "PeerHistoryEmpty", + "PEER_ID_INVALID": "PeerIdInvalid", + "PEER_ID_NOT_SUPPORTED": "PeerIdNotSupported", + "PEER_TYPES_INVALID": "PeerTypesInvalid", + "PERSISTENT_TIMESTAMP_EMPTY": "PersistentTimestampEmpty", + "PERSISTENT_TIMESTAMP_INVALID": "PersistentTimestampInvalid", + "PHONE_CODE_EMPTY": "PhoneCodeEmpty", + "PHONE_CODE_EXPIRED": "PhoneCodeExpired", + "PHONE_CODE_HASH_EMPTY": "PhoneCodeHashEmpty", + "PHONE_CODE_INVALID": "PhoneCodeInvalid", + "PHONE_HASH_EXPIRED": "PhoneHashExpired", + "PHONE_NOT_OCCUPIED": "PhoneNotOccupied", + "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN": "PhoneNumberAppSignupForbidden", + "PHONE_NUMBER_BANNED": "PhoneNumberBanned", + "PHONE_NUMBER_FLOOD": "PhoneNumberFlood", + "PHONE_NUMBER_INVALID": "PhoneNumberInvalid", + "PHONE_NUMBER_OCCUPIED": "PhoneNumberOccupied", + "PHONE_NUMBER_UNOCCUPIED": "PhoneNumberUnoccupied", + "PHONE_PASSWORD_PROTECTED": "PhonePasswordProtected", + "PHOTO_CONTENT_TYPE_INVALID": "PhotoContentTypeInvalid", + "PHOTO_CONTENT_URL_EMPTY": "PhotoContentUrlEmpty", + "PHOTO_CROP_FILE_MISSING": "PhotoCropFileMissing", + "PHOTO_CROP_SIZE_SMALL": "PhotoCropSizeSmall", + "PHOTO_EXT_INVALID": "PhotoExtInvalid", + "PHOTO_FILE_MISSING": "PhotoFileMissing", + "PHOTO_ID_INVALID": "PhotoIdInvalid", + "PHOTO_INVALID": "PhotoInvalid", + "PHOTO_INVALID_DIMENSIONS": "PhotoInvalidDimensions", + "PHOTO_SAVE_FILE_INVALID": "PhotoSaveFileInvalid", + "PHOTO_THUMB_URL_EMPTY": "PhotoThumbUrlEmpty", + "PHOTO_THUMB_URL_INVALID": "PhotoThumbUrlInvalid", + "PINNED_DIALOGS_TOO_MUCH": "PinnedDialogsTooMuch", + "PINNED_TOO_MUCH": "PinnedTooMuch", + "PIN_RESTRICTED": "PinRestricted", + "POLL_ANSWERS_INVALID": "PollAnswersInvalid", + "POLL_ANSWER_INVALID": "PollAnswerInvalid", + "POLL_OPTION_DUPLICATE": "PollOptionDuplicate", + "POLL_OPTION_INVALID": "PollOptionInvalid", + "POLL_QUESTION_INVALID": "PollQuestionInvalid", + "POLL_UNSUPPORTED": "PollUnsupported", + "POLL_VOTE_REQUIRED": "PollVoteRequired", + "PREMIUM_ACCOUNT_REQUIRED": "PremiumAccountRequired", + "PRICING_CHAT_INVALID": "PricingChatInvalid", + "PRIVACY_KEY_INVALID": "PrivacyKeyInvalid", + "PRIVACY_TOO_LONG": "PrivacyTooLong", + "PRIVACY_VALUE_INVALID": "PrivacyValueInvalid", + "PUBLIC_KEY_REQUIRED": "PublicKeyRequired", + "PURPOSE_INVALID": "PurposeInvalid", + "QUERY_ID_EMPTY": "QueryIdEmpty", + "QUERY_ID_INVALID": "QueryIdInvalid", + "QUERY_TOO_SHORT": "QueryTooShort", + "QUICK_REPLIES_BOT_NOT_ALLOWED": "QuickRepliesBotNotAllowed", + "QUICK_REPLIES_TOO_MUCH": "QuickRepliesTooMuch", + "QUIZ_ANSWER_MISSING": "QuizAnswerMissing", + "QUIZ_CORRECT_ANSWERS_EMPTY": "QuizCorrectAnswersEmpty", + "QUIZ_CORRECT_ANSWERS_TOO_MUCH": "QuizCorrectAnswersTooMuch", + "QUIZ_CORRECT_ANSWER_INVALID": "QuizCorrectAnswerInvalid", + "QUIZ_MULTIPLE_INVALID": "QuizMultipleInvalid", + "QUOTE_TEXT_INVALID": "QuoteTextInvalid", + "RAISE_HAND_FORBIDDEN": "RaiseHandForbidden", + "RANDOM_ID_EMPTY": "RandomIdEmpty", + "RANDOM_ID_EXPIRED": "RandomIdExpired", + "RANDOM_ID_INVALID": "RandomIdInvalid", + "RANDOM_LENGTH_INVALID": "RandomLengthInvalid", + "RANGES_INVALID": "RangesInvalid", + "REACTIONS_COUNT_INVALID": "ReactionsCountInvalid", + "REACTIONS_TOO_MANY": "ReactionsTooMany", + "REACTION_EMPTY": "ReactionEmpty", + "REACTION_INVALID": "ReactionInvalid", + "RECEIPT_EMPTY": "ReceiptEmpty", + "REFLECTOR_NOT_AVAILABLE": "ReflectorNotAvailable", + "REPLY_MARKUP_BUY_EMPTY": "ReplyMarkupBuyEmpty", + "REPLY_MARKUP_GAME_EMPTY": "ReplyMarkupGameEmpty", + "REPLY_MARKUP_INVALID": "ReplyMarkupInvalid", + "REPLY_MARKUP_TOO_LONG": "ReplyMarkupTooLong", + "REPLY_MESSAGES_TOO_MUCH": "ReplyMessagesTooMuch", + "REPLY_MESSAGE_ID_INVALID": "ReplyMessageIdInvalid", + "REPLY_TO_INVALID": "ReplyToInvalid", + "REPLY_TO_MONOFORUM_PEER_INVALID": "ReplyToMonoforumPeerInvalid", + "REPLY_TO_USER_INVALID": "ReplyToUserInvalid", + "REQUEST_TOKEN_INVALID": "RequestTokenInvalid", + "RESET_REQUEST_MISSING": "ResetRequestMissing", + "RESULTS_TOO_MUCH": "ResultsTooMuch", + "RESULT_ID_DUPLICATE": "ResultIdDuplicate", + "RESULT_ID_EMPTY": "ResultIdEmpty", + "RESULT_ID_INVALID": "ResultIdInvalid", + "RESULT_TYPE_INVALID": "ResultTypeInvalid", + "REVOTE_NOT_ALLOWED": "RevoteNotAllowed", + "RIGHTS_NOT_MODIFIED": "RightsNotModified", + "RINGTONE_INVALID": "RingtoneInvalid", + "RINGTONE_MIME_INVALID": "RingtoneMimeInvalid", + "RSA_DECRYPT_FAILED": "RsaDecryptFailed", + "SAVED_ID_EMPTY": "SavedIdEmpty", + "SCHEDULE_BOT_NOT_ALLOWED": "ScheduleBotNotAllowed", + "SCHEDULE_DATE_INVALID": "ScheduleDateInvalid", + "SCHEDULE_DATE_TOO_LATE": "ScheduleDateTooLate", + "SCHEDULE_STATUS_PRIVATE": "ScheduleStatusPrivate", + "SCHEDULE_TOO_MUCH": "ScheduleTooMuch", + "SCORE_INVALID": "ScoreInvalid", + "SEARCH_QUERY_EMPTY": "SearchQueryEmpty", + "SEARCH_WITH_LINK_NOT_SUPPORTED": "SearchWithLinkNotSupported", + "SECONDS_INVALID": "SecondsInvalid", + "SECURE_SECRET_REQUIRED": "SecureSecretRequired", + "SELF_DELETE_RESTRICTED": "SelfDeleteRestricted", + "SEND_AS_PEER_INVALID": "SendAsPeerInvalid", + "SEND_MESSAGE_GAME_INVALID": "SendMessageGameInvalid", + "SEND_MESSAGE_MEDIA_INVALID": "SendMessageMediaInvalid", + "SEND_MESSAGE_TYPE_INVALID": "SendMessageTypeInvalid", + "SESSION_TOO_FRESH_X": "SessionTooFresh", + "SETTINGS_INVALID": "SettingsInvalid", + "SHA256_HASH_INVALID": "Sha256HashInvalid", + "SHORTCUT_INVALID": "ShortcutInvalid", + "SHORTNAME_OCCUPY_FAILED": "ShortnameOccupyFailed", + "SHORT_NAME_INVALID": "ShortNameInvalid", + "SHORT_NAME_OCCUPIED": "ShortNameOccupied", + "SLOTS_EMPTY": "SlotsEmpty", + "SLOWMODE_MULTI_MSGS_DISABLED": "SlowmodeMultiMsgsDisabled", + "SLUG_INVALID": "SlugInvalid", + "SMSJOB_ID_INVALID": "SmsjobIdInvalid", + "SMS_CODE_CREATE_FAILED": "SmsCodeCreateFailed", + "SRP_A_INVALID": "SrpAInvalid", + "SRP_ID_INVALID": "SrpIdInvalid", + "SRP_PASSWORD_CHANGED": "SrpPasswordChanged", + "STARGIFT_ALREADY_CONVERTED": "StargiftAlreadyConverted", + "STARGIFT_ALREADY_REFUNDED": "StargiftAlreadyRefunded", + "STARGIFT_ALREADY_UPGRADED": "StargiftAlreadyUpgraded", + "STARGIFT_INVALID": "StargiftInvalid", + "STARGIFT_NOT_FOUND": "StargiftNotFound", + "STARGIFT_OWNER_INVALID": "StargiftOwnerInvalid", + "STARGIFT_PEER_INVALID": "StargiftPeerInvalid", + "STARGIFT_RESELL_CURRENCY_NOT_ALLOWED": "StargiftResellCurrencyNotAllowed", + "STARGIFT_SLUG_INVALID": "StargiftSlugInvalid", + "STARGIFT_TRANSFER_TOO_EARLY_X": "StargiftTransferTooEarly", + "STARGIFT_UPGRADE_UNAVAILABLE": "StargiftUpgradeUnavailable", + "STARGIFT_USAGE_LIMITED": "StargiftUsageLimited", + "STARGIFT_USER_USAGE_LIMITED": "StargiftUserUsageLimited", + "STARREF_AWAITING_END": "StarrefAwaitingEnd", + "STARREF_EXPIRED": "StarrefExpired", + "STARREF_HASH_REVOKED": "StarrefHashRevoked", + "STARREF_PERMILLE_INVALID": "StarrefPermilleInvalid", + "STARREF_PERMILLE_TOO_LOW": "StarrefPermilleTooLow", + "STARS_AMOUNT_INVALID": "StarsAmountInvalid", + "STARS_INVOICE_INVALID": "StarsInvoiceInvalid", + "STARS_PAYMENT_REQUIRED": "StarsPaymentRequired", + "START_PARAM_EMPTY": "StartParamEmpty", + "START_PARAM_INVALID": "StartParamInvalid", + "START_PARAM_TOO_LONG": "StartParamTooLong", + "STICKERPACK_STICKERS_TOO_MUCH": "StickerpackStickersTooMuch", + "STICKERSET_INVALID": "StickersetInvalid", + "STICKERSET_NOT_MODIFIED": "StickersetNotModified", + "STICKERS_EMPTY": "StickersEmpty", + "STICKERS_TOO_MUCH": "StickersTooMuch", + "STICKER_DOCUMENT_INVALID": "StickerDocumentInvalid", + "STICKER_EMOJI_INVALID": "StickerEmojiInvalid", + "STICKER_FILE_INVALID": "StickerFileInvalid", + "STICKER_GIF_DIMENSIONS": "StickerGifDimensions", + "STICKER_ID_INVALID": "StickerIdInvalid", + "STICKER_INVALID": "StickerInvalid", + "STICKER_MIME_INVALID": "StickerMimeInvalid", + "STICKER_PNG_DIMENSIONS": "StickerPngDimensions", + "STICKER_PNG_NOPNG": "StickerPngNopng", + "STICKER_TGS_NODOC": "StickerTgsNodoc", + "STICKER_TGS_NOTGS": "StickerTgsNotgs", + "STICKER_THUMB_PNG_NOPNG": "StickerThumbPngNopng", + "STICKER_THUMB_TGS_NOTGS": "StickerThumbTgsNotgs", + "STICKER_VIDEO_BIG": "StickerVideoBig", + "STICKER_VIDEO_NODOC": "StickerVideoNodoc", + "STICKER_VIDEO_NOWEBM": "StickerVideoNowebm", + "STORIES_NEVER_CREATED": "StoriesNeverCreated", + "STORIES_TOO_MUCH": "StoriesTooMuch", + "STORY_ID_EMPTY": "StoryIdEmpty", + "STORY_ID_INVALID": "StoryIdInvalid", + "STORY_NOT_MODIFIED": "StoryNotModified", + "STORY_PERIOD_INVALID": "StoryPeriodInvalid", + "STORY_SEND_FLOOD_MONTHLY_X": "StorySendFloodMonthly", + "STORY_SEND_FLOOD_WEEKLY_X": "StorySendFloodWeekly", + "SUBSCRIPTION_EXPORT_MISSING": "SubscriptionExportMissing", + "SUBSCRIPTION_ID_INVALID": "SubscriptionIdInvalid", + "SUBSCRIPTION_PERIOD_INVALID": "SubscriptionPeriodInvalid", + "SUGGESTED_POST_AMOUNT_INVALID": "SuggestedPostAmountInvalid", + "SUGGESTED_POST_PEER_INVALID": "SuggestedPostPeerInvalid", + "SWITCH_PM_TEXT_EMPTY": "SwitchPmTextEmpty", + "SWITCH_WEBVIEW_URL_INVALID": "SwitchWebviewUrlInvalid", + "TAKEOUT_INVALID": "TakeoutInvalid", + "TAKEOUT_REQUIRED": "TakeoutRequired", + "TASK_ALREADY_EXISTS": "TaskAlreadyExists", + "TEMP_AUTH_KEY_ALREADY_BOUND": "TempAuthKeyAlreadyBound", + "TEMP_AUTH_KEY_EMPTY": "TempAuthKeyEmpty", + "TERMS_URL_INVALID": "TermsUrlInvalid", + "THEME_FILE_INVALID": "ThemeFileInvalid", + "THEME_FORMAT_INVALID": "ThemeFormatInvalid", + "THEME_INVALID": "ThemeInvalid", + "THEME_MIME_INVALID": "ThemeMimeInvalid", + "THEME_PARAMS_INVALID": "ThemeParamsInvalid", + "THEME_SLUG_INVALID": "ThemeSlugInvalid", + "THEME_TITLE_INVALID": "ThemeTitleInvalid", + "TIMEZONE_INVALID": "TimezoneInvalid", + "TITLE_INVALID": "TitleInvalid", + "TMP_PASSWORD_DISABLED": "TmpPasswordDisabled", + "TMP_PASSWORD_INVALID": "TmpPasswordInvalid", + "TODO_ITEMS_EMPTY": "TodoItemsEmpty", + "TODO_ITEM_DUPLICATE": "TodoItemDuplicate", + "TODO_NOT_MODIFIED": "TodoNotModified", + "TOKEN_EMPTY": "TokenEmpty", + "TOKEN_INVALID": "TokenInvalid", + "TOKEN_TYPE_INVALID": "TokenTypeInvalid", + "TOPICS_EMPTY": "TopicsEmpty", + "TOPIC_CLOSED": "TopicClosed", + "TOPIC_CLOSE_SEPARATELY": "TopicCloseSeparately", + "TOPIC_DELETED": "TopicDeleted", + "TOPIC_HIDE_SEPARATELY": "TopicHideSeparately", + "TOPIC_ID_INVALID": "TopicIdInvalid", + "TOPIC_NOT_MODIFIED": "TopicNotModified", + "TOPIC_TITLE_EMPTY": "TopicTitleEmpty", + "TO_ID_INVALID": "ToIdInvalid", + "TO_LANG_INVALID": "ToLangInvalid", + "TRANSACTION_ID_INVALID": "TransactionIdInvalid", + "TRANSCRIPTION_FAILED": "TranscriptionFailed", + "TRANSLATE_REQ_QUOTA_EXCEEDED": "TranslateReqQuotaExceeded", + "TTL_DAYS_INVALID": "TtlDaysInvalid", + "TTL_MEDIA_INVALID": "TtlMediaInvalid", + "TTL_PERIOD_INVALID": "TtlPeriodInvalid", + "TYPES_EMPTY": "TypesEmpty", + "TYPE_CONSTRUCTOR_INVALID": "TypeConstructorInvalid", + "UNKNOWN_ERROR": "UnknownError", + "UNSUPPORTED": "Unsupported", + "UNTIL_DATE_INVALID": "UntilDateInvalid", + "URL_INVALID": "UrlInvalid", + "USAGE_LIMIT_INVALID": "UsageLimitInvalid", + "USERNAMES_ACTIVE_TOO_MUCH": "UsernamesActiveTooMuch", + "USERNAME_INVALID": "UsernameInvalid", + "USERNAME_NOT_MODIFIED": "UsernameNotModified", + "USERNAME_NOT_OCCUPIED": "UsernameNotOccupied", + "USERNAME_OCCUPIED": "UsernameOccupied", + "USERNAME_PURCHASE_AVAILABLE": "UsernamePurchaseAvailable", + "USERPIC_UPLOAD_REQUIRED": "UserpicUploadRequired", + "USERS_TOO_FEW": "UsersTooFew", + "USERS_TOO_MUCH": "UsersTooMuch", + "USER_ADMIN_INVALID": "UserAdminInvalid", + "USER_ALREADY_INVITED": "UserAlreadyInvited", + "USER_ALREADY_PARTICIPANT": "UserAlreadyParticipant", + "USER_BANNED_IN_CHANNEL": "UserBannedInChannel", + "USER_BLOCKED": "UserBlocked", + "USER_BOT": "UserBot", + "USER_BOT_INVALID": "UserBotInvalid", + "USER_BOT_REQUIRED": "UserBotRequired", + "USER_CHANNELS_TOO_MUCH": "UserChannelsTooMuch", + "USER_CREATOR": "UserCreator", + "USER_GIFT_UNAVAILABLE": "UserGiftUnavailable", + "USER_ID_INVALID": "UserIdInvalid", + "USER_INVALID": "UserInvalid", + "USER_IS_BLOCKED": "UserIsBlocked", + "USER_IS_BOT": "UserIsBot", + "USER_KICKED": "UserKicked", + "USER_NOT_MUTUAL_CONTACT": "UserNotMutualContact", + "USER_NOT_PARTICIPANT": "UserNotParticipant", + "USER_PUBLIC_MISSING": "UserPublicMissing", + "USER_VOLUME_INVALID": "UserVolumeInvalid", + "VENUE_ID_INVALID": "VenueIdInvalid", + "VIDEO_CONTENT_TYPE_INVALID": "VideoContentTypeInvalid", + "VIDEO_FILE_INVALID": "VideoFileInvalid", + "VIDEO_PAUSE_FORBIDDEN": "VideoPauseForbidden", + "VIDEO_STOP_FORBIDDEN": "VideoStopForbidden", + "VIDEO_TITLE_EMPTY": "VideoTitleEmpty", + "VOICE_MESSAGES_FORBIDDEN": "VoiceMessagesForbidden", + "VOLUME_LOC_NOT_FOUND": "VolumeLocNotFound", + "WALLPAPER_FILE_INVALID": "WallpaperFileInvalid", + "WALLPAPER_INVALID": "WallpaperInvalid", + "WALLPAPER_MIME_INVALID": "WallpaperMimeInvalid", + "WALLPAPER_NOT_FOUND": "WallpaperNotFound", + "WC_CONVERT_URL_INVALID": "WcConvertUrlInvalid", + "WEBDOCUMENT_INVALID": "WebdocumentInvalid", + "WEBDOCUMENT_MIME_INVALID": "WebdocumentMimeInvalid", + "WEBDOCUMENT_SIZE_TOO_BIG": "WebdocumentSizeTooBig", + "WEBDOCUMENT_URL_EMPTY": "WebdocumentUrlEmpty", + "WEBDOCUMENT_URL_INVALID": "WebdocumentUrlInvalid", + "WEBPAGE_CURL_FAILED": "WebpageCurlFailed", + "WEBPAGE_MEDIA_EMPTY": "WebpageMediaEmpty", + "WEBPAGE_NOT_FOUND": "WebpageNotFound", + "WEBPAGE_URL_INVALID": "WebpageUrlInvalid", + "WEBPUSH_AUTH_INVALID": "WebpushAuthInvalid", + "WEBPUSH_KEY_INVALID": "WebpushKeyInvalid", + "WEBPUSH_TOKEN_INVALID": "WebpushTokenInvalid", + "YOU_BLOCKED_USER": "YouBlockedUser", + }, + 500: { + "_": "InternalServerError", + "API_CALL_ERROR": "ApiCallError", + "AUTH_KEY_UNSYNCHRONIZED": "AuthKeyUnsynchronized", + "AUTH_RESTART": "AuthRestart", + "AUTH_RESTART_X": "AuthRestart", + "CALL_OCCUPY_FAILED": "CallOccupyFailed", + "CDN_UPLOAD_TIMEOUT": "CdnUploadTimeout", + "CHAT_FROM_CALL_CHANGED": "ChatFromCallChanged", + "CHAT_ID_GENERATE_FAILED": "ChatIdGenerateFailed", + "CHAT_INVALID": "ChatInvalid", + "CHAT_OCCUPY_LOC_FAILED": "ChatOccupyLocFailed", + "CHAT_OCCUPY_USERNAME_FAILED": "ChatOccupyUsernameFailed", + "CHP_CALL_FAIL": "ChpCallFail", + "ENCRYPTION_OCCUPY_ADMIN_FAILED": "EncryptionOccupyAdminFailed", + "ENCRYPTION_OCCUPY_FAILED": "EncryptionOccupyFailed", + "FILE_WRITE_FAILED": "FileWriteFailed", + "FOLDER_DEAC_AUTOFIX_ALL": "FolderDeacAutofixAll", + "GROUPCALL_ADD_PARTICIPANTS_FAILED": "GroupcallAddParticipantsFailed", + "GROUPED_ID_OCCUPY_FAILED": "GroupedIdOccupyFailed", + "HISTORY_GET_FAILED": "HistoryGetFailed", + "IMAGE_ENGINE_DOWN": "ImageEngineDown", + "INTERDC_X_CALL_ERROR": "InterdcCallError", + "INTERDC_X_CALL_RICH_ERROR": "InterdcCallRichError", + "MEMBER_FETCH_FAILED": "MemberFetchFailed", + "MEMBER_NO_LOCATION": "MemberNoLocation", + "MEMBER_OCCUPY_PRIMARY_LOC_FAILED": "MemberOccupyPrimaryLocFailed", + "MEMBER_OCCUPY_USERNAME_FAILED": "MemberOccupyUsernameFailed", + "MSGID_DECREASE_RETRY": "MsgidDecreaseRetry", + "MSG_RANGE_UNSYNC": "MsgRangeUnsync", + "MSG_WAIT_FAILED": "MsgWaitFailed", + "MT_SEND_QUEUE_TOO_LONG": "MtSendQueueTooLong", + "NEED_CHAT_INVALID": "NeedChatInvalid", + "NEED_MEMBER_INVALID": "NeedMemberInvalid", + "No workers running": "NoWorkersRunning", + "PARTICIPANT_CALL_FAILED": "ParticipantCallFailed", + "PERSISTENT_TIMESTAMP_OUTDATED": "PersistentTimestampOutdated", + "PHOTO_CREATE_FAILED": "PhotoCreateFailed", + "POSTPONED_TIMEOUT": "PostponedTimeout", + "PTS_CHANGE_EMPTY": "PtsChangeEmpty", + "RANDOM_ID_DUPLICATE": "RandomIdDuplicate", + "REG_ID_GENERATE_FAILED": "RegIdGenerateFailed", + "RPC_CALL_FAIL": "RpcCallFail", + "RPC_CONNECT_FAILED": "RpcConnectFailed", + "RPC_MCGET_FAIL": "RpcMcgetFail", + "SEND_MEDIA_INVALID": "SendMediaInvalid", + "SIGN_IN_FAILED": "SignInFailed", + "STORAGE_CHECK_FAILED": "StorageCheckFailed", + "STORE_INVALID_SCALAR_TYPE": "StoreInvalidScalarType", + "TIMEOUT": "Timeout", + "TRANSLATE_REQ_FAILED": "TranslateReqFailed", + "TRANSLATION_TIMEOUT": "TranslationTimeout", + "UNKNOWN_METHOD": "UnknownMethod", + "UPLOAD_NO_VOLUME": "UploadNoVolume", + "VOLUME_LOC_NOT_FOUND": "VolumeLocNotFound", + "WORKER_BUSY_TOO_LONG_RETRY": "WorkerBusyTooLongRetry", + "WP_ID_GENERATE_FAILED": "WpIdGenerateFailed", + }, + 403: { + "_": "Forbidden", + "ALLOW_PAYMENT_REQUIRED_X": "AllowPaymentRequired", + "ANONYMOUS_REACTIONS_DISABLED": "AnonymousReactionsDisabled", + "BOT_ACCESS_FORBIDDEN": "BotAccessForbidden", + "BOT_VERIFIER_FORBIDDEN": "BotVerifierForbidden", + "BROADCAST_FORBIDDEN": "BroadcastForbidden", + "CHANNEL_PUBLIC_GROUP_NA": "ChannelPublicGroupNa", + "CHAT_ACTION_FORBIDDEN": "ChatActionForbidden", + "CHAT_ADMIN_INVITE_REQUIRED": "ChatAdminInviteRequired", + "CHAT_ADMIN_REQUIRED": "ChatAdminRequired", + "CHAT_FORBIDDEN": "ChatForbidden", + "CHAT_GUEST_SEND_FORBIDDEN": "ChatGuestSendForbidden", + "CHAT_SEND_AUDIOS_FORBIDDEN": "ChatSendAudiosForbidden", + "CHAT_SEND_DOCS_FORBIDDEN": "ChatSendDocsForbidden", + "CHAT_SEND_GAME_FORBIDDEN": "ChatSendGameForbidden", + "CHAT_SEND_GIFS_FORBIDDEN": "ChatSendGifsForbidden", + "CHAT_SEND_INLINE_FORBIDDEN": "ChatSendInlineForbidden", + "CHAT_SEND_MEDIA_FORBIDDEN": "ChatSendMediaForbidden", + "CHAT_SEND_PHOTOS_FORBIDDEN": "ChatSendPhotosForbidden", + "CHAT_SEND_PLAIN_FORBIDDEN": "ChatSendPlainForbidden", + "CHAT_SEND_POLL_FORBIDDEN": "ChatSendPollForbidden", + "CHAT_SEND_ROUNDVIDEOS_FORBIDDEN": "ChatSendRoundvideosForbidden", + "CHAT_SEND_STICKERS_FORBIDDEN": "ChatSendStickersForbidden", + "CHAT_SEND_VIDEOS_FORBIDDEN": "ChatSendVideosForbidden", + "CHAT_SEND_VOICES_FORBIDDEN": "ChatSendVoicesForbidden", + "CHAT_SEND_WEBPAGE_FORBIDDEN": "ChatSendWebpageForbidden", + "CHAT_TYPE_INVALID": "ChatTypeInvalid", + "CHAT_WRITE_FORBIDDEN": "ChatWriteForbidden", + "EDIT_BOT_INVITE_FORBIDDEN": "EditBotInviteForbidden", + "GROUPCALL_ALREADY_STARTED": "GroupcallAlreadyStarted", + "GROUPCALL_FORBIDDEN": "GroupcallForbidden", + "INLINE_BOT_REQUIRED": "InlineBotRequired", + "LIVE_DISABLED": "LiveDisabled", + "MESSAGE_AUTHOR_REQUIRED": "MessageAuthorRequired", + "MESSAGE_DELETE_FORBIDDEN": "MessageDeleteForbidden", + "NOT_ALLOWED": "NotAllowed", + "NOT_ELIGIBLE": "NotEligible", + "PARTICIPANT_JOIN_MISSING": "ParticipantJoinMissing", + "PEER_ID_INVALID": "PeerIdInvalid", + "POLL_VOTE_REQUIRED": "PollVoteRequired", + "PREMIUM_ACCOUNT_REQUIRED": "PremiumAccountRequired", + "PRIVACY_PREMIUM_REQUIRED": "PrivacyPremiumRequired", + "PUBLIC_CHANNEL_MISSING": "PublicChannelMissing", + "RIGHT_FORBIDDEN": "RightForbidden", + "SENSITIVE_CHANGE_FORBIDDEN": "SensitiveChangeForbidden", + "TAKEOUT_REQUIRED": "TakeoutRequired", + "USER_BOT_INVALID": "UserBotInvalid", + "USER_CHANNELS_TOO_MUCH": "UserChannelsTooMuch", + "USER_DELETED": "UserDeleted", + "USER_INVALID": "UserInvalid", + "USER_IS_BLOCKED": "UserIsBlocked", + "USER_NOT_MUTUAL_CONTACT": "UserNotMutualContact", + "USER_NOT_PARTICIPANT": "UserNotParticipant", + "USER_PERMISSION_DENIED": "UserPermissionDenied", + "USER_PRIVACY_RESTRICTED": "UserPrivacyRestricted", + "USER_RESTRICTED": "UserRestricted", + "VOICE_MESSAGES_FORBIDDEN": "VoiceMessagesForbidden", + "YOUR_PRIVACY_RESTRICTED": "YourPrivacyRestricted", + }, + 503: { + "_": "ServiceUnavailable", + "ApiCallError": "ApiCallError", + "Timedout": "Timedout", + "Timeout": "Timeout", + }, + 303: { + "_": "SeeOther", + "FILE_MIGRATE_X": "FileMigrate", + "NETWORK_MIGRATE_X": "NetworkMigrate", + "PHONE_MIGRATE_X": "PhoneMigrate", + "STATS_MIGRATE_X": "StatsMigrate", + "USER_MIGRATE_X": "UserMigrate", + }, + 420: { + "_": "Flood", + "2FA_CONFIRM_WAIT_X": "TwoFaConfirmWait", + "ADDRESS_INVALID": "AddressInvalid", + "FLOOD_PREMIUM_WAIT_X": "FloodPremiumWait", + "FLOOD_TEST_PHONE_WAIT_X": "FloodTestPhoneWait", + "FLOOD_WAIT_X": "FloodWait", + "FROZEN_METHOD_INVALID": "FrozenMethodInvalid", + "PREMIUM_SUB_ACTIVE_UNTIL_X": "PremiumSubActiveUntil", + "SLOWMODE_WAIT_X": "SlowmodeWait", + "STORY_SEND_FLOOD_X": "StorySendFlood", + "TAKEOUT_INIT_DELAY_X": "TakeoutInitDelay", + }, + 406: { + "_": "NotAcceptable", + "ALLOW_PAYMENT_REQUIRED": "AllowPaymentRequired", + "API_GIFT_RESTRICTED_UPDATE_APP": "ApiGiftRestrictedUpdateApp", + "AUTH_KEY_DUPLICATED": "AuthKeyDuplicated", + "BANNED_RIGHTS_INVALID": "BannedRightsInvalid", + "BUSINESS_ADDRESS_ACTIVE": "BusinessAddressActive", + "CALL_PROTOCOL_COMPAT_LAYER_INVALID": "CallProtocolCompatLayerInvalid", + "CHANNEL_PRIVATE": "ChannelPrivate", + "CHANNEL_TOO_LARGE": "ChannelTooLarge", + "CHAT_FORWARDS_RESTRICTED": "ChatForwardsRestricted", + "FILEREF_UPGRADE_NEEDED": "FilerefUpgradeNeeded", + "FRESH_CHANGE_ADMINS_FORBIDDEN": "FreshChangeAdminsForbidden", + "FRESH_CHANGE_PHONE_FORBIDDEN": "FreshChangePhoneForbidden", + "FRESH_RESET_AUTHORISATION_FORBIDDEN": "FreshResetAuthorisationForbidden", + "GIFTCODE_NOT_ALLOWED": "GiftcodeNotAllowed", + "INVITE_HASH_EXPIRED": "InviteHashExpired", + "PAYMENT_UNSUPPORTED": "PaymentUnsupported", + "PEER_ID_INVALID": "PeerIdInvalid", + "PHONE_NUMBER_INVALID": "PhoneNumberInvalid", + "PHONE_PASSWORD_FLOOD": "PhonePasswordFlood", + "PRECHECKOUT_FAILED": "PrecheckoutFailed", + "PREMIUM_CURRENTLY_UNAVAILABLE": "PremiumCurrentlyUnavailable", + "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN": "PreviousChatImportActiveWaitMin", + "PRIVACY_PREMIUM_REQUIRED": "PrivacyPremiumRequired", + "SEND_CODE_UNAVAILABLE": "SendCodeUnavailable", + "STARGIFT_EXPORT_IN_PROGRESS": "StargiftExportInProgress", + "STARS_FORM_AMOUNT_MISMATCH": "StarsFormAmountMismatch", + "STICKERSET_INVALID": "StickersetInvalid", + "STICKERSET_OWNER_ANONYMOUS": "StickersetOwnerAnonymous", + "TOPIC_CLOSED": "TopicClosed", + "TOPIC_DELETED": "TopicDeleted", + "TRANSLATIONS_DISABLED": "TranslationsDisabled", + "UPDATE_APP_TO_LOGIN": "UpdateAppToLogin", + "USERPIC_PRIVACY_REQUIRED": "UserpicPrivacyRequired", + "USERPIC_UPLOAD_REQUIRED": "UserpicUploadRequired", + "USER_RESTRICTED": "UserRestricted", + }, +} diff --git a/pyrogram/errors/exceptions/bad_request_400.py b/pyrogram/errors/exceptions/bad_request_400.py new file mode 100644 index 00000000..d6dc071a --- /dev/null +++ b/pyrogram/errors/exceptions/bad_request_400.py @@ -0,0 +1,3255 @@ +from ..rpc_error import RPCError + + +class BadRequest(RPCError): + """Bad Request""" + CODE = 400 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class AboutTooLong(BadRequest): + """The provided about/bio text is too long""" + ID = "ABOUT_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AccessTokenExpired(BadRequest): + """The bot token has expired""" + ID = "ACCESS_TOKEN_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AccessTokenInvalid(BadRequest): + """The bot access token is invalid""" + ID = "ACCESS_TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AddressInvalid(BadRequest): + """The specified geopoint address is invalid.""" + ID = "ADDRESS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AdminsTooMuch(BadRequest): + """The chat has too many administrators""" + ID = "ADMINS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AdminIdInvalid(BadRequest): + """The specified admin ID is invalid""" + ID = "ADMIN_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AdminRankEmojiNotAllowed(BadRequest): + """Emoji are not allowed in custom administrator titles""" + ID = "ADMIN_RANK_EMOJI_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AdminRankInvalid(BadRequest): + """The custom administrator title is invalid or too long""" + ID = "ADMIN_RANK_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AdminRightsEmpty(BadRequest): + """The chatAdminRights constructor passed in keyboardButtonRequestPeer.peer_type.user_admin_rights has no rights set (i.e. flags is 0).""" + ID = "ADMIN_RIGHTS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AdExpired(BadRequest): + """The ad has expired (too old or not found).""" + ID = "AD_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AlbumPhotosTooMany(BadRequest): + """Too many photos were included in the album""" + ID = "ALBUM_PHOTOS_TOO_MANY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ApiIdInvalid(BadRequest): + """The api_id/api_hash combination is invalid""" + ID = "API_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ApiIdPublishedFlood(BadRequest): + """You are using an API key that is limited on the server side because it was published somewhere""" + ID = "API_ID_PUBLISHED_FLOOD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ArticleTitleEmpty(BadRequest): + """The article title is empty""" + ID = "ARTICLE_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AudioContentUrlEmpty(BadRequest): + """The remote URL specified in the content field is empty""" + ID = "AUDIO_CONTENT_URL_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AudioTitleEmpty(BadRequest): + """The title attribute of the audio is empty""" + ID = "AUDIO_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthBytesInvalid(BadRequest): + """The authorization bytes are invalid""" + ID = "AUTH_BYTES_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthTokenAlreadyAccepted(BadRequest): + """The authorization token was already used""" + ID = "AUTH_TOKEN_ALREADY_ACCEPTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthTokenException(BadRequest): + """An error occurred while importing the auth token""" + ID = "AUTH_TOKEN_EXCEPTION" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthTokenExpired(BadRequest): + """The provided authorization token has expired and the updated QR-code must be re-scanned""" + ID = "AUTH_TOKEN_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthTokenInvalid(BadRequest): + """An invalid authorization token was provided""" + ID = "AUTH_TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthTokenInvalid2(BadRequest): + """An invalid authorization token was provided""" + ID = "AUTH_TOKEN_INVALID2" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthTokenInvalidx(BadRequest): + """The specified auth token is invalid""" + ID = "AUTH_TOKEN_INVALIDX" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AutoarchiveNotAvailable(BadRequest): + """This feature is not yet enabled for your account due to it not receiving too many private messages from strangers""" + ID = "AUTOARCHIVE_NOT_AVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BalanceTooLow(BadRequest): + """The transaction cannot be completed because the current [Telegram Stars balance](https://core.telegram.org/api/stars) is too low.""" + ID = "BALANCE_TOO_LOW" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BankCardNumberInvalid(BadRequest): + """The credit card number is invalid""" + ID = "BANK_CARD_NUMBER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BannedRightsInvalid(BadRequest): + """You provided a set of restrictions that is invalid""" + ID = "BANNED_RIGHTS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BasePortLocInvalid(BadRequest): + """The base port location is invalid""" + ID = "BASE_PORT_LOC_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BirthdayInvalid(BadRequest): + """An invalid age was specified, must be between 0 and 150 years.""" + ID = "BIRTHDAY_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BoostsEmpty(BadRequest): + """Boosts empty""" + ID = "BOOSTS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BoostsRequired(BadRequest): + """Channel required more boost to upload a story""" + ID = "BOOSTS_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BoostNotModified(BadRequest): + """You're already [boosting](https://core.telegram.org/api/boost) the specified channel.""" + ID = "BOOST_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BoostPeerInvalid(BadRequest): + """The specified `boost_peer` is invalid.""" + ID = "BOOST_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotsTooMuch(BadRequest): + """The chat has too many bots""" + ID = "BOTS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotAlreadyDisabled(BadRequest): + """The connected business bot was already disabled for the specified peer.""" + ID = "BOT_ALREADY_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotAppBotInvalid(BadRequest): + """The bot_id passed in the inputBotAppShortName constructor is invalid.""" + ID = "BOT_APP_BOT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotAppInvalid(BadRequest): + """The specified bot app is invalid.""" + ID = "BOT_APP_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotAppShortnameInvalid(BadRequest): + """The specified bot app short name is invalid.""" + ID = "BOT_APP_SHORTNAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotBusinessMissing(BadRequest): + """The specified bot is not a business bot (the [user](https://core.telegram.org/constructor/user).`bot_business` flag is not set).""" + ID = "BOT_BUSINESS_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotChannelsNa(BadRequest): + """Bots can't edit admin privileges""" + ID = "BOT_CHANNELS_NA" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotCommandDescriptionInvalid(BadRequest): + """The command description was empty, too long or had invalid characters""" + ID = "BOT_COMMAND_DESCRIPTION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotCommandInvalid(BadRequest): + """The specified command is invalid""" + ID = "BOT_COMMAND_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotDomainInvalid(BadRequest): + """The domain used for the auth button does not match the one configured in @BotFather""" + ID = "BOT_DOMAIN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotFallbackUnsupported(BadRequest): + """The fallback flag can't be set for bots.""" + ID = "BOT_FALLBACK_UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotGamesDisabled(BadRequest): + """Bot games cannot be used in this type of chat""" + ID = "BOT_GAMES_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotGroupsBlocked(BadRequest): + """This bot can't be added to groups""" + ID = "BOT_GROUPS_BLOCKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotInlineDisabled(BadRequest): + """The inline feature of the bot is disabled""" + ID = "BOT_INLINE_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotInvalid(BadRequest): + """This is not a valid bot""" + ID = "BOT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotInvoiceInvalid(BadRequest): + """The specified invoice is invalid.""" + ID = "BOT_INVOICE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotMethodInvalid(BadRequest): + """The method can't be used by bots""" + ID = "BOT_METHOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotMissing(BadRequest): + """This method can only be run by a bot""" + ID = "BOT_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotNotConnectedYet(BadRequest): + """No [business bot](https://core.telegram.org/api/business#connected-bots) is connected to the currently logged in user.""" + ID = "BOT_NOT_CONNECTED_YET" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotOnesideNotAvail(BadRequest): + """Bots can't pin messages for one side only in private chats""" + ID = "BOT_ONESIDE_NOT_AVAIL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotPaymentsDisabled(BadRequest): + """This method can only be run by a bot""" + ID = "BOT_PAYMENTS_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotPollsDisabled(BadRequest): + """Sending polls by bots has been disabled""" + ID = "BOT_POLLS_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotResponseTimeout(BadRequest): + """The bot did not answer to the callback query in time""" + ID = "BOT_RESPONSE_TIMEOUT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotScoreNotModified(BadRequest): + """The bot score was not modified""" + ID = "BOT_SCORE_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotWebviewDisabled(BadRequest): + """A webview cannot be opened in the specified conditions: emitted for example if `from_bot_menu` or `url` are set and `peer` is not the chat with the bot.""" + ID = "BOT_WEBVIEW_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BroadcastCallsDisabled(BadRequest): + """Broadcast calls disabled""" + ID = "BROADCAST_CALLS_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BroadcastIdInvalid(BadRequest): + """The channel is invalid""" + ID = "BROADCAST_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BroadcastPublicVotersForbidden(BadRequest): + """Polls with public voters cannot be sent in channels""" + ID = "BROADCAST_PUBLIC_VOTERS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BroadcastRequired(BadRequest): + """The request can only be used with a channel""" + ID = "BROADCAST_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessConnectionInvalid(BadRequest): + """The `connection_id` passed to the wrapping [invokeWithBusinessConnection](https://core.telegram.org/api/business) call is invalid.""" + ID = "BUSINESS_CONNECTION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessConnectionNotAllowed(BadRequest): + """This method was invoked over a business connection using [invokeWithBusinessConnection](https://core.telegram.org/api/business#connected-bots), but either (1) we're a user, and users cannot invoke methods over a business connection; (2) we're a bot, but business mode was disabled in @botfather or (3); we're a bot, but this method cannot be invoked over a business connection.""" + ID = "BUSINESS_CONNECTION_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessPeerInvalid(BadRequest): + """Messages can't be set to the specified peer through the current [business connection](https://core.telegram.org/api/business#connected-bots).""" + ID = "BUSINESS_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessPeerUsageMissing(BadRequest): + """You cannot send a message to a user through a [business connection](https://core.telegram.org/api/business#connected-bots) if the user hasn't recently contacted us.""" + ID = "BUSINESS_PEER_USAGE_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessRecipientsEmpty(BadRequest): + """You didn't set any flag in inputBusinessBotRecipients, thus the bot cannot work with *any* peer.""" + ID = "BUSINESS_RECIPIENTS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessWorkHoursEmpty(BadRequest): + """No work hours were specified.""" + ID = "BUSINESS_WORK_HOURS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessWorkHoursPeriodInvalid(BadRequest): + """The specified work hours are invalid, see [here »](https://core.telegram.org/api/business#opening-hours) for the exact requirements.""" + ID = "BUSINESS_WORK_HOURS_PERIOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonCopyTextInvalid(BadRequest): + """The specified [keyboardButtonCopy](https://core.telegram.org/constructor/keyboardButtonCopy).`copy_text` is invalid.""" + ID = "BUTTON_COPY_TEXT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonDataInvalid(BadRequest): + """The button callback data is invalid or too large""" + ID = "BUTTON_DATA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonIdInvalid(BadRequest): + """The specified button ID is invalid.""" + ID = "BUTTON_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonInvalid(BadRequest): + """The specified button is invalid.""" + ID = "BUTTON_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonPosInvalid(BadRequest): + """The position of one of the keyboard buttons is invalid (i.e. a Game or Pay button not in the first position, and so on...).""" + ID = "BUTTON_POS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonTextInvalid(BadRequest): + """The specified button text is invalid""" + ID = "BUTTON_TEXT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonTypeInvalid(BadRequest): + """The type of one of the buttons you provided is invalid""" + ID = "BUTTON_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonUrlInvalid(BadRequest): + """The button url is invalid""" + ID = "BUTTON_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonUserInvalid(BadRequest): + """The `user_id` passed to inputKeyboardButtonUserProfile is invalid!""" + ID = "BUTTON_USER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ButtonUserPrivacyRestricted(BadRequest): + """The privacy settings of the user specified in a keyboard button do not allow creating such button""" + ID = "BUTTON_USER_PRIVACY_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallAlreadyAccepted(BadRequest): + """The call is already accepted""" + ID = "CALL_ALREADY_ACCEPTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallAlreadyDeclined(BadRequest): + """The call is already declined""" + ID = "CALL_ALREADY_DECLINED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallOccupyFailed(BadRequest): + """The call failed because the user is already making another call.""" + ID = "CALL_OCCUPY_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallPeerInvalid(BadRequest): + """The provided call peer object is invalid""" + ID = "CALL_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallProtocolFlagsInvalid(BadRequest): + """Call protocol flags invalid""" + ID = "CALL_PROTOCOL_FLAGS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallProtocolLayerInvalid(BadRequest): + """The specified protocol layer version range is invalid.""" + ID = "CALL_PROTOCOL_LAYER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CdnMethodInvalid(BadRequest): + """The method can't be used on CDN DCs""" + ID = "CDN_METHOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelsAdminLocatedTooMuch(BadRequest): + """The user has reached the limit of public geogroups""" + ID = "CHANNELS_ADMIN_LOCATED_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelsAdminPublicTooMuch(BadRequest): + """You are an administrator of too many public channels""" + ID = "CHANNELS_ADMIN_PUBLIC_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelsTooMuch(BadRequest): + """You have joined too many channels or supergroups, leave some and try again""" + ID = "CHANNELS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelAddInvalid(BadRequest): + """Internal error.""" + ID = "CHANNEL_ADD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelBanned(BadRequest): + """The channel is banned""" + ID = "CHANNEL_BANNED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelForumMissing(BadRequest): + """The channel forum is missing""" + ID = "CHANNEL_FORUM_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelIdInvalid(BadRequest): + """The specified supergroup ID is invalid.""" + ID = "CHANNEL_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelInvalid(BadRequest): + """The channel parameter is invalid""" + ID = "CHANNEL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelMonoforumUnsupported(BadRequest): + """[Monoforums](https://core.telegram.org/api/channel#monoforums) do not support this feature.""" + ID = "CHANNEL_MONOFORUM_UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelParicipantMissing(BadRequest): + """The current user is not in the channel""" + ID = "CHANNEL_PARICIPANT_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelPrivate(BadRequest): + """The channel/supergroup is not accessible""" + ID = "CHANNEL_PRIVATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelTooBig(BadRequest): + """The channel too big""" + ID = "CHANNEL_TOO_BIG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelTooLarge(BadRequest): + """The channel is too large""" + ID = "CHANNEL_TOO_LARGE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChargeAlreadyRefunded(BadRequest): + """The charge id was already used for a refund.""" + ID = "CHARGE_ALREADY_REFUNDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChargeIdEmpty(BadRequest): + """The specified charge_id is empty.""" + ID = "CHARGE_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChargeIdInvalid(BadRequest): + """The specified charge_id is invalid.""" + ID = "CHARGE_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChargeNotFound(BadRequest): + """The charge id was not found.""" + ID = "CHARGE_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatlinksTooMuch(BadRequest): + """Too many [business chat links](https://core.telegram.org/api/business#business-chat-links) were created, please delete some older links.""" + ID = "CHATLINKS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatlinkSlugEmpty(BadRequest): + """The specified slug is empty.""" + ID = "CHATLINK_SLUG_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatlinkSlugExpired(BadRequest): + """The specified [business chat link](https://core.telegram.org/api/business#business-chat-links) has expired.""" + ID = "CHATLINK_SLUG_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatlistsTooMuch(BadRequest): + """You have created too many folder links, hitting the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [limits »](https://core.telegram.org/api/config#chatlist-invites-limit-default).""" + ID = "CHATLISTS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatlistExcludeInvalid(BadRequest): + """The specified `exclude_peers` are invalid.""" + ID = "CHATLIST_EXCLUDE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatAboutNotModified(BadRequest): + """The chat about text was not modified because you tried to edit it using the same content""" + ID = "CHAT_ABOUT_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatAboutTooLong(BadRequest): + """The chat about text is too long""" + ID = "CHAT_ABOUT_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatAdminRequired(BadRequest): + """The method requires chat admin privileges""" + ID = "CHAT_ADMIN_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatDiscussionUnallowed(BadRequest): + """The chat discussion is not allowed""" + ID = "CHAT_DISCUSSION_UNALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatForwardsRestricted(BadRequest): + """The chat restricts forwarding content""" + ID = "CHAT_FORWARDS_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatIdEmpty(BadRequest): + """The provided chat id is empty""" + ID = "CHAT_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatIdInvalid(BadRequest): + """The chat id being used is invalid or not known yet. Make sure you see the chat before interacting with it""" + ID = "CHAT_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatInvalid(BadRequest): + """The chat is invalid""" + ID = "CHAT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatInvitePermanent(BadRequest): + """The chat invite link is primary""" + ID = "CHAT_INVITE_PERMANENT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatLinkExists(BadRequest): + """The action failed because the supergroup is linked to a channel""" + ID = "CHAT_LINK_EXISTS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatMemberAddFailed(BadRequest): + """Could not add participants.""" + ID = "CHAT_MEMBER_ADD_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatNotModified(BadRequest): + """The chat settings (title, permissions, photo, etc..) were not modified because you tried to edit them using the same content""" + ID = "CHAT_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatPublicRequired(BadRequest): + """You can only enable join requests in public groups.""" + ID = "CHAT_PUBLIC_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatRestricted(BadRequest): + """The chat is restricted and cannot be used""" + ID = "CHAT_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatRevokeDateUnsupported(BadRequest): + """`min_date` and `max_date` are not available for using with non-user peers""" + ID = "CHAT_REVOKE_DATE_UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendInlineForbidden(BadRequest): + """You cannot use inline bots to send messages in this chat""" + ID = "CHAT_SEND_INLINE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatTitleEmpty(BadRequest): + """The chat title is empty""" + ID = "CHAT_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatTooBig(BadRequest): + """The chat is too big for this action""" + ID = "CHAT_TOO_BIG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CodeEmpty(BadRequest): + """The provided code is empty""" + ID = "CODE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CodeHashInvalid(BadRequest): + """The provided code hash invalid""" + ID = "CODE_HASH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CodeInvalid(BadRequest): + """The provided code is invalid (i.e. from email)""" + ID = "CODE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CollectibleInvalid(BadRequest): + """The specified collectible is invalid.""" + ID = "COLLECTIBLE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CollectibleNotFound(BadRequest): + """The specified collectible could not be found.""" + ID = "COLLECTIBLE_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ColorInvalid(BadRequest): + """The provided color is invalid""" + ID = "COLOR_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionApiIdInvalid(BadRequest): + """The provided API id is invalid""" + ID = "CONNECTION_API_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionAppVersionEmpty(BadRequest): + """App version is empty""" + ID = "CONNECTION_APP_VERSION_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionDeviceModelEmpty(BadRequest): + """The device model is empty""" + ID = "CONNECTION_DEVICE_MODEL_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionIdInvalid(BadRequest): + """The specified connection ID is invalid.""" + ID = "CONNECTION_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionLangPackInvalid(BadRequest): + """The specified language pack is not valid""" + ID = "CONNECTION_LANG_PACK_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionLayerInvalid(BadRequest): + """The connection layer is invalid. Missing InvokeWithLayer-InitConnection call""" + ID = "CONNECTION_LAYER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionNotInited(BadRequest): + """The connection was not initialized""" + ID = "CONNECTION_NOT_INITED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionSystemEmpty(BadRequest): + """The connection to the system is empty""" + ID = "CONNECTION_SYSTEM_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ConnectionSystemLangCodeEmpty(BadRequest): + """The system language code is empty""" + ID = "CONNECTION_SYSTEM_LANG_CODE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ContactAddMissing(BadRequest): + """Contact to add is missing""" + ID = "CONTACT_ADD_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ContactIdInvalid(BadRequest): + """The provided contact id is invalid""" + ID = "CONTACT_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ContactMissing(BadRequest): + """The specified user is not a contact.""" + ID = "CONTACT_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ContactNameEmpty(BadRequest): + """The provided contact name is empty""" + ID = "CONTACT_NAME_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ContactReqMissing(BadRequest): + """Missing contact request""" + ID = "CONTACT_REQ_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CreateCallFailed(BadRequest): + """An error occurred while creating the call""" + ID = "CREATE_CALL_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CurrencyTotalAmountInvalid(BadRequest): + """The total amount of all prices is invalid""" + ID = "CURRENCY_TOTAL_AMOUNT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CustomReactionsTooMany(BadRequest): + """Too many custom reactions were specified.""" + ID = "CUSTOM_REACTIONS_TOO_MANY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DataHashSizeInvalid(BadRequest): + """The size of the specified secureValueErrorData.data_hash is invalid.""" + ID = "DATA_HASH_SIZE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DataInvalid(BadRequest): + """The encrypted data is invalid""" + ID = "DATA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DataJsonInvalid(BadRequest): + """The provided JSON data is invalid""" + ID = "DATA_JSON_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DataTooLong(BadRequest): + """Data too long""" + ID = "DATA_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DateEmpty(BadRequest): + """The date argument is empty""" + ID = "DATE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DcIdInvalid(BadRequest): + """The dc_id parameter is invalid""" + ID = "DC_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DhGAInvalid(BadRequest): + """The g_a parameter invalid""" + ID = "DH_G_A_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class DocumentInvalid(BadRequest): + """The document is invalid""" + ID = "DOCUMENT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EffectIdInvalid(BadRequest): + """The specified effect ID is invalid.""" + ID = "EFFECT_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailHashExpired(BadRequest): + """The email hash expired and cannot be used to verify it""" + ID = "EMAIL_HASH_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailInvalid(BadRequest): + """The email provided is invalid""" + ID = "EMAIL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailNotAllowed(BadRequest): + """This email is not allowed""" + ID = "EMAIL_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailNotSetup(BadRequest): + """In order to change the login email with emailVerifyPurposeLoginChange, an existing login email must already be set using emailVerifyPurposeLoginSetup.""" + ID = "EMAIL_NOT_SETUP" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailUnconfirmed(BadRequest): + """Email unconfirmed""" + ID = "EMAIL_UNCONFIRMED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailUnconfirmed(BadRequest): + """The provided email isn't confirmed, {value} is the length of the verification code that was just sent to the email""" + ID = "EMAIL_UNCONFIRMED_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmailVerifyExpired(BadRequest): + """The verification email has expired""" + ID = "EMAIL_VERIFY_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmojiInvalid(BadRequest): + """The specified theme emoji is valid""" + ID = "EMOJI_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmojiMarkupInvalid(BadRequest): + """The specified `video_emoji_markup` was invalid.""" + ID = "EMOJI_MARKUP_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmojiNotModified(BadRequest): + """The theme wasn't changed""" + ID = "EMOJI_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmoticonEmpty(BadRequest): + """The emoticon parameter is empty""" + ID = "EMOTICON_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmoticonInvalid(BadRequest): + """The emoticon parameter is invalid""" + ID = "EMOTICON_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EmoticonStickerpackMissing(BadRequest): + """The emoticon sticker pack you are trying to obtain is missing""" + ID = "EMOTICON_STICKERPACK_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptedMessageInvalid(BadRequest): + """The special binding message (bind_auth_key_inner) contains invalid data""" + ID = "ENCRYPTED_MESSAGE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptionAlreadyAccepted(BadRequest): + """The secret chat is already accepted""" + ID = "ENCRYPTION_ALREADY_ACCEPTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptionAlreadyDeclined(BadRequest): + """The secret chat is already declined""" + ID = "ENCRYPTION_ALREADY_DECLINED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptionDeclined(BadRequest): + """The secret chat was declined""" + ID = "ENCRYPTION_DECLINED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptionIdInvalid(BadRequest): + """The provided secret chat id is invalid""" + ID = "ENCRYPTION_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EntitiesTooLong(BadRequest): + """The entity provided contains data that is too long, or you passed too many entities to this message""" + ID = "ENTITIES_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EntityBoundsInvalid(BadRequest): + """The message entity bounds are invalid""" + ID = "ENTITY_BOUNDS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EntityMentionUserInvalid(BadRequest): + """The mentioned entity is not an user""" + ID = "ENTITY_MENTION_USER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ErrorTextEmpty(BadRequest): + """The provided error message is empty""" + ID = "ERROR_TEXT_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExpiresAtInvalid(BadRequest): + """The specified `expires_at` timestamp is invalid.""" + ID = "EXPIRES_AT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExpireDateInvalid(BadRequest): + """The expiration date is invalid""" + ID = "EXPIRE_DATE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExpireForbidden(BadRequest): + """Expire forbidden""" + ID = "EXPIRE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExportCardInvalid(BadRequest): + """The provided card is invalid""" + ID = "EXPORT_CARD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExtendedMediaAmountInvalid(BadRequest): + """The specified `stars_amount` of the passed [inputMediaPaidMedia](https://core.telegram.org/constructor/inputMediaPaidMedia) is invalid.""" + ID = "EXTENDED_MEDIA_AMOUNT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExtendedMediaInvalid(BadRequest): + """The specified paid media is invalid.""" + ID = "EXTENDED_MEDIA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ExternalUrlInvalid(BadRequest): + """The external media URL is invalid""" + ID = "EXTERNAL_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FieldNameEmpty(BadRequest): + """The field with the name FIELD_NAME is missing""" + ID = "FIELD_NAME_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FieldNameInvalid(BadRequest): + """The field with the name FIELD_NAME is invalid""" + ID = "FIELD_NAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileContentTypeInvalid(BadRequest): + """File content-type is invalid""" + ID = "FILE_CONTENT_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileEmtpy(BadRequest): + """An empty file was provided""" + ID = "FILE_EMTPY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileIdInvalid(BadRequest): + """The file id is invalid""" + ID = "FILE_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileMigrate(BadRequest): + """The file is in Data Center No. {value}""" + ID = "FILE_MIGRATE_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartsInvalid(BadRequest): + """Invalid number of parts.""" + ID = "FILE_PARTS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePart0Missing(BadRequest): + """File part 0 missing""" + ID = "FILE_PART_0_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartEmpty(BadRequest): + """The file part sent is empty""" + ID = "FILE_PART_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartInvalid(BadRequest): + """The file part number is invalid.""" + ID = "FILE_PART_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartLengthInvalid(BadRequest): + """The length of a file part is invalid""" + ID = "FILE_PART_LENGTH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartSizeChanged(BadRequest): + """The part size is different from the size of one of the previous parts in the same file""" + ID = "FILE_PART_SIZE_CHANGED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartSizeInvalid(BadRequest): + """The file part size is invalid""" + ID = "FILE_PART_SIZE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartTooBig(BadRequest): + """The size limit for the content of the file part has been exceeded""" + ID = "FILE_PART_TOO_BIG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartTooSmall(BadRequest): + """The size of the uploaded file part is too small, please see the documentation for the allowed sizes.""" + ID = "FILE_PART_TOO_SMALL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilePartMissing(BadRequest): + """Part {value} of the file is missing from storage""" + ID = "FILE_PART_X_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileReferenceEmpty(BadRequest): + """The file id contains an empty file reference, you must obtain a valid one by fetching the message from the origin context""" + ID = "FILE_REFERENCE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileReferenceExpired(BadRequest): + """The file id contains an expired file reference, you must obtain a valid one by fetching the message from the origin context""" + ID = "FILE_REFERENCE_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileReferenceInvalid(BadRequest): + """The file id contains an invalid file reference, you must obtain a valid one by fetching the message from the origin context""" + ID = "FILE_REFERENCE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileReferenceExpired(BadRequest): + """The file reference of the media file at index {value} in the passed media array expired, it [must be refreshed](https://core.telegram.org/api/file_reference).""" + ID = "FILE_REFERENCE_X_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileReferenceInvalid(BadRequest): + """The file reference of the media file at index {value} in the passed media array is invalid.""" + ID = "FILE_REFERENCE_X_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileTitleEmpty(BadRequest): + """An empty file title was specified""" + ID = "FILE_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileTokenInvalid(BadRequest): + """The master DC did not accept the `file_token` (e.g., the token has expired). Continue downloading the file from the master DC using upload.getFile.""" + ID = "FILE_TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilterIdInvalid(BadRequest): + """The specified filter ID is invalid""" + ID = "FILTER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilterIncludeEmpty(BadRequest): + """The filter include is empty""" + ID = "FILTER_INCLUDE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilterNotSupported(BadRequest): + """The specified filter cannot be used in this context""" + ID = "FILTER_NOT_SUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilterTitleEmpty(BadRequest): + """The title field of the filter is empty""" + ID = "FILTER_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FirstnameInvalid(BadRequest): + """The first name is invalid""" + ID = "FIRSTNAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FolderIdEmpty(BadRequest): + """The folder you tried to delete was already empty""" + ID = "FOLDER_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FolderIdInvalid(BadRequest): + """The folder id is invalid""" + ID = "FOLDER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FormExpired(BadRequest): + """The form was generated more than 10 minutes ago and has expired, please re-generate it using [payments.getPaymentForm](https://core.telegram.org/method/payments.getPaymentForm) and pass the new `form_id`.""" + ID = "FORM_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FormIdEmpty(BadRequest): + """The specified form ID is empty.""" + ID = "FORM_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FormIdExpired(BadRequest): + """The specified id has expired.""" + ID = "FORM_ID_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FormSubmitDuplicate(BadRequest): + """The same payment form was already submitted. .""" + ID = "FORM_SUBMIT_DUPLICATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FormUnsupported(BadRequest): + """Please update your client.""" + ID = "FORM_UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ForumEnabled(BadRequest): + """You can't execute the specified action because the group is a [forum](https://core.telegram.org/api/forum), disable forum functionality to continue.""" + ID = "FORUM_ENABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FreshChangeAdminsForbidden(BadRequest): + """You can't change administrator settings in this chat because your session was logged-in recently""" + ID = "FRESH_CHANGE_ADMINS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FromMessageBotDisabled(BadRequest): + """Bots can't use fromMessage min constructors""" + ID = "FROM_MESSAGE_BOT_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FromPeerInvalid(BadRequest): + """The from peer value is invalid""" + ID = "FROM_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FrozenParticipantMissing(BadRequest): + """The current account is [frozen](https://core.telegram.org/api/auth#frozen-accounts), and cannot access the specified peer.""" + ID = "FROZEN_PARTICIPANT_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GameBotInvalid(BadRequest): + """You cannot send that game with the current bot""" + ID = "GAME_BOT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GeneralModifyIconForbidden(BadRequest): + """You can't modify the icon of the "General" topic.""" + ID = "GENERAL_MODIFY_ICON_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GeoPointInvalid(BadRequest): + """Invalid geo point provided""" + ID = "GEO_POINT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GiftMonthsInvalid(BadRequest): + """The value passed in invoice.inputInvoicePremiumGiftStars.months is invalid.""" + ID = "GIFT_MONTHS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GiftSlugExpired(BadRequest): + """The gift slug is expired""" + ID = "GIFT_SLUG_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GiftSlugInvalid(BadRequest): + """The specified slug is invalid.""" + ID = "GIFT_SLUG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GiftStarsInvalid(BadRequest): + """The specified amount of stars is invalid.""" + ID = "GIFT_STARS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GifContentTypeInvalid(BadRequest): + """GIF content-type invalid""" + ID = "GIF_CONTENT_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GifIdInvalid(BadRequest): + """The provided gif/animation id is invalid""" + ID = "GIF_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GraphExpiredReload(BadRequest): + """This graph has expired, please obtain a new graph token""" + ID = "GRAPH_EXPIRED_RELOAD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GraphInvalidReload(BadRequest): + """Invalid graph token provided, please reload the stats and provide the updated token""" + ID = "GRAPH_INVALID_RELOAD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GraphOutdatedReload(BadRequest): + """The graph data is outdated""" + ID = "GRAPH_OUTDATED_RELOAD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallAlreadyDiscarded(BadRequest): + """The group call was already discarded""" + ID = "GROUPCALL_ALREADY_DISCARDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallForbidden(BadRequest): + """The group call has already ended.""" + ID = "GROUPCALL_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallInvalid(BadRequest): + """The specified group call is invalid""" + ID = "GROUPCALL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallJoinMissing(BadRequest): + """You haven't joined this group call""" + ID = "GROUPCALL_JOIN_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallNotModified(BadRequest): + """Group call settings weren't modified""" + ID = "GROUPCALL_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallSsrcDuplicateMuch(BadRequest): + """Too many group call synchronization source duplicates""" + ID = "GROUPCALL_SSRC_DUPLICATE_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupedMediaInvalid(BadRequest): + """The album contains invalid media""" + ID = "GROUPED_MEDIA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupCallInvalid(BadRequest): + """The group call is invalid""" + ID = "GROUP_CALL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class HashtagInvalid(BadRequest): + """The specified hashtag is invalid.""" + ID = "HASHTAG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class HashInvalid(BadRequest): + """The provided hash is invalid""" + ID = "HASH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class HashSizeInvalid(BadRequest): + """The size of the specified secureValueError.hash is invalid.""" + ID = "HASH_SIZE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class HideRequesterMissing(BadRequest): + """The join request was missing or was already handled""" + ID = "HIDE_REQUESTER_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class IdExpired(BadRequest): + """The passed prepared inline message ID has expired.""" + ID = "ID_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class IdInvalid(BadRequest): + """The passed ID is invalid.""" + ID = "ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImageProcessFailed(BadRequest): + """The server failed to process your image""" + ID = "IMAGE_PROCESS_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImportFileInvalid(BadRequest): + """The imported file is invalid""" + ID = "IMPORT_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImportFormatDateInvalid(BadRequest): + """The date specified in the import file is invalid.""" + ID = "IMPORT_FORMAT_DATE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImportFormatUnrecognized(BadRequest): + """The imported format is unrecognized""" + ID = "IMPORT_FORMAT_UNRECOGNIZED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImportIdInvalid(BadRequest): + """The import id is invalid""" + ID = "IMPORT_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImportTokenInvalid(BadRequest): + """The specified token is invalid.""" + ID = "IMPORT_TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InlineResultExpired(BadRequest): + """The inline bot query expired""" + ID = "INLINE_RESULT_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputChatlistInvalid(BadRequest): + """The specified folder is invalid.""" + ID = "INPUT_CHATLIST_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputConstructorInvalid(BadRequest): + """The provided constructor is invalid""" + ID = "INPUT_CONSTRUCTOR_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputFetchError(BadRequest): + """An error occurred while deserializing TL parameters""" + ID = "INPUT_FETCH_ERROR" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputFetchFail(BadRequest): + """Failed deserializing TL payload""" + ID = "INPUT_FETCH_FAIL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputFileInvalid(BadRequest): + """The specified [InputFile](https://core.telegram.org/type/InputFile) is invalid.""" + ID = "INPUT_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputFilterInvalid(BadRequest): + """The filter is invalid for this query""" + ID = "INPUT_FILTER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputLayerInvalid(BadRequest): + """The provided layer is invalid""" + ID = "INPUT_LAYER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputMethodInvalid(BadRequest): + """The method invoked is invalid in the current schema""" + ID = "INPUT_METHOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputPeersEmpty(BadRequest): + """The specified peer array is empty.""" + ID = "INPUT_PEERS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputPurposeInvalid(BadRequest): + """The specified payment purpose is invalid.""" + ID = "INPUT_PURPOSE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputRequestTooLong(BadRequest): + """The input request is too long""" + ID = "INPUT_REQUEST_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputTextEmpty(BadRequest): + """The specified text is empty""" + ID = "INPUT_TEXT_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputTextTooLong(BadRequest): + """The specified text is too long.""" + ID = "INPUT_TEXT_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InputUserDeactivated(BadRequest): + """The target user has been deleted/deactivated""" + ID = "INPUT_USER_DEACTIVATED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InvitesTooMuch(BadRequest): + """The maximum number of per-folder invites specified by the `chatlist_invites_limit_default`/`chatlist_invites_limit_premium` [client configuration parameters »](https://core.telegram.org/api/config#chatlist-invites-limit-default) was reached.""" + ID = "INVITES_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteForbiddenWithJoinas(BadRequest): + """If the user has anonymously joined a group call as a channel, they can't invite other users to the group call because that would cause deanonymization, because the invite would be sent using the original user ID, not the anonymized channel ID""" + ID = "INVITE_FORBIDDEN_WITH_JOINAS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteHashEmpty(BadRequest): + """The invite hash is empty""" + ID = "INVITE_HASH_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteHashExpired(BadRequest): + """The chat invite link is no longer valid""" + ID = "INVITE_HASH_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteHashInvalid(BadRequest): + """The invite link hash is invalid""" + ID = "INVITE_HASH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteRequestSent(BadRequest): + """The request to join this chat or channel has been successfully sent""" + ID = "INVITE_REQUEST_SENT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteRevokedMissing(BadRequest): + """The action required a chat invite link to be revoked first""" + ID = "INVITE_REVOKED_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteSlugEmpty(BadRequest): + """The invite slug is empty""" + ID = "INVITE_SLUG_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteSlugExpired(BadRequest): + """The invite slug is expired""" + ID = "INVITE_SLUG_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteSlugInvalid(BadRequest): + """The specified invitation slug is invalid.""" + ID = "INVITE_SLUG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InvoiceInvalid(BadRequest): + """The specified invoice is invalid.""" + ID = "INVOICE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InvoicePayloadInvalid(BadRequest): + """The specified invoice payload is invalid""" + ID = "INVOICE_PAYLOAD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class JoinAsPeerInvalid(BadRequest): + """The specified peer cannot be used to join a group call""" + ID = "JOIN_AS_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LanguageInvalid(BadRequest): + """The specified lang_code is invalid.""" + ID = "LANGUAGE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LangCodeInvalid(BadRequest): + """The specified language code is invalid""" + ID = "LANG_CODE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LangCodeNotSupported(BadRequest): + """The specified language code is not supported""" + ID = "LANG_CODE_NOT_SUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LangPackInvalid(BadRequest): + """The provided language pack is invalid""" + ID = "LANG_PACK_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LastnameInvalid(BadRequest): + """The last name is invalid""" + ID = "LASTNAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LimitInvalid(BadRequest): + """The limit parameter is invalid""" + ID = "LIMIT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LinkNotModified(BadRequest): + """The chat link was not modified because you tried to link to the same target""" + ID = "LINK_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LocationInvalid(BadRequest): + """The file location is invalid""" + ID = "LOCATION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MaxDateInvalid(BadRequest): + """The specified maximum date is invalid""" + ID = "MAX_DATE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MaxIdInvalid(BadRequest): + """The max_id parameter is invalid""" + ID = "MAX_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MaxQtsInvalid(BadRequest): + """The provided QTS is invalid""" + ID = "MAX_QTS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class Md5ChecksumInvalid(BadRequest): + """The file's checksum did not match the md5_checksum parameter""" + ID = "MD5_CHECKSUM_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaAlreadyPaid(BadRequest): + """You already paid for the specified media.""" + ID = "MEDIA_ALREADY_PAID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaCaptionTooLong(BadRequest): + """The media caption is too long""" + ID = "MEDIA_CAPTION_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaEmpty(BadRequest): + """The media you tried to send is invalid""" + ID = "MEDIA_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaFileInvalid(BadRequest): + """The provided media file is invalid""" + ID = "MEDIA_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaGroupedInvalid(BadRequest): + """You tried to send media of different types in an album""" + ID = "MEDIA_GROUPED_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaInvalid(BadRequest): + """The media is invalid""" + ID = "MEDIA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaNewInvalid(BadRequest): + """The new media to edit the message with is invalid""" + ID = "MEDIA_NEW_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaPrevInvalid(BadRequest): + """The previous media cannot be edited with anything else""" + ID = "MEDIA_PREV_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaTtlInvalid(BadRequest): + """The media ttl is invalid""" + ID = "MEDIA_TTL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaTypeInvalid(BadRequest): + """The specified media type cannot be used in stories.""" + ID = "MEDIA_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MediaVideoStoryMissing(BadRequest): + """The media does not have a photo or a video""" + ID = "MEDIA_VIDEO_STORY_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MegagroupGeoRequired(BadRequest): + """This method can only be invoked on a geogroup.""" + ID = "MEGAGROUP_GEO_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MegagroupIdInvalid(BadRequest): + """The supergroup is invalid""" + ID = "MEGAGROUP_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MegagroupPrehistoryHidden(BadRequest): + """The action failed because the supergroup has the pre-history hidden""" + ID = "MEGAGROUP_PREHISTORY_HIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MegagroupRequired(BadRequest): + """The request can only be used with a supergroup""" + ID = "MEGAGROUP_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageEditTimeExpired(BadRequest): + """You can no longer edit this message because too much time has passed""" + ID = "MESSAGE_EDIT_TIME_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageEmpty(BadRequest): + """The message sent is empty or contains invalid characters""" + ID = "MESSAGE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageIdsEmpty(BadRequest): + """The requested message doesn't exist or you provided no message id""" + ID = "MESSAGE_IDS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageIdInvalid(BadRequest): + """The message id is invalid""" + ID = "MESSAGE_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageNotModified(BadRequest): + """The message was not modified because you tried to edit it using the same content""" + ID = "MESSAGE_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageNotReadYet(BadRequest): + """The specified message wasn't read yet.""" + ID = "MESSAGE_NOT_READ_YET" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessagePollClosed(BadRequest): + """You can't interact with a closed poll""" + ID = "MESSAGE_POLL_CLOSED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageTooLong(BadRequest): + """The message text is too long""" + ID = "MESSAGE_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageTooOld(BadRequest): + """The message is too old, the requested information is not available.""" + ID = "MESSAGE_TOO_OLD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MethodInvalid(BadRequest): + """The API method is invalid and cannot be used""" + ID = "METHOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MinDateInvalid(BadRequest): + """The specified minimum date is invalid""" + ID = "MIN_DATE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MonthInvalid(BadRequest): + """The number of months specified in inputInvoicePremiumGiftStars.months is invalid.""" + ID = "MONTH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgIdInvalid(BadRequest): + """The message ID used in the peer was invalid""" + ID = "MSG_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgTooOld(BadRequest): + """chat_read_mark_expire_period have passed since the message was sent, read receipts were deleted""" + ID = "MSG_TOO_OLD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgVoiceMissing(BadRequest): + """The message does not contain a voice message""" + ID = "MSG_VOICE_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgWaitFailed(BadRequest): + """A waiting call returned an error""" + ID = "MSG_WAIT_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MultiMediaTooLong(BadRequest): + """The album/media group contains too many items""" + ID = "MULTI_MEDIA_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NewSaltInvalid(BadRequest): + """The new salt is invalid""" + ID = "NEW_SALT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NewSettingsEmpty(BadRequest): + """No password is set on the current account, and no new password was specified in `new_settings`""" + ID = "NEW_SETTINGS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NewSettingsInvalid(BadRequest): + """The new settings are invalid""" + ID = "NEW_SETTINGS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NextOffsetInvalid(BadRequest): + """The next offset value is invalid""" + ID = "NEXT_OFFSET_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NogeneralHideForbidden(BadRequest): + """Only the "General" topic with `id=1` can be hidden.""" + ID = "NOGENERAL_HIDE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NotEligible(BadRequest): + """The current user is not eligible to join the Peer-to-Peer Login Program.""" + ID = "NOT_ELIGIBLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NotJoined(BadRequest): + """The current user hasn't joined the Peer-to-Peer Login Program.""" + ID = "NOT_JOINED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NoPaymentNeeded(BadRequest): + """The upgrade/transfer of the specified gift was already paid for or is free.""" + ID = "NO_PAYMENT_NEEDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class OffsetInvalid(BadRequest): + """The offset parameter is invalid""" + ID = "OFFSET_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class OffsetPeerIdInvalid(BadRequest): + """The provided offset peer is invalid""" + ID = "OFFSET_PEER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class OptionsTooMuch(BadRequest): + """The poll options are too many""" + ID = "OPTIONS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class OptionInvalid(BadRequest): + """The option specified is invalid and does not exist in the target poll""" + ID = "OPTION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class OrderInvalid(BadRequest): + """The specified username order is invalid.""" + ID = "ORDER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PackShortNameInvalid(BadRequest): + """Invalid sticker pack name. It must begin with a letter, can't contain consecutive underscores and must end in '_by_'.""" + ID = "PACK_SHORT_NAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PackShortNameOccupied(BadRequest): + """A sticker pack with this name already exists""" + ID = "PACK_SHORT_NAME_OCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PackTitleInvalid(BadRequest): + """The sticker pack title is invalid""" + ID = "PACK_TITLE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PackTypeInvalid(BadRequest): + """The masks and emojis flags are mutually exclusive.""" + ID = "PACK_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParentPeerInvalid(BadRequest): + """The specified `parent_peer` is invalid.""" + ID = "PARENT_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParticipantsTooFew(BadRequest): + """The chat doesn't have enough participants""" + ID = "PARTICIPANTS_TOO_FEW" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParticipantIdInvalid(BadRequest): + """The specified participant ID is invalid""" + ID = "PARTICIPANT_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParticipantJoinMissing(BadRequest): + """Trying to enable a presentation, when the user hasn't joined the Video Chat with phone.joinGroupCall""" + ID = "PARTICIPANT_JOIN_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParticipantVersionOutdated(BadRequest): + """The other participant is using an outdated Telegram app version""" + ID = "PARTICIPANT_VERSION_OUTDATED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordEmpty(BadRequest): + """The password provided is empty""" + ID = "PASSWORD_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordHashInvalid(BadRequest): + """The two-step verification password is invalid""" + ID = "PASSWORD_HASH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordMissing(BadRequest): + """The account is missing the two-step verification password""" + ID = "PASSWORD_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordRecoveryExpired(BadRequest): + """The recovery code has expired.""" + ID = "PASSWORD_RECOVERY_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordRecoveryNa(BadRequest): + """The password recovery e-mail is not available""" + ID = "PASSWORD_RECOVERY_NA" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordRequired(BadRequest): + """The two-step verification password is required for this method""" + ID = "PASSWORD_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PasswordTooFresh(BadRequest): + """The two-step verification password was added recently and you are required to wait {value} seconds""" + ID = "PASSWORD_TOO_FRESH_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PaymentCredentialsInvalid(BadRequest): + """The specified payment credentials are invalid.""" + ID = "PAYMENT_CREDENTIALS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PaymentProviderInvalid(BadRequest): + """The payment provider was not recognised or its token was invalid""" + ID = "PAYMENT_PROVIDER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PaymentRequired(BadRequest): + """Payment is required for this action, see [here »](https://core.telegram.org/api/gifts) for more info.""" + ID = "PAYMENT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeersListEmpty(BadRequest): + """The specified list of peers is empty.""" + ID = "PEERS_LIST_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerFlood(BadRequest): + """The method can't be used because your account is currently limited""" + ID = "PEER_FLOOD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerHistoryEmpty(BadRequest): + """Peer history empty""" + ID = "PEER_HISTORY_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerIdInvalid(BadRequest): + """The peer id being used is invalid or not known yet. Make sure you meet the peer before interacting with it""" + ID = "PEER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerIdNotSupported(BadRequest): + """The provided peer id is not supported""" + ID = "PEER_ID_NOT_SUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerTypesInvalid(BadRequest): + """The passed [keyboardButtonSwitchInline](https://core.telegram.org/constructor/keyboardButtonSwitchInline).`peer_types` field is invalid.""" + ID = "PEER_TYPES_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PersistentTimestampEmpty(BadRequest): + """The pts argument is empty""" + ID = "PERSISTENT_TIMESTAMP_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PersistentTimestampInvalid(BadRequest): + """The persistent timestamp is invalid""" + ID = "PERSISTENT_TIMESTAMP_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneCodeEmpty(BadRequest): + """The phone code is missing""" + ID = "PHONE_CODE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneCodeExpired(BadRequest): + """The confirmation code has expired""" + ID = "PHONE_CODE_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneCodeHashEmpty(BadRequest): + """The phone code hash is missing""" + ID = "PHONE_CODE_HASH_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneCodeInvalid(BadRequest): + """The confirmation code is invalid""" + ID = "PHONE_CODE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneHashExpired(BadRequest): + """An invalid or expired phone_code_hash was provided""" + ID = "PHONE_HASH_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNotOccupied(BadRequest): + """No user is associated to the specified phone number""" + ID = "PHONE_NOT_OCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberAppSignupForbidden(BadRequest): + """You can't sign up using this app""" + ID = "PHONE_NUMBER_APP_SIGNUP_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberBanned(BadRequest): + """The phone number is banned from Telegram and cannot be used""" + ID = "PHONE_NUMBER_BANNED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberFlood(BadRequest): + """This number has tried to login too many times""" + ID = "PHONE_NUMBER_FLOOD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberInvalid(BadRequest): + """The phone number is invalid""" + ID = "PHONE_NUMBER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberOccupied(BadRequest): + """The phone number is already in use""" + ID = "PHONE_NUMBER_OCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberUnoccupied(BadRequest): + """The phone number is not yet being used""" + ID = "PHONE_NUMBER_UNOCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhonePasswordProtected(BadRequest): + """The phone is password protected""" + ID = "PHONE_PASSWORD_PROTECTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoContentTypeInvalid(BadRequest): + """The photo content type is invalid""" + ID = "PHOTO_CONTENT_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoContentUrlEmpty(BadRequest): + """The photo content URL is empty""" + ID = "PHOTO_CONTENT_URL_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoCropFileMissing(BadRequest): + """Photo crop file missing""" + ID = "PHOTO_CROP_FILE_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoCropSizeSmall(BadRequest): + """The photo is too small""" + ID = "PHOTO_CROP_SIZE_SMALL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoExtInvalid(BadRequest): + """The photo extension is invalid""" + ID = "PHOTO_EXT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoFileMissing(BadRequest): + """Profile photo file missing""" + ID = "PHOTO_FILE_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoIdInvalid(BadRequest): + """The photo id is invalid""" + ID = "PHOTO_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoInvalid(BadRequest): + """The photo is invalid""" + ID = "PHOTO_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoInvalidDimensions(BadRequest): + """The photo dimensions are invalid""" + ID = "PHOTO_INVALID_DIMENSIONS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoSaveFileInvalid(BadRequest): + """The photo you tried to send cannot be saved by Telegram""" + ID = "PHOTO_SAVE_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoThumbUrlEmpty(BadRequest): + """The photo thumb URL is empty""" + ID = "PHOTO_THUMB_URL_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoThumbUrlInvalid(BadRequest): + """The photo thumb URL is invalid""" + ID = "PHOTO_THUMB_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PinnedDialogsTooMuch(BadRequest): + """Too many pinned dialogs""" + ID = "PINNED_DIALOGS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PinnedTooMuch(BadRequest): + """There are too many pinned topics, unpin some first.""" + ID = "PINNED_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PinRestricted(BadRequest): + """You can't pin messages in private chats with other people""" + ID = "PIN_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollAnswersInvalid(BadRequest): + """The poll answers are invalid""" + ID = "POLL_ANSWERS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollAnswerInvalid(BadRequest): + """One of the poll answers is not acceptable""" + ID = "POLL_ANSWER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollOptionDuplicate(BadRequest): + """A duplicate option was sent in the same poll""" + ID = "POLL_OPTION_DUPLICATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollOptionInvalid(BadRequest): + """A poll option used invalid data (the data may be too long)""" + ID = "POLL_OPTION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollQuestionInvalid(BadRequest): + """The poll question is invalid""" + ID = "POLL_QUESTION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollUnsupported(BadRequest): + """This layer does not support polls in the invoked method""" + ID = "POLL_UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollVoteRequired(BadRequest): + """Cast a vote in the poll before calling this method""" + ID = "POLL_VOTE_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PremiumAccountRequired(BadRequest): + """The method requires a premium user account""" + ID = "PREMIUM_ACCOUNT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PricingChatInvalid(BadRequest): + """The pricing for the [subscription](https://core.telegram.org/api/subscriptions) is invalid, the maximum price is specified in the [`stars_subscription_amount_max` config key »](https://core.telegram.org/api/config#stars-subscription-amount-max).""" + ID = "PRICING_CHAT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PrivacyKeyInvalid(BadRequest): + """The privacy key is invalid""" + ID = "PRIVACY_KEY_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PrivacyTooLong(BadRequest): + """Your privacy exception list has exceeded the maximum capacity""" + ID = "PRIVACY_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PrivacyValueInvalid(BadRequest): + """The privacy value is invalid""" + ID = "PRIVACY_VALUE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PublicKeyRequired(BadRequest): + """A public key is required""" + ID = "PUBLIC_KEY_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PurposeInvalid(BadRequest): + """The specified payment purpose is invalid.""" + ID = "PURPOSE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QueryIdEmpty(BadRequest): + """The query ID is empty""" + ID = "QUERY_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QueryIdInvalid(BadRequest): + """The callback query id is invalid""" + ID = "QUERY_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QueryTooShort(BadRequest): + """The query is too short""" + ID = "QUERY_TOO_SHORT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuickRepliesBotNotAllowed(BadRequest): + """[Quick replies](https://core.telegram.org/api/business#quick-reply-shortcuts) cannot be used by bots.""" + ID = "QUICK_REPLIES_BOT_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuickRepliesTooMuch(BadRequest): + """A maximum of [appConfig.`quick_replies_limit`](https://core.telegram.org/api/config#quick-replies-limit) shortcuts may be created, the limit was reached.""" + ID = "QUICK_REPLIES_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuizAnswerMissing(BadRequest): + """You can forward a quiz while hiding the original author only after choosing an option in the quiz""" + ID = "QUIZ_ANSWER_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuizCorrectAnswersEmpty(BadRequest): + """The correct answers of the quiz are empty""" + ID = "QUIZ_CORRECT_ANSWERS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuizCorrectAnswersTooMuch(BadRequest): + """The quiz contains too many correct answers""" + ID = "QUIZ_CORRECT_ANSWERS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuizCorrectAnswerInvalid(BadRequest): + """The correct answers of the quiz are invalid""" + ID = "QUIZ_CORRECT_ANSWER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuizMultipleInvalid(BadRequest): + """A quiz can't have multiple answers""" + ID = "QUIZ_MULTIPLE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class QuoteTextInvalid(BadRequest): + """The specified `reply_to`.`quote_text` field is invalid.""" + ID = "QUOTE_TEXT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RaiseHandForbidden(BadRequest): + """You cannot raise your hand.""" + ID = "RAISE_HAND_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RandomIdEmpty(BadRequest): + """The random ID is empty""" + ID = "RANDOM_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RandomIdExpired(BadRequest): + """The specified `random_id` was expired (most likely it didn't follow the required `uint64_t random_id = (time() << 32) | ((uint64_t)random_uint32_t())` format, or the specified time is too far in the past).""" + ID = "RANDOM_ID_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RandomIdInvalid(BadRequest): + """The provided random ID is invalid""" + ID = "RANDOM_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RandomLengthInvalid(BadRequest): + """The random length is invalid""" + ID = "RANDOM_LENGTH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RangesInvalid(BadRequest): + """Invalid range provided""" + ID = "RANGES_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReactionsCountInvalid(BadRequest): + """The specified number of reactions is invalid.""" + ID = "REACTIONS_COUNT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReactionsTooMany(BadRequest): + """Currently, non-premium users, can set up to one reaction per message""" + ID = "REACTIONS_TOO_MANY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReactionEmpty(BadRequest): + """The reaction provided is empty""" + ID = "REACTION_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReactionInvalid(BadRequest): + """Invalid reaction provided (only valid emoji are allowed)""" + ID = "REACTION_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReceiptEmpty(BadRequest): + """The specified receipt is empty.""" + ID = "RECEIPT_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReflectorNotAvailable(BadRequest): + """The call reflector is not available""" + ID = "REFLECTOR_NOT_AVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyMarkupBuyEmpty(BadRequest): + """Reply markup for buy button empty""" + ID = "REPLY_MARKUP_BUY_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyMarkupGameEmpty(BadRequest): + """The provided reply markup for the game is empty""" + ID = "REPLY_MARKUP_GAME_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyMarkupInvalid(BadRequest): + """The provided reply markup is invalid""" + ID = "REPLY_MARKUP_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyMarkupTooLong(BadRequest): + """The reply markup is too long""" + ID = "REPLY_MARKUP_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyMessagesTooMuch(BadRequest): + """Each shortcut can contain a maximum of [appConfig.`quick_reply_messages_limit`](https://core.telegram.org/api/config#quick-reply-messages-limit) messages, the limit was reached.""" + ID = "REPLY_MESSAGES_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyMessageIdInvalid(BadRequest): + """The reply message id is invalid""" + ID = "REPLY_MESSAGE_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyToInvalid(BadRequest): + """The specified `reply_to` field is invalid.""" + ID = "REPLY_TO_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyToMonoforumPeerInvalid(BadRequest): + """The specified inputReplyToMonoForum.monoforum_peer_id is invalid.""" + ID = "REPLY_TO_MONOFORUM_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ReplyToUserInvalid(BadRequest): + """The replied-to user is invalid.""" + ID = "REPLY_TO_USER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RequestTokenInvalid(BadRequest): + """The master DC did not accept the `request_token` from the CDN DC. Continue downloading the file from the master DC using upload.getFile.""" + ID = "REQUEST_TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ResetRequestMissing(BadRequest): + """No password reset is in progress""" + ID = "RESET_REQUEST_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ResultsTooMuch(BadRequest): + """The result contains too many items""" + ID = "RESULTS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ResultIdDuplicate(BadRequest): + """The result contains items with duplicated identifiers""" + ID = "RESULT_ID_DUPLICATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ResultIdEmpty(BadRequest): + """Result ID empty""" + ID = "RESULT_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ResultIdInvalid(BadRequest): + """The given result cannot be used to send the selection to the bot""" + ID = "RESULT_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ResultTypeInvalid(BadRequest): + """The result type is invalid""" + ID = "RESULT_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RevoteNotAllowed(BadRequest): + """You cannot change your vote""" + ID = "REVOTE_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RightsNotModified(BadRequest): + """The new admin rights are equal to the old rights, no change was made""" + ID = "RIGHTS_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RingtoneInvalid(BadRequest): + """The specified ringtone is invalid.""" + ID = "RINGTONE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RingtoneMimeInvalid(BadRequest): + """The MIME type for the ringtone is invalid.""" + ID = "RINGTONE_MIME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RsaDecryptFailed(BadRequest): + """Internal RSA decryption failed""" + ID = "RSA_DECRYPT_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SavedIdEmpty(BadRequest): + """The passed inputSavedStarGiftChat.saved_id is empty.""" + ID = "SAVED_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ScheduleBotNotAllowed(BadRequest): + """Bots are not allowed to schedule messages""" + ID = "SCHEDULE_BOT_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ScheduleDateInvalid(BadRequest): + """Invalid schedule date provided""" + ID = "SCHEDULE_DATE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ScheduleDateTooLate(BadRequest): + """The date you tried to schedule is too far in the future (more than one year)""" + ID = "SCHEDULE_DATE_TOO_LATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ScheduleStatusPrivate(BadRequest): + """You cannot schedule a message until the person comes online if their privacy does not show this information""" + ID = "SCHEDULE_STATUS_PRIVATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ScheduleTooMuch(BadRequest): + """You tried to schedule too many messages in this chat""" + ID = "SCHEDULE_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ScoreInvalid(BadRequest): + """The specified game score is invalid""" + ID = "SCORE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SearchQueryEmpty(BadRequest): + """The search query is empty""" + ID = "SEARCH_QUERY_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SearchWithLinkNotSupported(BadRequest): + """You cannot provide a search query and an invite link at the same time""" + ID = "SEARCH_WITH_LINK_NOT_SUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SecondsInvalid(BadRequest): + """The seconds interval is invalid""" + ID = "SECONDS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SecureSecretRequired(BadRequest): + """A secure secret is required.""" + ID = "SECURE_SECRET_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SelfDeleteRestricted(BadRequest): + """Business bots can't delete messages just for the user, `revoke` **must** be set.""" + ID = "SELF_DELETE_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SendAsPeerInvalid(BadRequest): + """You can't send messages as the specified peer""" + ID = "SEND_AS_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SendMessageGameInvalid(BadRequest): + """An inputBotInlineMessageGame can only be contained in an inputBotInlineResultGame, not in an inputBotInlineResult/inputBotInlineResultPhoto/etc.""" + ID = "SEND_MESSAGE_GAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SendMessageMediaInvalid(BadRequest): + """The message media is invalid""" + ID = "SEND_MESSAGE_MEDIA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SendMessageTypeInvalid(BadRequest): + """The message type is invalid""" + ID = "SEND_MESSAGE_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SessionTooFresh(BadRequest): + """You can't do this action because the current session was logged-in recently""" + ID = "SESSION_TOO_FRESH_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SettingsInvalid(BadRequest): + """Invalid settings were provided""" + ID = "SETTINGS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class Sha256HashInvalid(BadRequest): + """The provided SHA256 hash is invalid""" + ID = "SHA256_HASH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ShortcutInvalid(BadRequest): + """The specified shortcut is invalid.""" + ID = "SHORTCUT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ShortnameOccupyFailed(BadRequest): + """An error occurred when trying to register the short-name used for the sticker pack. Try a different name""" + ID = "SHORTNAME_OCCUPY_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ShortNameInvalid(BadRequest): + """The specified short name is invalid""" + ID = "SHORT_NAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ShortNameOccupied(BadRequest): + """The specified short name is already in use""" + ID = "SHORT_NAME_OCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SlotsEmpty(BadRequest): + """The specified slot list is empty.""" + ID = "SLOTS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SlowmodeMultiMsgsDisabled(BadRequest): + """Slowmode is enabled, you cannot forward multiple messages to this group""" + ID = "SLOWMODE_MULTI_MSGS_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SlugInvalid(BadRequest): + """The specified invoice slug is invalid.""" + ID = "SLUG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SmsjobIdInvalid(BadRequest): + """The specified job ID is invalid.""" + ID = "SMSJOB_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SmsCodeCreateFailed(BadRequest): + """An error occurred while creating the SMS code""" + ID = "SMS_CODE_CREATE_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SrpAInvalid(BadRequest): + """The specified inputCheckPasswordSRP.A value is invalid.""" + ID = "SRP_A_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SrpIdInvalid(BadRequest): + """Invalid SRP ID provided""" + ID = "SRP_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SrpPasswordChanged(BadRequest): + """The password has changed""" + ID = "SRP_PASSWORD_CHANGED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftAlreadyConverted(BadRequest): + """The specified star gift was already converted to Stars.""" + ID = "STARGIFT_ALREADY_CONVERTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftAlreadyRefunded(BadRequest): + """The specified star gift was already refunded.""" + ID = "STARGIFT_ALREADY_REFUNDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftAlreadyUpgraded(BadRequest): + """The specified gift was already upgraded to a collectible gift.""" + ID = "STARGIFT_ALREADY_UPGRADED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftInvalid(BadRequest): + """The passed [inputInvoiceStarGift](https://core.telegram.org/constructor/inputInvoiceStarGift) is invalid.""" + ID = "STARGIFT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftNotFound(BadRequest): + """The specified gift was not found.""" + ID = "STARGIFT_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftOwnerInvalid(BadRequest): + """You cannot transfer or sell a gift owned by another user.""" + ID = "STARGIFT_OWNER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftPeerInvalid(BadRequest): + """The specified inputSavedStarGiftChat.peer is invalid.""" + ID = "STARGIFT_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftResellCurrencyNotAllowed(BadRequest): + """You can't buy the gift using the specified currency (i.e. trying to pay in Stars for TON gifts).""" + ID = "STARGIFT_RESELL_CURRENCY_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftSlugInvalid(BadRequest): + """The specified gift slug is invalid.""" + ID = "STARGIFT_SLUG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftTransferTooEarly(BadRequest): + """You cannot transfer this gift yet, wait {value} seconds.""" + ID = "STARGIFT_TRANSFER_TOO_EARLY_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftUpgradeUnavailable(BadRequest): + """A received gift can only be upgraded to a collectible gift if the [messageActionStarGift](https://core.telegram.org/constructor/messageActionStarGift)/[savedStarGift](https://core.telegram.org/constructor/savedStarGift).`can_upgrade` flag is set.""" + ID = "STARGIFT_UPGRADE_UNAVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftUsageLimited(BadRequest): + """The gift is sold out.""" + ID = "STARGIFT_USAGE_LIMITED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftUserUsageLimited(BadRequest): + """You've reached the starGift.limited_per_user limit, you can't buy any more gifts of this type.""" + ID = "STARGIFT_USER_USAGE_LIMITED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarrefAwaitingEnd(BadRequest): + """The previous referral program was terminated less than 24 hours ago: further changes can be made after the date specified in userFull.starref_program.end_date.""" + ID = "STARREF_AWAITING_END" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarrefExpired(BadRequest): + """The specified referral link is invalid.""" + ID = "STARREF_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarrefHashRevoked(BadRequest): + """The specified affiliate link was already revoked.""" + ID = "STARREF_HASH_REVOKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarrefPermilleInvalid(BadRequest): + """The specified commission_permille is invalid: the minimum and maximum values for this parameter are contained in the [starref_min_commission_permille](https://core.telegram.org/api/config#starref-min-commission-permille) and [starref_max_commission_permille](https://core.telegram.org/api/config#starref-max-commission-permille) client configuration parameters.""" + ID = "STARREF_PERMILLE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarrefPermilleTooLow(BadRequest): + """The specified commission_permille is too low: the minimum and maximum values for this parameter are contained in the [starref_min_commission_permille](https://core.telegram.org/api/config#starref-min-commission-permille) and [starref_max_commission_permille](https://core.telegram.org/api/config#starref-max-commission-permille) client configuration parameters.""" + ID = "STARREF_PERMILLE_TOO_LOW" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarsAmountInvalid(BadRequest): + """The specified amount in stars is invalid.""" + ID = "STARS_AMOUNT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarsInvoiceInvalid(BadRequest): + """The specified Telegram Star invoice is invalid.""" + ID = "STARS_INVOICE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarsPaymentRequired(BadRequest): + """To import this chat invite link, you must first [pay for the associated Telegram Star subscription »](https://core.telegram.org/api/subscriptions#channel-subscriptions).""" + ID = "STARS_PAYMENT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StartParamEmpty(BadRequest): + """The start parameter is empty""" + ID = "START_PARAM_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StartParamInvalid(BadRequest): + """The start parameter is invalid""" + ID = "START_PARAM_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StartParamTooLong(BadRequest): + """The start parameter is too long""" + ID = "START_PARAM_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerpackStickersTooMuch(BadRequest): + """There are too many stickers in this stickerpack, you can't add any more""" + ID = "STICKERPACK_STICKERS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickersetInvalid(BadRequest): + """The requested sticker set is invalid""" + ID = "STICKERSET_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickersetNotModified(BadRequest): + """The sticker set is not modified""" + ID = "STICKERSET_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickersEmpty(BadRequest): + """The sticker provided is empty""" + ID = "STICKERS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickersTooMuch(BadRequest): + """Too many stickers in the set""" + ID = "STICKERS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerDocumentInvalid(BadRequest): + """The sticker document is invalid""" + ID = "STICKER_DOCUMENT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerEmojiInvalid(BadRequest): + """The sticker emoji is invalid""" + ID = "STICKER_EMOJI_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerFileInvalid(BadRequest): + """The sticker file is invalid""" + ID = "STICKER_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerGifDimensions(BadRequest): + """The specified video sticker has invalid dimensions""" + ID = "STICKER_GIF_DIMENSIONS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerIdInvalid(BadRequest): + """The provided sticker id is invalid""" + ID = "STICKER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerInvalid(BadRequest): + """The provided sticker is invalid""" + ID = "STICKER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerMimeInvalid(BadRequest): + """Make sure to pass a valid image file for the right InputFile parameter""" + ID = "STICKER_MIME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerPngDimensions(BadRequest): + """The sticker png dimensions are invalid""" + ID = "STICKER_PNG_DIMENSIONS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerPngNopng(BadRequest): + """Stickers must be png files but the provided image was not a png""" + ID = "STICKER_PNG_NOPNG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerTgsNodoc(BadRequest): + """You must send the animated sticker as a document""" + ID = "STICKER_TGS_NODOC" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerTgsNotgs(BadRequest): + """A tgs sticker file was expected, but something else was provided""" + ID = "STICKER_TGS_NOTGS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerThumbPngNopng(BadRequest): + """A png sticker thumbnail file was expected, but something else was provided""" + ID = "STICKER_THUMB_PNG_NOPNG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerThumbTgsNotgs(BadRequest): + """Incorrect stickerset TGS thumb file provided.""" + ID = "STICKER_THUMB_TGS_NOTGS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerVideoBig(BadRequest): + """The specified video sticker is too big""" + ID = "STICKER_VIDEO_BIG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerVideoNodoc(BadRequest): + """You must send the video sticker as a document""" + ID = "STICKER_VIDEO_NODOC" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickerVideoNowebm(BadRequest): + """A webm video file was expected, but something else was provided""" + ID = "STICKER_VIDEO_NOWEBM" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoriesNeverCreated(BadRequest): + """You have never created any stories""" + ID = "STORIES_NEVER_CREATED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoriesTooMuch(BadRequest): + """Too many stories in the current account""" + ID = "STORIES_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoryIdEmpty(BadRequest): + """You specified no story IDs.""" + ID = "STORY_ID_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoryIdInvalid(BadRequest): + """The specified story ID is invalid.""" + ID = "STORY_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoryNotModified(BadRequest): + """The new story information you passed is equal to the previous story information, thus it wasn't modified.""" + ID = "STORY_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoryPeriodInvalid(BadRequest): + """The story period is invalid""" + ID = "STORY_PERIOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StorySendFloodMonthly(BadRequest): + """You've hit the monthly story limit as specified by the [`stories_sent_monthly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-monthly-limit-default): wait for the specified number of seconds before posting a new story.""" + ID = "STORY_SEND_FLOOD_MONTHLY_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StorySendFloodWeekly(BadRequest): + """You've hit the weekly story limit as specified by the [`stories_sent_weekly_limit_*` client configuration parameters](https://core.telegram.org/api/config#stories-sent-weekly-limit-default): wait for the specified number of seconds before posting a new story.""" + ID = "STORY_SEND_FLOOD_WEEKLY_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SubscriptionExportMissing(BadRequest): + """You cannot send a [bot subscription invoice](https://core.telegram.org/api/subscriptions#bot-subscriptions) directly, you may only create invoice links using [payments.exportInvoice](https://core.telegram.org/method/payments.exportInvoice).""" + ID = "SUBSCRIPTION_EXPORT_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SubscriptionIdInvalid(BadRequest): + """The specified subscription_id is invalid.""" + ID = "SUBSCRIPTION_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SubscriptionPeriodInvalid(BadRequest): + """The specified subscription_pricing.period is invalid.""" + ID = "SUBSCRIPTION_PERIOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SuggestedPostAmountInvalid(BadRequest): + """The specified price for the suggested post is invalid.""" + ID = "SUGGESTED_POST_AMOUNT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SuggestedPostPeerInvalid(BadRequest): + """You cannot send suggested posts to non-[monoforum](https://core.telegram.org/api/monoforum) peers.""" + ID = "SUGGESTED_POST_PEER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SwitchPmTextEmpty(BadRequest): + """The switch_pm.text field was empty""" + ID = "SWITCH_PM_TEXT_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SwitchWebviewUrlInvalid(BadRequest): + """The URL specified in switch_webview.url is invalid!""" + ID = "SWITCH_WEBVIEW_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TakeoutInvalid(BadRequest): + """The takeout id is invalid""" + ID = "TAKEOUT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TakeoutRequired(BadRequest): + """The method must be invoked inside a takeout session""" + ID = "TAKEOUT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TaskAlreadyExists(BadRequest): + """An email reset was already requested.""" + ID = "TASK_ALREADY_EXISTS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TempAuthKeyAlreadyBound(BadRequest): + """The passed temporary key is already bound to another perm_auth_key_id""" + ID = "TEMP_AUTH_KEY_ALREADY_BOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TempAuthKeyEmpty(BadRequest): + """The temporary auth key provided is empty""" + ID = "TEMP_AUTH_KEY_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TermsUrlInvalid(BadRequest): + """The specified [invoice](https://core.telegram.org/constructor/invoice).`terms_url` is invalid.""" + ID = "TERMS_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeFileInvalid(BadRequest): + """Invalid theme file provided""" + ID = "THEME_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeFormatInvalid(BadRequest): + """Invalid theme format provided""" + ID = "THEME_FORMAT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeInvalid(BadRequest): + """Invalid theme provided""" + ID = "THEME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeMimeInvalid(BadRequest): + """You cannot create this theme because the mime-type is invalid""" + ID = "THEME_MIME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeParamsInvalid(BadRequest): + """The specified `theme_params` field is invalid.""" + ID = "THEME_PARAMS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeSlugInvalid(BadRequest): + """The specified theme slug is invalid.""" + ID = "THEME_SLUG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ThemeTitleInvalid(BadRequest): + """The specified theme title is invalid""" + ID = "THEME_TITLE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TimezoneInvalid(BadRequest): + """The specified timezone does not exist.""" + ID = "TIMEZONE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TitleInvalid(BadRequest): + """The specified stickerpack title is invalid""" + ID = "TITLE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TmpPasswordDisabled(BadRequest): + """The temporary password is disabled""" + ID = "TMP_PASSWORD_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TmpPasswordInvalid(BadRequest): + """The temporary password is invalid""" + ID = "TMP_PASSWORD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TodoItemsEmpty(BadRequest): + """A checklist was specified, but no [checklist items](https://core.telegram.org/api/todo) were passed.""" + ID = "TODO_ITEMS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TodoItemDuplicate(BadRequest): + """Duplicate [checklist items](https://core.telegram.org/api/todo) detected.""" + ID = "TODO_ITEM_DUPLICATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TodoNotModified(BadRequest): + """No todo items were specified, so no changes were made to the todo list.""" + ID = "TODO_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TokenEmpty(BadRequest): + """The specified token is empty.""" + ID = "TOKEN_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TokenInvalid(BadRequest): + """The provided token is invalid""" + ID = "TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TokenTypeInvalid(BadRequest): + """The specified token type is invalid.""" + ID = "TOKEN_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicsEmpty(BadRequest): + """You specified no topic IDs.""" + ID = "TOPICS_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicClosed(BadRequest): + """The topic was closed""" + ID = "TOPIC_CLOSED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicCloseSeparately(BadRequest): + """The `close` flag cannot be provided together with any of the other flags.""" + ID = "TOPIC_CLOSE_SEPARATELY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicDeleted(BadRequest): + """The topic was deleted""" + ID = "TOPIC_DELETED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicHideSeparately(BadRequest): + """The `hide` flag cannot be provided together with any of the other flags.""" + ID = "TOPIC_HIDE_SEPARATELY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicIdInvalid(BadRequest): + """The provided topic ID is invalid""" + ID = "TOPIC_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicNotModified(BadRequest): + """The topic was not modified""" + ID = "TOPIC_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicTitleEmpty(BadRequest): + """The specified topic title is empty.""" + ID = "TOPIC_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ToIdInvalid(BadRequest): + """The specified `to_id` of the passed inputInvoiceStarGiftResale or inputInvoiceStarGiftTransfer is invalid.""" + ID = "TO_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ToLangInvalid(BadRequest): + """The specified destination language is invalid""" + ID = "TO_LANG_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TransactionIdInvalid(BadRequest): + """The specified transaction ID is invalid.""" + ID = "TRANSACTION_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TranscriptionFailed(BadRequest): + """Telegram is having internal problems. Please try again later to transcribe the audio.""" + ID = "TRANSCRIPTION_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TranslateReqQuotaExceeded(BadRequest): + """Translation is currently unavailable due to a temporary server-side lack of resources.""" + ID = "TRANSLATE_REQ_QUOTA_EXCEEDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TtlDaysInvalid(BadRequest): + """The provided TTL days is invalid""" + ID = "TTL_DAYS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TtlMediaInvalid(BadRequest): + """The media does not support self-destruction""" + ID = "TTL_MEDIA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TtlPeriodInvalid(BadRequest): + """The provided TTL period is invalid""" + ID = "TTL_PERIOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TypesEmpty(BadRequest): + """The types parameter is empty""" + ID = "TYPES_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TypeConstructorInvalid(BadRequest): + """The type constructor is invalid""" + ID = "TYPE_CONSTRUCTOR_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UnknownError(BadRequest): + """Unknown error""" + ID = "UNKNOWN_ERROR" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class Unsupported(BadRequest): + """`require_payment` cannot be *set* by users, only by monoforums: users must instead use the [inputPrivacyKeyNoPaidMessages](https://core.telegram.org/constructor/inputPrivacyKeyNoPaidMessages) privacy setting to remove a previously added exemption.""" + ID = "UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UntilDateInvalid(BadRequest): + """That date parameter is invalid""" + ID = "UNTIL_DATE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UrlInvalid(BadRequest): + """The URL provided is invalid""" + ID = "URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsageLimitInvalid(BadRequest): + """The usage limit is invalid""" + ID = "USAGE_LIMIT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsernamesActiveTooMuch(BadRequest): + """The maximum number of active usernames was reached.""" + ID = "USERNAMES_ACTIVE_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsernameInvalid(BadRequest): + """The username is invalid""" + ID = "USERNAME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsernameNotModified(BadRequest): + """The username was not modified because you tried to edit it using the same one""" + ID = "USERNAME_NOT_MODIFIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsernameNotOccupied(BadRequest): + """The username is not occupied by anyone""" + ID = "USERNAME_NOT_OCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsernameOccupied(BadRequest): + """The username is already in use by someone else""" + ID = "USERNAME_OCCUPIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsernamePurchaseAvailable(BadRequest): + """The username is available for purchase on fragment.com""" + ID = "USERNAME_PURCHASE_AVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserpicUploadRequired(BadRequest): + """You are required to upload a profile picture for this action""" + ID = "USERPIC_UPLOAD_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsersTooFew(BadRequest): + """Not enough users (to create a chat, for example)""" + ID = "USERS_TOO_FEW" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UsersTooMuch(BadRequest): + """The maximum number of users has been exceeded (to create a chat, for example)""" + ID = "USERS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserAdminInvalid(BadRequest): + """The action requires admin privileges. Probably you tried to edit admin privileges on someone you don't have rights to""" + ID = "USER_ADMIN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserAlreadyInvited(BadRequest): + """You have already invited this user""" + ID = "USER_ALREADY_INVITED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserAlreadyParticipant(BadRequest): + """The user is already a participant of this chat""" + ID = "USER_ALREADY_PARTICIPANT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserBannedInChannel(BadRequest): + """You are limited from sending messages in supergroups/channels, check @SpamBot for details""" + ID = "USER_BANNED_IN_CHANNEL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserBlocked(BadRequest): + """The user is blocked""" + ID = "USER_BLOCKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserBot(BadRequest): + """Bots in channels can only be administrators, not members.""" + ID = "USER_BOT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserBotInvalid(BadRequest): + """This method can only be used by a bot""" + ID = "USER_BOT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserBotRequired(BadRequest): + """The method can be used by bots only""" + ID = "USER_BOT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserChannelsTooMuch(BadRequest): + """The user is already in too many channels or supergroups""" + ID = "USER_CHANNELS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserCreator(BadRequest): + """You can't leave this channel because you're its creator""" + ID = "USER_CREATOR" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserGiftUnavailable(BadRequest): + """Gifts are not available in the current region ([stars_gifts_enabled](https://core.telegram.org/api/config#stars-gifts-enabled) is equal to false).""" + ID = "USER_GIFT_UNAVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserIdInvalid(BadRequest): + """The user id being used is invalid or not known yet. Make sure you meet the user before interacting with it""" + ID = "USER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserInvalid(BadRequest): + """The provided user is invalid""" + ID = "USER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserIsBlocked(BadRequest): + """The user blocked you""" + ID = "USER_IS_BLOCKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserIsBot(BadRequest): + """A bot cannot send messages to other bots or to itself""" + ID = "USER_IS_BOT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserKicked(BadRequest): + """This user was kicked from this chat""" + ID = "USER_KICKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserNotMutualContact(BadRequest): + """The user is not a mutual contact""" + ID = "USER_NOT_MUTUAL_CONTACT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserNotParticipant(BadRequest): + """The user is not a member of this chat""" + ID = "USER_NOT_PARTICIPANT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserPublicMissing(BadRequest): + """The accounts username is missing""" + ID = "USER_PUBLIC_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserVolumeInvalid(BadRequest): + """The specified user volume is invalid""" + ID = "USER_VOLUME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VenueIdInvalid(BadRequest): + """The specified venue ID is invalid.""" + ID = "VENUE_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VideoContentTypeInvalid(BadRequest): + """The video content type is invalid (i.e.: not streamable)""" + ID = "VIDEO_CONTENT_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VideoFileInvalid(BadRequest): + """The video file is invalid""" + ID = "VIDEO_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VideoPauseForbidden(BadRequest): + """You cannot pause the video stream.""" + ID = "VIDEO_PAUSE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VideoStopForbidden(BadRequest): + """You cannot stop the video stream.""" + ID = "VIDEO_STOP_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VideoTitleEmpty(BadRequest): + """The specified video title is empty""" + ID = "VIDEO_TITLE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VoiceMessagesForbidden(BadRequest): + """Voice messages are restricted""" + ID = "VOICE_MESSAGES_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VolumeLocNotFound(BadRequest): + """The volume location can't be found""" + ID = "VOLUME_LOC_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WallpaperFileInvalid(BadRequest): + """The provided file cannot be used as a wallpaper""" + ID = "WALLPAPER_FILE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WallpaperInvalid(BadRequest): + """The input wallpaper was not valid""" + ID = "WALLPAPER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WallpaperMimeInvalid(BadRequest): + """The wallpaper mime type is invalid""" + ID = "WALLPAPER_MIME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WallpaperNotFound(BadRequest): + """The specified wallpaper could not be found.""" + ID = "WALLPAPER_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WcConvertUrlInvalid(BadRequest): + """WC convert URL invalid""" + ID = "WC_CONVERT_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebdocumentInvalid(BadRequest): + """The web document is invalid""" + ID = "WEBDOCUMENT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebdocumentMimeInvalid(BadRequest): + """The web document mime type is invalid""" + ID = "WEBDOCUMENT_MIME_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebdocumentSizeTooBig(BadRequest): + """The web document is too big""" + ID = "WEBDOCUMENT_SIZE_TOO_BIG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebdocumentUrlEmpty(BadRequest): + """The web document URL is empty""" + ID = "WEBDOCUMENT_URL_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebdocumentUrlInvalid(BadRequest): + """The web document URL is invalid""" + ID = "WEBDOCUMENT_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpageCurlFailed(BadRequest): + """Telegram server could not fetch the provided URL""" + ID = "WEBPAGE_CURL_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpageMediaEmpty(BadRequest): + """The URL doesn't contain any valid media""" + ID = "WEBPAGE_MEDIA_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpageNotFound(BadRequest): + """Webpage not found""" + ID = "WEBPAGE_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpageUrlInvalid(BadRequest): + """Webpage url invalid""" + ID = "WEBPAGE_URL_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpushAuthInvalid(BadRequest): + """The specified web push authentication secret is invalid""" + ID = "WEBPUSH_AUTH_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpushKeyInvalid(BadRequest): + """The specified web push elliptic curve Diffie-Hellman public key is invalid""" + ID = "WEBPUSH_KEY_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WebpushTokenInvalid(BadRequest): + """The specified web push token is invalid""" + ID = "WEBPUSH_TOKEN_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class YouBlockedUser(BadRequest): + """You blocked this user""" + ID = "YOU_BLOCKED_USER" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/flood_420.py b/pyrogram/errors/exceptions/flood_420.py new file mode 100644 index 00000000..42330026 --- /dev/null +++ b/pyrogram/errors/exceptions/flood_420.py @@ -0,0 +1,60 @@ +from ..rpc_error import RPCError + + +class Flood(RPCError): + """Flood""" + CODE = 420 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class TwoFaConfirmWait(Flood): + """A wait of {value} seconds is required because this account is active and protected by a 2FA password""" + ID = "2FA_CONFIRM_WAIT_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AddressInvalid(Flood): + """The specified geopoint address is invalid.""" + ID = "ADDRESS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FloodPremiumWait(Flood): + """A wait of {value} seconds is required""" + ID = "FLOOD_PREMIUM_WAIT_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FloodTestPhoneWait(Flood): + """A wait of {value} seconds is required in the test servers""" + ID = "FLOOD_TEST_PHONE_WAIT_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FloodWait(Flood): + """A wait of {value} seconds is required""" + ID = "FLOOD_WAIT_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FrozenMethodInvalid(Flood): + """The current account is [frozen](https://core.telegram.org/api/auth#frozen-accounts), and thus cannot execute the specified action.""" + ID = "FROZEN_METHOD_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PremiumSubActiveUntil(Flood): + """A wait of {value} seconds is required""" + ID = "PREMIUM_SUB_ACTIVE_UNTIL_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SlowmodeWait(Flood): + """A wait of {value} seconds is required to send messages in this chat""" + ID = "SLOWMODE_WAIT_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StorySendFlood(Flood): + """A wait of {value} seconds is required to continue posting stories""" + ID = "STORY_SEND_FLOOD_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TakeoutInitDelay(Flood): + """You have to confirm the data export request using one of your mobile devices or wait {value} seconds""" + ID = "TAKEOUT_INIT_DELAY_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/forbidden_403.py b/pyrogram/errors/exceptions/forbidden_403.py new file mode 100644 index 00000000..9d74ddb5 --- /dev/null +++ b/pyrogram/errors/exceptions/forbidden_403.py @@ -0,0 +1,295 @@ +from ..rpc_error import RPCError + + +class Forbidden(RPCError): + """Forbidden""" + CODE = 403 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class AllowPaymentRequired(Forbidden): + """This peer charges {value} [Telegram Stars](https://core.telegram.org/api/stars) per message, but the `allow_paid_stars` was not set or its value is smaller than {value}.""" + ID = "ALLOW_PAYMENT_REQUIRED_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AnonymousReactionsDisabled(Forbidden): + """Sorry, anonymous administrators cannot leave reactions or participate in polls.""" + ID = "ANONYMOUS_REACTIONS_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotAccessForbidden(Forbidden): + """The specified method *can* be used over a [business connection](https://core.telegram.org/api/bots/connected-business-bots) for some operations, but the specified query attempted an operation that is not allowed over a business connection.""" + ID = "BOT_ACCESS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BotVerifierForbidden(Forbidden): + """This bot cannot assign [verification icons](https://core.telegram.org/api/bots/verification).""" + ID = "BOT_VERIFIER_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BroadcastForbidden(Forbidden): + """The request can't be used in channels""" + ID = "BROADCAST_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelPublicGroupNa(Forbidden): + """The channel/supergroup is not available""" + ID = "CHANNEL_PUBLIC_GROUP_NA" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatActionForbidden(Forbidden): + """You cannot execute this action.""" + ID = "CHAT_ACTION_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatAdminInviteRequired(Forbidden): + """You don't have rights to invite other users""" + ID = "CHAT_ADMIN_INVITE_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatAdminRequired(Forbidden): + """The method requires chat admin privileges""" + ID = "CHAT_ADMIN_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatForbidden(Forbidden): + """You cannot write in this chat""" + ID = "CHAT_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatGuestSendForbidden(Forbidden): + """You need to join the discussion group before commenting""" + ID = "CHAT_GUEST_SEND_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendAudiosForbidden(Forbidden): + """You can't send audio messages in this chat""" + ID = "CHAT_SEND_AUDIOS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendDocsForbidden(Forbidden): + """You can't send a documents to this chat""" + ID = "CHAT_SEND_DOCS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendGameForbidden(Forbidden): + """You can't send a game to this chat""" + ID = "CHAT_SEND_GAME_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendGifsForbidden(Forbidden): + """You can't send gifs in this chat""" + ID = "CHAT_SEND_GIFS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendInlineForbidden(Forbidden): + """You can't use inline bot to send messages in this chat""" + ID = "CHAT_SEND_INLINE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendMediaForbidden(Forbidden): + """You can't send media in this chat""" + ID = "CHAT_SEND_MEDIA_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendPhotosForbidden(Forbidden): + """You can't send photos in this chat""" + ID = "CHAT_SEND_PHOTOS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendPlainForbidden(Forbidden): + """You can't send non-media (text) messages in this chat""" + ID = "CHAT_SEND_PLAIN_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendPollForbidden(Forbidden): + """You can't send polls in this chat""" + ID = "CHAT_SEND_POLL_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendRoundvideosForbidden(Forbidden): + """You can't send round videos to this chat.""" + ID = "CHAT_SEND_ROUNDVIDEOS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendStickersForbidden(Forbidden): + """You can't send stickers in this chat""" + ID = "CHAT_SEND_STICKERS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendVideosForbidden(Forbidden): + """You can't send videos in this chat""" + ID = "CHAT_SEND_VIDEOS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendVoicesForbidden(Forbidden): + """You can't send voice recordings in this chat""" + ID = "CHAT_SEND_VOICES_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatSendWebpageForbidden(Forbidden): + """You can't send webpage previews to this chat.""" + ID = "CHAT_SEND_WEBPAGE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatTypeInvalid(Forbidden): + """The specified user type is invalid.""" + ID = "CHAT_TYPE_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatWriteForbidden(Forbidden): + """You can't write in this chat""" + ID = "CHAT_WRITE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EditBotInviteForbidden(Forbidden): + """Bots' chat invite links can't be edited""" + ID = "EDIT_BOT_INVITE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallAlreadyStarted(Forbidden): + """The groupcall has already started, you can join directly using phone.joinGroupCall""" + ID = "GROUPCALL_ALREADY_STARTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallForbidden(Forbidden): + """The group call has already ended""" + ID = "GROUPCALL_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InlineBotRequired(Forbidden): + """The action must be performed through an inline bot callback""" + ID = "INLINE_BOT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class LiveDisabled(Forbidden): + """Story is disabled server-side""" + ID = "LIVE_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageAuthorRequired(Forbidden): + """You are not the author of this message""" + ID = "MESSAGE_AUTHOR_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MessageDeleteForbidden(Forbidden): + """You don't have rights to delete messages in this chat, most likely because you are not the author of them""" + ID = "MESSAGE_DELETE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NotAllowed(Forbidden): + """Not allowed""" + ID = "NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NotEligible(Forbidden): + """You are not eligible for this action""" + ID = "NOT_ELIGIBLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParticipantJoinMissing(Forbidden): + """Trying to enable a presentation, when the user hasn't joined the Video Chat with phone.joinGroupCall""" + ID = "PARTICIPANT_JOIN_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerIdInvalid(Forbidden): + """The provided peer id is invalid.""" + ID = "PEER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PollVoteRequired(Forbidden): + """Cast a vote in the poll before calling this method""" + ID = "POLL_VOTE_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PremiumAccountRequired(Forbidden): + """This action requires a premium account""" + ID = "PREMIUM_ACCOUNT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PrivacyPremiumRequired(Forbidden): + """The user has restricted from sending messages OR This action requires a premium account""" + ID = "PRIVACY_PREMIUM_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PublicChannelMissing(Forbidden): + """You can only export group call invite links for public chats or channels""" + ID = "PUBLIC_CHANNEL_MISSING" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RightForbidden(Forbidden): + """You don't have enough rights for this action, or you tried to set one or more admin rights that can't be applied to this kind of chat (channel or supergroup)""" + ID = "RIGHT_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SensitiveChangeForbidden(Forbidden): + """Your sensitive content settings can't be changed at this time""" + ID = "SENSITIVE_CHANGE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TakeoutRequired(Forbidden): + """The method must be invoked inside a takeout session""" + ID = "TAKEOUT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserBotInvalid(Forbidden): + """This method can only be called by a bot""" + ID = "USER_BOT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserChannelsTooMuch(Forbidden): + """One of the users you tried to add is already in too many channels/supergroups""" + ID = "USER_CHANNELS_TOO_MUCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserDeleted(Forbidden): + """You can't send this secret message because the other participant deleted their account""" + ID = "USER_DELETED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserInvalid(Forbidden): + """The provided user is invalid""" + ID = "USER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserIsBlocked(Forbidden): + """The user is blocked""" + ID = "USER_IS_BLOCKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserNotMutualContact(Forbidden): + """The provided user is not a mutual contact""" + ID = "USER_NOT_MUTUAL_CONTACT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserNotParticipant(Forbidden): + """You're not a member of this supergroup/channel.""" + ID = "USER_NOT_PARTICIPANT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserPermissionDenied(Forbidden): + """The user hasn't granted or has revoked the bot's access to change their emoji status using [bots.toggleUserEmojiStatusPermission](https://core.telegram.org/method/bots.toggleUserEmojiStatusPermission).""" + ID = "USER_PERMISSION_DENIED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserPrivacyRestricted(Forbidden): + """The user's privacy settings is preventing you to perform this action""" + ID = "USER_PRIVACY_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserRestricted(Forbidden): + """You are limited/restricted. You can't perform this action""" + ID = "USER_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VoiceMessagesForbidden(Forbidden): + """This user's privacy settings forbid you from sending voice messages.""" + ID = "VOICE_MESSAGES_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class YourPrivacyRestricted(Forbidden): + """You cannot fetch the read date of this message because you have disallowed other users to do so for *your* messages; to fix, allow other users to see *your* exact last online date OR purchase a [Telegram Premium](https://core.telegram.org/api/premium) subscription.""" + ID = "YOUR_PRIVACY_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/internal_server_error_500.py b/pyrogram/errors/exceptions/internal_server_error_500.py new file mode 100644 index 00000000..3d12553b --- /dev/null +++ b/pyrogram/errors/exceptions/internal_server_error_500.py @@ -0,0 +1,285 @@ +from ..rpc_error import RPCError + + +class InternalServerError(RPCError): + """Internal Server Error""" + CODE = 500 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class ApiCallError(InternalServerError): + """API call error due to Telegram having internal problems. Please try again later""" + ID = "API_CALL_ERROR" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthKeyUnsynchronized(InternalServerError): + """Internal error, please repeat the method call.""" + ID = "AUTH_KEY_UNSYNCHRONIZED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthRestart(InternalServerError): + """User authorization has restarted""" + ID = "AUTH_RESTART" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthRestart(InternalServerError): + """Internal error (debug info {value}), please repeat the method call.""" + ID = "AUTH_RESTART_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallOccupyFailed(InternalServerError): + """The call failed because the user is already making another call""" + ID = "CALL_OCCUPY_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CdnUploadTimeout(InternalServerError): + """A server-side timeout occurred while reuploading the file to the CDN DC.""" + ID = "CDN_UPLOAD_TIMEOUT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatFromCallChanged(InternalServerError): + """""" + ID = "CHAT_FROM_CALL_CHANGED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatIdGenerateFailed(InternalServerError): + """Failure while generating the chat ID due to Telegram having internal problems. Please try again later""" + ID = "CHAT_ID_GENERATE_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatInvalid(InternalServerError): + """Invalid chat.""" + ID = "CHAT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatOccupyLocFailed(InternalServerError): + """An internal error occurred while creating the chat""" + ID = "CHAT_OCCUPY_LOC_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatOccupyUsernameFailed(InternalServerError): + """Failure to occupy chat username due to Telegram having internal problems. Please try again later""" + ID = "CHAT_OCCUPY_USERNAME_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChpCallFail(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "CHP_CALL_FAIL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptionOccupyAdminFailed(InternalServerError): + """Failed occupying memory for admin info due to Telegram having internal problems. Please try again later""" + ID = "ENCRYPTION_OCCUPY_ADMIN_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class EncryptionOccupyFailed(InternalServerError): + """Internal server error while accepting secret chat""" + ID = "ENCRYPTION_OCCUPY_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FileWriteFailed(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "FILE_WRITE_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FolderDeacAutofixAll(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "FOLDER_DEAC_AUTOFIX_ALL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupcallAddParticipantsFailed(InternalServerError): + """Failure while adding voice chat member due to Telegram having internal problems. Please try again later""" + ID = "GROUPCALL_ADD_PARTICIPANTS_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GroupedIdOccupyFailed(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "GROUPED_ID_OCCUPY_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class HistoryGetFailed(InternalServerError): + """The chat history couldn't be retrieved due to Telegram having internal problems. Please try again later""" + ID = "HISTORY_GET_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ImageEngineDown(InternalServerError): + """Image engine down due to Telegram having internal problems. Please try again later""" + ID = "IMAGE_ENGINE_DOWN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InterdcCallError(InternalServerError): + """An error occurred while Telegram was intercommunicating with DC{value}. Please try again later""" + ID = "INTERDC_X_CALL_ERROR" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InterdcCallRichError(InternalServerError): + """A rich error occurred while Telegram was intercommunicating with DC{value}. Please try again later""" + ID = "INTERDC_X_CALL_RICH_ERROR" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MemberFetchFailed(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "MEMBER_FETCH_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MemberNoLocation(InternalServerError): + """Couldn't find the member's location due to Telegram having internal problems. Please try again later""" + ID = "MEMBER_NO_LOCATION" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MemberOccupyPrimaryLocFailed(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "MEMBER_OCCUPY_PRIMARY_LOC_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MemberOccupyUsernameFailed(InternalServerError): + """Failure to occupy member username due to Telegram having internal problems. Please try again later""" + ID = "MEMBER_OCCUPY_USERNAME_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgidDecreaseRetry(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "MSGID_DECREASE_RETRY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgRangeUnsync(InternalServerError): + """Message range unsynchronized due to Telegram having internal problems. Please try again later""" + ID = "MSG_RANGE_UNSYNC" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MsgWaitFailed(InternalServerError): + """A waiting call returned an error.""" + ID = "MSG_WAIT_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class MtSendQueueTooLong(InternalServerError): + """The MTProto send queue has grown too much due to Telegram having internal problems. Please try again later""" + ID = "MT_SEND_QUEUE_TOO_LONG" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NeedChatInvalid(InternalServerError): + """The provided chat is invalid""" + ID = "NEED_CHAT_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NeedMemberInvalid(InternalServerError): + """The provided member is invalid or does not exist""" + ID = "NEED_MEMBER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NoWorkersRunning(InternalServerError): + """The Telegram server is restarting its workers. Try again later.""" + ID = "No workers running" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ParticipantCallFailed(InternalServerError): + """Failure while making call due to Telegram having internal problems. Please try again later""" + ID = "PARTICIPANT_CALL_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PersistentTimestampOutdated(InternalServerError): + """The persistent timestamp is outdated due to Telegram having internal problems. Please try again later""" + ID = "PERSISTENT_TIMESTAMP_OUTDATED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhotoCreateFailed(InternalServerError): + """The creation of the photo failed due to Telegram having internal problems. Please try again later""" + ID = "PHOTO_CREATE_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PostponedTimeout(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "POSTPONED_TIMEOUT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PtsChangeEmpty(InternalServerError): + """No PTS change""" + ID = "PTS_CHANGE_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RandomIdDuplicate(InternalServerError): + """You provided a random ID that was already used""" + ID = "RANDOM_ID_DUPLICATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RegIdGenerateFailed(InternalServerError): + """The registration id failed to generate due to Telegram having internal problems. Please try again later""" + ID = "REG_ID_GENERATE_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RpcCallFail(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "RPC_CALL_FAIL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RpcConnectFailed(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "RPC_CONNECT_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class RpcMcgetFail(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "RPC_MCGET_FAIL" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SendMediaInvalid(InternalServerError): + """The specified media is invalid.""" + ID = "SEND_MEDIA_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SignInFailed(InternalServerError): + """Failure while signing in due to Telegram having internal problems. Please try again later""" + ID = "SIGN_IN_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StorageCheckFailed(InternalServerError): + """Server storage check failed due to Telegram having internal problems. Please try again later""" + ID = "STORAGE_CHECK_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StoreInvalidScalarType(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "STORE_INVALID_SCALAR_TYPE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class Timeout(InternalServerError): + """A timeout occurred while fetching data from the worker""" + ID = "TIMEOUT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TranslateReqFailed(InternalServerError): + """Translation failed, please try again later.""" + ID = "TRANSLATE_REQ_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TranslationTimeout(InternalServerError): + """A timeout occurred while translating the specified text.""" + ID = "TRANSLATION_TIMEOUT" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UnknownMethod(InternalServerError): + """The method you tried to call cannot be called on non-CDN DCs""" + ID = "UNKNOWN_METHOD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UploadNoVolume(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "UPLOAD_NO_VOLUME" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class VolumeLocNotFound(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "VOLUME_LOC_NOT_FOUND" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WorkerBusyTooLongRetry(InternalServerError): + """Server workers are too busy right now due to Telegram having internal problems. Please try again later""" + ID = "WORKER_BUSY_TOO_LONG_RETRY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class WpIdGenerateFailed(InternalServerError): + """Telegram is having internal problems. Please try again later""" + ID = "WP_ID_GENERATE_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/not_acceptable_406.py b/pyrogram/errors/exceptions/not_acceptable_406.py new file mode 100644 index 00000000..d9c82cba --- /dev/null +++ b/pyrogram/errors/exceptions/not_acceptable_406.py @@ -0,0 +1,185 @@ +from ..rpc_error import RPCError + + +class NotAcceptable(RPCError): + """Not Acceptable""" + CODE = 406 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class AllowPaymentRequired(NotAcceptable): + """This peer only accepts [paid messages »](https://core.telegram.org/api/paid-messages): this error is only emitted for older layers without paid messages support, so the client must be updated in order to use paid messages. .""" + ID = "ALLOW_PAYMENT_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ApiGiftRestrictedUpdateApp(NotAcceptable): + """Please update the app to access the gift API.""" + ID = "API_GIFT_RESTRICTED_UPDATE_APP" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthKeyDuplicated(NotAcceptable): + """The same authorization key (session file) was used in more than one place simultaneously. You must delete your session file and log in again with your phone number or bot token""" + ID = "AUTH_KEY_DUPLICATED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BannedRightsInvalid(NotAcceptable): + """You provided some invalid flags in the banned rights.""" + ID = "BANNED_RIGHTS_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class BusinessAddressActive(NotAcceptable): + """The user is currently advertising a [Business Location](https://core.telegram.org/api/business#location), the location may only be changed (or removed) using [account.updateBusinessLocation »](https://core.telegram.org/method/account.updateBusinessLocation). .""" + ID = "BUSINESS_ADDRESS_ACTIVE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class CallProtocolCompatLayerInvalid(NotAcceptable): + """The other side of the call does not support any of the VoIP protocols supported by the local client, as specified by the `protocol.layer` and `protocol.library_versions` fields.""" + ID = "CALL_PROTOCOL_COMPAT_LAYER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelPrivate(NotAcceptable): + """The channel/supergroup is not accessible""" + ID = "CHANNEL_PRIVATE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChannelTooLarge(NotAcceptable): + """Сhannel is too large to be deleted. Contact support for removal""" + ID = "CHANNEL_TOO_LARGE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class ChatForwardsRestricted(NotAcceptable): + """You can't forward messages from a protected chat""" + ID = "CHAT_FORWARDS_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FilerefUpgradeNeeded(NotAcceptable): + """The file reference has expired and you must use a refreshed one by obtaining the original media message""" + ID = "FILEREF_UPGRADE_NEEDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FreshChangeAdminsForbidden(NotAcceptable): + """You were just elected admin, you can't add or modify other admins yet""" + ID = "FRESH_CHANGE_ADMINS_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FreshChangePhoneForbidden(NotAcceptable): + """You can't change your phone number because your session was logged-in recently""" + ID = "FRESH_CHANGE_PHONE_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class FreshResetAuthorisationForbidden(NotAcceptable): + """You can't terminate other authorized sessions because the current was logged-in recently""" + ID = "FRESH_RESET_AUTHORISATION_FORBIDDEN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class GiftcodeNotAllowed(NotAcceptable): + """Giftcode not allowed""" + ID = "GIFTCODE_NOT_ALLOWED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class InviteHashExpired(NotAcceptable): + """The chat the user tried to join has expired and is not valid anymore""" + ID = "INVITE_HASH_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PaymentUnsupported(NotAcceptable): + """A detailed description of the error will be received separately as described [here »](https://core.telegram.org/api/errors#406-not-acceptable).""" + ID = "PAYMENT_UNSUPPORTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PeerIdInvalid(NotAcceptable): + """The provided peer id is invalid.""" + ID = "PEER_ID_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneNumberInvalid(NotAcceptable): + """The phone number is invalid""" + ID = "PHONE_NUMBER_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhonePasswordFlood(NotAcceptable): + """You have tried to log-in too many times""" + ID = "PHONE_PASSWORD_FLOOD" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PrecheckoutFailed(NotAcceptable): + """Precheckout failed, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).""" + ID = "PRECHECKOUT_FAILED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PremiumCurrentlyUnavailable(NotAcceptable): + """Premium currently unavailable""" + ID = "PREMIUM_CURRENTLY_UNAVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PreviousChatImportActiveWaitMin(NotAcceptable): + """Similar to a flood wait, must wait {value} minutes""" + ID = "PREVIOUS_CHAT_IMPORT_ACTIVE_WAIT_XMIN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PrivacyPremiumRequired(NotAcceptable): + """You need a [Telegram Premium subscription](https://core.telegram.org/api/premium) to send a message to this user.""" + ID = "PRIVACY_PREMIUM_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SendCodeUnavailable(NotAcceptable): + """Returned when all available options for this type of number were already used (e.g. flash-call, then SMS, then this error might be returned to trigger a second resend)""" + ID = "SEND_CODE_UNAVAILABLE" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StargiftExportInProgress(NotAcceptable): + """A gift export is in progress, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).""" + ID = "STARGIFT_EXPORT_IN_PROGRESS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StarsFormAmountMismatch(NotAcceptable): + """The form amount has changed, please fetch the new form using [payments.getPaymentForm](https://core.telegram.org/method/payments.getPaymentForm) and restart the process.""" + ID = "STARS_FORM_AMOUNT_MISMATCH" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickersetInvalid(NotAcceptable): + """The sticker set is invalid""" + ID = "STICKERSET_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StickersetOwnerAnonymous(NotAcceptable): + """This sticker set can't be used as the group's sticker set because it was created by one of its anonymous admins""" + ID = "STICKERSET_OWNER_ANONYMOUS" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicClosed(NotAcceptable): + """This topic was closed, you can't send messages to it anymore.""" + ID = "TOPIC_CLOSED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TopicDeleted(NotAcceptable): + """The specified topic was deleted.""" + ID = "TOPIC_DELETED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class TranslationsDisabled(NotAcceptable): + """Translations are unavailable, a detailed and localized description for the error will be emitted via an [updateServiceNotification as specified here »](https://core.telegram.org/api/errors#406-not-acceptable).""" + ID = "TRANSLATIONS_DISABLED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UpdateAppToLogin(NotAcceptable): + """Update app to login""" + ID = "UPDATE_APP_TO_LOGIN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserpicPrivacyRequired(NotAcceptable): + """You need to disable privacy settings for your profile picture in order to make your geolocation public""" + ID = "USERPIC_PRIVACY_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserpicUploadRequired(NotAcceptable): + """You must have a profile picture to publish your geolocation""" + ID = "USERPIC_UPLOAD_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserRestricted(NotAcceptable): + """You are limited/restricted. You can't perform this action""" + ID = "USER_RESTRICTED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/see_other_303.py b/pyrogram/errors/exceptions/see_other_303.py new file mode 100644 index 00000000..b775292e --- /dev/null +++ b/pyrogram/errors/exceptions/see_other_303.py @@ -0,0 +1,35 @@ +from ..rpc_error import RPCError + + +class SeeOther(RPCError): + """See Other""" + CODE = 303 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class FileMigrate(SeeOther): + """The file to be accessed is currently stored in DC{value}""" + ID = "FILE_MIGRATE_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class NetworkMigrate(SeeOther): + """The source IP address is associated with DC{value} (for registration)""" + ID = "NETWORK_MIGRATE_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class PhoneMigrate(SeeOther): + """The phone number a user is trying to use for authorization is associated with DC{value}""" + ID = "PHONE_MIGRATE_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class StatsMigrate(SeeOther): + """The statistics of the group/channel are stored in DC{value}""" + ID = "STATS_MIGRATE_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserMigrate(SeeOther): + """The user whose identity is being used to execute queries is associated with DC{value} (for registration)""" + ID = "USER_MIGRATE_X" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/service_unavailable_503.py b/pyrogram/errors/exceptions/service_unavailable_503.py new file mode 100644 index 00000000..f1badad7 --- /dev/null +++ b/pyrogram/errors/exceptions/service_unavailable_503.py @@ -0,0 +1,25 @@ +from ..rpc_error import RPCError + + +class ServiceUnavailable(RPCError): + """Service Unavailable""" + CODE = 503 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class ApiCallError(ServiceUnavailable): + """Telegram is having internal problems. Please try again later.""" + ID = "ApiCallError" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class Timedout(ServiceUnavailable): + """Telegram is having internal problems. Please try again later.""" + ID = "Timedout" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class Timeout(ServiceUnavailable): + """Telegram is having internal problems. Please try again later.""" + ID = "Timeout" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/errors/exceptions/unauthorized_401.py b/pyrogram/errors/exceptions/unauthorized_401.py new file mode 100644 index 00000000..7fdd985b --- /dev/null +++ b/pyrogram/errors/exceptions/unauthorized_401.py @@ -0,0 +1,55 @@ +from ..rpc_error import RPCError + + +class Unauthorized(RPCError): + """Unauthorized""" + CODE = 401 + """``int``: RPC Error Code""" + NAME = __doc__ + + +class ActiveUserRequired(Unauthorized): + """The method is only available to already activated users""" + ID = "ACTIVE_USER_REQUIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthKeyInvalid(Unauthorized): + """The key is invalid""" + ID = "AUTH_KEY_INVALID" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthKeyPermEmpty(Unauthorized): + """The method is unavailable for temporary authorization key, not bound to permanent""" + ID = "AUTH_KEY_PERM_EMPTY" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class AuthKeyUnregistered(Unauthorized): + """The key is not registered in the system. Delete your session file and login again""" + ID = "AUTH_KEY_UNREGISTERED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SessionExpired(Unauthorized): + """The authorization has expired""" + ID = "SESSION_EXPIRED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SessionPasswordNeeded(Unauthorized): + """The two-step verification is enabled and a password is required""" + ID = "SESSION_PASSWORD_NEEDED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class SessionRevoked(Unauthorized): + """The authorization has been invalidated, because of the user terminating all sessions""" + ID = "SESSION_REVOKED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserDeactivated(Unauthorized): + """The user has been deleted/deactivated""" + ID = "USER_DEACTIVATED" + """``str``: RPC Error ID""" + MESSAGE = __doc__ +class UserDeactivatedBan(Unauthorized): + """The user has been deleted/deactivated""" + ID = "USER_DEACTIVATED_BAN" + """``str``: RPC Error ID""" + MESSAGE = __doc__ diff --git a/pyrogram/filters.py b/pyrogram/filters.py index 1888f100..76fea466 100644 --- a/pyrogram/filters.py +++ b/pyrogram/filters.py @@ -917,8 +917,10 @@ async def __call__(self, _, message: Message | Story): class topic(Filter, set): """Filter messages coming from one or more topics. + You can use `set bound methods `_ to manipulate the topics container. + Parameters: topics (``int`` | ``list``): Pass one or more topic ids to filter messages in specific topics. diff --git a/pyrogram/methods/business/create_invoice_link.py b/pyrogram/methods/business/create_invoice_link.py index 6bbc0503..67caa63e 100644 --- a/pyrogram/methods/business/create_invoice_link.py +++ b/pyrogram/methods/business/create_invoice_link.py @@ -140,7 +140,7 @@ async def create_invoice_link( payload=payload.encode() if isinstance(payload, str) else payload, provider=provider_token, provider_data=raw.types.DataJSON( - data=provider_data if provider_data else "{}", + data=provider_data or "{}", ), start_param=start_parameter, ), diff --git a/pyrogram/methods/business/send_invoice.py b/pyrogram/methods/business/send_invoice.py index 68a46ebf..84218bef 100644 --- a/pyrogram/methods/business/send_invoice.py +++ b/pyrogram/methods/business/send_invoice.py @@ -186,7 +186,7 @@ async def send_invoice( payload=encoded_payload, provider=provider, provider_data=raw.types.DataJSON( - data=provider_data if provider_data else "{}", + data=provider_data or "{}", ), photo=raw.types.InputWebDocument( url=photo_url, diff --git a/pyrogram/methods/messages/get_available_effects.py b/pyrogram/methods/messages/get_available_effects.py index b13ee459..00aa5b1e 100644 --- a/pyrogram/methods/messages/get_available_effects.py +++ b/pyrogram/methods/messages/get_available_effects.py @@ -34,7 +34,7 @@ async def get_available_effects( await types.AvailableEffect._parse( self, effect, - documents.get(effect.effect_sticker_id, None), + documents.get(effect.effect_sticker_id), ) for effect in r.effects ], diff --git a/pyrogram/methods/utilities/__init__.py b/pyrogram/methods/utilities/__init__.py index ea49b390..6ec41bb2 100644 --- a/pyrogram/methods/utilities/__init__.py +++ b/pyrogram/methods/utilities/__init__.py @@ -5,7 +5,6 @@ from .remove_handler import RemoveHandler from .restart import Restart from .run import Run -from .run_sync import RunSync from .start import Start from .stop import Stop from .stop_transmission import StopTransmissionError @@ -17,7 +16,6 @@ class Utilities( RemoveHandler, Restart, Run, - RunSync, Start, Stop, StopTransmissionError, diff --git a/pyrogram/methods/utilities/run.py b/pyrogram/methods/utilities/run.py index d2e04400..ffb6cd77 100644 --- a/pyrogram/methods/utilities/run.py +++ b/pyrogram/methods/utilities/run.py @@ -1,7 +1,6 @@ from __future__ import annotations import asyncio -import inspect from typing import TYPE_CHECKING from pyrogram.methods.utilities.idle import idle @@ -59,11 +58,7 @@ async def main(): if coroutine is not None: run(coroutine) - elif inspect.iscoroutinefunction(self.start): + else: run(self.start()) run(idle()) run(self.stop()) - else: - self.start() - run(idle()) - self.stop() diff --git a/pyrogram/methods/utilities/run_sync.py b/pyrogram/methods/utilities/run_sync.py deleted file mode 100644 index 331ff068..00000000 --- a/pyrogram/methods/utilities/run_sync.py +++ /dev/null @@ -1,36 +0,0 @@ -from __future__ import annotations - -from typing import TYPE_CHECKING, Any, TypeVar - -from pyrogram import utils - -if TYPE_CHECKING: - from collections.abc import Callable - - -class RunSync: - Result = TypeVar("Result") - - async def run_sync( - self, - func: Callable[..., Result], - *args: Any, - **kwargs: Any, - ) -> Result: - """Runs the given sync function (optionally with arguments) on a separate thread. - - Parameters: - func (``Callable``): - Sync function to run. - - \\*args (``any``, *optional*): - Function argument. - - \\*\\*kwargs (``any``, *optional*): - Function extras arguments. - - Returns: - ``any``: The function result. - """ - - return await utils.run_sync(func, *args, **kwargs) diff --git a/pyrogram/parser/parser.py b/pyrogram/parser/parser.py index 174601f1..2ca0bbc2 100644 --- a/pyrogram/parser/parser.py +++ b/pyrogram/parser/parser.py @@ -14,7 +14,7 @@ def __init__(self, client: pyrogram.Client | None) -> None: self.markdown = Markdown(client) async def parse(self, text: str, mode: enums.ParseMode | None = None): - text = str(text if text else "").strip() + text = str(text or "").strip() if mode is None: mode = self.client.parse_mode if self.client else enums.ParseMode.DEFAULT diff --git a/pyrogram/parser/utils.py b/pyrogram/parser/utils.py index 185e64d2..2041a21f 100644 --- a/pyrogram/parser/utils.py +++ b/pyrogram/parser/utils.py @@ -10,8 +10,9 @@ def add_surrogates(text): # Replace each SMP code point with a surrogate pair return SMP_RE.sub( - lambda match: # Split SMP in two surrogates - "".join(chr(i) for i in unpack(" None: def read(data: BytesIO, *args: Any) -> GzipPacked: # noqa: ARG004 # Return the Object itself instead of a GzipPacked wrapping it return cast( - "GzipPacked", TLObject.read(BytesIO(decompress(Bytes.read(data)))) + "GzipPacked", + TLObject.read(BytesIO(decompress(Bytes.read(data)))), ) def write(self, *args: Any) -> bytes: # noqa: ARG002 diff --git a/pyrogram/raw/core/primitives/string.py b/pyrogram/raw/core/primitives/string.py index 822f8d8b..eb16bd43 100644 --- a/pyrogram/raw/core/primitives/string.py +++ b/pyrogram/raw/core/primitives/string.py @@ -12,7 +12,7 @@ class String(Bytes): @classmethod def read(cls, data: BytesIO, *args) -> str: # noqa: ARG003 return cast("bytes", super(String, String).read(data)).decode( - errors="replace" + errors="replace", ) def __new__(cls, value: str) -> bytes: diff --git a/pyrogram/raw/functions/__init__.py b/pyrogram/raw/functions/__init__.py new file mode 100644 index 00000000..d6a73148 --- /dev/null +++ b/pyrogram/raw/functions/__init__.py @@ -0,0 +1,75 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .req_pq import ReqPq +from .req_pq_multi import ReqPqMulti +from .req_dh_params import ReqDHParams +from .set_client_dh_params import SetClientDHParams +from .destroy_auth_key import DestroyAuthKey +from .rpc_drop_answer import RpcDropAnswer +from .get_future_salts import GetFutureSalts +from .ping import Ping +from .ping_delay_disconnect import PingDelayDisconnect +from .destroy_session import DestroySession +from .invoke_after_msg import InvokeAfterMsg +from .invoke_after_msgs import InvokeAfterMsgs +from .init_connection import InitConnection +from .invoke_with_layer import InvokeWithLayer +from .invoke_without_updates import InvokeWithoutUpdates +from .invoke_with_messages_range import InvokeWithMessagesRange +from .invoke_with_takeout import InvokeWithTakeout +from .invoke_with_business_connection import InvokeWithBusinessConnection +from .invoke_with_google_play_integrity import InvokeWithGooglePlayIntegrity +from .invoke_with_apns_secret import InvokeWithApnsSecret +from .invoke_with_re_captcha import InvokeWithReCaptcha +from . import contest, auth, account, users, contacts, messages, updates, photos, upload, help, channels, bots, payments, stickers, phone, langpack, folders, stats, chatlists, stories, premium, smsjobs, fragment + +__all__ = [ + "ReqPq", + "ReqPqMulti", + "ReqDHParams", + "SetClientDHParams", + "DestroyAuthKey", + "RpcDropAnswer", + "GetFutureSalts", + "Ping", + "PingDelayDisconnect", + "DestroySession", + "InvokeAfterMsg", + "InvokeAfterMsgs", + "InitConnection", + "InvokeWithLayer", + "InvokeWithoutUpdates", + "InvokeWithMessagesRange", + "InvokeWithTakeout", + "InvokeWithBusinessConnection", + "InvokeWithGooglePlayIntegrity", + "InvokeWithApnsSecret", + "InvokeWithReCaptcha", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/account/__init__.py b/pyrogram/raw/functions/account/__init__.py new file mode 100644 index 00000000..27a20def --- /dev/null +++ b/pyrogram/raw/functions/account/__init__.py @@ -0,0 +1,279 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .register_device import RegisterDevice +from .unregister_device import UnregisterDevice +from .update_notify_settings import UpdateNotifySettings +from .get_notify_settings import GetNotifySettings +from .reset_notify_settings import ResetNotifySettings +from .update_profile import UpdateProfile +from .update_status import UpdateStatus +from .get_wall_papers import GetWallPapers +from .report_peer import ReportPeer +from .check_username import CheckUsername +from .update_username import UpdateUsername +from .get_privacy import GetPrivacy +from .set_privacy import SetPrivacy +from .delete_account import DeleteAccount +from .get_account_ttl import GetAccountTTL +from .set_account_ttl import SetAccountTTL +from .send_change_phone_code import SendChangePhoneCode +from .change_phone import ChangePhone +from .update_device_locked import UpdateDeviceLocked +from .get_authorizations import GetAuthorizations +from .reset_authorization import ResetAuthorization +from .get_password import GetPassword +from .get_password_settings import GetPasswordSettings +from .update_password_settings import UpdatePasswordSettings +from .send_confirm_phone_code import SendConfirmPhoneCode +from .confirm_phone import ConfirmPhone +from .get_tmp_password import GetTmpPassword +from .get_web_authorizations import GetWebAuthorizations +from .reset_web_authorization import ResetWebAuthorization +from .reset_web_authorizations import ResetWebAuthorizations +from .get_all_secure_values import GetAllSecureValues +from .get_secure_value import GetSecureValue +from .save_secure_value import SaveSecureValue +from .delete_secure_value import DeleteSecureValue +from .get_authorization_form import GetAuthorizationForm +from .accept_authorization import AcceptAuthorization +from .send_verify_phone_code import SendVerifyPhoneCode +from .verify_phone import VerifyPhone +from .send_verify_email_code import SendVerifyEmailCode +from .verify_email import VerifyEmail +from .init_takeout_session import InitTakeoutSession +from .finish_takeout_session import FinishTakeoutSession +from .confirm_password_email import ConfirmPasswordEmail +from .resend_password_email import ResendPasswordEmail +from .cancel_password_email import CancelPasswordEmail +from .get_contact_sign_up_notification import GetContactSignUpNotification +from .set_contact_sign_up_notification import SetContactSignUpNotification +from .get_notify_exceptions import GetNotifyExceptions +from .get_wall_paper import GetWallPaper +from .upload_wall_paper import UploadWallPaper +from .save_wall_paper import SaveWallPaper +from .install_wall_paper import InstallWallPaper +from .reset_wall_papers import ResetWallPapers +from .get_auto_download_settings import GetAutoDownloadSettings +from .save_auto_download_settings import SaveAutoDownloadSettings +from .upload_theme import UploadTheme +from .create_theme import CreateTheme +from .update_theme import UpdateTheme +from .save_theme import SaveTheme +from .install_theme import InstallTheme +from .get_theme import GetTheme +from .get_themes import GetThemes +from .set_content_settings import SetContentSettings +from .get_content_settings import GetContentSettings +from .get_multi_wall_papers import GetMultiWallPapers +from .get_global_privacy_settings import GetGlobalPrivacySettings +from .set_global_privacy_settings import SetGlobalPrivacySettings +from .report_profile_photo import ReportProfilePhoto +from .reset_password import ResetPassword +from .decline_password_reset import DeclinePasswordReset +from .get_chat_themes import GetChatThemes +from .set_authorization_ttl import SetAuthorizationTTL +from .change_authorization_settings import ChangeAuthorizationSettings +from .get_saved_ringtones import GetSavedRingtones +from .save_ringtone import SaveRingtone +from .upload_ringtone import UploadRingtone +from .update_emoji_status import UpdateEmojiStatus +from .get_default_emoji_statuses import GetDefaultEmojiStatuses +from .get_recent_emoji_statuses import GetRecentEmojiStatuses +from .clear_recent_emoji_statuses import ClearRecentEmojiStatuses +from .reorder_usernames import ReorderUsernames +from .toggle_username import ToggleUsername +from .get_default_profile_photo_emojis import GetDefaultProfilePhotoEmojis +from .get_default_group_photo_emojis import GetDefaultGroupPhotoEmojis +from .get_auto_save_settings import GetAutoSaveSettings +from .save_auto_save_settings import SaveAutoSaveSettings +from .delete_auto_save_exceptions import DeleteAutoSaveExceptions +from .invalidate_sign_in_codes import InvalidateSignInCodes +from .update_color import UpdateColor +from .get_default_background_emojis import GetDefaultBackgroundEmojis +from .get_channel_default_emoji_statuses import GetChannelDefaultEmojiStatuses +from .get_channel_restricted_status_emojis import GetChannelRestrictedStatusEmojis +from .update_business_work_hours import UpdateBusinessWorkHours +from .update_business_location import UpdateBusinessLocation +from .update_business_greeting_message import UpdateBusinessGreetingMessage +from .update_business_away_message import UpdateBusinessAwayMessage +from .update_connected_bot import UpdateConnectedBot +from .get_connected_bots import GetConnectedBots +from .get_bot_business_connection import GetBotBusinessConnection +from .update_business_intro import UpdateBusinessIntro +from .toggle_connected_bot_paused import ToggleConnectedBotPaused +from .disable_peer_connected_bot import DisablePeerConnectedBot +from .update_birthday import UpdateBirthday +from .create_business_chat_link import CreateBusinessChatLink +from .edit_business_chat_link import EditBusinessChatLink +from .delete_business_chat_link import DeleteBusinessChatLink +from .get_business_chat_links import GetBusinessChatLinks +from .resolve_business_chat_link import ResolveBusinessChatLink +from .update_personal_channel import UpdatePersonalChannel +from .toggle_sponsored_messages import ToggleSponsoredMessages +from .get_reactions_notify_settings import GetReactionsNotifySettings +from .set_reactions_notify_settings import SetReactionsNotifySettings +from .get_collectible_emoji_statuses import GetCollectibleEmojiStatuses +from .get_paid_messages_revenue import GetPaidMessagesRevenue +from .toggle_no_paid_messages_exception import ToggleNoPaidMessagesException +from .set_main_profile_tab import SetMainProfileTab +from .save_music import SaveMusic +from .get_saved_music_ids import GetSavedMusicIds +from .get_unique_gift_chat_themes import GetUniqueGiftChatThemes +from .init_passkey_registration import InitPasskeyRegistration +from .register_passkey import RegisterPasskey +from .get_passkeys import GetPasskeys +from .delete_passkey import DeletePasskey + + +__all__ = [ + "RegisterDevice", + "UnregisterDevice", + "UpdateNotifySettings", + "GetNotifySettings", + "ResetNotifySettings", + "UpdateProfile", + "UpdateStatus", + "GetWallPapers", + "ReportPeer", + "CheckUsername", + "UpdateUsername", + "GetPrivacy", + "SetPrivacy", + "DeleteAccount", + "GetAccountTTL", + "SetAccountTTL", + "SendChangePhoneCode", + "ChangePhone", + "UpdateDeviceLocked", + "GetAuthorizations", + "ResetAuthorization", + "GetPassword", + "GetPasswordSettings", + "UpdatePasswordSettings", + "SendConfirmPhoneCode", + "ConfirmPhone", + "GetTmpPassword", + "GetWebAuthorizations", + "ResetWebAuthorization", + "ResetWebAuthorizations", + "GetAllSecureValues", + "GetSecureValue", + "SaveSecureValue", + "DeleteSecureValue", + "GetAuthorizationForm", + "AcceptAuthorization", + "SendVerifyPhoneCode", + "VerifyPhone", + "SendVerifyEmailCode", + "VerifyEmail", + "InitTakeoutSession", + "FinishTakeoutSession", + "ConfirmPasswordEmail", + "ResendPasswordEmail", + "CancelPasswordEmail", + "GetContactSignUpNotification", + "SetContactSignUpNotification", + "GetNotifyExceptions", + "GetWallPaper", + "UploadWallPaper", + "SaveWallPaper", + "InstallWallPaper", + "ResetWallPapers", + "GetAutoDownloadSettings", + "SaveAutoDownloadSettings", + "UploadTheme", + "CreateTheme", + "UpdateTheme", + "SaveTheme", + "InstallTheme", + "GetTheme", + "GetThemes", + "SetContentSettings", + "GetContentSettings", + "GetMultiWallPapers", + "GetGlobalPrivacySettings", + "SetGlobalPrivacySettings", + "ReportProfilePhoto", + "ResetPassword", + "DeclinePasswordReset", + "GetChatThemes", + "SetAuthorizationTTL", + "ChangeAuthorizationSettings", + "GetSavedRingtones", + "SaveRingtone", + "UploadRingtone", + "UpdateEmojiStatus", + "GetDefaultEmojiStatuses", + "GetRecentEmojiStatuses", + "ClearRecentEmojiStatuses", + "ReorderUsernames", + "ToggleUsername", + "GetDefaultProfilePhotoEmojis", + "GetDefaultGroupPhotoEmojis", + "GetAutoSaveSettings", + "SaveAutoSaveSettings", + "DeleteAutoSaveExceptions", + "InvalidateSignInCodes", + "UpdateColor", + "GetDefaultBackgroundEmojis", + "GetChannelDefaultEmojiStatuses", + "GetChannelRestrictedStatusEmojis", + "UpdateBusinessWorkHours", + "UpdateBusinessLocation", + "UpdateBusinessGreetingMessage", + "UpdateBusinessAwayMessage", + "UpdateConnectedBot", + "GetConnectedBots", + "GetBotBusinessConnection", + "UpdateBusinessIntro", + "ToggleConnectedBotPaused", + "DisablePeerConnectedBot", + "UpdateBirthday", + "CreateBusinessChatLink", + "EditBusinessChatLink", + "DeleteBusinessChatLink", + "GetBusinessChatLinks", + "ResolveBusinessChatLink", + "UpdatePersonalChannel", + "ToggleSponsoredMessages", + "GetReactionsNotifySettings", + "SetReactionsNotifySettings", + "GetCollectibleEmojiStatuses", + "GetPaidMessagesRevenue", + "ToggleNoPaidMessagesException", + "SetMainProfileTab", + "SaveMusic", + "GetSavedMusicIds", + "GetUniqueGiftChatThemes", + "InitPasskeyRegistration", + "RegisterPasskey", + "GetPasskeys", + "DeletePasskey", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/account/accept_authorization.py b/pyrogram/raw/functions/account/accept_authorization.py new file mode 100644 index 00000000..57ad5c46 --- /dev/null +++ b/pyrogram/raw/functions/account/accept_authorization.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptAuthorization(TLObject): # type: ignore + """Sends a Telegram Passport authorization form, effectively sharing data with the service + + + Details: + - Layer: ``224`` + - ID: ``F3ED4C73`` + + Parameters: + bot_id (``int`` ``64-bit``): + Bot ID + + scope (``str``): + Telegram Passport element types requested by the service + + public_key (``str``): + Service's public key + + value_hashes (List of :obj:`SecureValueHash `): + Types of values sent and their hashes + + credentials (:obj:`SecureCredentialsEncrypted `): + Encrypted values + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot_id", "scope", "public_key", "value_hashes", "credentials"] + + ID = 0xf3ed4c73 + QUALNAME = "functions.account.AcceptAuthorization" + + def __init__(self, *, bot_id: int, scope: str, public_key: str, value_hashes: List["raw.base.SecureValueHash"], credentials: "raw.base.SecureCredentialsEncrypted") -> None: + self.bot_id = bot_id # long + self.scope = scope # string + self.public_key = public_key # string + self.value_hashes = value_hashes # Vector + self.credentials = credentials # SecureCredentialsEncrypted + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptAuthorization": + # No flags + + bot_id = Long.read(b) + + scope = String.read(b) + + public_key = String.read(b) + + value_hashes = TLObject.read(b) + + credentials = TLObject.read(b) + + return AcceptAuthorization(bot_id=bot_id, scope=scope, public_key=public_key, value_hashes=value_hashes, credentials=credentials) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.bot_id)) + + b.write(String(self.scope)) + + b.write(String(self.public_key)) + + b.write(Vector(self.value_hashes)) + + b.write(self.credentials.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/cancel_password_email.py b/pyrogram/raw/functions/account/cancel_password_email.py new file mode 100644 index 00000000..e5389a19 --- /dev/null +++ b/pyrogram/raw/functions/account/cancel_password_email.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CancelPasswordEmail(TLObject): # type: ignore + """Cancel the code that was sent to verify an email to use as 2FA recovery method. + + + Details: + - Layer: ``224`` + - ID: ``C1CBD5B6`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0xc1cbd5b6 + QUALNAME = "functions.account.CancelPasswordEmail" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CancelPasswordEmail": + # No flags + + return CancelPasswordEmail() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/change_authorization_settings.py b/pyrogram/raw/functions/account/change_authorization_settings.py new file mode 100644 index 00000000..bdfc5fad --- /dev/null +++ b/pyrogram/raw/functions/account/change_authorization_settings.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChangeAuthorizationSettings(TLObject): # type: ignore + """Change settings related to a session. + + + Details: + - Layer: ``224`` + - ID: ``40F48462`` + + Parameters: + hash (``int`` ``64-bit``): + Session ID from the authorization constructor, fetchable using account.getAuthorizations + + confirmed (``bool``, *optional*): + If set, confirms a newly logged in session ». + + encrypted_requests_disabled (``bool``, *optional*): + Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed + + call_requests_disabled (``bool``, *optional*): + Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["hash", "confirmed", "encrypted_requests_disabled", "call_requests_disabled"] + + ID = 0x40f48462 + QUALNAME = "functions.account.ChangeAuthorizationSettings" + + def __init__(self, *, hash: int, confirmed: Optional[bool] = None, encrypted_requests_disabled: Optional[bool] = None, call_requests_disabled: Optional[bool] = None) -> None: + self.hash = hash # long + self.confirmed = confirmed # flags.3?true + self.encrypted_requests_disabled = encrypted_requests_disabled # flags.0?Bool + self.call_requests_disabled = call_requests_disabled # flags.1?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChangeAuthorizationSettings": + + flags = Int.read(b) + + confirmed = True if flags & (1 << 3) else False + hash = Long.read(b) + + encrypted_requests_disabled = Bool.read(b) if flags & (1 << 0) else None + call_requests_disabled = Bool.read(b) if flags & (1 << 1) else None + return ChangeAuthorizationSettings(hash=hash, confirmed=confirmed, encrypted_requests_disabled=encrypted_requests_disabled, call_requests_disabled=call_requests_disabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.confirmed else 0 + flags |= (1 << 0) if self.encrypted_requests_disabled is not None else 0 + flags |= (1 << 1) if self.call_requests_disabled is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.hash)) + + if self.encrypted_requests_disabled is not None: + b.write(Bool(self.encrypted_requests_disabled)) + + if self.call_requests_disabled is not None: + b.write(Bool(self.call_requests_disabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/change_phone.py b/pyrogram/raw/functions/account/change_phone.py new file mode 100644 index 00000000..3cab0657 --- /dev/null +++ b/pyrogram/raw/functions/account/change_phone.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChangePhone(TLObject): # type: ignore + """Change the phone number of the current account + + + Details: + - Layer: ``224`` + - ID: ``70C32EDB`` + + Parameters: + phone_number (``str``): + New phone number + + phone_code_hash (``str``): + Phone code hash received when calling account.sendChangePhoneCode + + phone_code (``str``): + Phone code received when calling account.sendChangePhoneCode + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "phone_code"] + + ID = 0x70c32edb + QUALNAME = "functions.account.ChangePhone" + + def __init__(self, *, phone_number: str, phone_code_hash: str, phone_code: str) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.phone_code = phone_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChangePhone": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + phone_code = String.read(b) + + return ChangePhone(phone_number=phone_number, phone_code_hash=phone_code_hash, phone_code=phone_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + b.write(String(self.phone_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/check_username.py b/pyrogram/raw/functions/account/check_username.py new file mode 100644 index 00000000..154a9355 --- /dev/null +++ b/pyrogram/raw/functions/account/check_username.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckUsername(TLObject): # type: ignore + """Validates a username and checks availability. + + + Details: + - Layer: ``224`` + - ID: ``2714D86C`` + + Parameters: + username (``str``): + usernameAccepted characters: A-z (case-insensitive), 0-9 and underscores.Length: 5-32 characters. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["username"] + + ID = 0x2714d86c + QUALNAME = "functions.account.CheckUsername" + + def __init__(self, *, username: str) -> None: + self.username = username # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckUsername": + # No flags + + username = String.read(b) + + return CheckUsername(username=username) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.username)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/clear_recent_emoji_statuses.py b/pyrogram/raw/functions/account/clear_recent_emoji_statuses.py new file mode 100644 index 00000000..30976bb1 --- /dev/null +++ b/pyrogram/raw/functions/account/clear_recent_emoji_statuses.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClearRecentEmojiStatuses(TLObject): # type: ignore + """Clears list of recently used emoji statuses + + + Details: + - Layer: ``224`` + - ID: ``18201AAE`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x18201aae + QUALNAME = "functions.account.ClearRecentEmojiStatuses" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClearRecentEmojiStatuses": + # No flags + + return ClearRecentEmojiStatuses() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/confirm_password_email.py b/pyrogram/raw/functions/account/confirm_password_email.py new file mode 100644 index 00000000..ba18cd30 --- /dev/null +++ b/pyrogram/raw/functions/account/confirm_password_email.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConfirmPasswordEmail(TLObject): # type: ignore + """Verify an email to use as 2FA recovery method. + + + Details: + - Layer: ``224`` + - ID: ``8FDF1920`` + + Parameters: + code (``str``): + The phone code that was received after setting a recovery email + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["code"] + + ID = 0x8fdf1920 + QUALNAME = "functions.account.ConfirmPasswordEmail" + + def __init__(self, *, code: str) -> None: + self.code = code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConfirmPasswordEmail": + # No flags + + code = String.read(b) + + return ConfirmPasswordEmail(code=code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/confirm_phone.py b/pyrogram/raw/functions/account/confirm_phone.py new file mode 100644 index 00000000..7526e0f2 --- /dev/null +++ b/pyrogram/raw/functions/account/confirm_phone.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConfirmPhone(TLObject): # type: ignore + """Confirm a phone number to cancel account deletion, for more info click here » + + + Details: + - Layer: ``224`` + - ID: ``5F2178C3`` + + Parameters: + phone_code_hash (``str``): + Phone code hash, for more info click here » + + phone_code (``str``): + SMS code, for more info click here » + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["phone_code_hash", "phone_code"] + + ID = 0x5f2178c3 + QUALNAME = "functions.account.ConfirmPhone" + + def __init__(self, *, phone_code_hash: str, phone_code: str) -> None: + self.phone_code_hash = phone_code_hash # string + self.phone_code = phone_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConfirmPhone": + # No flags + + phone_code_hash = String.read(b) + + phone_code = String.read(b) + + return ConfirmPhone(phone_code_hash=phone_code_hash, phone_code=phone_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_code_hash)) + + b.write(String(self.phone_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/create_business_chat_link.py b/pyrogram/raw/functions/account/create_business_chat_link.py new file mode 100644 index 00000000..ed616a4e --- /dev/null +++ b/pyrogram/raw/functions/account/create_business_chat_link.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateBusinessChatLink(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``8851E68E`` + + Parameters: + link (:obj:`InputBusinessChatLink `): + + + Returns: + :obj:`BusinessChatLink ` + """ + + __slots__: List[str] = ["link"] + + ID = 0x8851e68e + QUALNAME = "functions.account.CreateBusinessChatLink" + + def __init__(self, *, link: "raw.base.InputBusinessChatLink") -> None: + self.link = link # InputBusinessChatLink + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateBusinessChatLink": + # No flags + + link = TLObject.read(b) + + return CreateBusinessChatLink(link=link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.link.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/create_theme.py b/pyrogram/raw/functions/account/create_theme.py new file mode 100644 index 00000000..f94952c5 --- /dev/null +++ b/pyrogram/raw/functions/account/create_theme.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateTheme(TLObject): # type: ignore + """Create a theme + + + Details: + - Layer: ``224`` + - ID: ``652E4400`` + + Parameters: + slug (``str``): + Unique theme ID used to generate theme deep links, can be empty to autogenerate a random ID. + + title (``str``): + Theme name + + document (:obj:`InputDocument `, *optional*): + Theme file + + settings (List of :obj:`InputThemeSettings `, *optional*): + Theme settings, multiple values can be provided for the different base themes (day/night mode, etc). + + Returns: + :obj:`Theme ` + """ + + __slots__: List[str] = ["slug", "title", "document", "settings"] + + ID = 0x652e4400 + QUALNAME = "functions.account.CreateTheme" + + def __init__(self, *, slug: str, title: str, document: "raw.base.InputDocument" = None, settings: Optional[List["raw.base.InputThemeSettings"]] = None) -> None: + self.slug = slug # string + self.title = title # string + self.document = document # flags.2?InputDocument + self.settings = settings # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateTheme": + + flags = Int.read(b) + + slug = String.read(b) + + title = String.read(b) + + document = TLObject.read(b) if flags & (1 << 2) else None + + settings = TLObject.read(b) if flags & (1 << 3) else [] + + return CreateTheme(slug=slug, title=title, document=document, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.document is not None else 0 + flags |= (1 << 3) if self.settings else 0 + b.write(Int(flags)) + + b.write(String(self.slug)) + + b.write(String(self.title)) + + if self.document is not None: + b.write(self.document.write()) + + if self.settings is not None: + b.write(Vector(self.settings)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/decline_password_reset.py b/pyrogram/raw/functions/account/decline_password_reset.py new file mode 100644 index 00000000..a4580a10 --- /dev/null +++ b/pyrogram/raw/functions/account/decline_password_reset.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeclinePasswordReset(TLObject): # type: ignore + """Abort a pending 2FA password reset, see here for more info » + + + Details: + - Layer: ``224`` + - ID: ``4C9409F6`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x4c9409f6 + QUALNAME = "functions.account.DeclinePasswordReset" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeclinePasswordReset": + # No flags + + return DeclinePasswordReset() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/delete_account.py b/pyrogram/raw/functions/account/delete_account.py new file mode 100644 index 00000000..0079d65f --- /dev/null +++ b/pyrogram/raw/functions/account/delete_account.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteAccount(TLObject): # type: ignore + """Delete the user's account from the telegram servers. + + + Details: + - Layer: ``224`` + - ID: ``A2C0CF74`` + + Parameters: + reason (``str``): + Why is the account being deleted, can be empty + + password (:obj:`InputCheckPasswordSRP `, *optional*): + 2FA password: this field can be omitted even for accounts with 2FA enabled: in this case account account deletion will be delayed by 7 days as specified in the docs » + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["reason", "password"] + + ID = 0xa2c0cf74 + QUALNAME = "functions.account.DeleteAccount" + + def __init__(self, *, reason: str, password: "raw.base.InputCheckPasswordSRP" = None) -> None: + self.reason = reason # string + self.password = password # flags.0?InputCheckPasswordSRP + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteAccount": + + flags = Int.read(b) + + reason = String.read(b) + + password = TLObject.read(b) if flags & (1 << 0) else None + + return DeleteAccount(reason=reason, password=password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.password is not None else 0 + b.write(Int(flags)) + + b.write(String(self.reason)) + + if self.password is not None: + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/delete_auto_save_exceptions.py b/pyrogram/raw/functions/account/delete_auto_save_exceptions.py new file mode 100644 index 00000000..f0d4a17e --- /dev/null +++ b/pyrogram/raw/functions/account/delete_auto_save_exceptions.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteAutoSaveExceptions(TLObject): # type: ignore + """Clear all peer-specific autosave settings. + + + Details: + - Layer: ``224`` + - ID: ``53BC0020`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x53bc0020 + QUALNAME = "functions.account.DeleteAutoSaveExceptions" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteAutoSaveExceptions": + # No flags + + return DeleteAutoSaveExceptions() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/delete_business_chat_link.py b/pyrogram/raw/functions/account/delete_business_chat_link.py new file mode 100644 index 00000000..ce1ce3e3 --- /dev/null +++ b/pyrogram/raw/functions/account/delete_business_chat_link.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteBusinessChatLink(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``60073674`` + + Parameters: + slug (``str``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["slug"] + + ID = 0x60073674 + QUALNAME = "functions.account.DeleteBusinessChatLink" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteBusinessChatLink": + # No flags + + slug = String.read(b) + + return DeleteBusinessChatLink(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/delete_passkey.py b/pyrogram/raw/functions/account/delete_passkey.py new file mode 100644 index 00000000..ec2f3036 --- /dev/null +++ b/pyrogram/raw/functions/account/delete_passkey.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeletePasskey(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``F5B5563F`` + + Parameters: + id (``str``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id"] + + ID = 0xf5b5563f + QUALNAME = "functions.account.DeletePasskey" + + def __init__(self, *, id: str) -> None: + self.id = id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeletePasskey": + # No flags + + id = String.read(b) + + return DeletePasskey(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/delete_secure_value.py b/pyrogram/raw/functions/account/delete_secure_value.py new file mode 100644 index 00000000..964f63bf --- /dev/null +++ b/pyrogram/raw/functions/account/delete_secure_value.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteSecureValue(TLObject): # type: ignore + """Delete stored Telegram Passport documents, for more info see the passport docs » + + + Details: + - Layer: ``224`` + - ID: ``B880BC4B`` + + Parameters: + types (List of :obj:`SecureValueType `): + Document types to delete + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["types"] + + ID = 0xb880bc4b + QUALNAME = "functions.account.DeleteSecureValue" + + def __init__(self, *, types: List["raw.base.SecureValueType"]) -> None: + self.types = types # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteSecureValue": + # No flags + + types = TLObject.read(b) + + return DeleteSecureValue(types=types) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.types)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/disable_peer_connected_bot.py b/pyrogram/raw/functions/account/disable_peer_connected_bot.py new file mode 100644 index 00000000..1af8ab0c --- /dev/null +++ b/pyrogram/raw/functions/account/disable_peer_connected_bot.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DisablePeerConnectedBot(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``5E437ED9`` + + Parameters: + peer (:obj:`InputPeer `): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x5e437ed9 + QUALNAME = "functions.account.DisablePeerConnectedBot" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DisablePeerConnectedBot": + # No flags + + peer = TLObject.read(b) + + return DisablePeerConnectedBot(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/edit_business_chat_link.py b/pyrogram/raw/functions/account/edit_business_chat_link.py new file mode 100644 index 00000000..1c803598 --- /dev/null +++ b/pyrogram/raw/functions/account/edit_business_chat_link.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditBusinessChatLink(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``8C3410AF`` + + Parameters: + slug (``str``): + + + link (:obj:`InputBusinessChatLink `): + + + Returns: + :obj:`BusinessChatLink ` + """ + + __slots__: List[str] = ["slug", "link"] + + ID = 0x8c3410af + QUALNAME = "functions.account.EditBusinessChatLink" + + def __init__(self, *, slug: str, link: "raw.base.InputBusinessChatLink") -> None: + self.slug = slug # string + self.link = link # InputBusinessChatLink + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditBusinessChatLink": + # No flags + + slug = String.read(b) + + link = TLObject.read(b) + + return EditBusinessChatLink(slug=slug, link=link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + b.write(self.link.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/finish_takeout_session.py b/pyrogram/raw/functions/account/finish_takeout_session.py new file mode 100644 index 00000000..af4c06cd --- /dev/null +++ b/pyrogram/raw/functions/account/finish_takeout_session.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FinishTakeoutSession(TLObject): # type: ignore + """Terminate a takeout session, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``1D2652EE`` + + Parameters: + success (``bool``, *optional*): + Data exported successfully + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["success"] + + ID = 0x1d2652ee + QUALNAME = "functions.account.FinishTakeoutSession" + + def __init__(self, *, success: Optional[bool] = None) -> None: + self.success = success # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FinishTakeoutSession": + + flags = Int.read(b) + + success = True if flags & (1 << 0) else False + return FinishTakeoutSession(success=success) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.success else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_account_ttl.py b/pyrogram/raw/functions/account/get_account_ttl.py new file mode 100644 index 00000000..ebc89bfc --- /dev/null +++ b/pyrogram/raw/functions/account/get_account_ttl.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAccountTTL(TLObject): # type: ignore + """Get days to live of account + + + Details: + - Layer: ``224`` + - ID: ``8FC711D`` + + Parameters: + No parameters required. + + Returns: + :obj:`AccountDaysTTL ` + """ + + __slots__: List[str] = [] + + ID = 0x8fc711d + QUALNAME = "functions.account.GetAccountTTL" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAccountTTL": + # No flags + + return GetAccountTTL() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_all_secure_values.py b/pyrogram/raw/functions/account/get_all_secure_values.py new file mode 100644 index 00000000..ec50255c --- /dev/null +++ b/pyrogram/raw/functions/account/get_all_secure_values.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAllSecureValues(TLObject): # type: ignore + """Get all saved Telegram Passport documents, for more info see the passport docs » + + + Details: + - Layer: ``224`` + - ID: ``B288BC7D`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`SecureValue ` + """ + + __slots__: List[str] = [] + + ID = 0xb288bc7d + QUALNAME = "functions.account.GetAllSecureValues" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAllSecureValues": + # No flags + + return GetAllSecureValues() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_authorization_form.py b/pyrogram/raw/functions/account/get_authorization_form.py new file mode 100644 index 00000000..b228024b --- /dev/null +++ b/pyrogram/raw/functions/account/get_authorization_form.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAuthorizationForm(TLObject): # type: ignore + """Returns a Telegram Passport authorization form for sharing data with a service + + + Details: + - Layer: ``224`` + - ID: ``A929597A`` + + Parameters: + bot_id (``int`` ``64-bit``): + User identifier of the service's bot + + scope (``str``): + Telegram Passport element types requested by the service + + public_key (``str``): + Service's public key + + Returns: + :obj:`account.AuthorizationForm ` + """ + + __slots__: List[str] = ["bot_id", "scope", "public_key"] + + ID = 0xa929597a + QUALNAME = "functions.account.GetAuthorizationForm" + + def __init__(self, *, bot_id: int, scope: str, public_key: str) -> None: + self.bot_id = bot_id # long + self.scope = scope # string + self.public_key = public_key # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAuthorizationForm": + # No flags + + bot_id = Long.read(b) + + scope = String.read(b) + + public_key = String.read(b) + + return GetAuthorizationForm(bot_id=bot_id, scope=scope, public_key=public_key) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.bot_id)) + + b.write(String(self.scope)) + + b.write(String(self.public_key)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_authorizations.py b/pyrogram/raw/functions/account/get_authorizations.py new file mode 100644 index 00000000..e69e1c19 --- /dev/null +++ b/pyrogram/raw/functions/account/get_authorizations.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAuthorizations(TLObject): # type: ignore + """Get logged-in sessions + + + Details: + - Layer: ``224`` + - ID: ``E320C158`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.Authorizations ` + """ + + __slots__: List[str] = [] + + ID = 0xe320c158 + QUALNAME = "functions.account.GetAuthorizations" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAuthorizations": + # No flags + + return GetAuthorizations() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_auto_download_settings.py b/pyrogram/raw/functions/account/get_auto_download_settings.py new file mode 100644 index 00000000..2aec41c8 --- /dev/null +++ b/pyrogram/raw/functions/account/get_auto_download_settings.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAutoDownloadSettings(TLObject): # type: ignore + """Get media autodownload settings + + + Details: + - Layer: ``224`` + - ID: ``56DA0B3F`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.AutoDownloadSettings ` + """ + + __slots__: List[str] = [] + + ID = 0x56da0b3f + QUALNAME = "functions.account.GetAutoDownloadSettings" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAutoDownloadSettings": + # No flags + + return GetAutoDownloadSettings() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_auto_save_settings.py b/pyrogram/raw/functions/account/get_auto_save_settings.py new file mode 100644 index 00000000..e6012bc4 --- /dev/null +++ b/pyrogram/raw/functions/account/get_auto_save_settings.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAutoSaveSettings(TLObject): # type: ignore + """Get autosave settings + + + Details: + - Layer: ``224`` + - ID: ``ADCBBCDA`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.AutoSaveSettings ` + """ + + __slots__: List[str] = [] + + ID = 0xadcbbcda + QUALNAME = "functions.account.GetAutoSaveSettings" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAutoSaveSettings": + # No flags + + return GetAutoSaveSettings() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_bot_business_connection.py b/pyrogram/raw/functions/account/get_bot_business_connection.py new file mode 100644 index 00000000..a9368d07 --- /dev/null +++ b/pyrogram/raw/functions/account/get_bot_business_connection.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotBusinessConnection(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``76A86270`` + + Parameters: + connection_id (``str``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["connection_id"] + + ID = 0x76a86270 + QUALNAME = "functions.account.GetBotBusinessConnection" + + def __init__(self, *, connection_id: str) -> None: + self.connection_id = connection_id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotBusinessConnection": + # No flags + + connection_id = String.read(b) + + return GetBotBusinessConnection(connection_id=connection_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.connection_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_business_chat_links.py b/pyrogram/raw/functions/account/get_business_chat_links.py new file mode 100644 index 00000000..0d60f5ed --- /dev/null +++ b/pyrogram/raw/functions/account/get_business_chat_links.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBusinessChatLinks(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``6F70DDE1`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.BusinessChatLinks ` + """ + + __slots__: List[str] = [] + + ID = 0x6f70dde1 + QUALNAME = "functions.account.GetBusinessChatLinks" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBusinessChatLinks": + # No flags + + return GetBusinessChatLinks() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_channel_default_emoji_statuses.py b/pyrogram/raw/functions/account/get_channel_default_emoji_statuses.py new file mode 100644 index 00000000..be743aa6 --- /dev/null +++ b/pyrogram/raw/functions/account/get_channel_default_emoji_statuses.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChannelDefaultEmojiStatuses(TLObject): # type: ignore + """Get a list of default suggested channel emoji statuses. + + + Details: + - Layer: ``224`` + - ID: ``7727A7D5`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.emojiStatuses.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.EmojiStatuses ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x7727a7d5 + QUALNAME = "functions.account.GetChannelDefaultEmojiStatuses" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChannelDefaultEmojiStatuses": + # No flags + + hash = Long.read(b) + + return GetChannelDefaultEmojiStatuses(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_channel_restricted_status_emojis.py b/pyrogram/raw/functions/account/get_channel_restricted_status_emojis.py new file mode 100644 index 00000000..00ed7fd1 --- /dev/null +++ b/pyrogram/raw/functions/account/get_channel_restricted_status_emojis.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChannelRestrictedStatusEmojis(TLObject): # type: ignore + """Returns fetch the full list of custom emoji IDs » that cannot be used in channel emoji statuses ». + + + Details: + - Layer: ``224`` + - ID: ``35A9E0D5`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the emojiList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`EmojiList ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x35a9e0d5 + QUALNAME = "functions.account.GetChannelRestrictedStatusEmojis" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChannelRestrictedStatusEmojis": + # No flags + + hash = Long.read(b) + + return GetChannelRestrictedStatusEmojis(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_chat_themes.py b/pyrogram/raw/functions/account/get_chat_themes.py new file mode 100644 index 00000000..c8c10cb3 --- /dev/null +++ b/pyrogram/raw/functions/account/get_chat_themes.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChatThemes(TLObject): # type: ignore + """Get all available chat themes ». + + + Details: + - Layer: ``224`` + - ID: ``D638DE89`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.themes.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.Themes ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xd638de89 + QUALNAME = "functions.account.GetChatThemes" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChatThemes": + # No flags + + hash = Long.read(b) + + return GetChatThemes(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_collectible_emoji_statuses.py b/pyrogram/raw/functions/account/get_collectible_emoji_statuses.py new file mode 100644 index 00000000..764d3668 --- /dev/null +++ b/pyrogram/raw/functions/account/get_collectible_emoji_statuses.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCollectibleEmojiStatuses(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``2E7B4543`` + + Parameters: + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`account.EmojiStatuses ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x2e7b4543 + QUALNAME = "functions.account.GetCollectibleEmojiStatuses" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCollectibleEmojiStatuses": + # No flags + + hash = Long.read(b) + + return GetCollectibleEmojiStatuses(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_connected_bots.py b/pyrogram/raw/functions/account/get_connected_bots.py new file mode 100644 index 00000000..b247e194 --- /dev/null +++ b/pyrogram/raw/functions/account/get_connected_bots.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetConnectedBots(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``4EA4C80F`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.ConnectedBots ` + """ + + __slots__: List[str] = [] + + ID = 0x4ea4c80f + QUALNAME = "functions.account.GetConnectedBots" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetConnectedBots": + # No flags + + return GetConnectedBots() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_contact_sign_up_notification.py b/pyrogram/raw/functions/account/get_contact_sign_up_notification.py new file mode 100644 index 00000000..e07eb4b3 --- /dev/null +++ b/pyrogram/raw/functions/account/get_contact_sign_up_notification.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetContactSignUpNotification(TLObject): # type: ignore + """Whether the user will receive notifications when contacts sign up + + + Details: + - Layer: ``224`` + - ID: ``9F07C728`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x9f07c728 + QUALNAME = "functions.account.GetContactSignUpNotification" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetContactSignUpNotification": + # No flags + + return GetContactSignUpNotification() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_content_settings.py b/pyrogram/raw/functions/account/get_content_settings.py new file mode 100644 index 00000000..f8b2e964 --- /dev/null +++ b/pyrogram/raw/functions/account/get_content_settings.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetContentSettings(TLObject): # type: ignore + """Get sensitive content settings + + + Details: + - Layer: ``224`` + - ID: ``8B9B4DAE`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.ContentSettings ` + """ + + __slots__: List[str] = [] + + ID = 0x8b9b4dae + QUALNAME = "functions.account.GetContentSettings" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetContentSettings": + # No flags + + return GetContentSettings() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_default_background_emojis.py b/pyrogram/raw/functions/account/get_default_background_emojis.py new file mode 100644 index 00000000..ccc25af9 --- /dev/null +++ b/pyrogram/raw/functions/account/get_default_background_emojis.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDefaultBackgroundEmojis(TLObject): # type: ignore + """Get a set of suggested custom emoji stickers that can be used in an accent color pattern. + + + Details: + - Layer: ``224`` + - ID: ``A60AB9CE`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the emojiList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`EmojiList ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xa60ab9ce + QUALNAME = "functions.account.GetDefaultBackgroundEmojis" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDefaultBackgroundEmojis": + # No flags + + hash = Long.read(b) + + return GetDefaultBackgroundEmojis(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_default_emoji_statuses.py b/pyrogram/raw/functions/account/get_default_emoji_statuses.py new file mode 100644 index 00000000..0d8bad2c --- /dev/null +++ b/pyrogram/raw/functions/account/get_default_emoji_statuses.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDefaultEmojiStatuses(TLObject): # type: ignore + """Get a list of default suggested emoji statuses + + + Details: + - Layer: ``224`` + - ID: ``D6753386`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.emojiStatuses.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.EmojiStatuses ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xd6753386 + QUALNAME = "functions.account.GetDefaultEmojiStatuses" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDefaultEmojiStatuses": + # No flags + + hash = Long.read(b) + + return GetDefaultEmojiStatuses(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_default_group_photo_emojis.py b/pyrogram/raw/functions/account/get_default_group_photo_emojis.py new file mode 100644 index 00000000..54c923f0 --- /dev/null +++ b/pyrogram/raw/functions/account/get_default_group_photo_emojis.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDefaultGroupPhotoEmojis(TLObject): # type: ignore + """Get a set of suggested custom emoji stickers that can be used as group picture + + + Details: + - Layer: ``224`` + - ID: ``915860AE`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the emojiList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`EmojiList ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x915860ae + QUALNAME = "functions.account.GetDefaultGroupPhotoEmojis" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDefaultGroupPhotoEmojis": + # No flags + + hash = Long.read(b) + + return GetDefaultGroupPhotoEmojis(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_default_profile_photo_emojis.py b/pyrogram/raw/functions/account/get_default_profile_photo_emojis.py new file mode 100644 index 00000000..58e70370 --- /dev/null +++ b/pyrogram/raw/functions/account/get_default_profile_photo_emojis.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDefaultProfilePhotoEmojis(TLObject): # type: ignore + """Get a set of suggested custom emoji stickers that can be used as profile picture + + + Details: + - Layer: ``224`` + - ID: ``E2750328`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the emojiList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`EmojiList ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xe2750328 + QUALNAME = "functions.account.GetDefaultProfilePhotoEmojis" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDefaultProfilePhotoEmojis": + # No flags + + hash = Long.read(b) + + return GetDefaultProfilePhotoEmojis(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_global_privacy_settings.py b/pyrogram/raw/functions/account/get_global_privacy_settings.py new file mode 100644 index 00000000..09f9d7e6 --- /dev/null +++ b/pyrogram/raw/functions/account/get_global_privacy_settings.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGlobalPrivacySettings(TLObject): # type: ignore + """Get global privacy settings + + + Details: + - Layer: ``224`` + - ID: ``EB2B4CF6`` + + Parameters: + No parameters required. + + Returns: + :obj:`GlobalPrivacySettings ` + """ + + __slots__: List[str] = [] + + ID = 0xeb2b4cf6 + QUALNAME = "functions.account.GetGlobalPrivacySettings" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGlobalPrivacySettings": + # No flags + + return GetGlobalPrivacySettings() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_multi_wall_papers.py b/pyrogram/raw/functions/account/get_multi_wall_papers.py new file mode 100644 index 00000000..81572262 --- /dev/null +++ b/pyrogram/raw/functions/account/get_multi_wall_papers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMultiWallPapers(TLObject): # type: ignore + """Get info about multiple wallpapers + + + Details: + - Layer: ``224`` + - ID: ``65AD71DC`` + + Parameters: + wallpapers (List of :obj:`InputWallPaper `): + Wallpapers to fetch info about + + Returns: + List of :obj:`WallPaper ` + """ + + __slots__: List[str] = ["wallpapers"] + + ID = 0x65ad71dc + QUALNAME = "functions.account.GetMultiWallPapers" + + def __init__(self, *, wallpapers: List["raw.base.InputWallPaper"]) -> None: + self.wallpapers = wallpapers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMultiWallPapers": + # No flags + + wallpapers = TLObject.read(b) + + return GetMultiWallPapers(wallpapers=wallpapers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.wallpapers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_notify_exceptions.py b/pyrogram/raw/functions/account/get_notify_exceptions.py new file mode 100644 index 00000000..9fbdd730 --- /dev/null +++ b/pyrogram/raw/functions/account/get_notify_exceptions.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetNotifyExceptions(TLObject): # type: ignore + """Returns list of chats with non-default notification settings + + + Details: + - Layer: ``224`` + - ID: ``53577479`` + + Parameters: + compare_sound (``bool``, *optional*): + If set, chats with non-default sound will be returned + + compare_stories (``bool``, *optional*): + If set, chats with non-default notification settings for stories will be returned + + peer (:obj:`InputNotifyPeer `, *optional*): + If specified, only chats of the specified category will be returned + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["compare_sound", "compare_stories", "peer"] + + ID = 0x53577479 + QUALNAME = "functions.account.GetNotifyExceptions" + + def __init__(self, *, compare_sound: Optional[bool] = None, compare_stories: Optional[bool] = None, peer: "raw.base.InputNotifyPeer" = None) -> None: + self.compare_sound = compare_sound # flags.1?true + self.compare_stories = compare_stories # flags.2?true + self.peer = peer # flags.0?InputNotifyPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetNotifyExceptions": + + flags = Int.read(b) + + compare_sound = True if flags & (1 << 1) else False + compare_stories = True if flags & (1 << 2) else False + peer = TLObject.read(b) if flags & (1 << 0) else None + + return GetNotifyExceptions(compare_sound=compare_sound, compare_stories=compare_stories, peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.compare_sound else 0 + flags |= (1 << 2) if self.compare_stories else 0 + flags |= (1 << 0) if self.peer is not None else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_notify_settings.py b/pyrogram/raw/functions/account/get_notify_settings.py new file mode 100644 index 00000000..cbdea79b --- /dev/null +++ b/pyrogram/raw/functions/account/get_notify_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetNotifySettings(TLObject): # type: ignore + """Gets current notification settings for a given user/group, from all users/all groups. + + + Details: + - Layer: ``224`` + - ID: ``12B3AD31`` + + Parameters: + peer (:obj:`InputNotifyPeer `): + Notification source + + Returns: + :obj:`PeerNotifySettings ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x12b3ad31 + QUALNAME = "functions.account.GetNotifySettings" + + def __init__(self, *, peer: "raw.base.InputNotifyPeer") -> None: + self.peer = peer # InputNotifyPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetNotifySettings": + # No flags + + peer = TLObject.read(b) + + return GetNotifySettings(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_paid_messages_revenue.py b/pyrogram/raw/functions/account/get_paid_messages_revenue.py new file mode 100644 index 00000000..8aa10117 --- /dev/null +++ b/pyrogram/raw/functions/account/get_paid_messages_revenue.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPaidMessagesRevenue(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``19BA4A67`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`account.PaidMessagesRevenue ` + """ + + __slots__: List[str] = ["user_id", "parent_peer"] + + ID = 0x19ba4a67 + QUALNAME = "functions.account.GetPaidMessagesRevenue" + + def __init__(self, *, user_id: "raw.base.InputUser", parent_peer: "raw.base.InputPeer" = None) -> None: + self.user_id = user_id # InputUser + self.parent_peer = parent_peer # flags.0?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPaidMessagesRevenue": + + flags = Int.read(b) + + parent_peer = TLObject.read(b) if flags & (1 << 0) else None + + user_id = TLObject.read(b) + + return GetPaidMessagesRevenue(user_id=user_id, parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_passkeys.py b/pyrogram/raw/functions/account/get_passkeys.py new file mode 100644 index 00000000..bee4439a --- /dev/null +++ b/pyrogram/raw/functions/account/get_passkeys.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPasskeys(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``EA1F0C52`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.Passkeys ` + """ + + __slots__: List[str] = [] + + ID = 0xea1f0c52 + QUALNAME = "functions.account.GetPasskeys" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPasskeys": + # No flags + + return GetPasskeys() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_password.py b/pyrogram/raw/functions/account/get_password.py new file mode 100644 index 00000000..608d500c --- /dev/null +++ b/pyrogram/raw/functions/account/get_password.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPassword(TLObject): # type: ignore + """Obtain configuration for two-factor authorization with password + + + Details: + - Layer: ``224`` + - ID: ``548A30F5`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.Password ` + """ + + __slots__: List[str] = [] + + ID = 0x548a30f5 + QUALNAME = "functions.account.GetPassword" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPassword": + # No flags + + return GetPassword() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_password_settings.py b/pyrogram/raw/functions/account/get_password_settings.py new file mode 100644 index 00000000..192d4f18 --- /dev/null +++ b/pyrogram/raw/functions/account/get_password_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPasswordSettings(TLObject): # type: ignore + """Get private info associated to the password info (recovery email, telegram passport info & so on) + + + Details: + - Layer: ``224`` + - ID: ``9CD4EAF9`` + + Parameters: + password (:obj:`InputCheckPasswordSRP `): + The password (see SRP) + + Returns: + :obj:`account.PasswordSettings ` + """ + + __slots__: List[str] = ["password"] + + ID = 0x9cd4eaf9 + QUALNAME = "functions.account.GetPasswordSettings" + + def __init__(self, *, password: "raw.base.InputCheckPasswordSRP") -> None: + self.password = password # InputCheckPasswordSRP + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPasswordSettings": + # No flags + + password = TLObject.read(b) + + return GetPasswordSettings(password=password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_privacy.py b/pyrogram/raw/functions/account/get_privacy.py new file mode 100644 index 00000000..27f8bec2 --- /dev/null +++ b/pyrogram/raw/functions/account/get_privacy.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPrivacy(TLObject): # type: ignore + """Get privacy settings of current account + + + Details: + - Layer: ``224`` + - ID: ``DADBC950`` + + Parameters: + key (:obj:`InputPrivacyKey `): + Peer category whose privacy settings should be fetched + + Returns: + :obj:`account.PrivacyRules ` + """ + + __slots__: List[str] = ["key"] + + ID = 0xdadbc950 + QUALNAME = "functions.account.GetPrivacy" + + def __init__(self, *, key: "raw.base.InputPrivacyKey") -> None: + self.key = key # InputPrivacyKey + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPrivacy": + # No flags + + key = TLObject.read(b) + + return GetPrivacy(key=key) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.key.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_reactions_notify_settings.py b/pyrogram/raw/functions/account/get_reactions_notify_settings.py new file mode 100644 index 00000000..cee739c0 --- /dev/null +++ b/pyrogram/raw/functions/account/get_reactions_notify_settings.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetReactionsNotifySettings(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``6DD654C`` + + Parameters: + No parameters required. + + Returns: + :obj:`ReactionsNotifySettings ` + """ + + __slots__: List[str] = [] + + ID = 0x6dd654c + QUALNAME = "functions.account.GetReactionsNotifySettings" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetReactionsNotifySettings": + # No flags + + return GetReactionsNotifySettings() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_recent_emoji_statuses.py b/pyrogram/raw/functions/account/get_recent_emoji_statuses.py new file mode 100644 index 00000000..ef047630 --- /dev/null +++ b/pyrogram/raw/functions/account/get_recent_emoji_statuses.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetRecentEmojiStatuses(TLObject): # type: ignore + """Get recently used emoji statuses + + + Details: + - Layer: ``224`` + - ID: ``F578105`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.emojiStatuses.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.EmojiStatuses ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xf578105 + QUALNAME = "functions.account.GetRecentEmojiStatuses" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetRecentEmojiStatuses": + # No flags + + hash = Long.read(b) + + return GetRecentEmojiStatuses(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_saved_music_ids.py b/pyrogram/raw/functions/account/get_saved_music_ids.py new file mode 100644 index 00000000..6dcc46b8 --- /dev/null +++ b/pyrogram/raw/functions/account/get_saved_music_ids.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedMusicIds(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E09D5FAF`` + + Parameters: + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`account.SavedMusicIds ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xe09d5faf + QUALNAME = "functions.account.GetSavedMusicIds" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedMusicIds": + # No flags + + hash = Long.read(b) + + return GetSavedMusicIds(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_saved_ringtones.py b/pyrogram/raw/functions/account/get_saved_ringtones.py new file mode 100644 index 00000000..726c8852 --- /dev/null +++ b/pyrogram/raw/functions/account/get_saved_ringtones.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedRingtones(TLObject): # type: ignore + """Fetch saved notification sounds + + + Details: + - Layer: ``224`` + - ID: ``E1902288`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.savedRingtones.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.SavedRingtones ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xe1902288 + QUALNAME = "functions.account.GetSavedRingtones" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedRingtones": + # No flags + + hash = Long.read(b) + + return GetSavedRingtones(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_secure_value.py b/pyrogram/raw/functions/account/get_secure_value.py new file mode 100644 index 00000000..17c0d34f --- /dev/null +++ b/pyrogram/raw/functions/account/get_secure_value.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSecureValue(TLObject): # type: ignore + """Get saved Telegram Passport document, for more info see the passport docs » + + + Details: + - Layer: ``224`` + - ID: ``73665BC2`` + + Parameters: + types (List of :obj:`SecureValueType `): + Requested value types + + Returns: + List of :obj:`SecureValue ` + """ + + __slots__: List[str] = ["types"] + + ID = 0x73665bc2 + QUALNAME = "functions.account.GetSecureValue" + + def __init__(self, *, types: List["raw.base.SecureValueType"]) -> None: + self.types = types # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSecureValue": + # No flags + + types = TLObject.read(b) + + return GetSecureValue(types=types) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.types)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_theme.py b/pyrogram/raw/functions/account/get_theme.py new file mode 100644 index 00000000..42fc8010 --- /dev/null +++ b/pyrogram/raw/functions/account/get_theme.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetTheme(TLObject): # type: ignore + """Get theme information + + + Details: + - Layer: ``224`` + - ID: ``3A5869EC`` + + Parameters: + format (``str``): + Theme format, a string that identifies the theming engines supported by the client + + theme (:obj:`InputTheme `): + Theme + + Returns: + :obj:`Theme ` + """ + + __slots__: List[str] = ["format", "theme"] + + ID = 0x3a5869ec + QUALNAME = "functions.account.GetTheme" + + def __init__(self, *, format: str, theme: "raw.base.InputTheme") -> None: + self.format = format # string + self.theme = theme # InputTheme + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetTheme": + # No flags + + format = String.read(b) + + theme = TLObject.read(b) + + return GetTheme(format=format, theme=theme) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.format)) + + b.write(self.theme.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_themes.py b/pyrogram/raw/functions/account/get_themes.py new file mode 100644 index 00000000..0dbca617 --- /dev/null +++ b/pyrogram/raw/functions/account/get_themes.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetThemes(TLObject): # type: ignore + """Get installed themes + + + Details: + - Layer: ``224`` + - ID: ``7206E458`` + + Parameters: + format (``str``): + Theme format, a string that identifies the theming engines supported by the client + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.themes.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.Themes ` + """ + + __slots__: List[str] = ["format", "hash"] + + ID = 0x7206e458 + QUALNAME = "functions.account.GetThemes" + + def __init__(self, *, format: str, hash: int) -> None: + self.format = format # string + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetThemes": + # No flags + + format = String.read(b) + + hash = Long.read(b) + + return GetThemes(format=format, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.format)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_tmp_password.py b/pyrogram/raw/functions/account/get_tmp_password.py new file mode 100644 index 00000000..967f3389 --- /dev/null +++ b/pyrogram/raw/functions/account/get_tmp_password.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetTmpPassword(TLObject): # type: ignore + """Get temporary payment password + + + Details: + - Layer: ``224`` + - ID: ``449E0B51`` + + Parameters: + password (:obj:`InputCheckPasswordSRP `): + SRP password parameters + + period (``int`` ``32-bit``): + Time during which the temporary password will be valid, in seconds; should be between 60 and 86400 + + Returns: + :obj:`account.TmpPassword ` + """ + + __slots__: List[str] = ["password", "period"] + + ID = 0x449e0b51 + QUALNAME = "functions.account.GetTmpPassword" + + def __init__(self, *, password: "raw.base.InputCheckPasswordSRP", period: int) -> None: + self.password = password # InputCheckPasswordSRP + self.period = period # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetTmpPassword": + # No flags + + password = TLObject.read(b) + + period = Int.read(b) + + return GetTmpPassword(password=password, period=period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.password.write()) + + b.write(Int(self.period)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_unique_gift_chat_themes.py b/pyrogram/raw/functions/account/get_unique_gift_chat_themes.py new file mode 100644 index 00000000..13c304fb --- /dev/null +++ b/pyrogram/raw/functions/account/get_unique_gift_chat_themes.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUniqueGiftChatThemes(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E42CE9C9`` + + Parameters: + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`account.ChatThemes ` + """ + + __slots__: List[str] = ["offset", "limit", "hash"] + + ID = 0xe42ce9c9 + QUALNAME = "functions.account.GetUniqueGiftChatThemes" + + def __init__(self, *, offset: str, limit: int, hash: int) -> None: + self.offset = offset # string + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUniqueGiftChatThemes": + # No flags + + offset = String.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetUniqueGiftChatThemes(offset=offset, limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_wall_paper.py b/pyrogram/raw/functions/account/get_wall_paper.py new file mode 100644 index 00000000..7db4d2a0 --- /dev/null +++ b/pyrogram/raw/functions/account/get_wall_paper.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWallPaper(TLObject): # type: ignore + """Get info about a certain wallpaper + + + Details: + - Layer: ``224`` + - ID: ``FC8DDBEA`` + + Parameters: + wallpaper (:obj:`InputWallPaper `): + The wallpaper to get info about + + Returns: + :obj:`WallPaper ` + """ + + __slots__: List[str] = ["wallpaper"] + + ID = 0xfc8ddbea + QUALNAME = "functions.account.GetWallPaper" + + def __init__(self, *, wallpaper: "raw.base.InputWallPaper") -> None: + self.wallpaper = wallpaper # InputWallPaper + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWallPaper": + # No flags + + wallpaper = TLObject.read(b) + + return GetWallPaper(wallpaper=wallpaper) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.wallpaper.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_wall_papers.py b/pyrogram/raw/functions/account/get_wall_papers.py new file mode 100644 index 00000000..7e029d72 --- /dev/null +++ b/pyrogram/raw/functions/account/get_wall_papers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWallPapers(TLObject): # type: ignore + """Returns a list of available wallpapers. + + + Details: + - Layer: ``224`` + - ID: ``7967D36`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the account.wallPapers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`account.WallPapers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x7967d36 + QUALNAME = "functions.account.GetWallPapers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWallPapers": + # No flags + + hash = Long.read(b) + + return GetWallPapers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/get_web_authorizations.py b/pyrogram/raw/functions/account/get_web_authorizations.py new file mode 100644 index 00000000..e04e39b4 --- /dev/null +++ b/pyrogram/raw/functions/account/get_web_authorizations.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWebAuthorizations(TLObject): # type: ignore + """Get web login widget authorizations + + + Details: + - Layer: ``224`` + - ID: ``182E6D6F`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.WebAuthorizations ` + """ + + __slots__: List[str] = [] + + ID = 0x182e6d6f + QUALNAME = "functions.account.GetWebAuthorizations" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWebAuthorizations": + # No flags + + return GetWebAuthorizations() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/init_passkey_registration.py b/pyrogram/raw/functions/account/init_passkey_registration.py new file mode 100644 index 00000000..f4c79fa6 --- /dev/null +++ b/pyrogram/raw/functions/account/init_passkey_registration.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InitPasskeyRegistration(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``429547E8`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.PasskeyRegistrationOptions ` + """ + + __slots__: List[str] = [] + + ID = 0x429547e8 + QUALNAME = "functions.account.InitPasskeyRegistration" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InitPasskeyRegistration": + # No flags + + return InitPasskeyRegistration() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/init_takeout_session.py b/pyrogram/raw/functions/account/init_takeout_session.py new file mode 100644 index 00000000..6d821a59 --- /dev/null +++ b/pyrogram/raw/functions/account/init_takeout_session.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InitTakeoutSession(TLObject): # type: ignore + """Initialize a takeout session, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``8EF3EAB0`` + + Parameters: + contacts (``bool``, *optional*): + Whether to export contacts + + message_users (``bool``, *optional*): + Whether to export messages in private chats + + message_chats (``bool``, *optional*): + Whether to export messages in basic groups + + message_megagroups (``bool``, *optional*): + Whether to export messages in supergroups + + message_channels (``bool``, *optional*): + Whether to export messages in channels + + files (``bool``, *optional*): + Whether to export files + + file_max_size (``int`` ``64-bit``, *optional*): + Maximum size of files to export + + Returns: + :obj:`account.Takeout ` + """ + + __slots__: List[str] = ["contacts", "message_users", "message_chats", "message_megagroups", "message_channels", "files", "file_max_size"] + + ID = 0x8ef3eab0 + QUALNAME = "functions.account.InitTakeoutSession" + + def __init__(self, *, contacts: Optional[bool] = None, message_users: Optional[bool] = None, message_chats: Optional[bool] = None, message_megagroups: Optional[bool] = None, message_channels: Optional[bool] = None, files: Optional[bool] = None, file_max_size: Optional[int] = None) -> None: + self.contacts = contacts # flags.0?true + self.message_users = message_users # flags.1?true + self.message_chats = message_chats # flags.2?true + self.message_megagroups = message_megagroups # flags.3?true + self.message_channels = message_channels # flags.4?true + self.files = files # flags.5?true + self.file_max_size = file_max_size # flags.5?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InitTakeoutSession": + + flags = Int.read(b) + + contacts = True if flags & (1 << 0) else False + message_users = True if flags & (1 << 1) else False + message_chats = True if flags & (1 << 2) else False + message_megagroups = True if flags & (1 << 3) else False + message_channels = True if flags & (1 << 4) else False + files = True if flags & (1 << 5) else False + file_max_size = Long.read(b) if flags & (1 << 5) else None + return InitTakeoutSession(contacts=contacts, message_users=message_users, message_chats=message_chats, message_megagroups=message_megagroups, message_channels=message_channels, files=files, file_max_size=file_max_size) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.contacts else 0 + flags |= (1 << 1) if self.message_users else 0 + flags |= (1 << 2) if self.message_chats else 0 + flags |= (1 << 3) if self.message_megagroups else 0 + flags |= (1 << 4) if self.message_channels else 0 + flags |= (1 << 5) if self.files else 0 + flags |= (1 << 5) if self.file_max_size is not None else 0 + b.write(Int(flags)) + + if self.file_max_size is not None: + b.write(Long(self.file_max_size)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/install_theme.py b/pyrogram/raw/functions/account/install_theme.py new file mode 100644 index 00000000..e82d7481 --- /dev/null +++ b/pyrogram/raw/functions/account/install_theme.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InstallTheme(TLObject): # type: ignore + """Install a theme + + + Details: + - Layer: ``224`` + - ID: ``C727BB3B`` + + Parameters: + dark (``bool``, *optional*): + Whether to install the dark version + + theme (:obj:`InputTheme `, *optional*): + Theme to install + + format (``str``, *optional*): + Theme format, a string that identifies the theming engines supported by the client + + base_theme (:obj:`BaseTheme `, *optional*): + Indicates a basic theme provided by all clients + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["dark", "theme", "format", "base_theme"] + + ID = 0xc727bb3b + QUALNAME = "functions.account.InstallTheme" + + def __init__(self, *, dark: Optional[bool] = None, theme: "raw.base.InputTheme" = None, format: Optional[str] = None, base_theme: "raw.base.BaseTheme" = None) -> None: + self.dark = dark # flags.0?true + self.theme = theme # flags.1?InputTheme + self.format = format # flags.2?string + self.base_theme = base_theme # flags.3?BaseTheme + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InstallTheme": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + theme = TLObject.read(b) if flags & (1 << 1) else None + + format = String.read(b) if flags & (1 << 2) else None + base_theme = TLObject.read(b) if flags & (1 << 3) else None + + return InstallTheme(dark=dark, theme=theme, format=format, base_theme=base_theme) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + flags |= (1 << 1) if self.theme is not None else 0 + flags |= (1 << 2) if self.format is not None else 0 + flags |= (1 << 3) if self.base_theme is not None else 0 + b.write(Int(flags)) + + if self.theme is not None: + b.write(self.theme.write()) + + if self.format is not None: + b.write(String(self.format)) + + if self.base_theme is not None: + b.write(self.base_theme.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/install_wall_paper.py b/pyrogram/raw/functions/account/install_wall_paper.py new file mode 100644 index 00000000..af6b6748 --- /dev/null +++ b/pyrogram/raw/functions/account/install_wall_paper.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InstallWallPaper(TLObject): # type: ignore + """Install wallpaper + + + Details: + - Layer: ``224`` + - ID: ``FEED5769`` + + Parameters: + wallpaper (:obj:`InputWallPaper `): + Wallpaper to install + + settings (:obj:`WallPaperSettings `): + Wallpaper settings + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["wallpaper", "settings"] + + ID = 0xfeed5769 + QUALNAME = "functions.account.InstallWallPaper" + + def __init__(self, *, wallpaper: "raw.base.InputWallPaper", settings: "raw.base.WallPaperSettings") -> None: + self.wallpaper = wallpaper # InputWallPaper + self.settings = settings # WallPaperSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InstallWallPaper": + # No flags + + wallpaper = TLObject.read(b) + + settings = TLObject.read(b) + + return InstallWallPaper(wallpaper=wallpaper, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.wallpaper.write()) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/invalidate_sign_in_codes.py b/pyrogram/raw/functions/account/invalidate_sign_in_codes.py new file mode 100644 index 00000000..184c8a89 --- /dev/null +++ b/pyrogram/raw/functions/account/invalidate_sign_in_codes.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvalidateSignInCodes(TLObject): # type: ignore + """Invalidate the specified login codes, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``CA8AE8BA`` + + Parameters: + codes (List of ``str``): + The login codes to invalidate. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["codes"] + + ID = 0xca8ae8ba + QUALNAME = "functions.account.InvalidateSignInCodes" + + def __init__(self, *, codes: List[str]) -> None: + self.codes = codes # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvalidateSignInCodes": + # No flags + + codes = TLObject.read(b, String) + + return InvalidateSignInCodes(codes=codes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.codes, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/register_device.py b/pyrogram/raw/functions/account/register_device.py new file mode 100644 index 00000000..1d98ca0e --- /dev/null +++ b/pyrogram/raw/functions/account/register_device.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RegisterDevice(TLObject): # type: ignore + """Register device to receive PUSH notifications + + + Details: + - Layer: ``224`` + - ID: ``EC86017A`` + + Parameters: + token_type (``int`` ``32-bit``): + Device token type, see PUSH updates for the possible values. + + token (``str``): + Device token, see PUSH updates for the possible values. + + app_sandbox (``bool``): + If (boolTrue) is transmitted, a sandbox-certificate will be used during transmission. + + secret (``bytes``): + For FCM and APNS VoIP, optional encryption key used to encrypt push notifications + + other_uids (List of ``int`` ``64-bit``): + List of user identifiers of other users currently using the client + + no_muted (``bool``, *optional*): + Avoid receiving (silent and invisible background) notifications. Useful to save battery. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["token_type", "token", "app_sandbox", "secret", "other_uids", "no_muted"] + + ID = 0xec86017a + QUALNAME = "functions.account.RegisterDevice" + + def __init__(self, *, token_type: int, token: str, app_sandbox: bool, secret: bytes, other_uids: List[int], no_muted: Optional[bool] = None) -> None: + self.token_type = token_type # int + self.token = token # string + self.app_sandbox = app_sandbox # Bool + self.secret = secret # bytes + self.other_uids = other_uids # Vector + self.no_muted = no_muted # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RegisterDevice": + + flags = Int.read(b) + + no_muted = True if flags & (1 << 0) else False + token_type = Int.read(b) + + token = String.read(b) + + app_sandbox = Bool.read(b) + + secret = Bytes.read(b) + + other_uids = TLObject.read(b, Long) + + return RegisterDevice(token_type=token_type, token=token, app_sandbox=app_sandbox, secret=secret, other_uids=other_uids, no_muted=no_muted) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.no_muted else 0 + b.write(Int(flags)) + + b.write(Int(self.token_type)) + + b.write(String(self.token)) + + b.write(Bool(self.app_sandbox)) + + b.write(Bytes(self.secret)) + + b.write(Vector(self.other_uids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/register_passkey.py b/pyrogram/raw/functions/account/register_passkey.py new file mode 100644 index 00000000..f6e03852 --- /dev/null +++ b/pyrogram/raw/functions/account/register_passkey.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RegisterPasskey(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``55B41FD6`` + + Parameters: + credential (:obj:`InputPasskeyCredential `): + N/A + + Returns: + :obj:`Passkey ` + """ + + __slots__: List[str] = ["credential"] + + ID = 0x55b41fd6 + QUALNAME = "functions.account.RegisterPasskey" + + def __init__(self, *, credential: "raw.base.InputPasskeyCredential") -> None: + self.credential = credential # InputPasskeyCredential + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RegisterPasskey": + # No flags + + credential = TLObject.read(b) + + return RegisterPasskey(credential=credential) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.credential.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reorder_usernames.py b/pyrogram/raw/functions/account/reorder_usernames.py new file mode 100644 index 00000000..e1bd23b0 --- /dev/null +++ b/pyrogram/raw/functions/account/reorder_usernames.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderUsernames(TLObject): # type: ignore + """Reorder usernames associated with the currently logged-in user. + + + Details: + - Layer: ``224`` + - ID: ``EF500EAB`` + + Parameters: + order (List of ``str``): + The new order for active usernames. All active usernames must be specified. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["order"] + + ID = 0xef500eab + QUALNAME = "functions.account.ReorderUsernames" + + def __init__(self, *, order: List[str]) -> None: + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderUsernames": + # No flags + + order = TLObject.read(b, String) + + return ReorderUsernames(order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.order, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/report_peer.py b/pyrogram/raw/functions/account/report_peer.py new file mode 100644 index 00000000..539c7994 --- /dev/null +++ b/pyrogram/raw/functions/account/report_peer.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportPeer(TLObject): # type: ignore + """Report a peer for violation of telegram's Terms of Service + + + Details: + - Layer: ``224`` + - ID: ``C5BA3D86`` + + Parameters: + peer (:obj:`InputPeer `): + The peer to report + + reason (:obj:`ReportReason `): + The reason why this peer is being reported + + message (``str``): + Comment for report moderation + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "reason", "message"] + + ID = 0xc5ba3d86 + QUALNAME = "functions.account.ReportPeer" + + def __init__(self, *, peer: "raw.base.InputPeer", reason: "raw.base.ReportReason", message: str) -> None: + self.peer = peer # InputPeer + self.reason = reason # ReportReason + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportPeer": + # No flags + + peer = TLObject.read(b) + + reason = TLObject.read(b) + + message = String.read(b) + + return ReportPeer(peer=peer, reason=reason, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.reason.write()) + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/report_profile_photo.py b/pyrogram/raw/functions/account/report_profile_photo.py new file mode 100644 index 00000000..4d0a369f --- /dev/null +++ b/pyrogram/raw/functions/account/report_profile_photo.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportProfilePhoto(TLObject): # type: ignore + """Report a profile photo of a dialog + + + Details: + - Layer: ``224`` + - ID: ``FA8CC6F5`` + + Parameters: + peer (:obj:`InputPeer `): + The dialog + + photo_id (:obj:`InputPhoto `): + Dialog photo ID + + reason (:obj:`ReportReason `): + Report reason + + message (``str``): + Comment for report moderation + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "photo_id", "reason", "message"] + + ID = 0xfa8cc6f5 + QUALNAME = "functions.account.ReportProfilePhoto" + + def __init__(self, *, peer: "raw.base.InputPeer", photo_id: "raw.base.InputPhoto", reason: "raw.base.ReportReason", message: str) -> None: + self.peer = peer # InputPeer + self.photo_id = photo_id # InputPhoto + self.reason = reason # ReportReason + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportProfilePhoto": + # No flags + + peer = TLObject.read(b) + + photo_id = TLObject.read(b) + + reason = TLObject.read(b) + + message = String.read(b) + + return ReportProfilePhoto(peer=peer, photo_id=photo_id, reason=reason, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.photo_id.write()) + + b.write(self.reason.write()) + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/resend_password_email.py b/pyrogram/raw/functions/account/resend_password_email.py new file mode 100644 index 00000000..42e4dd90 --- /dev/null +++ b/pyrogram/raw/functions/account/resend_password_email.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResendPasswordEmail(TLObject): # type: ignore + """Resend the code to verify an email to use as 2FA recovery method. + + + Details: + - Layer: ``224`` + - ID: ``7A7F2A15`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x7a7f2a15 + QUALNAME = "functions.account.ResendPasswordEmail" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResendPasswordEmail": + # No flags + + return ResendPasswordEmail() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reset_authorization.py b/pyrogram/raw/functions/account/reset_authorization.py new file mode 100644 index 00000000..dccb5acf --- /dev/null +++ b/pyrogram/raw/functions/account/reset_authorization.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetAuthorization(TLObject): # type: ignore + """Log out an active authorized session by its hash + + + Details: + - Layer: ``224`` + - ID: ``DF77F3BC`` + + Parameters: + hash (``int`` ``64-bit``): + Session hash + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xdf77f3bc + QUALNAME = "functions.account.ResetAuthorization" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetAuthorization": + # No flags + + hash = Long.read(b) + + return ResetAuthorization(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reset_notify_settings.py b/pyrogram/raw/functions/account/reset_notify_settings.py new file mode 100644 index 00000000..b8f2c3af --- /dev/null +++ b/pyrogram/raw/functions/account/reset_notify_settings.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetNotifySettings(TLObject): # type: ignore + """Resets all notification settings from users and groups. + + + Details: + - Layer: ``224`` + - ID: ``DB7E1747`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0xdb7e1747 + QUALNAME = "functions.account.ResetNotifySettings" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetNotifySettings": + # No flags + + return ResetNotifySettings() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reset_password.py b/pyrogram/raw/functions/account/reset_password.py new file mode 100644 index 00000000..bd61306a --- /dev/null +++ b/pyrogram/raw/functions/account/reset_password.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetPassword(TLObject): # type: ignore + """Initiate a 2FA password reset: can only be used if the user is already logged-in, see here for more info » + + + Details: + - Layer: ``224`` + - ID: ``9308CE1B`` + + Parameters: + No parameters required. + + Returns: + :obj:`account.ResetPasswordResult ` + """ + + __slots__: List[str] = [] + + ID = 0x9308ce1b + QUALNAME = "functions.account.ResetPassword" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetPassword": + # No flags + + return ResetPassword() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reset_wall_papers.py b/pyrogram/raw/functions/account/reset_wall_papers.py new file mode 100644 index 00000000..2530e593 --- /dev/null +++ b/pyrogram/raw/functions/account/reset_wall_papers.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetWallPapers(TLObject): # type: ignore + """Delete all installed wallpapers, reverting to the default wallpaper set. + + + Details: + - Layer: ``224`` + - ID: ``BB3B9804`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0xbb3b9804 + QUALNAME = "functions.account.ResetWallPapers" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetWallPapers": + # No flags + + return ResetWallPapers() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reset_web_authorization.py b/pyrogram/raw/functions/account/reset_web_authorization.py new file mode 100644 index 00000000..f11f0e5b --- /dev/null +++ b/pyrogram/raw/functions/account/reset_web_authorization.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetWebAuthorization(TLObject): # type: ignore + """Log out an active web telegram login session + + + Details: + - Layer: ``224`` + - ID: ``2D01B9EF`` + + Parameters: + hash (``int`` ``64-bit``): + Session hash + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x2d01b9ef + QUALNAME = "functions.account.ResetWebAuthorization" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetWebAuthorization": + # No flags + + hash = Long.read(b) + + return ResetWebAuthorization(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/reset_web_authorizations.py b/pyrogram/raw/functions/account/reset_web_authorizations.py new file mode 100644 index 00000000..ec6311e4 --- /dev/null +++ b/pyrogram/raw/functions/account/reset_web_authorizations.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetWebAuthorizations(TLObject): # type: ignore + """Reset all active web telegram login sessions + + + Details: + - Layer: ``224`` + - ID: ``682D2594`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x682d2594 + QUALNAME = "functions.account.ResetWebAuthorizations" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetWebAuthorizations": + # No flags + + return ResetWebAuthorizations() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/resolve_business_chat_link.py b/pyrogram/raw/functions/account/resolve_business_chat_link.py new file mode 100644 index 00000000..51e4dc93 --- /dev/null +++ b/pyrogram/raw/functions/account/resolve_business_chat_link.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResolveBusinessChatLink(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``5492E5EE`` + + Parameters: + slug (``str``): + + + Returns: + :obj:`account.ResolvedBusinessChatLinks ` + """ + + __slots__: List[str] = ["slug"] + + ID = 0x5492e5ee + QUALNAME = "functions.account.ResolveBusinessChatLink" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResolveBusinessChatLink": + # No flags + + slug = String.read(b) + + return ResolveBusinessChatLink(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_auto_download_settings.py b/pyrogram/raw/functions/account/save_auto_download_settings.py new file mode 100644 index 00000000..6ed68c7a --- /dev/null +++ b/pyrogram/raw/functions/account/save_auto_download_settings.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveAutoDownloadSettings(TLObject): # type: ignore + """Change media autodownload settings + + + Details: + - Layer: ``224`` + - ID: ``76F36233`` + + Parameters: + settings (:obj:`AutoDownloadSettings `): + Media autodownload settings + + low (``bool``, *optional*): + Whether to save media in the low data usage preset + + high (``bool``, *optional*): + Whether to save media in the high data usage preset + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["settings", "low", "high"] + + ID = 0x76f36233 + QUALNAME = "functions.account.SaveAutoDownloadSettings" + + def __init__(self, *, settings: "raw.base.AutoDownloadSettings", low: Optional[bool] = None, high: Optional[bool] = None) -> None: + self.settings = settings # AutoDownloadSettings + self.low = low # flags.0?true + self.high = high # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveAutoDownloadSettings": + + flags = Int.read(b) + + low = True if flags & (1 << 0) else False + high = True if flags & (1 << 1) else False + settings = TLObject.read(b) + + return SaveAutoDownloadSettings(settings=settings, low=low, high=high) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.low else 0 + flags |= (1 << 1) if self.high else 0 + b.write(Int(flags)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_auto_save_settings.py b/pyrogram/raw/functions/account/save_auto_save_settings.py new file mode 100644 index 00000000..9180c6f1 --- /dev/null +++ b/pyrogram/raw/functions/account/save_auto_save_settings.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveAutoSaveSettings(TLObject): # type: ignore + """Modify autosave settings + + + Details: + - Layer: ``224`` + - ID: ``D69B8361`` + + Parameters: + settings (:obj:`AutoSaveSettings `): + The new autosave settings + + users (``bool``, *optional*): + Whether the new settings should affect all private chats + + chats (``bool``, *optional*): + Whether the new settings should affect all groups + + broadcasts (``bool``, *optional*): + Whether the new settings should affect all channels + + peer (:obj:`InputPeer `, *optional*): + Whether the new settings should affect a specific peer + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["settings", "users", "chats", "broadcasts", "peer"] + + ID = 0xd69b8361 + QUALNAME = "functions.account.SaveAutoSaveSettings" + + def __init__(self, *, settings: "raw.base.AutoSaveSettings", users: Optional[bool] = None, chats: Optional[bool] = None, broadcasts: Optional[bool] = None, peer: "raw.base.InputPeer" = None) -> None: + self.settings = settings # AutoSaveSettings + self.users = users # flags.0?true + self.chats = chats # flags.1?true + self.broadcasts = broadcasts # flags.2?true + self.peer = peer # flags.3?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveAutoSaveSettings": + + flags = Int.read(b) + + users = True if flags & (1 << 0) else False + chats = True if flags & (1 << 1) else False + broadcasts = True if flags & (1 << 2) else False + peer = TLObject.read(b) if flags & (1 << 3) else None + + settings = TLObject.read(b) + + return SaveAutoSaveSettings(settings=settings, users=users, chats=chats, broadcasts=broadcasts, peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.users else 0 + flags |= (1 << 1) if self.chats else 0 + flags |= (1 << 2) if self.broadcasts else 0 + flags |= (1 << 3) if self.peer is not None else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_music.py b/pyrogram/raw/functions/account/save_music.py new file mode 100644 index 00000000..18ab9865 --- /dev/null +++ b/pyrogram/raw/functions/account/save_music.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveMusic(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B26732A9`` + + Parameters: + id (:obj:`InputDocument `): + N/A + + unsave (``bool``, *optional*): + N/A + + after_id (:obj:`InputDocument `, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "unsave", "after_id"] + + ID = 0xb26732a9 + QUALNAME = "functions.account.SaveMusic" + + def __init__(self, *, id: "raw.base.InputDocument", unsave: Optional[bool] = None, after_id: "raw.base.InputDocument" = None) -> None: + self.id = id # InputDocument + self.unsave = unsave # flags.0?true + self.after_id = after_id # flags.1?InputDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveMusic": + + flags = Int.read(b) + + unsave = True if flags & (1 << 0) else False + id = TLObject.read(b) + + after_id = TLObject.read(b) if flags & (1 << 1) else None + + return SaveMusic(id=id, unsave=unsave, after_id=after_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.unsave else 0 + flags |= (1 << 1) if self.after_id is not None else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + if self.after_id is not None: + b.write(self.after_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_ringtone.py b/pyrogram/raw/functions/account/save_ringtone.py new file mode 100644 index 00000000..cc1a4f99 --- /dev/null +++ b/pyrogram/raw/functions/account/save_ringtone.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveRingtone(TLObject): # type: ignore + """Save or remove saved notification sound. + + + Details: + - Layer: ``224`` + - ID: ``3DEA5B03`` + + Parameters: + id (:obj:`InputDocument `): + Notification sound uploaded using account.uploadRingtone + + unsave (``bool``): + Whether to add or delete the notification sound + + Returns: + :obj:`account.SavedRingtone ` + """ + + __slots__: List[str] = ["id", "unsave"] + + ID = 0x3dea5b03 + QUALNAME = "functions.account.SaveRingtone" + + def __init__(self, *, id: "raw.base.InputDocument", unsave: bool) -> None: + self.id = id # InputDocument + self.unsave = unsave # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveRingtone": + # No flags + + id = TLObject.read(b) + + unsave = Bool.read(b) + + return SaveRingtone(id=id, unsave=unsave) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(Bool(self.unsave)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_secure_value.py b/pyrogram/raw/functions/account/save_secure_value.py new file mode 100644 index 00000000..12f9241d --- /dev/null +++ b/pyrogram/raw/functions/account/save_secure_value.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveSecureValue(TLObject): # type: ignore + """Securely save Telegram Passport document, for more info see the passport docs » + + + Details: + - Layer: ``224`` + - ID: ``899FE31D`` + + Parameters: + value (:obj:`InputSecureValue `): + Secure value, for more info see the passport docs » + + secure_secret_id (``int`` ``64-bit``): + Passport secret hash, for more info see the passport docs » + + Returns: + :obj:`SecureValue ` + """ + + __slots__: List[str] = ["value", "secure_secret_id"] + + ID = 0x899fe31d + QUALNAME = "functions.account.SaveSecureValue" + + def __init__(self, *, value: "raw.base.InputSecureValue", secure_secret_id: int) -> None: + self.value = value # InputSecureValue + self.secure_secret_id = secure_secret_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveSecureValue": + # No flags + + value = TLObject.read(b) + + secure_secret_id = Long.read(b) + + return SaveSecureValue(value=value, secure_secret_id=secure_secret_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.value.write()) + + b.write(Long(self.secure_secret_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_theme.py b/pyrogram/raw/functions/account/save_theme.py new file mode 100644 index 00000000..c3d044df --- /dev/null +++ b/pyrogram/raw/functions/account/save_theme.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveTheme(TLObject): # type: ignore + """Save a theme + + + Details: + - Layer: ``224`` + - ID: ``F257106C`` + + Parameters: + theme (:obj:`InputTheme `): + Theme to save + + unsave (``bool``): + Unsave + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["theme", "unsave"] + + ID = 0xf257106c + QUALNAME = "functions.account.SaveTheme" + + def __init__(self, *, theme: "raw.base.InputTheme", unsave: bool) -> None: + self.theme = theme # InputTheme + self.unsave = unsave # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveTheme": + # No flags + + theme = TLObject.read(b) + + unsave = Bool.read(b) + + return SaveTheme(theme=theme, unsave=unsave) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.theme.write()) + + b.write(Bool(self.unsave)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/save_wall_paper.py b/pyrogram/raw/functions/account/save_wall_paper.py new file mode 100644 index 00000000..58d40517 --- /dev/null +++ b/pyrogram/raw/functions/account/save_wall_paper.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveWallPaper(TLObject): # type: ignore + """Install/uninstall wallpaper + + + Details: + - Layer: ``224`` + - ID: ``6C5A5B37`` + + Parameters: + wallpaper (:obj:`InputWallPaper `): + Wallpaper to install or uninstall + + unsave (``bool``): + Uninstall wallpaper? + + settings (:obj:`WallPaperSettings `): + Wallpaper settings + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["wallpaper", "unsave", "settings"] + + ID = 0x6c5a5b37 + QUALNAME = "functions.account.SaveWallPaper" + + def __init__(self, *, wallpaper: "raw.base.InputWallPaper", unsave: bool, settings: "raw.base.WallPaperSettings") -> None: + self.wallpaper = wallpaper # InputWallPaper + self.unsave = unsave # Bool + self.settings = settings # WallPaperSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveWallPaper": + # No flags + + wallpaper = TLObject.read(b) + + unsave = Bool.read(b) + + settings = TLObject.read(b) + + return SaveWallPaper(wallpaper=wallpaper, unsave=unsave, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.wallpaper.write()) + + b.write(Bool(self.unsave)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/send_change_phone_code.py b/pyrogram/raw/functions/account/send_change_phone_code.py new file mode 100644 index 00000000..52b4c560 --- /dev/null +++ b/pyrogram/raw/functions/account/send_change_phone_code.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendChangePhoneCode(TLObject): # type: ignore + """Verify a new phone number to associate to the current account + + + Details: + - Layer: ``224`` + - ID: ``82574AE5`` + + Parameters: + phone_number (``str``): + New phone number + + settings (:obj:`CodeSettings `): + Phone code settings + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["phone_number", "settings"] + + ID = 0x82574ae5 + QUALNAME = "functions.account.SendChangePhoneCode" + + def __init__(self, *, phone_number: str, settings: "raw.base.CodeSettings") -> None: + self.phone_number = phone_number # string + self.settings = settings # CodeSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendChangePhoneCode": + # No flags + + phone_number = String.read(b) + + settings = TLObject.read(b) + + return SendChangePhoneCode(phone_number=phone_number, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/send_confirm_phone_code.py b/pyrogram/raw/functions/account/send_confirm_phone_code.py new file mode 100644 index 00000000..00eabeb6 --- /dev/null +++ b/pyrogram/raw/functions/account/send_confirm_phone_code.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendConfirmPhoneCode(TLObject): # type: ignore + """Send confirmation code to cancel account deletion, for more info click here » + + + Details: + - Layer: ``224`` + - ID: ``1B3FAA88`` + + Parameters: + hash (``str``): + The hash from the service notification, for more info click here » + + settings (:obj:`CodeSettings `): + Phone code settings + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["hash", "settings"] + + ID = 0x1b3faa88 + QUALNAME = "functions.account.SendConfirmPhoneCode" + + def __init__(self, *, hash: str, settings: "raw.base.CodeSettings") -> None: + self.hash = hash # string + self.settings = settings # CodeSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendConfirmPhoneCode": + # No flags + + hash = String.read(b) + + settings = TLObject.read(b) + + return SendConfirmPhoneCode(hash=hash, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.hash)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/send_verify_email_code.py b/pyrogram/raw/functions/account/send_verify_email_code.py new file mode 100644 index 00000000..e791404b --- /dev/null +++ b/pyrogram/raw/functions/account/send_verify_email_code.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendVerifyEmailCode(TLObject): # type: ignore + """Send an email verification code. + + + Details: + - Layer: ``224`` + - ID: ``98E037BB`` + + Parameters: + purpose (:obj:`EmailVerifyPurpose `): + Verification purpose. + + email (``str``): + The email where to send the code. + + Returns: + :obj:`account.SentEmailCode ` + """ + + __slots__: List[str] = ["purpose", "email"] + + ID = 0x98e037bb + QUALNAME = "functions.account.SendVerifyEmailCode" + + def __init__(self, *, purpose: "raw.base.EmailVerifyPurpose", email: str) -> None: + self.purpose = purpose # EmailVerifyPurpose + self.email = email # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendVerifyEmailCode": + # No flags + + purpose = TLObject.read(b) + + email = String.read(b) + + return SendVerifyEmailCode(purpose=purpose, email=email) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.purpose.write()) + + b.write(String(self.email)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/send_verify_phone_code.py b/pyrogram/raw/functions/account/send_verify_phone_code.py new file mode 100644 index 00000000..49239c91 --- /dev/null +++ b/pyrogram/raw/functions/account/send_verify_phone_code.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendVerifyPhoneCode(TLObject): # type: ignore + """Send the verification phone code for telegram passport. + + + Details: + - Layer: ``224`` + - ID: ``A5A356F9`` + + Parameters: + phone_number (``str``): + The phone number to verify + + settings (:obj:`CodeSettings `): + Phone code settings + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["phone_number", "settings"] + + ID = 0xa5a356f9 + QUALNAME = "functions.account.SendVerifyPhoneCode" + + def __init__(self, *, phone_number: str, settings: "raw.base.CodeSettings") -> None: + self.phone_number = phone_number # string + self.settings = settings # CodeSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendVerifyPhoneCode": + # No flags + + phone_number = String.read(b) + + settings = TLObject.read(b) + + return SendVerifyPhoneCode(phone_number=phone_number, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_account_ttl.py b/pyrogram/raw/functions/account/set_account_ttl.py new file mode 100644 index 00000000..5ed493bb --- /dev/null +++ b/pyrogram/raw/functions/account/set_account_ttl.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetAccountTTL(TLObject): # type: ignore + """Set account self-destruction period + + + Details: + - Layer: ``224`` + - ID: ``2442485E`` + + Parameters: + ttl (:obj:`AccountDaysTTL `): + Time to live in days + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["ttl"] + + ID = 0x2442485e + QUALNAME = "functions.account.SetAccountTTL" + + def __init__(self, *, ttl: "raw.base.AccountDaysTTL") -> None: + self.ttl = ttl # AccountDaysTTL + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetAccountTTL": + # No flags + + ttl = TLObject.read(b) + + return SetAccountTTL(ttl=ttl) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.ttl.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_authorization_ttl.py b/pyrogram/raw/functions/account/set_authorization_ttl.py new file mode 100644 index 00000000..1f0bf96a --- /dev/null +++ b/pyrogram/raw/functions/account/set_authorization_ttl.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetAuthorizationTTL(TLObject): # type: ignore + """Set time-to-live of current session + + + Details: + - Layer: ``224`` + - ID: ``BF899AA0`` + + Parameters: + authorization_ttl_days (``int`` ``32-bit``): + Time-to-live of current session in days + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["authorization_ttl_days"] + + ID = 0xbf899aa0 + QUALNAME = "functions.account.SetAuthorizationTTL" + + def __init__(self, *, authorization_ttl_days: int) -> None: + self.authorization_ttl_days = authorization_ttl_days # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetAuthorizationTTL": + # No flags + + authorization_ttl_days = Int.read(b) + + return SetAuthorizationTTL(authorization_ttl_days=authorization_ttl_days) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.authorization_ttl_days)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_contact_sign_up_notification.py b/pyrogram/raw/functions/account/set_contact_sign_up_notification.py new file mode 100644 index 00000000..bd9a2538 --- /dev/null +++ b/pyrogram/raw/functions/account/set_contact_sign_up_notification.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetContactSignUpNotification(TLObject): # type: ignore + """Toggle contact sign up notifications + + + Details: + - Layer: ``224`` + - ID: ``CFF43F61`` + + Parameters: + silent (``bool``): + Whether to disable contact sign up notifications + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["silent"] + + ID = 0xcff43f61 + QUALNAME = "functions.account.SetContactSignUpNotification" + + def __init__(self, *, silent: bool) -> None: + self.silent = silent # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetContactSignUpNotification": + # No flags + + silent = Bool.read(b) + + return SetContactSignUpNotification(silent=silent) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.silent)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_content_settings.py b/pyrogram/raw/functions/account/set_content_settings.py new file mode 100644 index 00000000..da63f4e9 --- /dev/null +++ b/pyrogram/raw/functions/account/set_content_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetContentSettings(TLObject): # type: ignore + """Set sensitive content settings (for viewing or hiding NSFW content) + + + Details: + - Layer: ``224`` + - ID: ``B574B16B`` + + Parameters: + sensitive_enabled (``bool``, *optional*): + Enable NSFW content + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["sensitive_enabled"] + + ID = 0xb574b16b + QUALNAME = "functions.account.SetContentSettings" + + def __init__(self, *, sensitive_enabled: Optional[bool] = None) -> None: + self.sensitive_enabled = sensitive_enabled # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetContentSettings": + + flags = Int.read(b) + + sensitive_enabled = True if flags & (1 << 0) else False + return SetContentSettings(sensitive_enabled=sensitive_enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.sensitive_enabled else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_global_privacy_settings.py b/pyrogram/raw/functions/account/set_global_privacy_settings.py new file mode 100644 index 00000000..8d88cf25 --- /dev/null +++ b/pyrogram/raw/functions/account/set_global_privacy_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetGlobalPrivacySettings(TLObject): # type: ignore + """Set global privacy settings + + + Details: + - Layer: ``224`` + - ID: ``1EDAAAC2`` + + Parameters: + settings (:obj:`GlobalPrivacySettings `): + Global privacy settings + + Returns: + :obj:`GlobalPrivacySettings ` + """ + + __slots__: List[str] = ["settings"] + + ID = 0x1edaaac2 + QUALNAME = "functions.account.SetGlobalPrivacySettings" + + def __init__(self, *, settings: "raw.base.GlobalPrivacySettings") -> None: + self.settings = settings # GlobalPrivacySettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetGlobalPrivacySettings": + # No flags + + settings = TLObject.read(b) + + return SetGlobalPrivacySettings(settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_main_profile_tab.py b/pyrogram/raw/functions/account/set_main_profile_tab.py new file mode 100644 index 00000000..0214647b --- /dev/null +++ b/pyrogram/raw/functions/account/set_main_profile_tab.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetMainProfileTab(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``5DEE78B0`` + + Parameters: + tab (:obj:`ProfileTab `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["tab"] + + ID = 0x5dee78b0 + QUALNAME = "functions.account.SetMainProfileTab" + + def __init__(self, *, tab: "raw.base.ProfileTab") -> None: + self.tab = tab # ProfileTab + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetMainProfileTab": + # No flags + + tab = TLObject.read(b) + + return SetMainProfileTab(tab=tab) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.tab.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_privacy.py b/pyrogram/raw/functions/account/set_privacy.py new file mode 100644 index 00000000..cec54cf2 --- /dev/null +++ b/pyrogram/raw/functions/account/set_privacy.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetPrivacy(TLObject): # type: ignore + """Change privacy settings of current account + + + Details: + - Layer: ``224`` + - ID: ``C9F81CE8`` + + Parameters: + key (:obj:`InputPrivacyKey `): + New privacy rule + + rules (List of :obj:`InputPrivacyRule `): + Peers to which the privacy rule will apply. + + Returns: + :obj:`account.PrivacyRules ` + """ + + __slots__: List[str] = ["key", "rules"] + + ID = 0xc9f81ce8 + QUALNAME = "functions.account.SetPrivacy" + + def __init__(self, *, key: "raw.base.InputPrivacyKey", rules: List["raw.base.InputPrivacyRule"]) -> None: + self.key = key # InputPrivacyKey + self.rules = rules # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetPrivacy": + # No flags + + key = TLObject.read(b) + + rules = TLObject.read(b) + + return SetPrivacy(key=key, rules=rules) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.key.write()) + + b.write(Vector(self.rules)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/set_reactions_notify_settings.py b/pyrogram/raw/functions/account/set_reactions_notify_settings.py new file mode 100644 index 00000000..e7ce73a3 --- /dev/null +++ b/pyrogram/raw/functions/account/set_reactions_notify_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetReactionsNotifySettings(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``316CE548`` + + Parameters: + settings (:obj:`ReactionsNotifySettings `): + + + Returns: + :obj:`ReactionsNotifySettings ` + """ + + __slots__: List[str] = ["settings"] + + ID = 0x316ce548 + QUALNAME = "functions.account.SetReactionsNotifySettings" + + def __init__(self, *, settings: "raw.base.ReactionsNotifySettings") -> None: + self.settings = settings # ReactionsNotifySettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetReactionsNotifySettings": + # No flags + + settings = TLObject.read(b) + + return SetReactionsNotifySettings(settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/toggle_connected_bot_paused.py b/pyrogram/raw/functions/account/toggle_connected_bot_paused.py new file mode 100644 index 00000000..02b3fde8 --- /dev/null +++ b/pyrogram/raw/functions/account/toggle_connected_bot_paused.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleConnectedBotPaused(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``646E1097`` + + Parameters: + peer (:obj:`InputPeer `): + + + paused (``bool``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "paused"] + + ID = 0x646e1097 + QUALNAME = "functions.account.ToggleConnectedBotPaused" + + def __init__(self, *, peer: "raw.base.InputPeer", paused: bool) -> None: + self.peer = peer # InputPeer + self.paused = paused # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleConnectedBotPaused": + # No flags + + peer = TLObject.read(b) + + paused = Bool.read(b) + + return ToggleConnectedBotPaused(peer=peer, paused=paused) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bool(self.paused)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/toggle_no_paid_messages_exception.py b/pyrogram/raw/functions/account/toggle_no_paid_messages_exception.py new file mode 100644 index 00000000..0c2d7bef --- /dev/null +++ b/pyrogram/raw/functions/account/toggle_no_paid_messages_exception.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleNoPaidMessagesException(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``FE2EDA76`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + refund_charged (``bool``, *optional*): + N/A + + require_payment (``bool``, *optional*): + N/A + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["user_id", "refund_charged", "require_payment", "parent_peer"] + + ID = 0xfe2eda76 + QUALNAME = "functions.account.ToggleNoPaidMessagesException" + + def __init__(self, *, user_id: "raw.base.InputUser", refund_charged: Optional[bool] = None, require_payment: Optional[bool] = None, parent_peer: "raw.base.InputPeer" = None) -> None: + self.user_id = user_id # InputUser + self.refund_charged = refund_charged # flags.0?true + self.require_payment = require_payment # flags.2?true + self.parent_peer = parent_peer # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleNoPaidMessagesException": + + flags = Int.read(b) + + refund_charged = True if flags & (1 << 0) else False + require_payment = True if flags & (1 << 2) else False + parent_peer = TLObject.read(b) if flags & (1 << 1) else None + + user_id = TLObject.read(b) + + return ToggleNoPaidMessagesException(user_id=user_id, refund_charged=refund_charged, require_payment=require_payment, parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.refund_charged else 0 + flags |= (1 << 2) if self.require_payment else 0 + flags |= (1 << 1) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/toggle_sponsored_messages.py b/pyrogram/raw/functions/account/toggle_sponsored_messages.py new file mode 100644 index 00000000..9f041de4 --- /dev/null +++ b/pyrogram/raw/functions/account/toggle_sponsored_messages.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleSponsoredMessages(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``B9D9A38D`` + + Parameters: + enabled (``bool``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["enabled"] + + ID = 0xb9d9a38d + QUALNAME = "functions.account.ToggleSponsoredMessages" + + def __init__(self, *, enabled: bool) -> None: + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleSponsoredMessages": + # No flags + + enabled = Bool.read(b) + + return ToggleSponsoredMessages(enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/toggle_username.py b/pyrogram/raw/functions/account/toggle_username.py new file mode 100644 index 00000000..dc8db806 --- /dev/null +++ b/pyrogram/raw/functions/account/toggle_username.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleUsername(TLObject): # type: ignore + """Activate or deactivate a purchased fragment.com username associated to the currently logged-in user. + + + Details: + - Layer: ``224`` + - ID: ``58D6B376`` + + Parameters: + username (``str``): + Username + + active (``bool``): + Whether to activate or deactivate it + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["username", "active"] + + ID = 0x58d6b376 + QUALNAME = "functions.account.ToggleUsername" + + def __init__(self, *, username: str, active: bool) -> None: + self.username = username # string + self.active = active # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleUsername": + # No flags + + username = String.read(b) + + active = Bool.read(b) + + return ToggleUsername(username=username, active=active) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.username)) + + b.write(Bool(self.active)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/unregister_device.py b/pyrogram/raw/functions/account/unregister_device.py new file mode 100644 index 00000000..33ac1763 --- /dev/null +++ b/pyrogram/raw/functions/account/unregister_device.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UnregisterDevice(TLObject): # type: ignore + """Deletes a device by its token, stops sending PUSH-notifications to it. + + + Details: + - Layer: ``224`` + - ID: ``6A0D3206`` + + Parameters: + token_type (``int`` ``32-bit``): + Device token type, see PUSH updates for the possible values. + + token (``str``): + Device token, see PUSH updates for the possible values. + + other_uids (List of ``int`` ``64-bit``): + List of user identifiers of other users currently using the client + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["token_type", "token", "other_uids"] + + ID = 0x6a0d3206 + QUALNAME = "functions.account.UnregisterDevice" + + def __init__(self, *, token_type: int, token: str, other_uids: List[int]) -> None: + self.token_type = token_type # int + self.token = token # string + self.other_uids = other_uids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UnregisterDevice": + # No flags + + token_type = Int.read(b) + + token = String.read(b) + + other_uids = TLObject.read(b, Long) + + return UnregisterDevice(token_type=token_type, token=token, other_uids=other_uids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.token_type)) + + b.write(String(self.token)) + + b.write(Vector(self.other_uids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_birthday.py b/pyrogram/raw/functions/account/update_birthday.py new file mode 100644 index 00000000..e64011e8 --- /dev/null +++ b/pyrogram/raw/functions/account/update_birthday.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateBirthday(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``CC6E0C11`` + + Parameters: + birthday (:obj:`Birthday `, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["birthday"] + + ID = 0xcc6e0c11 + QUALNAME = "functions.account.UpdateBirthday" + + def __init__(self, *, birthday: "raw.base.Birthday" = None) -> None: + self.birthday = birthday # flags.0?Birthday + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateBirthday": + + flags = Int.read(b) + + birthday = TLObject.read(b) if flags & (1 << 0) else None + + return UpdateBirthday(birthday=birthday) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.birthday is not None else 0 + b.write(Int(flags)) + + if self.birthday is not None: + b.write(self.birthday.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_business_away_message.py b/pyrogram/raw/functions/account/update_business_away_message.py new file mode 100644 index 00000000..f7c6dec1 --- /dev/null +++ b/pyrogram/raw/functions/account/update_business_away_message.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateBusinessAwayMessage(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``A26A7FA5`` + + Parameters: + message (:obj:`InputBusinessAwayMessage `, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["message"] + + ID = 0xa26a7fa5 + QUALNAME = "functions.account.UpdateBusinessAwayMessage" + + def __init__(self, *, message: "raw.base.InputBusinessAwayMessage" = None) -> None: + self.message = message # flags.0?InputBusinessAwayMessage + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateBusinessAwayMessage": + + flags = Int.read(b) + + message = TLObject.read(b) if flags & (1 << 0) else None + + return UpdateBusinessAwayMessage(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.message is not None else 0 + b.write(Int(flags)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_business_greeting_message.py b/pyrogram/raw/functions/account/update_business_greeting_message.py new file mode 100644 index 00000000..46d7c3fa --- /dev/null +++ b/pyrogram/raw/functions/account/update_business_greeting_message.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateBusinessGreetingMessage(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``66CDAFC4`` + + Parameters: + message (:obj:`InputBusinessGreetingMessage `, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["message"] + + ID = 0x66cdafc4 + QUALNAME = "functions.account.UpdateBusinessGreetingMessage" + + def __init__(self, *, message: "raw.base.InputBusinessGreetingMessage" = None) -> None: + self.message = message # flags.0?InputBusinessGreetingMessage + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateBusinessGreetingMessage": + + flags = Int.read(b) + + message = TLObject.read(b) if flags & (1 << 0) else None + + return UpdateBusinessGreetingMessage(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.message is not None else 0 + b.write(Int(flags)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_business_intro.py b/pyrogram/raw/functions/account/update_business_intro.py new file mode 100644 index 00000000..6a898e55 --- /dev/null +++ b/pyrogram/raw/functions/account/update_business_intro.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateBusinessIntro(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``A614D034`` + + Parameters: + intro (:obj:`InputBusinessIntro `, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["intro"] + + ID = 0xa614d034 + QUALNAME = "functions.account.UpdateBusinessIntro" + + def __init__(self, *, intro: "raw.base.InputBusinessIntro" = None) -> None: + self.intro = intro # flags.0?InputBusinessIntro + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateBusinessIntro": + + flags = Int.read(b) + + intro = TLObject.read(b) if flags & (1 << 0) else None + + return UpdateBusinessIntro(intro=intro) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.intro is not None else 0 + b.write(Int(flags)) + + if self.intro is not None: + b.write(self.intro.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_business_location.py b/pyrogram/raw/functions/account/update_business_location.py new file mode 100644 index 00000000..4866e5c8 --- /dev/null +++ b/pyrogram/raw/functions/account/update_business_location.py @@ -0,0 +1,68 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateBusinessLocation(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``9E6B131A`` + + Parameters: + geo_point (:obj:`InputGeoPoint `, *optional*): + + + address (``str``, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["geo_point", "address"] + + ID = 0x9e6b131a + QUALNAME = "functions.account.UpdateBusinessLocation" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint" = None, address: Optional[str] = None) -> None: + self.geo_point = geo_point # flags.1?InputGeoPoint + self.address = address # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateBusinessLocation": + + flags = Int.read(b) + + geo_point = TLObject.read(b) if flags & (1 << 1) else None + + address = String.read(b) if flags & (1 << 0) else None + return UpdateBusinessLocation(geo_point=geo_point, address=address) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.geo_point is not None else 0 + flags |= (1 << 0) if self.address is not None else 0 + b.write(Int(flags)) + + if self.geo_point is not None: + b.write(self.geo_point.write()) + + if self.address is not None: + b.write(String(self.address)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_business_work_hours.py b/pyrogram/raw/functions/account/update_business_work_hours.py new file mode 100644 index 00000000..680b5776 --- /dev/null +++ b/pyrogram/raw/functions/account/update_business_work_hours.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateBusinessWorkHours(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``4B00E066`` + + Parameters: + business_work_hours (:obj:`BusinessWorkHours `, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["business_work_hours"] + + ID = 0x4b00e066 + QUALNAME = "functions.account.UpdateBusinessWorkHours" + + def __init__(self, *, business_work_hours: "raw.base.BusinessWorkHours" = None) -> None: + self.business_work_hours = business_work_hours # flags.0?BusinessWorkHours + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateBusinessWorkHours": + + flags = Int.read(b) + + business_work_hours = TLObject.read(b) if flags & (1 << 0) else None + + return UpdateBusinessWorkHours(business_work_hours=business_work_hours) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.business_work_hours is not None else 0 + b.write(Int(flags)) + + if self.business_work_hours is not None: + b.write(self.business_work_hours.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_color.py b/pyrogram/raw/functions/account/update_color.py new file mode 100644 index 00000000..ccc55c66 --- /dev/null +++ b/pyrogram/raw/functions/account/update_color.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateColor(TLObject): # type: ignore + """Update the accent color and background custom emoji » of the current account. + + + Details: + - Layer: ``224`` + - ID: ``684D214E`` + + Parameters: + for_profile (``bool``, *optional*): + Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. + + color (:obj:`PeerColor `, *optional*): + ID of the accent color palette » to use (not RGB24, see here » for more info). + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["for_profile", "color"] + + ID = 0x684d214e + QUALNAME = "functions.account.UpdateColor" + + def __init__(self, *, for_profile: Optional[bool] = None, color: "raw.base.PeerColor" = None) -> None: + self.for_profile = for_profile # flags.1?true + self.color = color # flags.2?PeerColor + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateColor": + + flags = Int.read(b) + + for_profile = True if flags & (1 << 1) else False + color = TLObject.read(b) if flags & (1 << 2) else None + + return UpdateColor(for_profile=for_profile, color=color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.for_profile else 0 + flags |= (1 << 2) if self.color is not None else 0 + b.write(Int(flags)) + + if self.color is not None: + b.write(self.color.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_connected_bot.py b/pyrogram/raw/functions/account/update_connected_bot.py new file mode 100644 index 00000000..83332bb0 --- /dev/null +++ b/pyrogram/raw/functions/account/update_connected_bot.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateConnectedBot(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``66A08C7E`` + + Parameters: + bot (:obj:`InputUser `): + + + recipients (:obj:`InputBusinessBotRecipients `): + + + deleted (``bool``, *optional*): + + + rights (:obj:`BusinessBotRights `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["bot", "recipients", "deleted", "rights"] + + ID = 0x66a08c7e + QUALNAME = "functions.account.UpdateConnectedBot" + + def __init__(self, *, bot: "raw.base.InputUser", recipients: "raw.base.InputBusinessBotRecipients", deleted: Optional[bool] = None, rights: "raw.base.BusinessBotRights" = None) -> None: + self.bot = bot # InputUser + self.recipients = recipients # InputBusinessBotRecipients + self.deleted = deleted # flags.1?true + self.rights = rights # flags.0?BusinessBotRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateConnectedBot": + + flags = Int.read(b) + + deleted = True if flags & (1 << 1) else False + rights = TLObject.read(b) if flags & (1 << 0) else None + + bot = TLObject.read(b) + + recipients = TLObject.read(b) + + return UpdateConnectedBot(bot=bot, recipients=recipients, deleted=deleted, rights=rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.deleted else 0 + flags |= (1 << 0) if self.rights is not None else 0 + b.write(Int(flags)) + + if self.rights is not None: + b.write(self.rights.write()) + + b.write(self.bot.write()) + + b.write(self.recipients.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_device_locked.py b/pyrogram/raw/functions/account/update_device_locked.py new file mode 100644 index 00000000..79abd480 --- /dev/null +++ b/pyrogram/raw/functions/account/update_device_locked.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateDeviceLocked(TLObject): # type: ignore + """When client-side passcode lock feature is enabled, will not show message texts in incoming PUSH notifications. + + + Details: + - Layer: ``224`` + - ID: ``38DF3532`` + + Parameters: + period (``int`` ``32-bit``): + Inactivity period after which to start hiding message texts in PUSH notifications. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["period"] + + ID = 0x38df3532 + QUALNAME = "functions.account.UpdateDeviceLocked" + + def __init__(self, *, period: int) -> None: + self.period = period # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateDeviceLocked": + # No flags + + period = Int.read(b) + + return UpdateDeviceLocked(period=period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.period)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_emoji_status.py b/pyrogram/raw/functions/account/update_emoji_status.py new file mode 100644 index 00000000..816fb3dc --- /dev/null +++ b/pyrogram/raw/functions/account/update_emoji_status.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateEmojiStatus(TLObject): # type: ignore + """Set an emoji status + + + Details: + - Layer: ``224`` + - ID: ``FBD3DE6B`` + + Parameters: + emoji_status (:obj:`EmojiStatus `): + Emoji status to set + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["emoji_status"] + + ID = 0xfbd3de6b + QUALNAME = "functions.account.UpdateEmojiStatus" + + def __init__(self, *, emoji_status: "raw.base.EmojiStatus") -> None: + self.emoji_status = emoji_status # EmojiStatus + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateEmojiStatus": + # No flags + + emoji_status = TLObject.read(b) + + return UpdateEmojiStatus(emoji_status=emoji_status) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.emoji_status.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_notify_settings.py b/pyrogram/raw/functions/account/update_notify_settings.py new file mode 100644 index 00000000..13209acf --- /dev/null +++ b/pyrogram/raw/functions/account/update_notify_settings.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateNotifySettings(TLObject): # type: ignore + """Edits notification settings from a given user/group, from all users/all groups. + + + Details: + - Layer: ``224`` + - ID: ``84BE5B93`` + + Parameters: + peer (:obj:`InputNotifyPeer `): + Notification source + + settings (:obj:`InputPeerNotifySettings `): + Notification settings + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "settings"] + + ID = 0x84be5b93 + QUALNAME = "functions.account.UpdateNotifySettings" + + def __init__(self, *, peer: "raw.base.InputNotifyPeer", settings: "raw.base.InputPeerNotifySettings") -> None: + self.peer = peer # InputNotifyPeer + self.settings = settings # InputPeerNotifySettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateNotifySettings": + # No flags + + peer = TLObject.read(b) + + settings = TLObject.read(b) + + return UpdateNotifySettings(peer=peer, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_password_settings.py b/pyrogram/raw/functions/account/update_password_settings.py new file mode 100644 index 00000000..8aea2f8b --- /dev/null +++ b/pyrogram/raw/functions/account/update_password_settings.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdatePasswordSettings(TLObject): # type: ignore + """Set a new 2FA password + + + Details: + - Layer: ``224`` + - ID: ``A59B102F`` + + Parameters: + password (:obj:`InputCheckPasswordSRP `): + The old password (see SRP) + + new_settings (:obj:`account.PasswordInputSettings `): + The new password (see SRP) + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["password", "new_settings"] + + ID = 0xa59b102f + QUALNAME = "functions.account.UpdatePasswordSettings" + + def __init__(self, *, password: "raw.base.InputCheckPasswordSRP", new_settings: "raw.base.account.PasswordInputSettings") -> None: + self.password = password # InputCheckPasswordSRP + self.new_settings = new_settings # account.PasswordInputSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdatePasswordSettings": + # No flags + + password = TLObject.read(b) + + new_settings = TLObject.read(b) + + return UpdatePasswordSettings(password=password, new_settings=new_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.password.write()) + + b.write(self.new_settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_personal_channel.py b/pyrogram/raw/functions/account/update_personal_channel.py new file mode 100644 index 00000000..1e747cae --- /dev/null +++ b/pyrogram/raw/functions/account/update_personal_channel.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdatePersonalChannel(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``D94305E0`` + + Parameters: + channel (:obj:`InputChannel `): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel"] + + ID = 0xd94305e0 + QUALNAME = "functions.account.UpdatePersonalChannel" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdatePersonalChannel": + # No flags + + channel = TLObject.read(b) + + return UpdatePersonalChannel(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_profile.py b/pyrogram/raw/functions/account/update_profile.py new file mode 100644 index 00000000..d49251bf --- /dev/null +++ b/pyrogram/raw/functions/account/update_profile.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateProfile(TLObject): # type: ignore + """Updates user profile. + + + Details: + - Layer: ``224`` + - ID: ``78515775`` + + Parameters: + first_name (``str``, *optional*): + New user first name + + last_name (``str``, *optional*): + New user last name + + about (``str``, *optional*): + New bio + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["first_name", "last_name", "about"] + + ID = 0x78515775 + QUALNAME = "functions.account.UpdateProfile" + + def __init__(self, *, first_name: Optional[str] = None, last_name: Optional[str] = None, about: Optional[str] = None) -> None: + self.first_name = first_name # flags.0?string + self.last_name = last_name # flags.1?string + self.about = about # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateProfile": + + flags = Int.read(b) + + first_name = String.read(b) if flags & (1 << 0) else None + last_name = String.read(b) if flags & (1 << 1) else None + about = String.read(b) if flags & (1 << 2) else None + return UpdateProfile(first_name=first_name, last_name=last_name, about=about) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.first_name is not None else 0 + flags |= (1 << 1) if self.last_name is not None else 0 + flags |= (1 << 2) if self.about is not None else 0 + b.write(Int(flags)) + + if self.first_name is not None: + b.write(String(self.first_name)) + + if self.last_name is not None: + b.write(String(self.last_name)) + + if self.about is not None: + b.write(String(self.about)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_status.py b/pyrogram/raw/functions/account/update_status.py new file mode 100644 index 00000000..f97afb37 --- /dev/null +++ b/pyrogram/raw/functions/account/update_status.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateStatus(TLObject): # type: ignore + """Updates online user status. + + + Details: + - Layer: ``224`` + - ID: ``6628562C`` + + Parameters: + offline (``bool``): + If (boolTrue) is transmitted, user status will change to (userStatusOffline). + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["offline"] + + ID = 0x6628562c + QUALNAME = "functions.account.UpdateStatus" + + def __init__(self, *, offline: bool) -> None: + self.offline = offline # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateStatus": + # No flags + + offline = Bool.read(b) + + return UpdateStatus(offline=offline) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.offline)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_theme.py b/pyrogram/raw/functions/account/update_theme.py new file mode 100644 index 00000000..8c43406a --- /dev/null +++ b/pyrogram/raw/functions/account/update_theme.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateTheme(TLObject): # type: ignore + """Update theme + + + Details: + - Layer: ``224`` + - ID: ``2BF40CCC`` + + Parameters: + format (``str``): + Theme format, a string that identifies the theming engines supported by the client + + theme (:obj:`InputTheme `): + Theme to update + + slug (``str``, *optional*): + Unique theme ID + + title (``str``, *optional*): + Theme name + + document (:obj:`InputDocument `, *optional*): + Theme file + + settings (List of :obj:`InputThemeSettings `, *optional*): + Theme settings + + Returns: + :obj:`Theme ` + """ + + __slots__: List[str] = ["format", "theme", "slug", "title", "document", "settings"] + + ID = 0x2bf40ccc + QUALNAME = "functions.account.UpdateTheme" + + def __init__(self, *, format: str, theme: "raw.base.InputTheme", slug: Optional[str] = None, title: Optional[str] = None, document: "raw.base.InputDocument" = None, settings: Optional[List["raw.base.InputThemeSettings"]] = None) -> None: + self.format = format # string + self.theme = theme # InputTheme + self.slug = slug # flags.0?string + self.title = title # flags.1?string + self.document = document # flags.2?InputDocument + self.settings = settings # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateTheme": + + flags = Int.read(b) + + format = String.read(b) + + theme = TLObject.read(b) + + slug = String.read(b) if flags & (1 << 0) else None + title = String.read(b) if flags & (1 << 1) else None + document = TLObject.read(b) if flags & (1 << 2) else None + + settings = TLObject.read(b) if flags & (1 << 3) else [] + + return UpdateTheme(format=format, theme=theme, slug=slug, title=title, document=document, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.slug is not None else 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 2) if self.document is not None else 0 + flags |= (1 << 3) if self.settings else 0 + b.write(Int(flags)) + + b.write(String(self.format)) + + b.write(self.theme.write()) + + if self.slug is not None: + b.write(String(self.slug)) + + if self.title is not None: + b.write(String(self.title)) + + if self.document is not None: + b.write(self.document.write()) + + if self.settings is not None: + b.write(Vector(self.settings)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/update_username.py b/pyrogram/raw/functions/account/update_username.py new file mode 100644 index 00000000..c4b33449 --- /dev/null +++ b/pyrogram/raw/functions/account/update_username.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateUsername(TLObject): # type: ignore + """Changes username for the current user. + + + Details: + - Layer: ``224`` + - ID: ``3E0BDD7C`` + + Parameters: + username (``str``): + username or empty string if username is to be removedAccepted characters: a-z (case-insensitive), 0-9 and underscores.Length: 5-32 characters. + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["username"] + + ID = 0x3e0bdd7c + QUALNAME = "functions.account.UpdateUsername" + + def __init__(self, *, username: str) -> None: + self.username = username # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateUsername": + # No flags + + username = String.read(b) + + return UpdateUsername(username=username) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.username)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/upload_ringtone.py b/pyrogram/raw/functions/account/upload_ringtone.py new file mode 100644 index 00000000..25ea5e7c --- /dev/null +++ b/pyrogram/raw/functions/account/upload_ringtone.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadRingtone(TLObject): # type: ignore + """Upload notification sound, use account.saveRingtone to convert it and add it to the list of saved notification sounds. + + + Details: + - Layer: ``224`` + - ID: ``831A83A2`` + + Parameters: + file (:obj:`InputFile `): + Notification sound + + file_name (``str``): + File name + + mime_type (``str``): + MIME type of file + + Returns: + :obj:`Document ` + """ + + __slots__: List[str] = ["file", "file_name", "mime_type"] + + ID = 0x831a83a2 + QUALNAME = "functions.account.UploadRingtone" + + def __init__(self, *, file: "raw.base.InputFile", file_name: str, mime_type: str) -> None: + self.file = file # InputFile + self.file_name = file_name # string + self.mime_type = mime_type # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadRingtone": + # No flags + + file = TLObject.read(b) + + file_name = String.read(b) + + mime_type = String.read(b) + + return UploadRingtone(file=file, file_name=file_name, mime_type=mime_type) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.file.write()) + + b.write(String(self.file_name)) + + b.write(String(self.mime_type)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/upload_theme.py b/pyrogram/raw/functions/account/upload_theme.py new file mode 100644 index 00000000..dbb6061e --- /dev/null +++ b/pyrogram/raw/functions/account/upload_theme.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadTheme(TLObject): # type: ignore + """Upload theme + + + Details: + - Layer: ``224`` + - ID: ``1C3DB333`` + + Parameters: + file (:obj:`InputFile `): + Previously uploaded theme file with platform-specific colors for UI components, can be left unset when creating themes that only modify the wallpaper or accent colors. + + file_name (``str``): + File name + + mime_type (``str``): + MIME type, must be application/x-tgtheme-{format}, where format depends on the client + + thumb (:obj:`InputFile `, *optional*): + Thumbnail + + Returns: + :obj:`Document ` + """ + + __slots__: List[str] = ["file", "file_name", "mime_type", "thumb"] + + ID = 0x1c3db333 + QUALNAME = "functions.account.UploadTheme" + + def __init__(self, *, file: "raw.base.InputFile", file_name: str, mime_type: str, thumb: "raw.base.InputFile" = None) -> None: + self.file = file # InputFile + self.file_name = file_name # string + self.mime_type = mime_type # string + self.thumb = thumb # flags.0?InputFile + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadTheme": + + flags = Int.read(b) + + file = TLObject.read(b) + + thumb = TLObject.read(b) if flags & (1 << 0) else None + + file_name = String.read(b) + + mime_type = String.read(b) + + return UploadTheme(file=file, file_name=file_name, mime_type=mime_type, thumb=thumb) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.thumb is not None else 0 + b.write(Int(flags)) + + b.write(self.file.write()) + + if self.thumb is not None: + b.write(self.thumb.write()) + + b.write(String(self.file_name)) + + b.write(String(self.mime_type)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/upload_wall_paper.py b/pyrogram/raw/functions/account/upload_wall_paper.py new file mode 100644 index 00000000..3edb37e9 --- /dev/null +++ b/pyrogram/raw/functions/account/upload_wall_paper.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadWallPaper(TLObject): # type: ignore + """Create and upload a new wallpaper + + + Details: + - Layer: ``224`` + - ID: ``E39A8F03`` + + Parameters: + file (:obj:`InputFile `): + The JPG/PNG wallpaper + + mime_type (``str``): + MIME type of uploaded wallpaper + + settings (:obj:`WallPaperSettings `): + Wallpaper settings + + for_chat (``bool``, *optional*): + Set this flag when uploading wallpapers to be passed to messages.setChatWallPaper. + + Returns: + :obj:`WallPaper ` + """ + + __slots__: List[str] = ["file", "mime_type", "settings", "for_chat"] + + ID = 0xe39a8f03 + QUALNAME = "functions.account.UploadWallPaper" + + def __init__(self, *, file: "raw.base.InputFile", mime_type: str, settings: "raw.base.WallPaperSettings", for_chat: Optional[bool] = None) -> None: + self.file = file # InputFile + self.mime_type = mime_type # string + self.settings = settings # WallPaperSettings + self.for_chat = for_chat # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadWallPaper": + + flags = Int.read(b) + + for_chat = True if flags & (1 << 0) else False + file = TLObject.read(b) + + mime_type = String.read(b) + + settings = TLObject.read(b) + + return UploadWallPaper(file=file, mime_type=mime_type, settings=settings, for_chat=for_chat) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.for_chat else 0 + b.write(Int(flags)) + + b.write(self.file.write()) + + b.write(String(self.mime_type)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/verify_email.py b/pyrogram/raw/functions/account/verify_email.py new file mode 100644 index 00000000..1300f853 --- /dev/null +++ b/pyrogram/raw/functions/account/verify_email.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class VerifyEmail(TLObject): # type: ignore + """Verify an email address. + + + Details: + - Layer: ``224`` + - ID: ``32DA4CF`` + + Parameters: + purpose (:obj:`EmailVerifyPurpose `): + Verification purpose + + verification (:obj:`EmailVerification `): + Email verification code or token + + Returns: + :obj:`account.EmailVerified ` + """ + + __slots__: List[str] = ["purpose", "verification"] + + ID = 0x32da4cf + QUALNAME = "functions.account.VerifyEmail" + + def __init__(self, *, purpose: "raw.base.EmailVerifyPurpose", verification: "raw.base.EmailVerification") -> None: + self.purpose = purpose # EmailVerifyPurpose + self.verification = verification # EmailVerification + + @staticmethod + def read(b: BytesIO, *args: Any) -> "VerifyEmail": + # No flags + + purpose = TLObject.read(b) + + verification = TLObject.read(b) + + return VerifyEmail(purpose=purpose, verification=verification) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.purpose.write()) + + b.write(self.verification.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/account/verify_phone.py b/pyrogram/raw/functions/account/verify_phone.py new file mode 100644 index 00000000..e9932fbb --- /dev/null +++ b/pyrogram/raw/functions/account/verify_phone.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class VerifyPhone(TLObject): # type: ignore + """Verify a phone number for telegram passport. + + + Details: + - Layer: ``224`` + - ID: ``4DD3A7F6`` + + Parameters: + phone_number (``str``): + Phone number + + phone_code_hash (``str``): + Phone code hash received from the call to account.sendVerifyPhoneCode + + phone_code (``str``): + Code received after the call to account.sendVerifyPhoneCode + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "phone_code"] + + ID = 0x4dd3a7f6 + QUALNAME = "functions.account.VerifyPhone" + + def __init__(self, *, phone_number: str, phone_code_hash: str, phone_code: str) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.phone_code = phone_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "VerifyPhone": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + phone_code = String.read(b) + + return VerifyPhone(phone_number=phone_number, phone_code_hash=phone_code_hash, phone_code=phone_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + b.write(String(self.phone_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/__init__.py b/pyrogram/raw/functions/auth/__init__.py new file mode 100644 index 00000000..8252586f --- /dev/null +++ b/pyrogram/raw/functions/auth/__init__.py @@ -0,0 +1,85 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .send_code import SendCode +from .sign_up import SignUp +from .sign_in import SignIn +from .log_out import LogOut +from .reset_authorizations import ResetAuthorizations +from .export_authorization import ExportAuthorization +from .import_authorization import ImportAuthorization +from .bind_temp_auth_key import BindTempAuthKey +from .import_bot_authorization import ImportBotAuthorization +from .check_password import CheckPassword +from .request_password_recovery import RequestPasswordRecovery +from .recover_password import RecoverPassword +from .resend_code import ResendCode +from .cancel_code import CancelCode +from .drop_temp_auth_keys import DropTempAuthKeys +from .export_login_token import ExportLoginToken +from .import_login_token import ImportLoginToken +from .accept_login_token import AcceptLoginToken +from .check_recovery_password import CheckRecoveryPassword +from .import_web_token_authorization import ImportWebTokenAuthorization +from .request_firebase_sms import RequestFirebaseSms +from .reset_login_email import ResetLoginEmail +from .report_missing_code import ReportMissingCode +from .check_paid_auth import CheckPaidAuth +from .init_passkey_login import InitPasskeyLogin +from .finish_passkey_login import FinishPasskeyLogin + + +__all__ = [ + "SendCode", + "SignUp", + "SignIn", + "LogOut", + "ResetAuthorizations", + "ExportAuthorization", + "ImportAuthorization", + "BindTempAuthKey", + "ImportBotAuthorization", + "CheckPassword", + "RequestPasswordRecovery", + "RecoverPassword", + "ResendCode", + "CancelCode", + "DropTempAuthKeys", + "ExportLoginToken", + "ImportLoginToken", + "AcceptLoginToken", + "CheckRecoveryPassword", + "ImportWebTokenAuthorization", + "RequestFirebaseSms", + "ResetLoginEmail", + "ReportMissingCode", + "CheckPaidAuth", + "InitPasskeyLogin", + "FinishPasskeyLogin", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/auth/accept_login_token.py b/pyrogram/raw/functions/auth/accept_login_token.py new file mode 100644 index 00000000..28affa32 --- /dev/null +++ b/pyrogram/raw/functions/auth/accept_login_token.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptLoginToken(TLObject): # type: ignore + """Accept QR code login token, logging in the app that generated it. + + + Details: + - Layer: ``224`` + - ID: ``E894AD4D`` + + Parameters: + token (``bytes``): + Login token embedded in QR code, for more info, see login via QR code. + + Returns: + :obj:`Authorization ` + """ + + __slots__: List[str] = ["token"] + + ID = 0xe894ad4d + QUALNAME = "functions.auth.AcceptLoginToken" + + def __init__(self, *, token: bytes) -> None: + self.token = token # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptLoginToken": + # No flags + + token = Bytes.read(b) + + return AcceptLoginToken(token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/bind_temp_auth_key.py b/pyrogram/raw/functions/auth/bind_temp_auth_key.py new file mode 100644 index 00000000..eb0fb53b --- /dev/null +++ b/pyrogram/raw/functions/auth/bind_temp_auth_key.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BindTempAuthKey(TLObject): # type: ignore + """Binds a temporary authorization key temp_auth_key_id to the permanent authorization key perm_auth_key_id. Each permanent key may only be bound to one temporary key at a time, binding a new temporary key overwrites the previous one. + + + Details: + - Layer: ``224`` + - ID: ``CDD42A05`` + + Parameters: + perm_auth_key_id (``int`` ``64-bit``): + Permanent auth_key_id to bind to + + nonce (``int`` ``64-bit``): + Random long from Binding message contents + + expires_at (``int`` ``32-bit``): + Unix timestamp to invalidate temporary key, see Binding message contents + + encrypted_message (``bytes``): + See Generating encrypted_message + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["perm_auth_key_id", "nonce", "expires_at", "encrypted_message"] + + ID = 0xcdd42a05 + QUALNAME = "functions.auth.BindTempAuthKey" + + def __init__(self, *, perm_auth_key_id: int, nonce: int, expires_at: int, encrypted_message: bytes) -> None: + self.perm_auth_key_id = perm_auth_key_id # long + self.nonce = nonce # long + self.expires_at = expires_at # int + self.encrypted_message = encrypted_message # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BindTempAuthKey": + # No flags + + perm_auth_key_id = Long.read(b) + + nonce = Long.read(b) + + expires_at = Int.read(b) + + encrypted_message = Bytes.read(b) + + return BindTempAuthKey(perm_auth_key_id=perm_auth_key_id, nonce=nonce, expires_at=expires_at, encrypted_message=encrypted_message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.perm_auth_key_id)) + + b.write(Long(self.nonce)) + + b.write(Int(self.expires_at)) + + b.write(Bytes(self.encrypted_message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/cancel_code.py b/pyrogram/raw/functions/auth/cancel_code.py new file mode 100644 index 00000000..0f091fb5 --- /dev/null +++ b/pyrogram/raw/functions/auth/cancel_code.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CancelCode(TLObject): # type: ignore + """Cancel the login verification code + + + Details: + - Layer: ``224`` + - ID: ``1F040578`` + + Parameters: + phone_number (``str``): + Phone number + + phone_code_hash (``str``): + Phone code hash from auth.sendCode + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash"] + + ID = 0x1f040578 + QUALNAME = "functions.auth.CancelCode" + + def __init__(self, *, phone_number: str, phone_code_hash: str) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CancelCode": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + return CancelCode(phone_number=phone_number, phone_code_hash=phone_code_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/check_paid_auth.py b/pyrogram/raw/functions/auth/check_paid_auth.py new file mode 100644 index 00000000..c300e7ac --- /dev/null +++ b/pyrogram/raw/functions/auth/check_paid_auth.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckPaidAuth(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``56E59F9C`` + + Parameters: + phone_number (``str``): + N/A + + phone_code_hash (``str``): + N/A + + form_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "form_id"] + + ID = 0x56e59f9c + QUALNAME = "functions.auth.CheckPaidAuth" + + def __init__(self, *, phone_number: str, phone_code_hash: str, form_id: int) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.form_id = form_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckPaidAuth": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + form_id = Long.read(b) + + return CheckPaidAuth(phone_number=phone_number, phone_code_hash=phone_code_hash, form_id=form_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + b.write(Long(self.form_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/check_password.py b/pyrogram/raw/functions/auth/check_password.py new file mode 100644 index 00000000..5822df06 --- /dev/null +++ b/pyrogram/raw/functions/auth/check_password.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckPassword(TLObject): # type: ignore + """Try logging to an account protected by a 2FA password. + + + Details: + - Layer: ``224`` + - ID: ``D18B4D16`` + + Parameters: + password (:obj:`InputCheckPasswordSRP `): + The account's password (see SRP) + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["password"] + + ID = 0xd18b4d16 + QUALNAME = "functions.auth.CheckPassword" + + def __init__(self, *, password: "raw.base.InputCheckPasswordSRP") -> None: + self.password = password # InputCheckPasswordSRP + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckPassword": + # No flags + + password = TLObject.read(b) + + return CheckPassword(password=password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/check_recovery_password.py b/pyrogram/raw/functions/auth/check_recovery_password.py new file mode 100644 index 00000000..2cd92b9e --- /dev/null +++ b/pyrogram/raw/functions/auth/check_recovery_password.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckRecoveryPassword(TLObject): # type: ignore + """Check if the 2FA recovery code sent using auth.requestPasswordRecovery is valid, before passing it to auth.recoverPassword. + + + Details: + - Layer: ``224`` + - ID: ``D36BF79`` + + Parameters: + code (``str``): + Code received via email + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["code"] + + ID = 0xd36bf79 + QUALNAME = "functions.auth.CheckRecoveryPassword" + + def __init__(self, *, code: str) -> None: + self.code = code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckRecoveryPassword": + # No flags + + code = String.read(b) + + return CheckRecoveryPassword(code=code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/drop_temp_auth_keys.py b/pyrogram/raw/functions/auth/drop_temp_auth_keys.py new file mode 100644 index 00000000..0082a9a2 --- /dev/null +++ b/pyrogram/raw/functions/auth/drop_temp_auth_keys.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DropTempAuthKeys(TLObject): # type: ignore + """Delete all temporary authorization keys except for the ones specified + + + Details: + - Layer: ``224`` + - ID: ``8E48A188`` + + Parameters: + except_auth_keys (List of ``int`` ``64-bit``): + The auth keys that shouldn't be dropped. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["except_auth_keys"] + + ID = 0x8e48a188 + QUALNAME = "functions.auth.DropTempAuthKeys" + + def __init__(self, *, except_auth_keys: List[int]) -> None: + self.except_auth_keys = except_auth_keys # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DropTempAuthKeys": + # No flags + + except_auth_keys = TLObject.read(b, Long) + + return DropTempAuthKeys(except_auth_keys=except_auth_keys) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.except_auth_keys, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/export_authorization.py b/pyrogram/raw/functions/auth/export_authorization.py new file mode 100644 index 00000000..e456b204 --- /dev/null +++ b/pyrogram/raw/functions/auth/export_authorization.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportAuthorization(TLObject): # type: ignore + """Returns data for copying authorization to another data-center. + + + Details: + - Layer: ``224`` + - ID: ``E5BFFFCD`` + + Parameters: + dc_id (``int`` ``32-bit``): + Number of a target data-center + + Returns: + :obj:`auth.ExportedAuthorization ` + """ + + __slots__: List[str] = ["dc_id"] + + ID = 0xe5bfffcd + QUALNAME = "functions.auth.ExportAuthorization" + + def __init__(self, *, dc_id: int) -> None: + self.dc_id = dc_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportAuthorization": + # No flags + + dc_id = Int.read(b) + + return ExportAuthorization(dc_id=dc_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.dc_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/export_login_token.py b/pyrogram/raw/functions/auth/export_login_token.py new file mode 100644 index 00000000..78249a7d --- /dev/null +++ b/pyrogram/raw/functions/auth/export_login_token.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportLoginToken(TLObject): # type: ignore + """Generate a login token, for login via QR code. +The generated login token should be encoded using base64url, then shown as a tg://login?token=base64encodedtoken deep link » in the QR code. + + + Details: + - Layer: ``224`` + - ID: ``B7E085FE`` + + Parameters: + api_id (``int`` ``32-bit``): + Application identifier (see. App configuration) + + api_hash (``str``): + Application identifier hash (see. App configuration) + + except_ids (List of ``int`` ``64-bit``): + List of already logged-in user IDs, to prevent logging in twice with the same user + + Returns: + :obj:`auth.LoginToken ` + """ + + __slots__: List[str] = ["api_id", "api_hash", "except_ids"] + + ID = 0xb7e085fe + QUALNAME = "functions.auth.ExportLoginToken" + + def __init__(self, *, api_id: int, api_hash: str, except_ids: List[int]) -> None: + self.api_id = api_id # int + self.api_hash = api_hash # string + self.except_ids = except_ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportLoginToken": + # No flags + + api_id = Int.read(b) + + api_hash = String.read(b) + + except_ids = TLObject.read(b, Long) + + return ExportLoginToken(api_id=api_id, api_hash=api_hash, except_ids=except_ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.api_id)) + + b.write(String(self.api_hash)) + + b.write(Vector(self.except_ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/finish_passkey_login.py b/pyrogram/raw/functions/auth/finish_passkey_login.py new file mode 100644 index 00000000..f15d53c5 --- /dev/null +++ b/pyrogram/raw/functions/auth/finish_passkey_login.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FinishPasskeyLogin(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``9857AD07`` + + Parameters: + credential (:obj:`InputPasskeyCredential `): + N/A + + from_dc_id (``int`` ``32-bit``, *optional*): + N/A + + from_auth_key_id (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["credential", "from_dc_id", "from_auth_key_id"] + + ID = 0x9857ad07 + QUALNAME = "functions.auth.FinishPasskeyLogin" + + def __init__(self, *, credential: "raw.base.InputPasskeyCredential", from_dc_id: Optional[int] = None, from_auth_key_id: Optional[int] = None) -> None: + self.credential = credential # InputPasskeyCredential + self.from_dc_id = from_dc_id # flags.0?int + self.from_auth_key_id = from_auth_key_id # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FinishPasskeyLogin": + + flags = Int.read(b) + + credential = TLObject.read(b) + + from_dc_id = Int.read(b) if flags & (1 << 0) else None + from_auth_key_id = Long.read(b) if flags & (1 << 0) else None + return FinishPasskeyLogin(credential=credential, from_dc_id=from_dc_id, from_auth_key_id=from_auth_key_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.from_dc_id is not None else 0 + flags |= (1 << 0) if self.from_auth_key_id is not None else 0 + b.write(Int(flags)) + + b.write(self.credential.write()) + + if self.from_dc_id is not None: + b.write(Int(self.from_dc_id)) + + if self.from_auth_key_id is not None: + b.write(Long(self.from_auth_key_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/import_authorization.py b/pyrogram/raw/functions/auth/import_authorization.py new file mode 100644 index 00000000..da4de9ff --- /dev/null +++ b/pyrogram/raw/functions/auth/import_authorization.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportAuthorization(TLObject): # type: ignore + """Logs in a user using a key transmitted from his native data-center. + + + Details: + - Layer: ``224`` + - ID: ``A57A7DAD`` + + Parameters: + id (``int`` ``64-bit``): + User ID + + bytes (``bytes``): + Authorization key + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["id", "bytes"] + + ID = 0xa57a7dad + QUALNAME = "functions.auth.ImportAuthorization" + + def __init__(self, *, id: int, bytes: bytes) -> None: + self.id = id # long + self.bytes = bytes # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportAuthorization": + # No flags + + id = Long.read(b) + + bytes = Bytes.read(b) + + return ImportAuthorization(id=id, bytes=bytes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Bytes(self.bytes)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/import_bot_authorization.py b/pyrogram/raw/functions/auth/import_bot_authorization.py new file mode 100644 index 00000000..08132151 --- /dev/null +++ b/pyrogram/raw/functions/auth/import_bot_authorization.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportBotAuthorization(TLObject): # type: ignore + """Login as a bot + + + Details: + - Layer: ``224`` + - ID: ``67A3FF2C`` + + Parameters: + flags (``int`` ``32-bit``): + Reserved for future use + + api_id (``int`` ``32-bit``): + Application identifier (see. App configuration) + + api_hash (``str``): + Application identifier hash (see. App configuration) + + bot_auth_token (``str``): + Bot token (see bots) + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["flags", "api_id", "api_hash", "bot_auth_token"] + + ID = 0x67a3ff2c + QUALNAME = "functions.auth.ImportBotAuthorization" + + def __init__(self, *, flags: int, api_id: int, api_hash: str, bot_auth_token: str) -> None: + self.flags = flags # int + self.api_id = api_id # int + self.api_hash = api_hash # string + self.bot_auth_token = bot_auth_token # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportBotAuthorization": + # No flags + + flags = Int.read(b) + + api_id = Int.read(b) + + api_hash = String.read(b) + + bot_auth_token = String.read(b) + + return ImportBotAuthorization(flags=flags, api_id=api_id, api_hash=api_hash, bot_auth_token=bot_auth_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.flags)) + + b.write(Int(self.api_id)) + + b.write(String(self.api_hash)) + + b.write(String(self.bot_auth_token)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/import_login_token.py b/pyrogram/raw/functions/auth/import_login_token.py new file mode 100644 index 00000000..933c7fed --- /dev/null +++ b/pyrogram/raw/functions/auth/import_login_token.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportLoginToken(TLObject): # type: ignore + """Login using a redirected login token, generated in case of DC mismatch during QR code login. + + + Details: + - Layer: ``224`` + - ID: ``95AC5CE4`` + + Parameters: + token (``bytes``): + Login token + + Returns: + :obj:`auth.LoginToken ` + """ + + __slots__: List[str] = ["token"] + + ID = 0x95ac5ce4 + QUALNAME = "functions.auth.ImportLoginToken" + + def __init__(self, *, token: bytes) -> None: + self.token = token # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportLoginToken": + # No flags + + token = Bytes.read(b) + + return ImportLoginToken(token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/import_web_token_authorization.py b/pyrogram/raw/functions/auth/import_web_token_authorization.py new file mode 100644 index 00000000..e799451d --- /dev/null +++ b/pyrogram/raw/functions/auth/import_web_token_authorization.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportWebTokenAuthorization(TLObject): # type: ignore + """Login by importing an authorization token + + + Details: + - Layer: ``224`` + - ID: ``2DB873A9`` + + Parameters: + api_id (``int`` ``32-bit``): + API ID + + api_hash (``str``): + API hash + + web_auth_token (``str``): + The authorization token + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["api_id", "api_hash", "web_auth_token"] + + ID = 0x2db873a9 + QUALNAME = "functions.auth.ImportWebTokenAuthorization" + + def __init__(self, *, api_id: int, api_hash: str, web_auth_token: str) -> None: + self.api_id = api_id # int + self.api_hash = api_hash # string + self.web_auth_token = web_auth_token # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportWebTokenAuthorization": + # No flags + + api_id = Int.read(b) + + api_hash = String.read(b) + + web_auth_token = String.read(b) + + return ImportWebTokenAuthorization(api_id=api_id, api_hash=api_hash, web_auth_token=web_auth_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.api_id)) + + b.write(String(self.api_hash)) + + b.write(String(self.web_auth_token)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/init_passkey_login.py b/pyrogram/raw/functions/auth/init_passkey_login.py new file mode 100644 index 00000000..45235078 --- /dev/null +++ b/pyrogram/raw/functions/auth/init_passkey_login.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InitPasskeyLogin(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``518AD0B7`` + + Parameters: + api_id (``int`` ``32-bit``): + N/A + + api_hash (``str``): + N/A + + Returns: + :obj:`auth.PasskeyLoginOptions ` + """ + + __slots__: List[str] = ["api_id", "api_hash"] + + ID = 0x518ad0b7 + QUALNAME = "functions.auth.InitPasskeyLogin" + + def __init__(self, *, api_id: int, api_hash: str) -> None: + self.api_id = api_id # int + self.api_hash = api_hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InitPasskeyLogin": + # No flags + + api_id = Int.read(b) + + api_hash = String.read(b) + + return InitPasskeyLogin(api_id=api_id, api_hash=api_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.api_id)) + + b.write(String(self.api_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/log_out.py b/pyrogram/raw/functions/auth/log_out.py new file mode 100644 index 00000000..062d8db8 --- /dev/null +++ b/pyrogram/raw/functions/auth/log_out.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LogOut(TLObject): # type: ignore + """Logs out the user. + + + Details: + - Layer: ``224`` + - ID: ``3E72BA19`` + + Parameters: + No parameters required. + + Returns: + :obj:`auth.LoggedOut ` + """ + + __slots__: List[str] = [] + + ID = 0x3e72ba19 + QUALNAME = "functions.auth.LogOut" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LogOut": + # No flags + + return LogOut() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/recover_password.py b/pyrogram/raw/functions/auth/recover_password.py new file mode 100644 index 00000000..e3913608 --- /dev/null +++ b/pyrogram/raw/functions/auth/recover_password.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RecoverPassword(TLObject): # type: ignore + """Reset the 2FA password using the recovery code sent using auth.requestPasswordRecovery. + + + Details: + - Layer: ``224`` + - ID: ``37096C70`` + + Parameters: + code (``str``): + Code received via email + + new_settings (:obj:`account.PasswordInputSettings `, *optional*): + New password + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["code", "new_settings"] + + ID = 0x37096c70 + QUALNAME = "functions.auth.RecoverPassword" + + def __init__(self, *, code: str, new_settings: "raw.base.account.PasswordInputSettings" = None) -> None: + self.code = code # string + self.new_settings = new_settings # flags.0?account.PasswordInputSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RecoverPassword": + + flags = Int.read(b) + + code = String.read(b) + + new_settings = TLObject.read(b) if flags & (1 << 0) else None + + return RecoverPassword(code=code, new_settings=new_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.new_settings is not None else 0 + b.write(Int(flags)) + + b.write(String(self.code)) + + if self.new_settings is not None: + b.write(self.new_settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/report_missing_code.py b/pyrogram/raw/functions/auth/report_missing_code.py new file mode 100644 index 00000000..652911ee --- /dev/null +++ b/pyrogram/raw/functions/auth/report_missing_code.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportMissingCode(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``CB9DEFF6`` + + Parameters: + phone_number (``str``): + + + phone_code_hash (``str``): + + + mnc (``str``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "mnc"] + + ID = 0xcb9deff6 + QUALNAME = "functions.auth.ReportMissingCode" + + def __init__(self, *, phone_number: str, phone_code_hash: str, mnc: str) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.mnc = mnc # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportMissingCode": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + mnc = String.read(b) + + return ReportMissingCode(phone_number=phone_number, phone_code_hash=phone_code_hash, mnc=mnc) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + b.write(String(self.mnc)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/request_firebase_sms.py b/pyrogram/raw/functions/auth/request_firebase_sms.py new file mode 100644 index 00000000..394b7af8 --- /dev/null +++ b/pyrogram/raw/functions/auth/request_firebase_sms.py @@ -0,0 +1,92 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestFirebaseSms(TLObject): # type: ignore + """Request an SMS code via Firebase. + + + Details: + - Layer: ``224`` + - ID: ``8E39261E`` + + Parameters: + phone_number (``str``): + Phone number + + phone_code_hash (``str``): + Phone code hash returned by auth.sendCode + + safety_net_token (``str``, *optional*): + On Android, a JWS object obtained as described in the auth documentation » + + play_integrity_token (``str``, *optional*): + + + ios_push_secret (``str``, *optional*): + Secret token received via an apple push notification + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "safety_net_token", "play_integrity_token", "ios_push_secret"] + + ID = 0x8e39261e + QUALNAME = "functions.auth.RequestFirebaseSms" + + def __init__(self, *, phone_number: str, phone_code_hash: str, safety_net_token: Optional[str] = None, play_integrity_token: Optional[str] = None, ios_push_secret: Optional[str] = None) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.safety_net_token = safety_net_token # flags.0?string + self.play_integrity_token = play_integrity_token # flags.2?string + self.ios_push_secret = ios_push_secret # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestFirebaseSms": + + flags = Int.read(b) + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + safety_net_token = String.read(b) if flags & (1 << 0) else None + play_integrity_token = String.read(b) if flags & (1 << 2) else None + ios_push_secret = String.read(b) if flags & (1 << 1) else None + return RequestFirebaseSms(phone_number=phone_number, phone_code_hash=phone_code_hash, safety_net_token=safety_net_token, play_integrity_token=play_integrity_token, ios_push_secret=ios_push_secret) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.safety_net_token is not None else 0 + flags |= (1 << 2) if self.play_integrity_token is not None else 0 + flags |= (1 << 1) if self.ios_push_secret is not None else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + if self.safety_net_token is not None: + b.write(String(self.safety_net_token)) + + if self.play_integrity_token is not None: + b.write(String(self.play_integrity_token)) + + if self.ios_push_secret is not None: + b.write(String(self.ios_push_secret)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/request_password_recovery.py b/pyrogram/raw/functions/auth/request_password_recovery.py new file mode 100644 index 00000000..275edeac --- /dev/null +++ b/pyrogram/raw/functions/auth/request_password_recovery.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestPasswordRecovery(TLObject): # type: ignore + """Request recovery code of a 2FA password, only for accounts with a recovery email configured. + + + Details: + - Layer: ``224`` + - ID: ``D897BC66`` + + Parameters: + No parameters required. + + Returns: + :obj:`auth.PasswordRecovery ` + """ + + __slots__: List[str] = [] + + ID = 0xd897bc66 + QUALNAME = "functions.auth.RequestPasswordRecovery" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestPasswordRecovery": + # No flags + + return RequestPasswordRecovery() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/resend_code.py b/pyrogram/raw/functions/auth/resend_code.py new file mode 100644 index 00000000..de12cead --- /dev/null +++ b/pyrogram/raw/functions/auth/resend_code.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResendCode(TLObject): # type: ignore + """Resend the login code via another medium, the phone code type is determined by the return value of the previous auth.sendCode/auth.resendCode: see login for more info. + + + Details: + - Layer: ``224`` + - ID: ``CAE47523`` + + Parameters: + phone_number (``str``): + The phone number + + phone_code_hash (``str``): + The phone code hash obtained from auth.sendCode + + reason (``str``, *optional*): + + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "reason"] + + ID = 0xcae47523 + QUALNAME = "functions.auth.ResendCode" + + def __init__(self, *, phone_number: str, phone_code_hash: str, reason: Optional[str] = None) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.reason = reason # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResendCode": + + flags = Int.read(b) + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + reason = String.read(b) if flags & (1 << 0) else None + return ResendCode(phone_number=phone_number, phone_code_hash=phone_code_hash, reason=reason) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.reason is not None else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + if self.reason is not None: + b.write(String(self.reason)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/reset_authorizations.py b/pyrogram/raw/functions/auth/reset_authorizations.py new file mode 100644 index 00000000..ebc25cdd --- /dev/null +++ b/pyrogram/raw/functions/auth/reset_authorizations.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetAuthorizations(TLObject): # type: ignore + """Terminates all user's authorized sessions except for the current one. + + + Details: + - Layer: ``224`` + - ID: ``9FAB0D1A`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x9fab0d1a + QUALNAME = "functions.auth.ResetAuthorizations" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetAuthorizations": + # No flags + + return ResetAuthorizations() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/reset_login_email.py b/pyrogram/raw/functions/auth/reset_login_email.py new file mode 100644 index 00000000..2a608dde --- /dev/null +++ b/pyrogram/raw/functions/auth/reset_login_email.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetLoginEmail(TLObject): # type: ignore + """Reset the login email ». + + + Details: + - Layer: ``224`` + - ID: ``7E960193`` + + Parameters: + phone_number (``str``): + Phone number of the account + + phone_code_hash (``str``): + Phone code hash, obtained as described in the documentation » + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash"] + + ID = 0x7e960193 + QUALNAME = "functions.auth.ResetLoginEmail" + + def __init__(self, *, phone_number: str, phone_code_hash: str) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetLoginEmail": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + return ResetLoginEmail(phone_number=phone_number, phone_code_hash=phone_code_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/send_code.py b/pyrogram/raw/functions/auth/send_code.py new file mode 100644 index 00000000..f6221e5c --- /dev/null +++ b/pyrogram/raw/functions/auth/send_code.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendCode(TLObject): # type: ignore + """Send the verification code for login + + + Details: + - Layer: ``224`` + - ID: ``A677244F`` + + Parameters: + phone_number (``str``): + Phone number in international format + + api_id (``int`` ``32-bit``): + Application identifier (see App configuration) + + api_hash (``str``): + Application secret hash (see App configuration) + + settings (:obj:`CodeSettings `): + Settings for the code type to send + + Returns: + :obj:`auth.SentCode ` + """ + + __slots__: List[str] = ["phone_number", "api_id", "api_hash", "settings"] + + ID = 0xa677244f + QUALNAME = "functions.auth.SendCode" + + def __init__(self, *, phone_number: str, api_id: int, api_hash: str, settings: "raw.base.CodeSettings") -> None: + self.phone_number = phone_number # string + self.api_id = api_id # int + self.api_hash = api_hash # string + self.settings = settings # CodeSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendCode": + # No flags + + phone_number = String.read(b) + + api_id = Int.read(b) + + api_hash = String.read(b) + + settings = TLObject.read(b) + + return SendCode(phone_number=phone_number, api_id=api_id, api_hash=api_hash, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(Int(self.api_id)) + + b.write(String(self.api_hash)) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/sign_in.py b/pyrogram/raw/functions/auth/sign_in.py new file mode 100644 index 00000000..6e6a11e5 --- /dev/null +++ b/pyrogram/raw/functions/auth/sign_in.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SignIn(TLObject): # type: ignore + """Signs in a user with a validated phone number. + + + Details: + - Layer: ``224`` + - ID: ``8D52A951`` + + Parameters: + phone_number (``str``): + Phone number in the international format + + phone_code_hash (``str``): + SMS-message ID, obtained from auth.sendCode + + phone_code (``str``, *optional*): + Valid numerical code from the SMS-message + + email_verification (:obj:`EmailVerification `, *optional*): + Email verification code or token + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "phone_code", "email_verification"] + + ID = 0x8d52a951 + QUALNAME = "functions.auth.SignIn" + + def __init__(self, *, phone_number: str, phone_code_hash: str, phone_code: Optional[str] = None, email_verification: "raw.base.EmailVerification" = None) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.phone_code = phone_code # flags.0?string + self.email_verification = email_verification # flags.1?EmailVerification + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SignIn": + + flags = Int.read(b) + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + phone_code = String.read(b) if flags & (1 << 0) else None + email_verification = TLObject.read(b) if flags & (1 << 1) else None + + return SignIn(phone_number=phone_number, phone_code_hash=phone_code_hash, phone_code=phone_code, email_verification=email_verification) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.phone_code is not None else 0 + flags |= (1 << 1) if self.email_verification is not None else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + if self.phone_code is not None: + b.write(String(self.phone_code)) + + if self.email_verification is not None: + b.write(self.email_verification.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/auth/sign_up.py b/pyrogram/raw/functions/auth/sign_up.py new file mode 100644 index 00000000..c2b29aa8 --- /dev/null +++ b/pyrogram/raw/functions/auth/sign_up.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SignUp(TLObject): # type: ignore + """Registers a validated phone number in the system. + + + Details: + - Layer: ``224`` + - ID: ``AAC7B717`` + + Parameters: + phone_number (``str``): + Phone number in the international format + + phone_code_hash (``str``): + SMS-message ID + + first_name (``str``): + New user first name + + last_name (``str``): + New user last name + + no_joined_notifications (``bool``, *optional*): + + + Returns: + :obj:`auth.Authorization ` + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "first_name", "last_name", "no_joined_notifications"] + + ID = 0xaac7b717 + QUALNAME = "functions.auth.SignUp" + + def __init__(self, *, phone_number: str, phone_code_hash: str, first_name: str, last_name: str, no_joined_notifications: Optional[bool] = None) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.first_name = first_name # string + self.last_name = last_name # string + self.no_joined_notifications = no_joined_notifications # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SignUp": + + flags = Int.read(b) + + no_joined_notifications = True if flags & (1 << 0) else False + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + return SignUp(phone_number=phone_number, phone_code_hash=phone_code_hash, first_name=first_name, last_name=last_name, no_joined_notifications=no_joined_notifications) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.no_joined_notifications else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/__init__.py b/pyrogram/raw/functions/bots/__init__.py new file mode 100644 index 00000000..ac7ece30 --- /dev/null +++ b/pyrogram/raw/functions/bots/__init__.py @@ -0,0 +1,93 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .send_custom_request import SendCustomRequest +from .answer_webhook_json_query import AnswerWebhookJSONQuery +from .set_bot_commands import SetBotCommands +from .reset_bot_commands import ResetBotCommands +from .get_bot_commands import GetBotCommands +from .set_bot_menu_button import SetBotMenuButton +from .get_bot_menu_button import GetBotMenuButton +from .set_bot_broadcast_default_admin_rights import SetBotBroadcastDefaultAdminRights +from .set_bot_group_default_admin_rights import SetBotGroupDefaultAdminRights +from .set_bot_info import SetBotInfo +from .get_bot_info import GetBotInfo +from .reorder_usernames import ReorderUsernames +from .toggle_username import ToggleUsername +from .can_send_message import CanSendMessage +from .allow_send_message import AllowSendMessage +from .invoke_web_view_custom_method import InvokeWebViewCustomMethod +from .get_popular_app_bots import GetPopularAppBots +from .add_preview_media import AddPreviewMedia +from .edit_preview_media import EditPreviewMedia +from .delete_preview_media import DeletePreviewMedia +from .reorder_preview_medias import ReorderPreviewMedias +from .get_preview_info import GetPreviewInfo +from .get_preview_medias import GetPreviewMedias +from .update_user_emoji_status import UpdateUserEmojiStatus +from .toggle_user_emoji_status_permission import ToggleUserEmojiStatusPermission +from .check_download_file_params import CheckDownloadFileParams +from .get_admined_bots import GetAdminedBots +from .update_star_ref_program import UpdateStarRefProgram +from .set_custom_verification import SetCustomVerification +from .get_bot_recommendations import GetBotRecommendations + + +__all__ = [ + "SendCustomRequest", + "AnswerWebhookJSONQuery", + "SetBotCommands", + "ResetBotCommands", + "GetBotCommands", + "SetBotMenuButton", + "GetBotMenuButton", + "SetBotBroadcastDefaultAdminRights", + "SetBotGroupDefaultAdminRights", + "SetBotInfo", + "GetBotInfo", + "ReorderUsernames", + "ToggleUsername", + "CanSendMessage", + "AllowSendMessage", + "InvokeWebViewCustomMethod", + "GetPopularAppBots", + "AddPreviewMedia", + "EditPreviewMedia", + "DeletePreviewMedia", + "ReorderPreviewMedias", + "GetPreviewInfo", + "GetPreviewMedias", + "UpdateUserEmojiStatus", + "ToggleUserEmojiStatusPermission", + "CheckDownloadFileParams", + "GetAdminedBots", + "UpdateStarRefProgram", + "SetCustomVerification", + "GetBotRecommendations", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/bots/add_preview_media.py b/pyrogram/raw/functions/bots/add_preview_media.py new file mode 100644 index 00000000..93d4beba --- /dev/null +++ b/pyrogram/raw/functions/bots/add_preview_media.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AddPreviewMedia(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``17AEB75A`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + lang_code (``str``): + N/A + + media (:obj:`InputMedia `): + N/A + + Returns: + :obj:`BotPreviewMedia ` + """ + + __slots__: List[str] = ["bot", "lang_code", "media"] + + ID = 0x17aeb75a + QUALNAME = "functions.bots.AddPreviewMedia" + + def __init__(self, *, bot: "raw.base.InputUser", lang_code: str, media: "raw.base.InputMedia") -> None: + self.bot = bot # InputUser + self.lang_code = lang_code # string + self.media = media # InputMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AddPreviewMedia": + # No flags + + bot = TLObject.read(b) + + lang_code = String.read(b) + + media = TLObject.read(b) + + return AddPreviewMedia(bot=bot, lang_code=lang_code, media=media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + b.write(self.media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/allow_send_message.py b/pyrogram/raw/functions/bots/allow_send_message.py new file mode 100644 index 00000000..7b850a25 --- /dev/null +++ b/pyrogram/raw/functions/bots/allow_send_message.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AllowSendMessage(TLObject): # type: ignore + """Allow the specified bot to send us messages + + + Details: + - Layer: ``224`` + - ID: ``F132E3EF`` + + Parameters: + bot (:obj:`InputUser `): + The bot + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["bot"] + + ID = 0xf132e3ef + QUALNAME = "functions.bots.AllowSendMessage" + + def __init__(self, *, bot: "raw.base.InputUser") -> None: + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AllowSendMessage": + # No flags + + bot = TLObject.read(b) + + return AllowSendMessage(bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/answer_webhook_json_query.py b/pyrogram/raw/functions/bots/answer_webhook_json_query.py new file mode 100644 index 00000000..3692e0bf --- /dev/null +++ b/pyrogram/raw/functions/bots/answer_webhook_json_query.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AnswerWebhookJSONQuery(TLObject): # type: ignore + """Answers a custom query; for bots only + + + Details: + - Layer: ``224`` + - ID: ``E6213F4D`` + + Parameters: + query_id (``int`` ``64-bit``): + Identifier of a custom query + + data (:obj:`DataJSON `): + JSON-serialized answer to the query + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["query_id", "data"] + + ID = 0xe6213f4d + QUALNAME = "functions.bots.AnswerWebhookJSONQuery" + + def __init__(self, *, query_id: int, data: "raw.base.DataJSON") -> None: + self.query_id = query_id # long + self.data = data # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AnswerWebhookJSONQuery": + # No flags + + query_id = Long.read(b) + + data = TLObject.read(b) + + return AnswerWebhookJSONQuery(query_id=query_id, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.query_id)) + + b.write(self.data.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/can_send_message.py b/pyrogram/raw/functions/bots/can_send_message.py new file mode 100644 index 00000000..df66328c --- /dev/null +++ b/pyrogram/raw/functions/bots/can_send_message.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CanSendMessage(TLObject): # type: ignore + """Check whether the specified bot can send us messages + + + Details: + - Layer: ``224`` + - ID: ``1359F4E6`` + + Parameters: + bot (:obj:`InputUser `): + The bot + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot"] + + ID = 0x1359f4e6 + QUALNAME = "functions.bots.CanSendMessage" + + def __init__(self, *, bot: "raw.base.InputUser") -> None: + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CanSendMessage": + # No flags + + bot = TLObject.read(b) + + return CanSendMessage(bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/check_download_file_params.py b/pyrogram/raw/functions/bots/check_download_file_params.py new file mode 100644 index 00000000..2614126a --- /dev/null +++ b/pyrogram/raw/functions/bots/check_download_file_params.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckDownloadFileParams(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``50077589`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + file_name (``str``): + N/A + + url (``str``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "file_name", "url"] + + ID = 0x50077589 + QUALNAME = "functions.bots.CheckDownloadFileParams" + + def __init__(self, *, bot: "raw.base.InputUser", file_name: str, url: str) -> None: + self.bot = bot # InputUser + self.file_name = file_name # string + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckDownloadFileParams": + # No flags + + bot = TLObject.read(b) + + file_name = String.read(b) + + url = String.read(b) + + return CheckDownloadFileParams(bot=bot, file_name=file_name, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.file_name)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/delete_preview_media.py b/pyrogram/raw/functions/bots/delete_preview_media.py new file mode 100644 index 00000000..8fc35bcd --- /dev/null +++ b/pyrogram/raw/functions/bots/delete_preview_media.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeletePreviewMedia(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``2D0135B3`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + lang_code (``str``): + N/A + + media (List of :obj:`InputMedia `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "lang_code", "media"] + + ID = 0x2d0135b3 + QUALNAME = "functions.bots.DeletePreviewMedia" + + def __init__(self, *, bot: "raw.base.InputUser", lang_code: str, media: List["raw.base.InputMedia"]) -> None: + self.bot = bot # InputUser + self.lang_code = lang_code # string + self.media = media # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeletePreviewMedia": + # No flags + + bot = TLObject.read(b) + + lang_code = String.read(b) + + media = TLObject.read(b) + + return DeletePreviewMedia(bot=bot, lang_code=lang_code, media=media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + b.write(Vector(self.media)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/edit_preview_media.py b/pyrogram/raw/functions/bots/edit_preview_media.py new file mode 100644 index 00000000..5fc6fc9e --- /dev/null +++ b/pyrogram/raw/functions/bots/edit_preview_media.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditPreviewMedia(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8525606F`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + lang_code (``str``): + N/A + + media (:obj:`InputMedia `): + N/A + + new_media (:obj:`InputMedia `): + N/A + + Returns: + :obj:`BotPreviewMedia ` + """ + + __slots__: List[str] = ["bot", "lang_code", "media", "new_media"] + + ID = 0x8525606f + QUALNAME = "functions.bots.EditPreviewMedia" + + def __init__(self, *, bot: "raw.base.InputUser", lang_code: str, media: "raw.base.InputMedia", new_media: "raw.base.InputMedia") -> None: + self.bot = bot # InputUser + self.lang_code = lang_code # string + self.media = media # InputMedia + self.new_media = new_media # InputMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditPreviewMedia": + # No flags + + bot = TLObject.read(b) + + lang_code = String.read(b) + + media = TLObject.read(b) + + new_media = TLObject.read(b) + + return EditPreviewMedia(bot=bot, lang_code=lang_code, media=media, new_media=new_media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + b.write(self.media.write()) + + b.write(self.new_media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_admined_bots.py b/pyrogram/raw/functions/bots/get_admined_bots.py new file mode 100644 index 00000000..8db75532 --- /dev/null +++ b/pyrogram/raw/functions/bots/get_admined_bots.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAdminedBots(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B0711D83`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`User ` + """ + + __slots__: List[str] = [] + + ID = 0xb0711d83 + QUALNAME = "functions.bots.GetAdminedBots" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAdminedBots": + # No flags + + return GetAdminedBots() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_bot_commands.py b/pyrogram/raw/functions/bots/get_bot_commands.py new file mode 100644 index 00000000..b9dd2753 --- /dev/null +++ b/pyrogram/raw/functions/bots/get_bot_commands.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotCommands(TLObject): # type: ignore + """Obtain a list of bot commands for the specified bot scope and language code + + + Details: + - Layer: ``224`` + - ID: ``E34C0DD6`` + + Parameters: + scope (:obj:`BotCommandScope `): + Command scope + + lang_code (``str``): + Language code + + Returns: + List of :obj:`BotCommand ` + """ + + __slots__: List[str] = ["scope", "lang_code"] + + ID = 0xe34c0dd6 + QUALNAME = "functions.bots.GetBotCommands" + + def __init__(self, *, scope: "raw.base.BotCommandScope", lang_code: str) -> None: + self.scope = scope # BotCommandScope + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotCommands": + # No flags + + scope = TLObject.read(b) + + lang_code = String.read(b) + + return GetBotCommands(scope=scope, lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.scope.write()) + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_bot_info.py b/pyrogram/raw/functions/bots/get_bot_info.py new file mode 100644 index 00000000..3a27a286 --- /dev/null +++ b/pyrogram/raw/functions/bots/get_bot_info.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotInfo(TLObject): # type: ignore + """Get localized name, about text and description of a bot (or of the current account, if called by a bot). + + + Details: + - Layer: ``224`` + - ID: ``DCD914FD`` + + Parameters: + lang_code (``str``): + Language code, if left empty this method will return the fallback about text and description. + + bot (:obj:`InputUser `, *optional*): + If called by a user, must contain the peer of a bot we own. + + Returns: + :obj:`bots.BotInfo ` + """ + + __slots__: List[str] = ["lang_code", "bot"] + + ID = 0xdcd914fd + QUALNAME = "functions.bots.GetBotInfo" + + def __init__(self, *, lang_code: str, bot: "raw.base.InputUser" = None) -> None: + self.lang_code = lang_code # string + self.bot = bot # flags.0?InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotInfo": + + flags = Int.read(b) + + bot = TLObject.read(b) if flags & (1 << 0) else None + + lang_code = String.read(b) + + return GetBotInfo(lang_code=lang_code, bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.bot is not None else 0 + b.write(Int(flags)) + + if self.bot is not None: + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_bot_menu_button.py b/pyrogram/raw/functions/bots/get_bot_menu_button.py new file mode 100644 index 00000000..88064577 --- /dev/null +++ b/pyrogram/raw/functions/bots/get_bot_menu_button.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotMenuButton(TLObject): # type: ignore + """Gets the menu button action for a given user or for all users, previously set using bots.setBotMenuButton; users can see this information in the botInfo constructor. + + + Details: + - Layer: ``224`` + - ID: ``9C60EB28`` + + Parameters: + user_id (:obj:`InputUser `): + User ID or empty for the default menu button. + + Returns: + :obj:`BotMenuButton ` + """ + + __slots__: List[str] = ["user_id"] + + ID = 0x9c60eb28 + QUALNAME = "functions.bots.GetBotMenuButton" + + def __init__(self, *, user_id: "raw.base.InputUser") -> None: + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotMenuButton": + # No flags + + user_id = TLObject.read(b) + + return GetBotMenuButton(user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_bot_recommendations.py b/pyrogram/raw/functions/bots/get_bot_recommendations.py new file mode 100644 index 00000000..69dd03ae --- /dev/null +++ b/pyrogram/raw/functions/bots/get_bot_recommendations.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotRecommendations(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A1B70815`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + Returns: + :obj:`users.Users ` + """ + + __slots__: List[str] = ["bot"] + + ID = 0xa1b70815 + QUALNAME = "functions.bots.GetBotRecommendations" + + def __init__(self, *, bot: "raw.base.InputUser") -> None: + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotRecommendations": + # No flags + + bot = TLObject.read(b) + + return GetBotRecommendations(bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_popular_app_bots.py b/pyrogram/raw/functions/bots/get_popular_app_bots.py new file mode 100644 index 00000000..f8e97b57 --- /dev/null +++ b/pyrogram/raw/functions/bots/get_popular_app_bots.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPopularAppBots(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C2510192`` + + Parameters: + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + Returns: + :obj:`bots.PopularAppBots ` + """ + + __slots__: List[str] = ["offset", "limit"] + + ID = 0xc2510192 + QUALNAME = "functions.bots.GetPopularAppBots" + + def __init__(self, *, offset: str, limit: int) -> None: + self.offset = offset # string + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPopularAppBots": + # No flags + + offset = String.read(b) + + limit = Int.read(b) + + return GetPopularAppBots(offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_preview_info.py b/pyrogram/raw/functions/bots/get_preview_info.py new file mode 100644 index 00000000..6c5c70ce --- /dev/null +++ b/pyrogram/raw/functions/bots/get_preview_info.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPreviewInfo(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``423AB3AD`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + lang_code (``str``): + N/A + + Returns: + :obj:`bots.PreviewInfo ` + """ + + __slots__: List[str] = ["bot", "lang_code"] + + ID = 0x423ab3ad + QUALNAME = "functions.bots.GetPreviewInfo" + + def __init__(self, *, bot: "raw.base.InputUser", lang_code: str) -> None: + self.bot = bot # InputUser + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPreviewInfo": + # No flags + + bot = TLObject.read(b) + + lang_code = String.read(b) + + return GetPreviewInfo(bot=bot, lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/get_preview_medias.py b/pyrogram/raw/functions/bots/get_preview_medias.py new file mode 100644 index 00000000..dc95615f --- /dev/null +++ b/pyrogram/raw/functions/bots/get_preview_medias.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPreviewMedias(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A2A5594D`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + Returns: + List of :obj:`BotPreviewMedia ` + """ + + __slots__: List[str] = ["bot"] + + ID = 0xa2a5594d + QUALNAME = "functions.bots.GetPreviewMedias" + + def __init__(self, *, bot: "raw.base.InputUser") -> None: + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPreviewMedias": + # No flags + + bot = TLObject.read(b) + + return GetPreviewMedias(bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/invoke_web_view_custom_method.py b/pyrogram/raw/functions/bots/invoke_web_view_custom_method.py new file mode 100644 index 00000000..66e7f85d --- /dev/null +++ b/pyrogram/raw/functions/bots/invoke_web_view_custom_method.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWebViewCustomMethod(TLObject): # type: ignore + """Send a custom request from a mini bot app, triggered by a web_app_invoke_custom_method event ». + + + Details: + - Layer: ``224`` + - ID: ``87FC5E7`` + + Parameters: + bot (:obj:`InputUser `): + Identifier of the bot associated to the mini bot app + + custom_method (``str``): + Identifier of the custom method to invoke + + params (:obj:`DataJSON `): + Method parameters + + Returns: + :obj:`DataJSON ` + """ + + __slots__: List[str] = ["bot", "custom_method", "params"] + + ID = 0x87fc5e7 + QUALNAME = "functions.bots.InvokeWebViewCustomMethod" + + def __init__(self, *, bot: "raw.base.InputUser", custom_method: str, params: "raw.base.DataJSON") -> None: + self.bot = bot # InputUser + self.custom_method = custom_method # string + self.params = params # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWebViewCustomMethod": + # No flags + + bot = TLObject.read(b) + + custom_method = String.read(b) + + params = TLObject.read(b) + + return InvokeWebViewCustomMethod(bot=bot, custom_method=custom_method, params=params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.custom_method)) + + b.write(self.params.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/reorder_preview_medias.py b/pyrogram/raw/functions/bots/reorder_preview_medias.py new file mode 100644 index 00000000..1384386b --- /dev/null +++ b/pyrogram/raw/functions/bots/reorder_preview_medias.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderPreviewMedias(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B627F3AA`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + lang_code (``str``): + N/A + + order (List of :obj:`InputMedia `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "lang_code", "order"] + + ID = 0xb627f3aa + QUALNAME = "functions.bots.ReorderPreviewMedias" + + def __init__(self, *, bot: "raw.base.InputUser", lang_code: str, order: List["raw.base.InputMedia"]) -> None: + self.bot = bot # InputUser + self.lang_code = lang_code # string + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderPreviewMedias": + # No flags + + bot = TLObject.read(b) + + lang_code = String.read(b) + + order = TLObject.read(b) + + return ReorderPreviewMedias(bot=bot, lang_code=lang_code, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + b.write(Vector(self.order)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/reorder_usernames.py b/pyrogram/raw/functions/bots/reorder_usernames.py new file mode 100644 index 00000000..c38d7278 --- /dev/null +++ b/pyrogram/raw/functions/bots/reorder_usernames.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderUsernames(TLObject): # type: ignore + """Reorder usernames associated to a bot we own. + + + Details: + - Layer: ``224`` + - ID: ``9709B1C2`` + + Parameters: + bot (:obj:`InputUser `): + The bot + + order (List of ``str``): + The new order for active usernames. All active usernames must be specified. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "order"] + + ID = 0x9709b1c2 + QUALNAME = "functions.bots.ReorderUsernames" + + def __init__(self, *, bot: "raw.base.InputUser", order: List[str]) -> None: + self.bot = bot # InputUser + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderUsernames": + # No flags + + bot = TLObject.read(b) + + order = TLObject.read(b, String) + + return ReorderUsernames(bot=bot, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(Vector(self.order, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/reset_bot_commands.py b/pyrogram/raw/functions/bots/reset_bot_commands.py new file mode 100644 index 00000000..76472a29 --- /dev/null +++ b/pyrogram/raw/functions/bots/reset_bot_commands.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetBotCommands(TLObject): # type: ignore + """Clear bot commands for the specified bot scope and language code + + + Details: + - Layer: ``224`` + - ID: ``3D8DE0F9`` + + Parameters: + scope (:obj:`BotCommandScope `): + Command scope + + lang_code (``str``): + Language code + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["scope", "lang_code"] + + ID = 0x3d8de0f9 + QUALNAME = "functions.bots.ResetBotCommands" + + def __init__(self, *, scope: "raw.base.BotCommandScope", lang_code: str) -> None: + self.scope = scope # BotCommandScope + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetBotCommands": + # No flags + + scope = TLObject.read(b) + + lang_code = String.read(b) + + return ResetBotCommands(scope=scope, lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.scope.write()) + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/send_custom_request.py b/pyrogram/raw/functions/bots/send_custom_request.py new file mode 100644 index 00000000..fe95d50f --- /dev/null +++ b/pyrogram/raw/functions/bots/send_custom_request.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendCustomRequest(TLObject): # type: ignore + """Sends a custom request; for bots only + + + Details: + - Layer: ``224`` + - ID: ``AA2769ED`` + + Parameters: + custom_method (``str``): + The method name + + params (:obj:`DataJSON `): + JSON-serialized method parameters + + Returns: + :obj:`DataJSON ` + """ + + __slots__: List[str] = ["custom_method", "params"] + + ID = 0xaa2769ed + QUALNAME = "functions.bots.SendCustomRequest" + + def __init__(self, *, custom_method: str, params: "raw.base.DataJSON") -> None: + self.custom_method = custom_method # string + self.params = params # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendCustomRequest": + # No flags + + custom_method = String.read(b) + + params = TLObject.read(b) + + return SendCustomRequest(custom_method=custom_method, params=params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.custom_method)) + + b.write(self.params.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/set_bot_broadcast_default_admin_rights.py b/pyrogram/raw/functions/bots/set_bot_broadcast_default_admin_rights.py new file mode 100644 index 00000000..1f3bb27b --- /dev/null +++ b/pyrogram/raw/functions/bots/set_bot_broadcast_default_admin_rights.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotBroadcastDefaultAdminRights(TLObject): # type: ignore + """Set the default suggested admin rights for bots being added as admins to channels, see here for more info on how to handle them ». + + + Details: + - Layer: ``224`` + - ID: ``788464E1`` + + Parameters: + admin_rights (:obj:`ChatAdminRights `): + Admin rights + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["admin_rights"] + + ID = 0x788464e1 + QUALNAME = "functions.bots.SetBotBroadcastDefaultAdminRights" + + def __init__(self, *, admin_rights: "raw.base.ChatAdminRights") -> None: + self.admin_rights = admin_rights # ChatAdminRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotBroadcastDefaultAdminRights": + # No flags + + admin_rights = TLObject.read(b) + + return SetBotBroadcastDefaultAdminRights(admin_rights=admin_rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.admin_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/set_bot_commands.py b/pyrogram/raw/functions/bots/set_bot_commands.py new file mode 100644 index 00000000..e22084b0 --- /dev/null +++ b/pyrogram/raw/functions/bots/set_bot_commands.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotCommands(TLObject): # type: ignore + """Set bot command list + + + Details: + - Layer: ``224`` + - ID: ``517165A`` + + Parameters: + scope (:obj:`BotCommandScope `): + Command scope + + lang_code (``str``): + Language code + + commands (List of :obj:`BotCommand `): + Bot commands + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["scope", "lang_code", "commands"] + + ID = 0x517165a + QUALNAME = "functions.bots.SetBotCommands" + + def __init__(self, *, scope: "raw.base.BotCommandScope", lang_code: str, commands: List["raw.base.BotCommand"]) -> None: + self.scope = scope # BotCommandScope + self.lang_code = lang_code # string + self.commands = commands # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotCommands": + # No flags + + scope = TLObject.read(b) + + lang_code = String.read(b) + + commands = TLObject.read(b) + + return SetBotCommands(scope=scope, lang_code=lang_code, commands=commands) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.scope.write()) + + b.write(String(self.lang_code)) + + b.write(Vector(self.commands)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/set_bot_group_default_admin_rights.py b/pyrogram/raw/functions/bots/set_bot_group_default_admin_rights.py new file mode 100644 index 00000000..d76f5a5f --- /dev/null +++ b/pyrogram/raw/functions/bots/set_bot_group_default_admin_rights.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotGroupDefaultAdminRights(TLObject): # type: ignore + """Set the default suggested admin rights for bots being added as admins to groups, see here for more info on how to handle them ». + + + Details: + - Layer: ``224`` + - ID: ``925EC9EA`` + + Parameters: + admin_rights (:obj:`ChatAdminRights `): + Admin rights + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["admin_rights"] + + ID = 0x925ec9ea + QUALNAME = "functions.bots.SetBotGroupDefaultAdminRights" + + def __init__(self, *, admin_rights: "raw.base.ChatAdminRights") -> None: + self.admin_rights = admin_rights # ChatAdminRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotGroupDefaultAdminRights": + # No flags + + admin_rights = TLObject.read(b) + + return SetBotGroupDefaultAdminRights(admin_rights=admin_rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.admin_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/set_bot_info.py b/pyrogram/raw/functions/bots/set_bot_info.py new file mode 100644 index 00000000..650f0b2c --- /dev/null +++ b/pyrogram/raw/functions/bots/set_bot_info.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotInfo(TLObject): # type: ignore + """Set localized name, about text and description of a bot (or of the current account, if called by a bot). + + + Details: + - Layer: ``224`` + - ID: ``10CF3123`` + + Parameters: + lang_code (``str``): + Language code, if left empty update the fallback about text and description + + bot (:obj:`InputUser `, *optional*): + If called by a user, must contain the peer of a bot we own. + + name (``str``, *optional*): + New bot name + + about (``str``, *optional*): + New about text + + description (``str``, *optional*): + New description + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["lang_code", "bot", "name", "about", "description"] + + ID = 0x10cf3123 + QUALNAME = "functions.bots.SetBotInfo" + + def __init__(self, *, lang_code: str, bot: "raw.base.InputUser" = None, name: Optional[str] = None, about: Optional[str] = None, description: Optional[str] = None) -> None: + self.lang_code = lang_code # string + self.bot = bot # flags.2?InputUser + self.name = name # flags.3?string + self.about = about # flags.0?string + self.description = description # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotInfo": + + flags = Int.read(b) + + bot = TLObject.read(b) if flags & (1 << 2) else None + + lang_code = String.read(b) + + name = String.read(b) if flags & (1 << 3) else None + about = String.read(b) if flags & (1 << 0) else None + description = String.read(b) if flags & (1 << 1) else None + return SetBotInfo(lang_code=lang_code, bot=bot, name=name, about=about, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.bot is not None else 0 + flags |= (1 << 3) if self.name is not None else 0 + flags |= (1 << 0) if self.about is not None else 0 + flags |= (1 << 1) if self.description is not None else 0 + b.write(Int(flags)) + + if self.bot is not None: + b.write(self.bot.write()) + + b.write(String(self.lang_code)) + + if self.name is not None: + b.write(String(self.name)) + + if self.about is not None: + b.write(String(self.about)) + + if self.description is not None: + b.write(String(self.description)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/set_bot_menu_button.py b/pyrogram/raw/functions/bots/set_bot_menu_button.py new file mode 100644 index 00000000..195947a8 --- /dev/null +++ b/pyrogram/raw/functions/bots/set_bot_menu_button.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotMenuButton(TLObject): # type: ignore + """Sets the menu button action » for a given user or for all users + + + Details: + - Layer: ``224`` + - ID: ``4504D54F`` + + Parameters: + user_id (:obj:`InputUser `): + User ID + + button (:obj:`BotMenuButton `): + Bot menu button action + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["user_id", "button"] + + ID = 0x4504d54f + QUALNAME = "functions.bots.SetBotMenuButton" + + def __init__(self, *, user_id: "raw.base.InputUser", button: "raw.base.BotMenuButton") -> None: + self.user_id = user_id # InputUser + self.button = button # BotMenuButton + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotMenuButton": + # No flags + + user_id = TLObject.read(b) + + button = TLObject.read(b) + + return SetBotMenuButton(user_id=user_id, button=button) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(self.button.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/set_custom_verification.py b/pyrogram/raw/functions/bots/set_custom_verification.py new file mode 100644 index 00000000..ff467287 --- /dev/null +++ b/pyrogram/raw/functions/bots/set_custom_verification.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetCustomVerification(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8B89DFBD`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + enabled (``bool``, *optional*): + N/A + + bot (:obj:`InputUser `, *optional*): + N/A + + custom_description (``str``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "enabled", "bot", "custom_description"] + + ID = 0x8b89dfbd + QUALNAME = "functions.bots.SetCustomVerification" + + def __init__(self, *, peer: "raw.base.InputPeer", enabled: Optional[bool] = None, bot: "raw.base.InputUser" = None, custom_description: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.enabled = enabled # flags.1?true + self.bot = bot # flags.0?InputUser + self.custom_description = custom_description # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetCustomVerification": + + flags = Int.read(b) + + enabled = True if flags & (1 << 1) else False + bot = TLObject.read(b) if flags & (1 << 0) else None + + peer = TLObject.read(b) + + custom_description = String.read(b) if flags & (1 << 2) else None + return SetCustomVerification(peer=peer, enabled=enabled, bot=bot, custom_description=custom_description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.enabled else 0 + flags |= (1 << 0) if self.bot is not None else 0 + flags |= (1 << 2) if self.custom_description is not None else 0 + b.write(Int(flags)) + + if self.bot is not None: + b.write(self.bot.write()) + + b.write(self.peer.write()) + + if self.custom_description is not None: + b.write(String(self.custom_description)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/toggle_user_emoji_status_permission.py b/pyrogram/raw/functions/bots/toggle_user_emoji_status_permission.py new file mode 100644 index 00000000..52c323e2 --- /dev/null +++ b/pyrogram/raw/functions/bots/toggle_user_emoji_status_permission.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleUserEmojiStatusPermission(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``6DE6392`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + enabled (``bool``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "enabled"] + + ID = 0x6de6392 + QUALNAME = "functions.bots.ToggleUserEmojiStatusPermission" + + def __init__(self, *, bot: "raw.base.InputUser", enabled: bool) -> None: + self.bot = bot # InputUser + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleUserEmojiStatusPermission": + # No flags + + bot = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleUserEmojiStatusPermission(bot=bot, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/toggle_username.py b/pyrogram/raw/functions/bots/toggle_username.py new file mode 100644 index 00000000..36308ebf --- /dev/null +++ b/pyrogram/raw/functions/bots/toggle_username.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleUsername(TLObject): # type: ignore + """Activate or deactivate a purchased fragment.com username associated to a bot we own. + + + Details: + - Layer: ``224`` + - ID: ``53CA973`` + + Parameters: + bot (:obj:`InputUser `): + The bot + + username (``str``): + Username + + active (``bool``): + Whether to activate or deactivate it + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "username", "active"] + + ID = 0x53ca973 + QUALNAME = "functions.bots.ToggleUsername" + + def __init__(self, *, bot: "raw.base.InputUser", username: str, active: bool) -> None: + self.bot = bot # InputUser + self.username = username # string + self.active = active # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleUsername": + # No flags + + bot = TLObject.read(b) + + username = String.read(b) + + active = Bool.read(b) + + return ToggleUsername(bot=bot, username=username, active=active) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.username)) + + b.write(Bool(self.active)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/update_star_ref_program.py b/pyrogram/raw/functions/bots/update_star_ref_program.py new file mode 100644 index 00000000..9e460b62 --- /dev/null +++ b/pyrogram/raw/functions/bots/update_star_ref_program.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateStarRefProgram(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``778B5AB3`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + commission_permille (``int`` ``32-bit``): + N/A + + duration_months (``int`` ``32-bit``, *optional*): + N/A + + Returns: + :obj:`StarRefProgram ` + """ + + __slots__: List[str] = ["bot", "commission_permille", "duration_months"] + + ID = 0x778b5ab3 + QUALNAME = "functions.bots.UpdateStarRefProgram" + + def __init__(self, *, bot: "raw.base.InputUser", commission_permille: int, duration_months: Optional[int] = None) -> None: + self.bot = bot # InputUser + self.commission_permille = commission_permille # int + self.duration_months = duration_months # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateStarRefProgram": + + flags = Int.read(b) + + bot = TLObject.read(b) + + commission_permille = Int.read(b) + + duration_months = Int.read(b) if flags & (1 << 0) else None + return UpdateStarRefProgram(bot=bot, commission_permille=commission_permille, duration_months=duration_months) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.duration_months is not None else 0 + b.write(Int(flags)) + + b.write(self.bot.write()) + + b.write(Int(self.commission_permille)) + + if self.duration_months is not None: + b.write(Int(self.duration_months)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/bots/update_user_emoji_status.py b/pyrogram/raw/functions/bots/update_user_emoji_status.py new file mode 100644 index 00000000..09fc74ed --- /dev/null +++ b/pyrogram/raw/functions/bots/update_user_emoji_status.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateUserEmojiStatus(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``ED9F30C5`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + emoji_status (:obj:`EmojiStatus `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["user_id", "emoji_status"] + + ID = 0xed9f30c5 + QUALNAME = "functions.bots.UpdateUserEmojiStatus" + + def __init__(self, *, user_id: "raw.base.InputUser", emoji_status: "raw.base.EmojiStatus") -> None: + self.user_id = user_id # InputUser + self.emoji_status = emoji_status # EmojiStatus + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateUserEmojiStatus": + # No flags + + user_id = TLObject.read(b) + + emoji_status = TLObject.read(b) + + return UpdateUserEmojiStatus(user_id=user_id, emoji_status=emoji_status) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(self.emoji_status.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/__init__.py b/pyrogram/raw/functions/channels/__init__.py new file mode 100644 index 00000000..68269743 --- /dev/null +++ b/pyrogram/raw/functions/channels/__init__.py @@ -0,0 +1,153 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .read_history import ReadHistory +from .delete_messages import DeleteMessages +from .report_spam import ReportSpam +from .get_messages import GetMessages +from .get_participants import GetParticipants +from .get_participant import GetParticipant +from .get_channels import GetChannels +from .get_full_channel import GetFullChannel +from .create_channel import CreateChannel +from .edit_admin import EditAdmin +from .edit_title import EditTitle +from .edit_photo import EditPhoto +from .check_username import CheckUsername +from .update_username import UpdateUsername +from .join_channel import JoinChannel +from .leave_channel import LeaveChannel +from .invite_to_channel import InviteToChannel +from .delete_channel import DeleteChannel +from .export_message_link import ExportMessageLink +from .toggle_signatures import ToggleSignatures +from .get_admined_public_channels import GetAdminedPublicChannels +from .edit_banned import EditBanned +from .get_admin_log import GetAdminLog +from .set_stickers import SetStickers +from .read_message_contents import ReadMessageContents +from .delete_history import DeleteHistory +from .toggle_pre_history_hidden import TogglePreHistoryHidden +from .get_left_channels import GetLeftChannels +from .get_groups_for_discussion import GetGroupsForDiscussion +from .set_discussion_group import SetDiscussionGroup +from .edit_creator import EditCreator +from .edit_location import EditLocation +from .toggle_slow_mode import ToggleSlowMode +from .get_inactive_channels import GetInactiveChannels +from .convert_to_gigagroup import ConvertToGigagroup +from .get_send_as import GetSendAs +from .delete_participant_history import DeleteParticipantHistory +from .toggle_join_to_send import ToggleJoinToSend +from .toggle_join_request import ToggleJoinRequest +from .reorder_usernames import ReorderUsernames +from .toggle_username import ToggleUsername +from .deactivate_all_usernames import DeactivateAllUsernames +from .toggle_forum import ToggleForum +from .toggle_anti_spam import ToggleAntiSpam +from .report_anti_spam_false_positive import ReportAntiSpamFalsePositive +from .toggle_participants_hidden import ToggleParticipantsHidden +from .update_color import UpdateColor +from .toggle_view_forum_as_messages import ToggleViewForumAsMessages +from .get_channel_recommendations import GetChannelRecommendations +from .update_emoji_status import UpdateEmojiStatus +from .set_boosts_to_unblock_restrictions import SetBoostsToUnblockRestrictions +from .set_emoji_stickers import SetEmojiStickers +from .restrict_sponsored_messages import RestrictSponsoredMessages +from .search_posts import SearchPosts +from .update_paid_messages_price import UpdatePaidMessagesPrice +from .toggle_autotranslation import ToggleAutotranslation +from .get_message_author import GetMessageAuthor +from .check_search_posts_flood import CheckSearchPostsFlood +from .set_main_profile_tab import SetMainProfileTab +from .get_future_creator_after_leave import GetFutureCreatorAfterLeave + + +__all__ = [ + "ReadHistory", + "DeleteMessages", + "ReportSpam", + "GetMessages", + "GetParticipants", + "GetParticipant", + "GetChannels", + "GetFullChannel", + "CreateChannel", + "EditAdmin", + "EditTitle", + "EditPhoto", + "CheckUsername", + "UpdateUsername", + "JoinChannel", + "LeaveChannel", + "InviteToChannel", + "DeleteChannel", + "ExportMessageLink", + "ToggleSignatures", + "GetAdminedPublicChannels", + "EditBanned", + "GetAdminLog", + "SetStickers", + "ReadMessageContents", + "DeleteHistory", + "TogglePreHistoryHidden", + "GetLeftChannels", + "GetGroupsForDiscussion", + "SetDiscussionGroup", + "EditCreator", + "EditLocation", + "ToggleSlowMode", + "GetInactiveChannels", + "ConvertToGigagroup", + "GetSendAs", + "DeleteParticipantHistory", + "ToggleJoinToSend", + "ToggleJoinRequest", + "ReorderUsernames", + "ToggleUsername", + "DeactivateAllUsernames", + "ToggleForum", + "ToggleAntiSpam", + "ReportAntiSpamFalsePositive", + "ToggleParticipantsHidden", + "UpdateColor", + "ToggleViewForumAsMessages", + "GetChannelRecommendations", + "UpdateEmojiStatus", + "SetBoostsToUnblockRestrictions", + "SetEmojiStickers", + "RestrictSponsoredMessages", + "SearchPosts", + "UpdatePaidMessagesPrice", + "ToggleAutotranslation", + "GetMessageAuthor", + "CheckSearchPostsFlood", + "SetMainProfileTab", + "GetFutureCreatorAfterLeave", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/channels/check_search_posts_flood.py b/pyrogram/raw/functions/channels/check_search_posts_flood.py new file mode 100644 index 00000000..ed99589a --- /dev/null +++ b/pyrogram/raw/functions/channels/check_search_posts_flood.py @@ -0,0 +1,57 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckSearchPostsFlood(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``22567115`` + + Parameters: + query (``str``, *optional*): + N/A + + Returns: + :obj:`SearchPostsFlood ` + """ + + __slots__: List[str] = ["query"] + + ID = 0x22567115 + QUALNAME = "functions.channels.CheckSearchPostsFlood" + + def __init__(self, *, query: Optional[str] = None) -> None: + self.query = query # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckSearchPostsFlood": + + flags = Int.read(b) + + query = String.read(b) if flags & (1 << 0) else None + return CheckSearchPostsFlood(query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.query is not None else 0 + b.write(Int(flags)) + + if self.query is not None: + b.write(String(self.query)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/check_username.py b/pyrogram/raw/functions/channels/check_username.py new file mode 100644 index 00000000..611884df --- /dev/null +++ b/pyrogram/raw/functions/channels/check_username.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckUsername(TLObject): # type: ignore + """Check if a username is free and can be assigned to a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``10E6BD2C`` + + Parameters: + channel (:obj:`InputChannel `): + The channel/supergroup that will assigned the specified username + + username (``str``): + The username to check + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "username"] + + ID = 0x10e6bd2c + QUALNAME = "functions.channels.CheckUsername" + + def __init__(self, *, channel: "raw.base.InputChannel", username: str) -> None: + self.channel = channel # InputChannel + self.username = username # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckUsername": + # No flags + + channel = TLObject.read(b) + + username = String.read(b) + + return CheckUsername(channel=channel, username=username) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(String(self.username)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/convert_to_gigagroup.py b/pyrogram/raw/functions/channels/convert_to_gigagroup.py new file mode 100644 index 00000000..6f87bcbc --- /dev/null +++ b/pyrogram/raw/functions/channels/convert_to_gigagroup.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConvertToGigagroup(TLObject): # type: ignore + """Convert a supergroup to a gigagroup, when requested by channel suggestions. + + + Details: + - Layer: ``224`` + - ID: ``B290C69`` + + Parameters: + channel (:obj:`InputChannel `): + The supergroup to convert + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0xb290c69 + QUALNAME = "functions.channels.ConvertToGigagroup" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConvertToGigagroup": + # No flags + + channel = TLObject.read(b) + + return ConvertToGigagroup(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/create_channel.py b/pyrogram/raw/functions/channels/create_channel.py new file mode 100644 index 00000000..e81fb1e3 --- /dev/null +++ b/pyrogram/raw/functions/channels/create_channel.py @@ -0,0 +1,117 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateChannel(TLObject): # type: ignore + """Create a supergroup/channel. + + + Details: + - Layer: ``224`` + - ID: ``91006707`` + + Parameters: + title (``str``): + Channel title + + about (``str``): + Channel description + + broadcast (``bool``, *optional*): + Whether to create a channel + + megagroup (``bool``, *optional*): + Whether to create a supergroup + + for_import (``bool``, *optional*): + Whether the supergroup is being created to import messages from a foreign chat service using messages.initHistoryImport + + forum (``bool``, *optional*): + Whether to create a forum + + geo_point (:obj:`InputGeoPoint `, *optional*): + Geogroup location, see here » for more info on geogroups. + + address (``str``, *optional*): + Geogroup address, see here » for more info on geogroups. + + ttl_period (``int`` ``32-bit``, *optional*): + Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use messages.setDefaultHistoryTTL to edit this value later. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["title", "about", "broadcast", "megagroup", "for_import", "forum", "geo_point", "address", "ttl_period"] + + ID = 0x91006707 + QUALNAME = "functions.channels.CreateChannel" + + def __init__(self, *, title: str, about: str, broadcast: Optional[bool] = None, megagroup: Optional[bool] = None, for_import: Optional[bool] = None, forum: Optional[bool] = None, geo_point: "raw.base.InputGeoPoint" = None, address: Optional[str] = None, ttl_period: Optional[int] = None) -> None: + self.title = title # string + self.about = about # string + self.broadcast = broadcast # flags.0?true + self.megagroup = megagroup # flags.1?true + self.for_import = for_import # flags.3?true + self.forum = forum # flags.5?true + self.geo_point = geo_point # flags.2?InputGeoPoint + self.address = address # flags.2?string + self.ttl_period = ttl_period # flags.4?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateChannel": + + flags = Int.read(b) + + broadcast = True if flags & (1 << 0) else False + megagroup = True if flags & (1 << 1) else False + for_import = True if flags & (1 << 3) else False + forum = True if flags & (1 << 5) else False + title = String.read(b) + + about = String.read(b) + + geo_point = TLObject.read(b) if flags & (1 << 2) else None + + address = String.read(b) if flags & (1 << 2) else None + ttl_period = Int.read(b) if flags & (1 << 4) else None + return CreateChannel(title=title, about=about, broadcast=broadcast, megagroup=megagroup, for_import=for_import, forum=forum, geo_point=geo_point, address=address, ttl_period=ttl_period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.broadcast else 0 + flags |= (1 << 1) if self.megagroup else 0 + flags |= (1 << 3) if self.for_import else 0 + flags |= (1 << 5) if self.forum else 0 + flags |= (1 << 2) if self.geo_point is not None else 0 + flags |= (1 << 2) if self.address is not None else 0 + flags |= (1 << 4) if self.ttl_period is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.about)) + + if self.geo_point is not None: + b.write(self.geo_point.write()) + + if self.address is not None: + b.write(String(self.address)) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/deactivate_all_usernames.py b/pyrogram/raw/functions/channels/deactivate_all_usernames.py new file mode 100644 index 00000000..fe61e649 --- /dev/null +++ b/pyrogram/raw/functions/channels/deactivate_all_usernames.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeactivateAllUsernames(TLObject): # type: ignore + """Disable all purchased usernames of a supergroup or channel + + + Details: + - Layer: ``224`` + - ID: ``A245DD3`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup or channel + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel"] + + ID = 0xa245dd3 + QUALNAME = "functions.channels.DeactivateAllUsernames" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeactivateAllUsernames": + # No flags + + channel = TLObject.read(b) + + return DeactivateAllUsernames(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/delete_channel.py b/pyrogram/raw/functions/channels/delete_channel.py new file mode 100644 index 00000000..45f0bd41 --- /dev/null +++ b/pyrogram/raw/functions/channels/delete_channel.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteChannel(TLObject): # type: ignore + """Delete a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``C0111FE3`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup to delete + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0xc0111fe3 + QUALNAME = "functions.channels.DeleteChannel" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteChannel": + # No flags + + channel = TLObject.read(b) + + return DeleteChannel(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/delete_history.py b/pyrogram/raw/functions/channels/delete_history.py new file mode 100644 index 00000000..b29a634c --- /dev/null +++ b/pyrogram/raw/functions/channels/delete_history.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteHistory(TLObject): # type: ignore + """Delete the history of a supergroup + + + Details: + - Layer: ``224`` + - ID: ``9BAA9647`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup whose history must be deleted + + max_id (``int`` ``32-bit``): + ID of message up to which the history must be deleted + + for_everyone (``bool``, *optional*): + Whether the history should be deleted for everyone + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "max_id", "for_everyone"] + + ID = 0x9baa9647 + QUALNAME = "functions.channels.DeleteHistory" + + def __init__(self, *, channel: "raw.base.InputChannel", max_id: int, for_everyone: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.max_id = max_id # int + self.for_everyone = for_everyone # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteHistory": + + flags = Int.read(b) + + for_everyone = True if flags & (1 << 0) else False + channel = TLObject.read(b) + + max_id = Int.read(b) + + return DeleteHistory(channel=channel, max_id=max_id, for_everyone=for_everyone) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.for_everyone else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/delete_messages.py b/pyrogram/raw/functions/channels/delete_messages.py new file mode 100644 index 00000000..8f619dcb --- /dev/null +++ b/pyrogram/raw/functions/channels/delete_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteMessages(TLObject): # type: ignore + """Delete messages in a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``84C1FD4E`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + id (List of ``int`` ``32-bit``): + IDs of messages to delete + + Returns: + :obj:`messages.AffectedMessages ` + """ + + __slots__: List[str] = ["channel", "id"] + + ID = 0x84c1fd4e + QUALNAME = "functions.channels.DeleteMessages" + + def __init__(self, *, channel: "raw.base.InputChannel", id: List[int]) -> None: + self.channel = channel # InputChannel + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteMessages": + # No flags + + channel = TLObject.read(b) + + id = TLObject.read(b, Int) + + return DeleteMessages(channel=channel, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/delete_participant_history.py b/pyrogram/raw/functions/channels/delete_participant_history.py new file mode 100644 index 00000000..b061ebaf --- /dev/null +++ b/pyrogram/raw/functions/channels/delete_participant_history.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteParticipantHistory(TLObject): # type: ignore + """Delete all messages sent by a specific participant of a given supergroup + + + Details: + - Layer: ``224`` + - ID: ``367544DB`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup + + participant (:obj:`InputPeer `): + The participant whose messages should be deleted + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["channel", "participant"] + + ID = 0x367544db + QUALNAME = "functions.channels.DeleteParticipantHistory" + + def __init__(self, *, channel: "raw.base.InputChannel", participant: "raw.base.InputPeer") -> None: + self.channel = channel # InputChannel + self.participant = participant # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteParticipantHistory": + # No flags + + channel = TLObject.read(b) + + participant = TLObject.read(b) + + return DeleteParticipantHistory(channel=channel, participant=participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/edit_admin.py b/pyrogram/raw/functions/channels/edit_admin.py new file mode 100644 index 00000000..8ce3622f --- /dev/null +++ b/pyrogram/raw/functions/channels/edit_admin.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditAdmin(TLObject): # type: ignore + """Modify the admin rights of a user in a supergroup/channel. + + + Details: + - Layer: ``224`` + - ID: ``D33C8902`` + + Parameters: + channel (:obj:`InputChannel `): + The supergroup/channel. + + user_id (:obj:`InputUser `): + The ID of the user whose admin rights should be modified + + admin_rights (:obj:`ChatAdminRights `): + The admin rights + + rank (``str``): + Indicates the role (rank) of the admin in the group: just an arbitrary string + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "user_id", "admin_rights", "rank"] + + ID = 0xd33c8902 + QUALNAME = "functions.channels.EditAdmin" + + def __init__(self, *, channel: "raw.base.InputChannel", user_id: "raw.base.InputUser", admin_rights: "raw.base.ChatAdminRights", rank: str) -> None: + self.channel = channel # InputChannel + self.user_id = user_id # InputUser + self.admin_rights = admin_rights # ChatAdminRights + self.rank = rank # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditAdmin": + # No flags + + channel = TLObject.read(b) + + user_id = TLObject.read(b) + + admin_rights = TLObject.read(b) + + rank = String.read(b) + + return EditAdmin(channel=channel, user_id=user_id, admin_rights=admin_rights, rank=rank) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.user_id.write()) + + b.write(self.admin_rights.write()) + + b.write(String(self.rank)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/edit_banned.py b/pyrogram/raw/functions/channels/edit_banned.py new file mode 100644 index 00000000..ae5dcbac --- /dev/null +++ b/pyrogram/raw/functions/channels/edit_banned.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditBanned(TLObject): # type: ignore + """Ban/unban/kick a user in a supergroup/channel. + + + Details: + - Layer: ``224`` + - ID: ``96E6CD81`` + + Parameters: + channel (:obj:`InputChannel `): + The supergroup/channel. + + participant (:obj:`InputPeer `): + Participant to ban + + banned_rights (:obj:`ChatBannedRights `): + The banned rights + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "participant", "banned_rights"] + + ID = 0x96e6cd81 + QUALNAME = "functions.channels.EditBanned" + + def __init__(self, *, channel: "raw.base.InputChannel", participant: "raw.base.InputPeer", banned_rights: "raw.base.ChatBannedRights") -> None: + self.channel = channel # InputChannel + self.participant = participant # InputPeer + self.banned_rights = banned_rights # ChatBannedRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditBanned": + # No flags + + channel = TLObject.read(b) + + participant = TLObject.read(b) + + banned_rights = TLObject.read(b) + + return EditBanned(channel=channel, participant=participant, banned_rights=banned_rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.participant.write()) + + b.write(self.banned_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/edit_creator.py b/pyrogram/raw/functions/channels/edit_creator.py new file mode 100644 index 00000000..3a82af05 --- /dev/null +++ b/pyrogram/raw/functions/channels/edit_creator.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditCreator(TLObject): # type: ignore + """Transfer channel ownership + + + Details: + - Layer: ``224`` + - ID: ``8F38CD1F`` + + Parameters: + channel (:obj:`InputChannel `): + Channel + + user_id (:obj:`InputUser `): + New channel owner + + password (:obj:`InputCheckPasswordSRP `): + 2FA password of account + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "user_id", "password"] + + ID = 0x8f38cd1f + QUALNAME = "functions.channels.EditCreator" + + def __init__(self, *, channel: "raw.base.InputChannel", user_id: "raw.base.InputUser", password: "raw.base.InputCheckPasswordSRP") -> None: + self.channel = channel # InputChannel + self.user_id = user_id # InputUser + self.password = password # InputCheckPasswordSRP + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditCreator": + # No flags + + channel = TLObject.read(b) + + user_id = TLObject.read(b) + + password = TLObject.read(b) + + return EditCreator(channel=channel, user_id=user_id, password=password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.user_id.write()) + + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/edit_location.py b/pyrogram/raw/functions/channels/edit_location.py new file mode 100644 index 00000000..2217b1d5 --- /dev/null +++ b/pyrogram/raw/functions/channels/edit_location.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditLocation(TLObject): # type: ignore + """Edit location of geogroup, see here » for more info on geogroups. + + + Details: + - Layer: ``224`` + - ID: ``58E63F6D`` + + Parameters: + channel (:obj:`InputChannel `): + Geogroup + + geo_point (:obj:`InputGeoPoint `): + New geolocation + + address (``str``): + Address string + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "geo_point", "address"] + + ID = 0x58e63f6d + QUALNAME = "functions.channels.EditLocation" + + def __init__(self, *, channel: "raw.base.InputChannel", geo_point: "raw.base.InputGeoPoint", address: str) -> None: + self.channel = channel # InputChannel + self.geo_point = geo_point # InputGeoPoint + self.address = address # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditLocation": + # No flags + + channel = TLObject.read(b) + + geo_point = TLObject.read(b) + + address = String.read(b) + + return EditLocation(channel=channel, geo_point=geo_point, address=address) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.geo_point.write()) + + b.write(String(self.address)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/edit_photo.py b/pyrogram/raw/functions/channels/edit_photo.py new file mode 100644 index 00000000..814072c4 --- /dev/null +++ b/pyrogram/raw/functions/channels/edit_photo.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditPhoto(TLObject): # type: ignore + """Change the photo of a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``F12E57C9`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup whose photo should be edited + + photo (:obj:`InputChatPhoto `): + New photo + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "photo"] + + ID = 0xf12e57c9 + QUALNAME = "functions.channels.EditPhoto" + + def __init__(self, *, channel: "raw.base.InputChannel", photo: "raw.base.InputChatPhoto") -> None: + self.channel = channel # InputChannel + self.photo = photo # InputChatPhoto + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditPhoto": + # No flags + + channel = TLObject.read(b) + + photo = TLObject.read(b) + + return EditPhoto(channel=channel, photo=photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/edit_title.py b/pyrogram/raw/functions/channels/edit_title.py new file mode 100644 index 00000000..8f9a665d --- /dev/null +++ b/pyrogram/raw/functions/channels/edit_title.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditTitle(TLObject): # type: ignore + """Edit the name of a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``566DECD0`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + title (``str``): + New name + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "title"] + + ID = 0x566decd0 + QUALNAME = "functions.channels.EditTitle" + + def __init__(self, *, channel: "raw.base.InputChannel", title: str) -> None: + self.channel = channel # InputChannel + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditTitle": + # No flags + + channel = TLObject.read(b) + + title = String.read(b) + + return EditTitle(channel=channel, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/export_message_link.py b/pyrogram/raw/functions/channels/export_message_link.py new file mode 100644 index 00000000..28073c8f --- /dev/null +++ b/pyrogram/raw/functions/channels/export_message_link.py @@ -0,0 +1,77 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportMessageLink(TLObject): # type: ignore + """Get link and embed info of a message in a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``E63FADEB`` + + Parameters: + channel (:obj:`InputChannel `): + Channel + + id (``int`` ``32-bit``): + Message ID + + grouped (``bool``, *optional*): + Whether to include other grouped media (for albums) + + thread (``bool``, *optional*): + Whether to also include a thread ID, if available, inside of the link + + Returns: + :obj:`ExportedMessageLink ` + """ + + __slots__: List[str] = ["channel", "id", "grouped", "thread"] + + ID = 0xe63fadeb + QUALNAME = "functions.channels.ExportMessageLink" + + def __init__(self, *, channel: "raw.base.InputChannel", id: int, grouped: Optional[bool] = None, thread: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.id = id # int + self.grouped = grouped # flags.0?true + self.thread = thread # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportMessageLink": + + flags = Int.read(b) + + grouped = True if flags & (1 << 0) else False + thread = True if flags & (1 << 1) else False + channel = TLObject.read(b) + + id = Int.read(b) + + return ExportMessageLink(channel=channel, id=id, grouped=grouped, thread=thread) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.grouped else 0 + flags |= (1 << 1) if self.thread else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_admin_log.py b/pyrogram/raw/functions/channels/get_admin_log.py new file mode 100644 index 00000000..26b03638 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_admin_log.py @@ -0,0 +1,109 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAdminLog(TLObject): # type: ignore + """Get the admin log of a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``33DDF480`` + + Parameters: + channel (:obj:`InputChannel `): + Channel + + q (``str``): + Search query, can be empty + + max_id (``int`` ``64-bit``): + Maximum ID of message to return (see pagination) + + min_id (``int`` ``64-bit``): + Minimum ID of message to return (see pagination) + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + events_filter (:obj:`ChannelAdminLogEventsFilter `, *optional*): + Event filter + + admins (List of :obj:`InputUser `, *optional*): + Only show events from these admins + + Returns: + :obj:`channels.AdminLogResults ` + """ + + __slots__: List[str] = ["channel", "q", "max_id", "min_id", "limit", "events_filter", "admins"] + + ID = 0x33ddf480 + QUALNAME = "functions.channels.GetAdminLog" + + def __init__(self, *, channel: "raw.base.InputChannel", q: str, max_id: int, min_id: int, limit: int, events_filter: "raw.base.ChannelAdminLogEventsFilter" = None, admins: Optional[List["raw.base.InputUser"]] = None) -> None: + self.channel = channel # InputChannel + self.q = q # string + self.max_id = max_id # long + self.min_id = min_id # long + self.limit = limit # int + self.events_filter = events_filter # flags.0?ChannelAdminLogEventsFilter + self.admins = admins # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAdminLog": + + flags = Int.read(b) + + channel = TLObject.read(b) + + q = String.read(b) + + events_filter = TLObject.read(b) if flags & (1 << 0) else None + + admins = TLObject.read(b) if flags & (1 << 1) else [] + + max_id = Long.read(b) + + min_id = Long.read(b) + + limit = Int.read(b) + + return GetAdminLog(channel=channel, q=q, max_id=max_id, min_id=min_id, limit=limit, events_filter=events_filter, admins=admins) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.events_filter is not None else 0 + flags |= (1 << 1) if self.admins else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + b.write(String(self.q)) + + if self.events_filter is not None: + b.write(self.events_filter.write()) + + if self.admins is not None: + b.write(Vector(self.admins)) + + b.write(Long(self.max_id)) + + b.write(Long(self.min_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_admined_public_channels.py b/pyrogram/raw/functions/channels/get_admined_public_channels.py new file mode 100644 index 00000000..2aca0ee5 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_admined_public_channels.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAdminedPublicChannels(TLObject): # type: ignore + """Get channels/supergroups/geogroups we're admin in. Usually called when the user exceeds the limit for owned public channels/supergroups/geogroups, and the user is given the choice to remove one of his channels/supergroups/geogroups. + + + Details: + - Layer: ``224`` + - ID: ``F8B036AF`` + + Parameters: + by_location (``bool``, *optional*): + Get geogroups + + check_limit (``bool``, *optional*): + If set and the user has reached the limit of owned public channels/supergroups/geogroups, instead of returning the channel list one of the specified errors will be returned.Useful to check if a new public channel can indeed be created, even before asking the user to enter a channel username to use in channels.checkUsername/channels.updateUsername. + + for_personal (``bool``, *optional*): + + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["by_location", "check_limit", "for_personal"] + + ID = 0xf8b036af + QUALNAME = "functions.channels.GetAdminedPublicChannels" + + def __init__(self, *, by_location: Optional[bool] = None, check_limit: Optional[bool] = None, for_personal: Optional[bool] = None) -> None: + self.by_location = by_location # flags.0?true + self.check_limit = check_limit # flags.1?true + self.for_personal = for_personal # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAdminedPublicChannels": + + flags = Int.read(b) + + by_location = True if flags & (1 << 0) else False + check_limit = True if flags & (1 << 1) else False + for_personal = True if flags & (1 << 2) else False + return GetAdminedPublicChannels(by_location=by_location, check_limit=check_limit, for_personal=for_personal) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.by_location else 0 + flags |= (1 << 1) if self.check_limit else 0 + flags |= (1 << 2) if self.for_personal else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_channel_recommendations.py b/pyrogram/raw/functions/channels/get_channel_recommendations.py new file mode 100644 index 00000000..0139c6d9 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_channel_recommendations.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChannelRecommendations(TLObject): # type: ignore + """Obtain a list of similarly themed public channels, selected based on similarities in their subscriber bases. + + + Details: + - Layer: ``224`` + - ID: ``25A71742`` + + Parameters: + channel (:obj:`InputChannel `, *optional*): + The method will return channels related to the passed channel. + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0x25a71742 + QUALNAME = "functions.channels.GetChannelRecommendations" + + def __init__(self, *, channel: "raw.base.InputChannel" = None) -> None: + self.channel = channel # flags.0?InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChannelRecommendations": + + flags = Int.read(b) + + channel = TLObject.read(b) if flags & (1 << 0) else None + + return GetChannelRecommendations(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.channel is not None else 0 + b.write(Int(flags)) + + if self.channel is not None: + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_channels.py b/pyrogram/raw/functions/channels/get_channels.py new file mode 100644 index 00000000..967238d7 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_channels.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChannels(TLObject): # type: ignore + """Get info about channels/supergroups + + + Details: + - Layer: ``224`` + - ID: ``A7F6BBB`` + + Parameters: + id (List of :obj:`InputChannel `): + IDs of channels/supergroups to get info about + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["id"] + + ID = 0xa7f6bbb + QUALNAME = "functions.channels.GetChannels" + + def __init__(self, *, id: List["raw.base.InputChannel"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChannels": + # No flags + + id = TLObject.read(b) + + return GetChannels(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_full_channel.py b/pyrogram/raw/functions/channels/get_full_channel.py new file mode 100644 index 00000000..6b2f051d --- /dev/null +++ b/pyrogram/raw/functions/channels/get_full_channel.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFullChannel(TLObject): # type: ignore + """Get full info about a supergroup, gigagroup or channel + + + Details: + - Layer: ``224`` + - ID: ``8736A09`` + + Parameters: + channel (:obj:`InputChannel `): + The channel, supergroup or gigagroup to get info about + + Returns: + :obj:`messages.ChatFull ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0x8736a09 + QUALNAME = "functions.channels.GetFullChannel" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFullChannel": + # No flags + + channel = TLObject.read(b) + + return GetFullChannel(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_future_creator_after_leave.py b/pyrogram/raw/functions/channels/get_future_creator_after_leave.py new file mode 100644 index 00000000..c2f3d81b --- /dev/null +++ b/pyrogram/raw/functions/channels/get_future_creator_after_leave.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFutureCreatorAfterLeave(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A00918AF`` + + Parameters: + channel (:obj:`InputChannel `): + N/A + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0xa00918af + QUALNAME = "functions.channels.GetFutureCreatorAfterLeave" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFutureCreatorAfterLeave": + # No flags + + channel = TLObject.read(b) + + return GetFutureCreatorAfterLeave(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_groups_for_discussion.py b/pyrogram/raw/functions/channels/get_groups_for_discussion.py new file mode 100644 index 00000000..71980bdd --- /dev/null +++ b/pyrogram/raw/functions/channels/get_groups_for_discussion.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupsForDiscussion(TLObject): # type: ignore + """Get all groups that can be used as discussion groups. + + + Details: + - Layer: ``224`` + - ID: ``F5DAD378`` + + Parameters: + No parameters required. + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = [] + + ID = 0xf5dad378 + QUALNAME = "functions.channels.GetGroupsForDiscussion" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupsForDiscussion": + # No flags + + return GetGroupsForDiscussion() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_inactive_channels.py b/pyrogram/raw/functions/channels/get_inactive_channels.py new file mode 100644 index 00000000..08f523e3 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_inactive_channels.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetInactiveChannels(TLObject): # type: ignore + """Get inactive channels and supergroups + + + Details: + - Layer: ``224`` + - ID: ``11E831EE`` + + Parameters: + No parameters required. + + Returns: + :obj:`messages.InactiveChats ` + """ + + __slots__: List[str] = [] + + ID = 0x11e831ee + QUALNAME = "functions.channels.GetInactiveChannels" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetInactiveChannels": + # No flags + + return GetInactiveChannels() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_left_channels.py b/pyrogram/raw/functions/channels/get_left_channels.py new file mode 100644 index 00000000..b80d9e73 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_left_channels.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetLeftChannels(TLObject): # type: ignore + """Get a list of channels/supergroups we left, requires a takeout session, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``8341ECC0`` + + Parameters: + offset (``int`` ``32-bit``): + Offset for pagination + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["offset"] + + ID = 0x8341ecc0 + QUALNAME = "functions.channels.GetLeftChannels" + + def __init__(self, *, offset: int) -> None: + self.offset = offset # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetLeftChannels": + # No flags + + offset = Int.read(b) + + return GetLeftChannels(offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_message_author.py b/pyrogram/raw/functions/channels/get_message_author.py new file mode 100644 index 00000000..dc483696 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_message_author.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessageAuthor(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``ECE2A0E6`` + + Parameters: + channel (:obj:`InputChannel `): + N/A + + id (``int`` ``32-bit``): + N/A + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["channel", "id"] + + ID = 0xece2a0e6 + QUALNAME = "functions.channels.GetMessageAuthor" + + def __init__(self, *, channel: "raw.base.InputChannel", id: int) -> None: + self.channel = channel # InputChannel + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessageAuthor": + # No flags + + channel = TLObject.read(b) + + id = Int.read(b) + + return GetMessageAuthor(channel=channel, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_messages.py b/pyrogram/raw/functions/channels/get_messages.py new file mode 100644 index 00000000..7b06479a --- /dev/null +++ b/pyrogram/raw/functions/channels/get_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessages(TLObject): # type: ignore + """Get channel/supergroup messages + + + Details: + - Layer: ``224`` + - ID: ``AD8C9A23`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + id (List of :obj:`InputMessage `): + IDs of messages to get + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["channel", "id"] + + ID = 0xad8c9a23 + QUALNAME = "functions.channels.GetMessages" + + def __init__(self, *, channel: "raw.base.InputChannel", id: List["raw.base.InputMessage"]) -> None: + self.channel = channel # InputChannel + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessages": + # No flags + + channel = TLObject.read(b) + + id = TLObject.read(b) + + return GetMessages(channel=channel, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_participant.py b/pyrogram/raw/functions/channels/get_participant.py new file mode 100644 index 00000000..93e99cdc --- /dev/null +++ b/pyrogram/raw/functions/channels/get_participant.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetParticipant(TLObject): # type: ignore + """Get info about a channel/supergroup participant + + + Details: + - Layer: ``224`` + - ID: ``A0AB6CC6`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + participant (:obj:`InputPeer `): + Participant to get info about + + Returns: + :obj:`channels.ChannelParticipant ` + """ + + __slots__: List[str] = ["channel", "participant"] + + ID = 0xa0ab6cc6 + QUALNAME = "functions.channels.GetParticipant" + + def __init__(self, *, channel: "raw.base.InputChannel", participant: "raw.base.InputPeer") -> None: + self.channel = channel # InputChannel + self.participant = participant # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetParticipant": + # No flags + + channel = TLObject.read(b) + + participant = TLObject.read(b) + + return GetParticipant(channel=channel, participant=participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_participants.py b/pyrogram/raw/functions/channels/get_participants.py new file mode 100644 index 00000000..174cac75 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_participants.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetParticipants(TLObject): # type: ignore + """Get the participants of a supergroup/channel + + + Details: + - Layer: ``224`` + - ID: ``77CED9D0`` + + Parameters: + channel (:obj:`InputChannel `): + Channel + + filter (:obj:`ChannelParticipantsFilter `): + Which participant types to fetch + + offset (``int`` ``32-bit``): + Offset + + limit (``int`` ``32-bit``): + Limit + + hash (``int`` ``64-bit``): + Hash + + Returns: + :obj:`channels.ChannelParticipants ` + """ + + __slots__: List[str] = ["channel", "filter", "offset", "limit", "hash"] + + ID = 0x77ced9d0 + QUALNAME = "functions.channels.GetParticipants" + + def __init__(self, *, channel: "raw.base.InputChannel", filter: "raw.base.ChannelParticipantsFilter", offset: int, limit: int, hash: int) -> None: + self.channel = channel # InputChannel + self.filter = filter # ChannelParticipantsFilter + self.offset = offset # int + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetParticipants": + # No flags + + channel = TLObject.read(b) + + filter = TLObject.read(b) + + offset = Int.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetParticipants(channel=channel, filter=filter, offset=offset, limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.filter.write()) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/get_send_as.py b/pyrogram/raw/functions/channels/get_send_as.py new file mode 100644 index 00000000..73a65bf8 --- /dev/null +++ b/pyrogram/raw/functions/channels/get_send_as.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSendAs(TLObject): # type: ignore + """Obtains a list of peers that can be used to send messages in a specific group + + + Details: + - Layer: ``224`` + - ID: ``E785A43F`` + + Parameters: + peer (:obj:`InputPeer `): + The group where we intend to send messages + + for_paid_reactions (``bool``, *optional*): + N/A + + for_live_stories (``bool``, *optional*): + N/A + + Returns: + :obj:`channels.SendAsPeers ` + """ + + __slots__: List[str] = ["peer", "for_paid_reactions", "for_live_stories"] + + ID = 0xe785a43f + QUALNAME = "functions.channels.GetSendAs" + + def __init__(self, *, peer: "raw.base.InputPeer", for_paid_reactions: Optional[bool] = None, for_live_stories: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.for_paid_reactions = for_paid_reactions # flags.0?true + self.for_live_stories = for_live_stories # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSendAs": + + flags = Int.read(b) + + for_paid_reactions = True if flags & (1 << 0) else False + for_live_stories = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + return GetSendAs(peer=peer, for_paid_reactions=for_paid_reactions, for_live_stories=for_live_stories) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.for_paid_reactions else 0 + flags |= (1 << 1) if self.for_live_stories else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/invite_to_channel.py b/pyrogram/raw/functions/channels/invite_to_channel.py new file mode 100644 index 00000000..a0f17372 --- /dev/null +++ b/pyrogram/raw/functions/channels/invite_to_channel.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InviteToChannel(TLObject): # type: ignore + """Invite users to a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``C9E33D54`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + users (List of :obj:`InputUser `): + Users to invite + + Returns: + :obj:`messages.InvitedUsers ` + """ + + __slots__: List[str] = ["channel", "users"] + + ID = 0xc9e33d54 + QUALNAME = "functions.channels.InviteToChannel" + + def __init__(self, *, channel: "raw.base.InputChannel", users: List["raw.base.InputUser"]) -> None: + self.channel = channel # InputChannel + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InviteToChannel": + # No flags + + channel = TLObject.read(b) + + users = TLObject.read(b) + + return InviteToChannel(channel=channel, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/join_channel.py b/pyrogram/raw/functions/channels/join_channel.py new file mode 100644 index 00000000..1c08dd67 --- /dev/null +++ b/pyrogram/raw/functions/channels/join_channel.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JoinChannel(TLObject): # type: ignore + """Join a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``24B524C5`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup to join + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0x24b524c5 + QUALNAME = "functions.channels.JoinChannel" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JoinChannel": + # No flags + + channel = TLObject.read(b) + + return JoinChannel(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/leave_channel.py b/pyrogram/raw/functions/channels/leave_channel.py new file mode 100644 index 00000000..4b9a5f05 --- /dev/null +++ b/pyrogram/raw/functions/channels/leave_channel.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LeaveChannel(TLObject): # type: ignore + """Leave a channel/supergroup + + + Details: + - Layer: ``224`` + - ID: ``F836AA95`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup to leave + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel"] + + ID = 0xf836aa95 + QUALNAME = "functions.channels.LeaveChannel" + + def __init__(self, *, channel: "raw.base.InputChannel") -> None: + self.channel = channel # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LeaveChannel": + # No flags + + channel = TLObject.read(b) + + return LeaveChannel(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/read_history.py b/pyrogram/raw/functions/channels/read_history.py new file mode 100644 index 00000000..ab04b153 --- /dev/null +++ b/pyrogram/raw/functions/channels/read_history.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadHistory(TLObject): # type: ignore + """Mark channel/supergroup history as read + + + Details: + - Layer: ``224`` + - ID: ``CC104937`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + max_id (``int`` ``32-bit``): + ID of message up to which messages should be marked as read + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "max_id"] + + ID = 0xcc104937 + QUALNAME = "functions.channels.ReadHistory" + + def __init__(self, *, channel: "raw.base.InputChannel", max_id: int) -> None: + self.channel = channel # InputChannel + self.max_id = max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadHistory": + # No flags + + channel = TLObject.read(b) + + max_id = Int.read(b) + + return ReadHistory(channel=channel, max_id=max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/read_message_contents.py b/pyrogram/raw/functions/channels/read_message_contents.py new file mode 100644 index 00000000..d0200e5d --- /dev/null +++ b/pyrogram/raw/functions/channels/read_message_contents.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadMessageContents(TLObject): # type: ignore + """Mark channel/supergroup message contents as read + + + Details: + - Layer: ``224`` + - ID: ``EAB5DC38`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + id (List of ``int`` ``32-bit``): + IDs of messages whose contents should be marked as read + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "id"] + + ID = 0xeab5dc38 + QUALNAME = "functions.channels.ReadMessageContents" + + def __init__(self, *, channel: "raw.base.InputChannel", id: List[int]) -> None: + self.channel = channel # InputChannel + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadMessageContents": + # No flags + + channel = TLObject.read(b) + + id = TLObject.read(b, Int) + + return ReadMessageContents(channel=channel, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/reorder_usernames.py b/pyrogram/raw/functions/channels/reorder_usernames.py new file mode 100644 index 00000000..257c59fd --- /dev/null +++ b/pyrogram/raw/functions/channels/reorder_usernames.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderUsernames(TLObject): # type: ignore + """Reorder active usernames + + + Details: + - Layer: ``224`` + - ID: ``B45CED1D`` + + Parameters: + channel (:obj:`InputChannel `): + The supergroup or channel + + order (List of ``str``): + The new order for active usernames. All active usernames must be specified. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "order"] + + ID = 0xb45ced1d + QUALNAME = "functions.channels.ReorderUsernames" + + def __init__(self, *, channel: "raw.base.InputChannel", order: List[str]) -> None: + self.channel = channel # InputChannel + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderUsernames": + # No flags + + channel = TLObject.read(b) + + order = TLObject.read(b, String) + + return ReorderUsernames(channel=channel, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Vector(self.order, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/report_anti_spam_false_positive.py b/pyrogram/raw/functions/channels/report_anti_spam_false_positive.py new file mode 100644 index 00000000..a32e81a0 --- /dev/null +++ b/pyrogram/raw/functions/channels/report_anti_spam_false_positive.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportAntiSpamFalsePositive(TLObject): # type: ignore + """Report a native antispam false positive + + + Details: + - Layer: ``224`` + - ID: ``A850A693`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup ID + + msg_id (``int`` ``32-bit``): + Message ID that was mistakenly deleted by the native antispam system, taken from the admin log + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "msg_id"] + + ID = 0xa850a693 + QUALNAME = "functions.channels.ReportAntiSpamFalsePositive" + + def __init__(self, *, channel: "raw.base.InputChannel", msg_id: int) -> None: + self.channel = channel # InputChannel + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportAntiSpamFalsePositive": + # No flags + + channel = TLObject.read(b) + + msg_id = Int.read(b) + + return ReportAntiSpamFalsePositive(channel=channel, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/report_spam.py b/pyrogram/raw/functions/channels/report_spam.py new file mode 100644 index 00000000..222808c9 --- /dev/null +++ b/pyrogram/raw/functions/channels/report_spam.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportSpam(TLObject): # type: ignore + """Reports some messages from a user in a supergroup as spam; requires administrator rights in the supergroup + + + Details: + - Layer: ``224`` + - ID: ``F44A8315`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup + + participant (:obj:`InputPeer `): + Participant whose messages should be reported + + id (List of ``int`` ``32-bit``): + IDs of spam messages + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "participant", "id"] + + ID = 0xf44a8315 + QUALNAME = "functions.channels.ReportSpam" + + def __init__(self, *, channel: "raw.base.InputChannel", participant: "raw.base.InputPeer", id: List[int]) -> None: + self.channel = channel # InputChannel + self.participant = participant # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportSpam": + # No flags + + channel = TLObject.read(b) + + participant = TLObject.read(b) + + id = TLObject.read(b, Int) + + return ReportSpam(channel=channel, participant=participant, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.participant.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/restrict_sponsored_messages.py b/pyrogram/raw/functions/channels/restrict_sponsored_messages.py new file mode 100644 index 00000000..4d5d3d72 --- /dev/null +++ b/pyrogram/raw/functions/channels/restrict_sponsored_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RestrictSponsoredMessages(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``9AE91519`` + + Parameters: + channel (:obj:`InputChannel `): + + + restricted (``bool``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "restricted"] + + ID = 0x9ae91519 + QUALNAME = "functions.channels.RestrictSponsoredMessages" + + def __init__(self, *, channel: "raw.base.InputChannel", restricted: bool) -> None: + self.channel = channel # InputChannel + self.restricted = restricted # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RestrictSponsoredMessages": + # No flags + + channel = TLObject.read(b) + + restricted = Bool.read(b) + + return RestrictSponsoredMessages(channel=channel, restricted=restricted) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.restricted)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/search_posts.py b/pyrogram/raw/functions/channels/search_posts.py new file mode 100644 index 00000000..45faf143 --- /dev/null +++ b/pyrogram/raw/functions/channels/search_posts.py @@ -0,0 +1,108 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchPosts(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``F2C4F24D`` + + Parameters: + offset_rate (``int`` ``32-bit``): + + + offset_peer (:obj:`InputPeer `): + + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + hashtag (``str``, *optional*): + + + query (``str``, *optional*): + N/A + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["offset_rate", "offset_peer", "offset_id", "limit", "hashtag", "query", "allow_paid_stars"] + + ID = 0xf2c4f24d + QUALNAME = "functions.channels.SearchPosts" + + def __init__(self, *, offset_rate: int, offset_peer: "raw.base.InputPeer", offset_id: int, limit: int, hashtag: Optional[str] = None, query: Optional[str] = None, allow_paid_stars: Optional[int] = None) -> None: + self.offset_rate = offset_rate # int + self.offset_peer = offset_peer # InputPeer + self.offset_id = offset_id # int + self.limit = limit # int + self.hashtag = hashtag # flags.0?string + self.query = query # flags.1?string + self.allow_paid_stars = allow_paid_stars # flags.2?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchPosts": + + flags = Int.read(b) + + hashtag = String.read(b) if flags & (1 << 0) else None + query = String.read(b) if flags & (1 << 1) else None + offset_rate = Int.read(b) + + offset_peer = TLObject.read(b) + + offset_id = Int.read(b) + + limit = Int.read(b) + + allow_paid_stars = Long.read(b) if flags & (1 << 2) else None + return SearchPosts(offset_rate=offset_rate, offset_peer=offset_peer, offset_id=offset_id, limit=limit, hashtag=hashtag, query=query, allow_paid_stars=allow_paid_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.hashtag is not None else 0 + flags |= (1 << 1) if self.query is not None else 0 + flags |= (1 << 2) if self.allow_paid_stars is not None else 0 + b.write(Int(flags)) + + if self.hashtag is not None: + b.write(String(self.hashtag)) + + if self.query is not None: + b.write(String(self.query)) + + b.write(Int(self.offset_rate)) + + b.write(self.offset_peer.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.limit)) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/set_boosts_to_unblock_restrictions.py b/pyrogram/raw/functions/channels/set_boosts_to_unblock_restrictions.py new file mode 100644 index 00000000..0f7753cb --- /dev/null +++ b/pyrogram/raw/functions/channels/set_boosts_to_unblock_restrictions.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBoostsToUnblockRestrictions(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``AD399CEE`` + + Parameters: + channel (:obj:`InputChannel `): + + + boosts (``int`` ``32-bit``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "boosts"] + + ID = 0xad399cee + QUALNAME = "functions.channels.SetBoostsToUnblockRestrictions" + + def __init__(self, *, channel: "raw.base.InputChannel", boosts: int) -> None: + self.channel = channel # InputChannel + self.boosts = boosts # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBoostsToUnblockRestrictions": + # No flags + + channel = TLObject.read(b) + + boosts = Int.read(b) + + return SetBoostsToUnblockRestrictions(channel=channel, boosts=boosts) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Int(self.boosts)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/set_discussion_group.py b/pyrogram/raw/functions/channels/set_discussion_group.py new file mode 100644 index 00000000..a71e0dd7 --- /dev/null +++ b/pyrogram/raw/functions/channels/set_discussion_group.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetDiscussionGroup(TLObject): # type: ignore + """Associate a group to a channel as discussion group for that channel + + + Details: + - Layer: ``224`` + - ID: ``40582BB2`` + + Parameters: + broadcast (:obj:`InputChannel `): + Channel + + group (:obj:`InputChannel `): + Discussion group to associate to the channel + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["broadcast", "group"] + + ID = 0x40582bb2 + QUALNAME = "functions.channels.SetDiscussionGroup" + + def __init__(self, *, broadcast: "raw.base.InputChannel", group: "raw.base.InputChannel") -> None: + self.broadcast = broadcast # InputChannel + self.group = group # InputChannel + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetDiscussionGroup": + # No flags + + broadcast = TLObject.read(b) + + group = TLObject.read(b) + + return SetDiscussionGroup(broadcast=broadcast, group=group) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.broadcast.write()) + + b.write(self.group.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/set_emoji_stickers.py b/pyrogram/raw/functions/channels/set_emoji_stickers.py new file mode 100644 index 00000000..a49e9350 --- /dev/null +++ b/pyrogram/raw/functions/channels/set_emoji_stickers.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetEmojiStickers(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``3CD930B7`` + + Parameters: + channel (:obj:`InputChannel `): + + + stickerset (:obj:`InputStickerSet `): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "stickerset"] + + ID = 0x3cd930b7 + QUALNAME = "functions.channels.SetEmojiStickers" + + def __init__(self, *, channel: "raw.base.InputChannel", stickerset: "raw.base.InputStickerSet") -> None: + self.channel = channel # InputChannel + self.stickerset = stickerset # InputStickerSet + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetEmojiStickers": + # No flags + + channel = TLObject.read(b) + + stickerset = TLObject.read(b) + + return SetEmojiStickers(channel=channel, stickerset=stickerset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/set_main_profile_tab.py b/pyrogram/raw/functions/channels/set_main_profile_tab.py new file mode 100644 index 00000000..72cf3b04 --- /dev/null +++ b/pyrogram/raw/functions/channels/set_main_profile_tab.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetMainProfileTab(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``3583FCB1`` + + Parameters: + channel (:obj:`InputChannel `): + N/A + + tab (:obj:`ProfileTab `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "tab"] + + ID = 0x3583fcb1 + QUALNAME = "functions.channels.SetMainProfileTab" + + def __init__(self, *, channel: "raw.base.InputChannel", tab: "raw.base.ProfileTab") -> None: + self.channel = channel # InputChannel + self.tab = tab # ProfileTab + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetMainProfileTab": + # No flags + + channel = TLObject.read(b) + + tab = TLObject.read(b) + + return SetMainProfileTab(channel=channel, tab=tab) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.tab.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/set_stickers.py b/pyrogram/raw/functions/channels/set_stickers.py new file mode 100644 index 00000000..864c624e --- /dev/null +++ b/pyrogram/raw/functions/channels/set_stickers.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetStickers(TLObject): # type: ignore + """Associate a stickerset to the supergroup + + + Details: + - Layer: ``224`` + - ID: ``EA8CA4F9`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup + + stickerset (:obj:`InputStickerSet `): + The stickerset to associate + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "stickerset"] + + ID = 0xea8ca4f9 + QUALNAME = "functions.channels.SetStickers" + + def __init__(self, *, channel: "raw.base.InputChannel", stickerset: "raw.base.InputStickerSet") -> None: + self.channel = channel # InputChannel + self.stickerset = stickerset # InputStickerSet + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetStickers": + # No flags + + channel = TLObject.read(b) + + stickerset = TLObject.read(b) + + return SetStickers(channel=channel, stickerset=stickerset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_anti_spam.py b/pyrogram/raw/functions/channels/toggle_anti_spam.py new file mode 100644 index 00000000..65956f8c --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_anti_spam.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleAntiSpam(TLObject): # type: ignore + """Enable or disable the native antispam system. + + + Details: + - Layer: ``224`` + - ID: ``68F3E4EB`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup ID. The specified supergroup must have at least telegram_antispam_group_size_min members to enable antispam functionality, as specified by the client configuration parameters. + + enabled (``bool``): + Enable or disable the native antispam system. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0x68f3e4eb + QUALNAME = "functions.channels.ToggleAntiSpam" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleAntiSpam": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleAntiSpam(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_autotranslation.py b/pyrogram/raw/functions/channels/toggle_autotranslation.py new file mode 100644 index 00000000..faab36bf --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_autotranslation.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleAutotranslation(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``167FC0A1`` + + Parameters: + channel (:obj:`InputChannel `): + N/A + + enabled (``bool``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0x167fc0a1 + QUALNAME = "functions.channels.ToggleAutotranslation" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleAutotranslation": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleAutotranslation(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_forum.py b/pyrogram/raw/functions/channels/toggle_forum.py new file mode 100644 index 00000000..e1b75b66 --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_forum.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleForum(TLObject): # type: ignore + """Enable or disable forum functionality in a supergroup. + + + Details: + - Layer: ``224`` + - ID: ``3FF75734`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup ID + + enabled (``bool``): + Enable or disable forum functionality + + tabs (``bool``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled", "tabs"] + + ID = 0x3ff75734 + QUALNAME = "functions.channels.ToggleForum" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool, tabs: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + self.tabs = tabs # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleForum": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + tabs = Bool.read(b) + + return ToggleForum(channel=channel, enabled=enabled, tabs=tabs) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + b.write(Bool(self.tabs)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_join_request.py b/pyrogram/raw/functions/channels/toggle_join_request.py new file mode 100644 index 00000000..8ff5bc56 --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_join_request.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleJoinRequest(TLObject): # type: ignore + """Set whether all users should request admin approval to join the group ». + + + Details: + - Layer: ``224`` + - ID: ``4C2985B6`` + + Parameters: + channel (:obj:`InputChannel `): + Group + + enabled (``bool``): + Toggle + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0x4c2985b6 + QUALNAME = "functions.channels.ToggleJoinRequest" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleJoinRequest": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleJoinRequest(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_join_to_send.py b/pyrogram/raw/functions/channels/toggle_join_to_send.py new file mode 100644 index 00000000..e700056c --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_join_to_send.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleJoinToSend(TLObject): # type: ignore + """Set whether all users should join a discussion group in order to comment on a post » + + + Details: + - Layer: ``224`` + - ID: ``E4CB9580`` + + Parameters: + channel (:obj:`InputChannel `): + Discussion group + + enabled (``bool``): + Toggle + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0xe4cb9580 + QUALNAME = "functions.channels.ToggleJoinToSend" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleJoinToSend": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleJoinToSend(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_participants_hidden.py b/pyrogram/raw/functions/channels/toggle_participants_hidden.py new file mode 100644 index 00000000..015e0fbc --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_participants_hidden.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleParticipantsHidden(TLObject): # type: ignore + """Hide or display the participants list in a supergroup. + + + Details: + - Layer: ``224`` + - ID: ``6A6E7854`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup ID + + enabled (``bool``): + If true, will hide the participants list; otherwise will unhide it. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0x6a6e7854 + QUALNAME = "functions.channels.ToggleParticipantsHidden" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleParticipantsHidden": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleParticipantsHidden(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_pre_history_hidden.py b/pyrogram/raw/functions/channels/toggle_pre_history_hidden.py new file mode 100644 index 00000000..33fea6ce --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_pre_history_hidden.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TogglePreHistoryHidden(TLObject): # type: ignore + """Hide/unhide message history for new channel/supergroup users + + + Details: + - Layer: ``224`` + - ID: ``EABBB94C`` + + Parameters: + channel (:obj:`InputChannel `): + Channel/supergroup + + enabled (``bool``): + Hide/unhide + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0xeabbb94c + QUALNAME = "functions.channels.TogglePreHistoryHidden" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TogglePreHistoryHidden": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return TogglePreHistoryHidden(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_signatures.py b/pyrogram/raw/functions/channels/toggle_signatures.py new file mode 100644 index 00000000..61fdd2f2 --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_signatures.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleSignatures(TLObject): # type: ignore + """Enable/disable message signatures in channels + + + Details: + - Layer: ``224`` + - ID: ``418D549C`` + + Parameters: + channel (:obj:`InputChannel `): + Channel + + signatures_enabled (``bool``, *optional*): + N/A + + profiles_enabled (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "signatures_enabled", "profiles_enabled"] + + ID = 0x418d549c + QUALNAME = "functions.channels.ToggleSignatures" + + def __init__(self, *, channel: "raw.base.InputChannel", signatures_enabled: Optional[bool] = None, profiles_enabled: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.signatures_enabled = signatures_enabled # flags.0?true + self.profiles_enabled = profiles_enabled # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleSignatures": + + flags = Int.read(b) + + signatures_enabled = True if flags & (1 << 0) else False + profiles_enabled = True if flags & (1 << 1) else False + channel = TLObject.read(b) + + return ToggleSignatures(channel=channel, signatures_enabled=signatures_enabled, profiles_enabled=profiles_enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.signatures_enabled else 0 + flags |= (1 << 1) if self.profiles_enabled else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_slow_mode.py b/pyrogram/raw/functions/channels/toggle_slow_mode.py new file mode 100644 index 00000000..65415f8a --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_slow_mode.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleSlowMode(TLObject): # type: ignore + """Toggle supergroup slow mode: if enabled, users will only be able to send one message every seconds seconds + + + Details: + - Layer: ``224`` + - ID: ``EDD49EF0`` + + Parameters: + channel (:obj:`InputChannel `): + The supergroup + + seconds (``int`` ``32-bit``): + Users will only be able to send one message every seconds seconds, 0 to disable the limitation + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "seconds"] + + ID = 0xedd49ef0 + QUALNAME = "functions.channels.ToggleSlowMode" + + def __init__(self, *, channel: "raw.base.InputChannel", seconds: int) -> None: + self.channel = channel # InputChannel + self.seconds = seconds # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleSlowMode": + # No flags + + channel = TLObject.read(b) + + seconds = Int.read(b) + + return ToggleSlowMode(channel=channel, seconds=seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Int(self.seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_username.py b/pyrogram/raw/functions/channels/toggle_username.py new file mode 100644 index 00000000..b9555f55 --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_username.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleUsername(TLObject): # type: ignore + """Activate or deactivate a purchased fragment.com username associated to a supergroup or channel we own. + + + Details: + - Layer: ``224`` + - ID: ``50F24105`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup or channel + + username (``str``): + Username + + active (``bool``): + Whether to activate or deactivate the username + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "username", "active"] + + ID = 0x50f24105 + QUALNAME = "functions.channels.ToggleUsername" + + def __init__(self, *, channel: "raw.base.InputChannel", username: str, active: bool) -> None: + self.channel = channel # InputChannel + self.username = username # string + self.active = active # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleUsername": + # No flags + + channel = TLObject.read(b) + + username = String.read(b) + + active = Bool.read(b) + + return ToggleUsername(channel=channel, username=username, active=active) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(String(self.username)) + + b.write(Bool(self.active)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/toggle_view_forum_as_messages.py b/pyrogram/raw/functions/channels/toggle_view_forum_as_messages.py new file mode 100644 index 00000000..61dcdc2e --- /dev/null +++ b/pyrogram/raw/functions/channels/toggle_view_forum_as_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleViewForumAsMessages(TLObject): # type: ignore + """Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client: this setting only affects the current account, and is synced to other logged in sessions using this method. + + + Details: + - Layer: ``224`` + - ID: ``9738BB15`` + + Parameters: + channel (:obj:`InputChannel `): + The forum + + enabled (``bool``): + The new value of the view_forum_as_messages flag. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "enabled"] + + ID = 0x9738bb15 + QUALNAME = "functions.channels.ToggleViewForumAsMessages" + + def __init__(self, *, channel: "raw.base.InputChannel", enabled: bool) -> None: + self.channel = channel # InputChannel + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleViewForumAsMessages": + # No flags + + channel = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleViewForumAsMessages(channel=channel, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/update_color.py b/pyrogram/raw/functions/channels/update_color.py new file mode 100644 index 00000000..d2a60e56 --- /dev/null +++ b/pyrogram/raw/functions/channels/update_color.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateColor(TLObject): # type: ignore + """Update the accent color and background custom emoji » of a channel. + + + Details: + - Layer: ``224`` + - ID: ``D8AA3671`` + + Parameters: + channel (:obj:`InputChannel `): + Channel whose accent color should be changed. + + for_profile (``bool``, *optional*): + Whether to change the accent color emoji pattern of the profile page; otherwise, the accent color and emoji pattern of messages will be changed. + + color (``int`` ``32-bit``, *optional*): + ID of the accent color palette » to use (not RGB24, see here » for more info); if not set, the default palette is used. + + background_emoji_id (``int`` ``64-bit``, *optional*): + Custom emoji ID used in the accent color pattern. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "for_profile", "color", "background_emoji_id"] + + ID = 0xd8aa3671 + QUALNAME = "functions.channels.UpdateColor" + + def __init__(self, *, channel: "raw.base.InputChannel", for_profile: Optional[bool] = None, color: Optional[int] = None, background_emoji_id: Optional[int] = None) -> None: + self.channel = channel # InputChannel + self.for_profile = for_profile # flags.1?true + self.color = color # flags.2?int + self.background_emoji_id = background_emoji_id # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateColor": + + flags = Int.read(b) + + for_profile = True if flags & (1 << 1) else False + channel = TLObject.read(b) + + color = Int.read(b) if flags & (1 << 2) else None + background_emoji_id = Long.read(b) if flags & (1 << 0) else None + return UpdateColor(channel=channel, for_profile=for_profile, color=color, background_emoji_id=background_emoji_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.for_profile else 0 + flags |= (1 << 2) if self.color is not None else 0 + flags |= (1 << 0) if self.background_emoji_id is not None else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + if self.color is not None: + b.write(Int(self.color)) + + if self.background_emoji_id is not None: + b.write(Long(self.background_emoji_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/update_emoji_status.py b/pyrogram/raw/functions/channels/update_emoji_status.py new file mode 100644 index 00000000..e41cdda1 --- /dev/null +++ b/pyrogram/raw/functions/channels/update_emoji_status.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateEmojiStatus(TLObject): # type: ignore + """Set an emoji status for a channel. + + + Details: + - Layer: ``224`` + - ID: ``F0D3E6A8`` + + Parameters: + channel (:obj:`InputChannel `): + The channel, must have at least channel_emoji_status_level_min boosts. + + emoji_status (:obj:`EmojiStatus `): + Emoji status to set + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "emoji_status"] + + ID = 0xf0d3e6a8 + QUALNAME = "functions.channels.UpdateEmojiStatus" + + def __init__(self, *, channel: "raw.base.InputChannel", emoji_status: "raw.base.EmojiStatus") -> None: + self.channel = channel # InputChannel + self.emoji_status = emoji_status # EmojiStatus + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateEmojiStatus": + # No flags + + channel = TLObject.read(b) + + emoji_status = TLObject.read(b) + + return UpdateEmojiStatus(channel=channel, emoji_status=emoji_status) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(self.emoji_status.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/update_paid_messages_price.py b/pyrogram/raw/functions/channels/update_paid_messages_price.py new file mode 100644 index 00000000..62aa3bba --- /dev/null +++ b/pyrogram/raw/functions/channels/update_paid_messages_price.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdatePaidMessagesPrice(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``4B12327B`` + + Parameters: + channel (:obj:`InputChannel `): + N/A + + send_paid_messages_stars (``int`` ``64-bit``): + N/A + + broadcast_messages_allowed (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["channel", "send_paid_messages_stars", "broadcast_messages_allowed"] + + ID = 0x4b12327b + QUALNAME = "functions.channels.UpdatePaidMessagesPrice" + + def __init__(self, *, channel: "raw.base.InputChannel", send_paid_messages_stars: int, broadcast_messages_allowed: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.send_paid_messages_stars = send_paid_messages_stars # long + self.broadcast_messages_allowed = broadcast_messages_allowed # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdatePaidMessagesPrice": + + flags = Int.read(b) + + broadcast_messages_allowed = True if flags & (1 << 0) else False + channel = TLObject.read(b) + + send_paid_messages_stars = Long.read(b) + + return UpdatePaidMessagesPrice(channel=channel, send_paid_messages_stars=send_paid_messages_stars, broadcast_messages_allowed=broadcast_messages_allowed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.broadcast_messages_allowed else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + b.write(Long(self.send_paid_messages_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/channels/update_username.py b/pyrogram/raw/functions/channels/update_username.py new file mode 100644 index 00000000..5f77f87b --- /dev/null +++ b/pyrogram/raw/functions/channels/update_username.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateUsername(TLObject): # type: ignore + """Change or remove the username of a supergroup/channel + + + Details: + - Layer: ``224`` + - ID: ``3514B3DE`` + + Parameters: + channel (:obj:`InputChannel `): + Channel + + username (``str``): + New username, pass an empty string to remove the username + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["channel", "username"] + + ID = 0x3514b3de + QUALNAME = "functions.channels.UpdateUsername" + + def __init__(self, *, channel: "raw.base.InputChannel", username: str) -> None: + self.channel = channel # InputChannel + self.username = username # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateUsername": + # No flags + + channel = TLObject.read(b) + + username = String.read(b) + + return UpdateUsername(channel=channel, username=username) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(String(self.username)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/__init__.py b/pyrogram/raw/functions/chatlists/__init__.py new file mode 100644 index 00000000..cbcc3440 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/__init__.py @@ -0,0 +1,55 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .export_chatlist_invite import ExportChatlistInvite +from .delete_exported_invite import DeleteExportedInvite +from .edit_exported_invite import EditExportedInvite +from .get_exported_invites import GetExportedInvites +from .check_chatlist_invite import CheckChatlistInvite +from .join_chatlist_invite import JoinChatlistInvite +from .get_chatlist_updates import GetChatlistUpdates +from .join_chatlist_updates import JoinChatlistUpdates +from .hide_chatlist_updates import HideChatlistUpdates +from .get_leave_chatlist_suggestions import GetLeaveChatlistSuggestions +from .leave_chatlist import LeaveChatlist + + +__all__ = [ + "ExportChatlistInvite", + "DeleteExportedInvite", + "EditExportedInvite", + "GetExportedInvites", + "CheckChatlistInvite", + "JoinChatlistInvite", + "GetChatlistUpdates", + "JoinChatlistUpdates", + "HideChatlistUpdates", + "GetLeaveChatlistSuggestions", + "LeaveChatlist", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/chatlists/check_chatlist_invite.py b/pyrogram/raw/functions/chatlists/check_chatlist_invite.py new file mode 100644 index 00000000..7a9b0cbf --- /dev/null +++ b/pyrogram/raw/functions/chatlists/check_chatlist_invite.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckChatlistInvite(TLObject): # type: ignore + """Obtain information about a chat folder deep link ». + + + Details: + - Layer: ``224`` + - ID: ``41C10FFF`` + + Parameters: + slug (``str``): + slug obtained from the chat folder deep link » + + Returns: + :obj:`chatlists.ChatlistInvite ` + """ + + __slots__: List[str] = ["slug"] + + ID = 0x41c10fff + QUALNAME = "functions.chatlists.CheckChatlistInvite" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckChatlistInvite": + # No flags + + slug = String.read(b) + + return CheckChatlistInvite(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/delete_exported_invite.py b/pyrogram/raw/functions/chatlists/delete_exported_invite.py new file mode 100644 index 00000000..1d1c5038 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/delete_exported_invite.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteExportedInvite(TLObject): # type: ignore + """Delete a previously created chat folder deep link ». + + + Details: + - Layer: ``224`` + - ID: ``719C5C5E`` + + Parameters: + chatlist (:obj:`InputChatlist `): + The related folder + + slug (``str``): + slug obtained from the chat folder deep link ». + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["chatlist", "slug"] + + ID = 0x719c5c5e + QUALNAME = "functions.chatlists.DeleteExportedInvite" + + def __init__(self, *, chatlist: "raw.base.InputChatlist", slug: str) -> None: + self.chatlist = chatlist # InputChatlist + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteExportedInvite": + # No flags + + chatlist = TLObject.read(b) + + slug = String.read(b) + + return DeleteExportedInvite(chatlist=chatlist, slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/edit_exported_invite.py b/pyrogram/raw/functions/chatlists/edit_exported_invite.py new file mode 100644 index 00000000..0d0fe0a4 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/edit_exported_invite.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditExportedInvite(TLObject): # type: ignore + """Edit a chat folder deep link ». + + + Details: + - Layer: ``224`` + - ID: ``653DB63D`` + + Parameters: + chatlist (:obj:`InputChatlist `): + Folder ID + + slug (``str``): + slug obtained from the chat folder deep link ». + + revoked (``bool``, *optional*): + N/A + + title (``str``, *optional*): + If set, sets a new name for the link + + peers (List of :obj:`InputPeer `, *optional*): + If set, changes the list of peers shared with the link + + Returns: + :obj:`ExportedChatlistInvite ` + """ + + __slots__: List[str] = ["chatlist", "slug", "revoked", "title", "peers"] + + ID = 0x653db63d + QUALNAME = "functions.chatlists.EditExportedInvite" + + def __init__(self, *, chatlist: "raw.base.InputChatlist", slug: str, revoked: Optional[bool] = None, title: Optional[str] = None, peers: Optional[List["raw.base.InputPeer"]] = None) -> None: + self.chatlist = chatlist # InputChatlist + self.slug = slug # string + self.revoked = revoked # flags.0?true + self.title = title # flags.1?string + self.peers = peers # flags.2?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditExportedInvite": + + flags = Int.read(b) + + revoked = True if flags & (1 << 0) else False + chatlist = TLObject.read(b) + + slug = String.read(b) + + title = String.read(b) if flags & (1 << 1) else None + peers = TLObject.read(b) if flags & (1 << 2) else [] + + return EditExportedInvite(chatlist=chatlist, slug=slug, revoked=revoked, title=title, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoked else 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 2) if self.peers else 0 + b.write(Int(flags)) + + b.write(self.chatlist.write()) + + b.write(String(self.slug)) + + if self.title is not None: + b.write(String(self.title)) + + if self.peers is not None: + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/export_chatlist_invite.py b/pyrogram/raw/functions/chatlists/export_chatlist_invite.py new file mode 100644 index 00000000..d858f87b --- /dev/null +++ b/pyrogram/raw/functions/chatlists/export_chatlist_invite.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportChatlistInvite(TLObject): # type: ignore + """Export a folder », creating a chat folder deep link ». + + + Details: + - Layer: ``224`` + - ID: ``8472478E`` + + Parameters: + chatlist (:obj:`InputChatlist `): + The folder to export + + title (``str``): + An optional name for the link + + peers (List of :obj:`InputPeer `): + The list of channels, group and supergroups to share with the link. Basic groups will automatically be converted to supergroups when invoking the method. + + Returns: + :obj:`chatlists.ExportedChatlistInvite ` + """ + + __slots__: List[str] = ["chatlist", "title", "peers"] + + ID = 0x8472478e + QUALNAME = "functions.chatlists.ExportChatlistInvite" + + def __init__(self, *, chatlist: "raw.base.InputChatlist", title: str, peers: List["raw.base.InputPeer"]) -> None: + self.chatlist = chatlist # InputChatlist + self.title = title # string + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportChatlistInvite": + # No flags + + chatlist = TLObject.read(b) + + title = String.read(b) + + peers = TLObject.read(b) + + return ExportChatlistInvite(chatlist=chatlist, title=title, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + b.write(String(self.title)) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/get_chatlist_updates.py b/pyrogram/raw/functions/chatlists/get_chatlist_updates.py new file mode 100644 index 00000000..cb3fbfdb --- /dev/null +++ b/pyrogram/raw/functions/chatlists/get_chatlist_updates.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChatlistUpdates(TLObject): # type: ignore + """Fetch new chats associated with an imported chat folder deep link ». Must be invoked at most every chatlist_update_period seconds (as per the related client configuration parameter »). + + + Details: + - Layer: ``224`` + - ID: ``89419521`` + + Parameters: + chatlist (:obj:`InputChatlist `): + The folder + + Returns: + :obj:`chatlists.ChatlistUpdates ` + """ + + __slots__: List[str] = ["chatlist"] + + ID = 0x89419521 + QUALNAME = "functions.chatlists.GetChatlistUpdates" + + def __init__(self, *, chatlist: "raw.base.InputChatlist") -> None: + self.chatlist = chatlist # InputChatlist + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChatlistUpdates": + # No flags + + chatlist = TLObject.read(b) + + return GetChatlistUpdates(chatlist=chatlist) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/get_exported_invites.py b/pyrogram/raw/functions/chatlists/get_exported_invites.py new file mode 100644 index 00000000..003b4b31 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/get_exported_invites.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetExportedInvites(TLObject): # type: ignore + """List all chat folder deep links » associated to a folder + + + Details: + - Layer: ``224`` + - ID: ``CE03DA83`` + + Parameters: + chatlist (:obj:`InputChatlist `): + The folder + + Returns: + :obj:`chatlists.ExportedInvites ` + """ + + __slots__: List[str] = ["chatlist"] + + ID = 0xce03da83 + QUALNAME = "functions.chatlists.GetExportedInvites" + + def __init__(self, *, chatlist: "raw.base.InputChatlist") -> None: + self.chatlist = chatlist # InputChatlist + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetExportedInvites": + # No flags + + chatlist = TLObject.read(b) + + return GetExportedInvites(chatlist=chatlist) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/get_leave_chatlist_suggestions.py b/pyrogram/raw/functions/chatlists/get_leave_chatlist_suggestions.py new file mode 100644 index 00000000..3c231a24 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/get_leave_chatlist_suggestions.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetLeaveChatlistSuggestions(TLObject): # type: ignore + """Returns identifiers of pinned or always included chats from a chat folder imported using a chat folder deep link », which are suggested to be left when the chat folder is deleted. + + + Details: + - Layer: ``224`` + - ID: ``FDBCD714`` + + Parameters: + chatlist (:obj:`InputChatlist `): + Folder ID + + Returns: + List of :obj:`Peer ` + """ + + __slots__: List[str] = ["chatlist"] + + ID = 0xfdbcd714 + QUALNAME = "functions.chatlists.GetLeaveChatlistSuggestions" + + def __init__(self, *, chatlist: "raw.base.InputChatlist") -> None: + self.chatlist = chatlist # InputChatlist + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetLeaveChatlistSuggestions": + # No flags + + chatlist = TLObject.read(b) + + return GetLeaveChatlistSuggestions(chatlist=chatlist) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/hide_chatlist_updates.py b/pyrogram/raw/functions/chatlists/hide_chatlist_updates.py new file mode 100644 index 00000000..823b3b98 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/hide_chatlist_updates.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HideChatlistUpdates(TLObject): # type: ignore + """Dismiss new pending peers recently added to a chat folder deep link ». + + + Details: + - Layer: ``224`` + - ID: ``66E486FB`` + + Parameters: + chatlist (:obj:`InputChatlist `): + The folder + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["chatlist"] + + ID = 0x66e486fb + QUALNAME = "functions.chatlists.HideChatlistUpdates" + + def __init__(self, *, chatlist: "raw.base.InputChatlist") -> None: + self.chatlist = chatlist # InputChatlist + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HideChatlistUpdates": + # No flags + + chatlist = TLObject.read(b) + + return HideChatlistUpdates(chatlist=chatlist) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/join_chatlist_invite.py b/pyrogram/raw/functions/chatlists/join_chatlist_invite.py new file mode 100644 index 00000000..4e975535 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/join_chatlist_invite.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JoinChatlistInvite(TLObject): # type: ignore + """Import a chat folder deep link », joining some or all the chats in the folder. + + + Details: + - Layer: ``224`` + - ID: ``A6B1E39A`` + + Parameters: + slug (``str``): + slug obtained from a chat folder deep link ». + + peers (List of :obj:`InputPeer `): + List of new chats to join, fetched using chatlists.checkChatlistInvite and filtered as specified in the documentation ». + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["slug", "peers"] + + ID = 0xa6b1e39a + QUALNAME = "functions.chatlists.JoinChatlistInvite" + + def __init__(self, *, slug: str, peers: List["raw.base.InputPeer"]) -> None: + self.slug = slug # string + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JoinChatlistInvite": + # No flags + + slug = String.read(b) + + peers = TLObject.read(b) + + return JoinChatlistInvite(slug=slug, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/join_chatlist_updates.py b/pyrogram/raw/functions/chatlists/join_chatlist_updates.py new file mode 100644 index 00000000..7a32e376 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/join_chatlist_updates.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JoinChatlistUpdates(TLObject): # type: ignore + """Join channels and supergroups recently added to a chat folder deep link ». + + + Details: + - Layer: ``224`` + - ID: ``E089F8F5`` + + Parameters: + chatlist (:obj:`InputChatlist `): + The folder + + peers (List of :obj:`InputPeer `): + List of new chats to join, fetched using chatlists.getChatlistUpdates and filtered as specified in the documentation ». + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["chatlist", "peers"] + + ID = 0xe089f8f5 + QUALNAME = "functions.chatlists.JoinChatlistUpdates" + + def __init__(self, *, chatlist: "raw.base.InputChatlist", peers: List["raw.base.InputPeer"]) -> None: + self.chatlist = chatlist # InputChatlist + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JoinChatlistUpdates": + # No flags + + chatlist = TLObject.read(b) + + peers = TLObject.read(b) + + return JoinChatlistUpdates(chatlist=chatlist, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/chatlists/leave_chatlist.py b/pyrogram/raw/functions/chatlists/leave_chatlist.py new file mode 100644 index 00000000..36d26a27 --- /dev/null +++ b/pyrogram/raw/functions/chatlists/leave_chatlist.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LeaveChatlist(TLObject): # type: ignore + """Delete a folder imported using a chat folder deep link » + + + Details: + - Layer: ``224`` + - ID: ``74FAE13A`` + + Parameters: + chatlist (:obj:`InputChatlist `): + Folder ID + + peers (List of :obj:`InputPeer `): + Also leave the specified channels and groups + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["chatlist", "peers"] + + ID = 0x74fae13a + QUALNAME = "functions.chatlists.LeaveChatlist" + + def __init__(self, *, chatlist: "raw.base.InputChatlist", peers: List["raw.base.InputPeer"]) -> None: + self.chatlist = chatlist # InputChatlist + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LeaveChatlist": + # No flags + + chatlist = TLObject.read(b) + + peers = TLObject.read(b) + + return LeaveChatlist(chatlist=chatlist, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chatlist.write()) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/__init__.py b/pyrogram/raw/functions/contacts/__init__.py new file mode 100644 index 00000000..24df732b --- /dev/null +++ b/pyrogram/raw/functions/contacts/__init__.py @@ -0,0 +1,91 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_contact_i_ds import GetContactIDs +from .get_statuses import GetStatuses +from .get_contacts import GetContacts +from .import_contacts import ImportContacts +from .delete_contacts import DeleteContacts +from .delete_by_phones import DeleteByPhones +from .block import Block +from .unblock import Unblock +from .get_blocked import GetBlocked +from .search import Search +from .resolve_username import ResolveUsername +from .get_top_peers import GetTopPeers +from .reset_top_peer_rating import ResetTopPeerRating +from .reset_saved import ResetSaved +from .get_saved import GetSaved +from .toggle_top_peers import ToggleTopPeers +from .add_contact import AddContact +from .accept_contact import AcceptContact +from .get_located import GetLocated +from .block_from_replies import BlockFromReplies +from .resolve_phone import ResolvePhone +from .export_contact_token import ExportContactToken +from .import_contact_token import ImportContactToken +from .edit_close_friends import EditCloseFriends +from .set_blocked import SetBlocked +from .get_birthdays import GetBirthdays +from .get_sponsored_peers import GetSponsoredPeers +from .update_contact_note import UpdateContactNote +from .import_card import ImportCard + + +__all__ = [ + "GetContactIDs", + "GetStatuses", + "GetContacts", + "ImportContacts", + "DeleteContacts", + "DeleteByPhones", + "Block", + "Unblock", + "GetBlocked", + "Search", + "ResolveUsername", + "GetTopPeers", + "ResetTopPeerRating", + "ResetSaved", + "GetSaved", + "ToggleTopPeers", + "AddContact", + "AcceptContact", + "GetLocated", + "BlockFromReplies", + "ResolvePhone", + "ExportContactToken", + "ImportContactToken", + "EditCloseFriends", + "SetBlocked", + "GetBirthdays", + "GetSponsoredPeers", + "UpdateContactNote", + "ImportCard", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/contacts/accept_contact.py b/pyrogram/raw/functions/contacts/accept_contact.py new file mode 100644 index 00000000..ac3e610b --- /dev/null +++ b/pyrogram/raw/functions/contacts/accept_contact.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptContact(TLObject): # type: ignore + """If the add contact action bar is active, add that user as contact + + + Details: + - Layer: ``224`` + - ID: ``F831A20F`` + + Parameters: + id (:obj:`InputUser `): + The user to add as contact + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["id"] + + ID = 0xf831a20f + QUALNAME = "functions.contacts.AcceptContact" + + def __init__(self, *, id: "raw.base.InputUser") -> None: + self.id = id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptContact": + # No flags + + id = TLObject.read(b) + + return AcceptContact(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/add_contact.py b/pyrogram/raw/functions/contacts/add_contact.py new file mode 100644 index 00000000..e931961f --- /dev/null +++ b/pyrogram/raw/functions/contacts/add_contact.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AddContact(TLObject): # type: ignore + """Add an existing telegram user as contact. + + + Details: + - Layer: ``224`` + - ID: ``D9BA2E54`` + + Parameters: + id (:obj:`InputUser `): + Telegram ID of the other user + + first_name (``str``): + First name + + last_name (``str``): + Last name + + phone (``str``): + User's phone number, may be omitted to simply add the user to the contact list, without a phone number. + + add_phone_privacy_exception (``bool``, *optional*): + Allow the other user to see our phone number? + + note (:obj:`TextWithEntities `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["id", "first_name", "last_name", "phone", "add_phone_privacy_exception", "note"] + + ID = 0xd9ba2e54 + QUALNAME = "functions.contacts.AddContact" + + def __init__(self, *, id: "raw.base.InputUser", first_name: str, last_name: str, phone: str, add_phone_privacy_exception: Optional[bool] = None, note: "raw.base.TextWithEntities" = None) -> None: + self.id = id # InputUser + self.first_name = first_name # string + self.last_name = last_name # string + self.phone = phone # string + self.add_phone_privacy_exception = add_phone_privacy_exception # flags.0?true + self.note = note # flags.1?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AddContact": + + flags = Int.read(b) + + add_phone_privacy_exception = True if flags & (1 << 0) else False + id = TLObject.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + phone = String.read(b) + + note = TLObject.read(b) if flags & (1 << 1) else None + + return AddContact(id=id, first_name=first_name, last_name=last_name, phone=phone, add_phone_privacy_exception=add_phone_privacy_exception, note=note) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.add_phone_privacy_exception else 0 + flags |= (1 << 1) if self.note is not None else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + b.write(String(self.phone)) + + if self.note is not None: + b.write(self.note.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/block.py b/pyrogram/raw/functions/contacts/block.py new file mode 100644 index 00000000..2a7e7f26 --- /dev/null +++ b/pyrogram/raw/functions/contacts/block.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Block(TLObject): # type: ignore + """Adds a peer to a blocklist, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``2E2E8734`` + + Parameters: + id (:obj:`InputPeer `): + Peer + + my_stories_from (``bool``, *optional*): + Whether the peer should be added to the story blocklist; if not set, the peer will be added to the main blocklist, see here » for more info. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "my_stories_from"] + + ID = 0x2e2e8734 + QUALNAME = "functions.contacts.Block" + + def __init__(self, *, id: "raw.base.InputPeer", my_stories_from: Optional[bool] = None) -> None: + self.id = id # InputPeer + self.my_stories_from = my_stories_from # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Block": + + flags = Int.read(b) + + my_stories_from = True if flags & (1 << 0) else False + id = TLObject.read(b) + + return Block(id=id, my_stories_from=my_stories_from) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.my_stories_from else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/block_from_replies.py b/pyrogram/raw/functions/contacts/block_from_replies.py new file mode 100644 index 00000000..312200bb --- /dev/null +++ b/pyrogram/raw/functions/contacts/block_from_replies.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BlockFromReplies(TLObject): # type: ignore + """Stop getting notifications about discussion replies of a certain user in @replies + + + Details: + - Layer: ``224`` + - ID: ``29A8962C`` + + Parameters: + msg_id (``int`` ``32-bit``): + ID of the message in the @replies chat + + delete_message (``bool``, *optional*): + Whether to delete the specified message as well + + delete_history (``bool``, *optional*): + Whether to delete all @replies messages from this user as well + + report_spam (``bool``, *optional*): + Whether to also report this user for spam + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["msg_id", "delete_message", "delete_history", "report_spam"] + + ID = 0x29a8962c + QUALNAME = "functions.contacts.BlockFromReplies" + + def __init__(self, *, msg_id: int, delete_message: Optional[bool] = None, delete_history: Optional[bool] = None, report_spam: Optional[bool] = None) -> None: + self.msg_id = msg_id # int + self.delete_message = delete_message # flags.0?true + self.delete_history = delete_history # flags.1?true + self.report_spam = report_spam # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BlockFromReplies": + + flags = Int.read(b) + + delete_message = True if flags & (1 << 0) else False + delete_history = True if flags & (1 << 1) else False + report_spam = True if flags & (1 << 2) else False + msg_id = Int.read(b) + + return BlockFromReplies(msg_id=msg_id, delete_message=delete_message, delete_history=delete_history, report_spam=report_spam) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.delete_message else 0 + flags |= (1 << 1) if self.delete_history else 0 + flags |= (1 << 2) if self.report_spam else 0 + b.write(Int(flags)) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/delete_by_phones.py b/pyrogram/raw/functions/contacts/delete_by_phones.py new file mode 100644 index 00000000..01354a9f --- /dev/null +++ b/pyrogram/raw/functions/contacts/delete_by_phones.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteByPhones(TLObject): # type: ignore + """Delete contacts by phone number + + + Details: + - Layer: ``224`` + - ID: ``1013FD9E`` + + Parameters: + phones (List of ``str``): + Phone numbers + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["phones"] + + ID = 0x1013fd9e + QUALNAME = "functions.contacts.DeleteByPhones" + + def __init__(self, *, phones: List[str]) -> None: + self.phones = phones # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteByPhones": + # No flags + + phones = TLObject.read(b, String) + + return DeleteByPhones(phones=phones) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.phones, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/delete_contacts.py b/pyrogram/raw/functions/contacts/delete_contacts.py new file mode 100644 index 00000000..110c5781 --- /dev/null +++ b/pyrogram/raw/functions/contacts/delete_contacts.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteContacts(TLObject): # type: ignore + """Deletes several contacts from the list. + + + Details: + - Layer: ``224`` + - ID: ``96A0E00`` + + Parameters: + id (List of :obj:`InputUser `): + User ID list + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["id"] + + ID = 0x96a0e00 + QUALNAME = "functions.contacts.DeleteContacts" + + def __init__(self, *, id: List["raw.base.InputUser"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteContacts": + # No flags + + id = TLObject.read(b) + + return DeleteContacts(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/edit_close_friends.py b/pyrogram/raw/functions/contacts/edit_close_friends.py new file mode 100644 index 00000000..1cf262aa --- /dev/null +++ b/pyrogram/raw/functions/contacts/edit_close_friends.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditCloseFriends(TLObject): # type: ignore + """Edit the close friends list, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``BA6705F0`` + + Parameters: + id (List of ``int`` ``64-bit``): + Full list of user IDs of close friends, see here for more info. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id"] + + ID = 0xba6705f0 + QUALNAME = "functions.contacts.EditCloseFriends" + + def __init__(self, *, id: List[int]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditCloseFriends": + # No flags + + id = TLObject.read(b, Long) + + return EditCloseFriends(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/export_contact_token.py b/pyrogram/raw/functions/contacts/export_contact_token.py new file mode 100644 index 00000000..f92ef690 --- /dev/null +++ b/pyrogram/raw/functions/contacts/export_contact_token.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportContactToken(TLObject): # type: ignore + """Generates a temporary profile link for the currently logged-in user. + + + Details: + - Layer: ``224`` + - ID: ``F8654027`` + + Parameters: + No parameters required. + + Returns: + :obj:`ExportedContactToken ` + """ + + __slots__: List[str] = [] + + ID = 0xf8654027 + QUALNAME = "functions.contacts.ExportContactToken" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportContactToken": + # No flags + + return ExportContactToken() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_birthdays.py b/pyrogram/raw/functions/contacts/get_birthdays.py new file mode 100644 index 00000000..855c5e19 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_birthdays.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBirthdays(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``DAEDA864`` + + Parameters: + No parameters required. + + Returns: + :obj:`contacts.ContactBirthdays ` + """ + + __slots__: List[str] = [] + + ID = 0xdaeda864 + QUALNAME = "functions.contacts.GetBirthdays" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBirthdays": + # No flags + + return GetBirthdays() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_blocked.py b/pyrogram/raw/functions/contacts/get_blocked.py new file mode 100644 index 00000000..802a49f5 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_blocked.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBlocked(TLObject): # type: ignore + """Returns the list of blocked users. + + + Details: + - Layer: ``224`` + - ID: ``9A868F80`` + + Parameters: + offset (``int`` ``32-bit``): + The number of list elements to be skipped + + limit (``int`` ``32-bit``): + The number of list elements to be returned + + my_stories_from (``bool``, *optional*): + Whether to fetch the story blocklist; if not set, will fetch the main blocklist. See here » for differences between the two. + + Returns: + :obj:`contacts.Blocked ` + """ + + __slots__: List[str] = ["offset", "limit", "my_stories_from"] + + ID = 0x9a868f80 + QUALNAME = "functions.contacts.GetBlocked" + + def __init__(self, *, offset: int, limit: int, my_stories_from: Optional[bool] = None) -> None: + self.offset = offset # int + self.limit = limit # int + self.my_stories_from = my_stories_from # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBlocked": + + flags = Int.read(b) + + my_stories_from = True if flags & (1 << 0) else False + offset = Int.read(b) + + limit = Int.read(b) + + return GetBlocked(offset=offset, limit=limit, my_stories_from=my_stories_from) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.my_stories_from else 0 + b.write(Int(flags)) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_contact_i_ds.py b/pyrogram/raw/functions/contacts/get_contact_i_ds.py new file mode 100644 index 00000000..6bbeff94 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_contact_i_ds.py @@ -0,0 +1,56 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetContactIDs(TLObject): # type: ignore + """Get the telegram IDs of all contacts. +Returns an array of Telegram user IDs for all contacts (0 if a contact does not have an associated Telegram account or have hidden their account using privacy settings). + + + Details: + - Layer: ``224`` + - ID: ``7ADC669D`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Returns: + List of ``int`` ``32-bit`` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x7adc669d + QUALNAME = "functions.contacts.GetContactIDs" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetContactIDs": + # No flags + + hash = Long.read(b) + + return GetContactIDs(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_contacts.py b/pyrogram/raw/functions/contacts/get_contacts.py new file mode 100644 index 00000000..8b9a9d5c --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_contacts.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetContacts(TLObject): # type: ignore + """Returns the current user's contact list. + + + Details: + - Layer: ``224`` + - ID: ``5DD69E12`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note that the hash is computed using the usual algorithm, passing to the algorithm first the previously returned contacts.contacts.saved_count field, then max 100000 sorted user IDs from the contact list, including the ID of the currently logged in user if it is saved as a contact. Example: tdlib implementation. + + Returns: + :obj:`contacts.Contacts ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x5dd69e12 + QUALNAME = "functions.contacts.GetContacts" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetContacts": + # No flags + + hash = Long.read(b) + + return GetContacts(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_located.py b/pyrogram/raw/functions/contacts/get_located.py new file mode 100644 index 00000000..4f0360a8 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_located.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetLocated(TLObject): # type: ignore + """Get users and geochats near you, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``D348BC44`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + Geolocation + + background (``bool``, *optional*): + While the geolocation of the current user is public, clients should update it in the background every half-an-hour or so, while setting this flag. Do this only if the new location is more than 1 KM away from the previous one, or if the previous location is unknown. + + self_expires (``int`` ``32-bit``, *optional*): + If set, the geolocation of the current user will be public for the specified number of seconds; pass 0x7fffffff to disable expiry, 0 to make the current geolocation private; if the flag isn't set, no changes will be applied. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["geo_point", "background", "self_expires"] + + ID = 0xd348bc44 + QUALNAME = "functions.contacts.GetLocated" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint", background: Optional[bool] = None, self_expires: Optional[int] = None) -> None: + self.geo_point = geo_point # InputGeoPoint + self.background = background # flags.1?true + self.self_expires = self_expires # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetLocated": + + flags = Int.read(b) + + background = True if flags & (1 << 1) else False + geo_point = TLObject.read(b) + + self_expires = Int.read(b) if flags & (1 << 0) else None + return GetLocated(geo_point=geo_point, background=background, self_expires=self_expires) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.background else 0 + flags |= (1 << 0) if self.self_expires is not None else 0 + b.write(Int(flags)) + + b.write(self.geo_point.write()) + + if self.self_expires is not None: + b.write(Int(self.self_expires)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_saved.py b/pyrogram/raw/functions/contacts/get_saved.py new file mode 100644 index 00000000..853d6ff8 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_saved.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSaved(TLObject): # type: ignore + """Get all contacts, requires a takeout session, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``82F1E39F`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`SavedContact ` + """ + + __slots__: List[str] = [] + + ID = 0x82f1e39f + QUALNAME = "functions.contacts.GetSaved" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSaved": + # No flags + + return GetSaved() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_sponsored_peers.py b/pyrogram/raw/functions/contacts/get_sponsored_peers.py new file mode 100644 index 00000000..4708ef71 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_sponsored_peers.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSponsoredPeers(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B6C8C393`` + + Parameters: + q (``str``): + N/A + + Returns: + :obj:`contacts.SponsoredPeers ` + """ + + __slots__: List[str] = ["q"] + + ID = 0xb6c8c393 + QUALNAME = "functions.contacts.GetSponsoredPeers" + + def __init__(self, *, q: str) -> None: + self.q = q # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSponsoredPeers": + # No flags + + q = String.read(b) + + return GetSponsoredPeers(q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_statuses.py b/pyrogram/raw/functions/contacts/get_statuses.py new file mode 100644 index 00000000..e87121a7 --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_statuses.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStatuses(TLObject): # type: ignore + """Use this method to obtain the online statuses of all contacts with an accessible Telegram account. + + + Details: + - Layer: ``224`` + - ID: ``C4A353EE`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`ContactStatus ` + """ + + __slots__: List[str] = [] + + ID = 0xc4a353ee + QUALNAME = "functions.contacts.GetStatuses" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStatuses": + # No flags + + return GetStatuses() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/get_top_peers.py b/pyrogram/raw/functions/contacts/get_top_peers.py new file mode 100644 index 00000000..93f8e7df --- /dev/null +++ b/pyrogram/raw/functions/contacts/get_top_peers.py @@ -0,0 +1,127 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetTopPeers(TLObject): # type: ignore + """Get most used peers + + + Details: + - Layer: ``224`` + - ID: ``973478B6`` + + Parameters: + offset (``int`` ``32-bit``): + Offset for pagination + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + correspondents (``bool``, *optional*): + Users we've chatted most frequently with + + bots_pm (``bool``, *optional*): + Most used bots + + bots_inline (``bool``, *optional*): + Most used inline bots + + phone_calls (``bool``, *optional*): + Most frequently called users + + forward_users (``bool``, *optional*): + Users to which the users often forwards messages to + + forward_chats (``bool``, *optional*): + Chats to which the users often forwards messages to + + groups (``bool``, *optional*): + Often-opened groups and supergroups + + channels (``bool``, *optional*): + Most frequently visited channels + + bots_app (``bool``, *optional*): + N/A + + Returns: + :obj:`contacts.TopPeers ` + """ + + __slots__: List[str] = ["offset", "limit", "hash", "correspondents", "bots_pm", "bots_inline", "phone_calls", "forward_users", "forward_chats", "groups", "channels", "bots_app"] + + ID = 0x973478b6 + QUALNAME = "functions.contacts.GetTopPeers" + + def __init__(self, *, offset: int, limit: int, hash: int, correspondents: Optional[bool] = None, bots_pm: Optional[bool] = None, bots_inline: Optional[bool] = None, phone_calls: Optional[bool] = None, forward_users: Optional[bool] = None, forward_chats: Optional[bool] = None, groups: Optional[bool] = None, channels: Optional[bool] = None, bots_app: Optional[bool] = None) -> None: + self.offset = offset # int + self.limit = limit # int + self.hash = hash # long + self.correspondents = correspondents # flags.0?true + self.bots_pm = bots_pm # flags.1?true + self.bots_inline = bots_inline # flags.2?true + self.phone_calls = phone_calls # flags.3?true + self.forward_users = forward_users # flags.4?true + self.forward_chats = forward_chats # flags.5?true + self.groups = groups # flags.10?true + self.channels = channels # flags.15?true + self.bots_app = bots_app # flags.16?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetTopPeers": + + flags = Int.read(b) + + correspondents = True if flags & (1 << 0) else False + bots_pm = True if flags & (1 << 1) else False + bots_inline = True if flags & (1 << 2) else False + phone_calls = True if flags & (1 << 3) else False + forward_users = True if flags & (1 << 4) else False + forward_chats = True if flags & (1 << 5) else False + groups = True if flags & (1 << 10) else False + channels = True if flags & (1 << 15) else False + bots_app = True if flags & (1 << 16) else False + offset = Int.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetTopPeers(offset=offset, limit=limit, hash=hash, correspondents=correspondents, bots_pm=bots_pm, bots_inline=bots_inline, phone_calls=phone_calls, forward_users=forward_users, forward_chats=forward_chats, groups=groups, channels=channels, bots_app=bots_app) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.correspondents else 0 + flags |= (1 << 1) if self.bots_pm else 0 + flags |= (1 << 2) if self.bots_inline else 0 + flags |= (1 << 3) if self.phone_calls else 0 + flags |= (1 << 4) if self.forward_users else 0 + flags |= (1 << 5) if self.forward_chats else 0 + flags |= (1 << 10) if self.groups else 0 + flags |= (1 << 15) if self.channels else 0 + flags |= (1 << 16) if self.bots_app else 0 + b.write(Int(flags)) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/import_card.py b/pyrogram/raw/functions/contacts/import_card.py new file mode 100644 index 00000000..c5c091e5 --- /dev/null +++ b/pyrogram/raw/functions/contacts/import_card.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportCard(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``4FE196FE`` + + Parameters: + export_card (List of ``int`` ``32-bit``): + N/A + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["export_card"] + + ID = 0x4fe196fe + QUALNAME = "functions.contacts.ImportCard" + + def __init__(self, *, export_card: List[int]) -> None: + self.export_card = export_card # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportCard": + # No flags + + export_card = TLObject.read(b, Int) + + return ImportCard(export_card=export_card) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.export_card, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/import_contact_token.py b/pyrogram/raw/functions/contacts/import_contact_token.py new file mode 100644 index 00000000..6bdca9d9 --- /dev/null +++ b/pyrogram/raw/functions/contacts/import_contact_token.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportContactToken(TLObject): # type: ignore + """Obtain user info from a temporary profile link. + + + Details: + - Layer: ``224`` + - ID: ``13005788`` + + Parameters: + token (``str``): + The token extracted from the temporary profile link. + + Returns: + :obj:`User ` + """ + + __slots__: List[str] = ["token"] + + ID = 0x13005788 + QUALNAME = "functions.contacts.ImportContactToken" + + def __init__(self, *, token: str) -> None: + self.token = token # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportContactToken": + # No flags + + token = String.read(b) + + return ImportContactToken(token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/import_contacts.py b/pyrogram/raw/functions/contacts/import_contacts.py new file mode 100644 index 00000000..2665b89d --- /dev/null +++ b/pyrogram/raw/functions/contacts/import_contacts.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportContacts(TLObject): # type: ignore + """Imports contacts: saves a full list on the server, adds already registered contacts to the contact list, returns added contacts and their info. + + + Details: + - Layer: ``224`` + - ID: ``2C800BE5`` + + Parameters: + contacts (List of :obj:`InputContact `): + List of contacts to import + + Returns: + :obj:`contacts.ImportedContacts ` + """ + + __slots__: List[str] = ["contacts"] + + ID = 0x2c800be5 + QUALNAME = "functions.contacts.ImportContacts" + + def __init__(self, *, contacts: List["raw.base.InputContact"]) -> None: + self.contacts = contacts # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportContacts": + # No flags + + contacts = TLObject.read(b) + + return ImportContacts(contacts=contacts) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.contacts)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/reset_saved.py b/pyrogram/raw/functions/contacts/reset_saved.py new file mode 100644 index 00000000..63478d37 --- /dev/null +++ b/pyrogram/raw/functions/contacts/reset_saved.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetSaved(TLObject): # type: ignore + """Removes all contacts without an associated Telegram account. + + + Details: + - Layer: ``224`` + - ID: ``879537F1`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x879537f1 + QUALNAME = "functions.contacts.ResetSaved" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetSaved": + # No flags + + return ResetSaved() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/reset_top_peer_rating.py b/pyrogram/raw/functions/contacts/reset_top_peer_rating.py new file mode 100644 index 00000000..91f47e7a --- /dev/null +++ b/pyrogram/raw/functions/contacts/reset_top_peer_rating.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetTopPeerRating(TLObject): # type: ignore + """Reset rating of top peer + + + Details: + - Layer: ``224`` + - ID: ``1AE373AC`` + + Parameters: + category (:obj:`TopPeerCategory `): + Top peer category + + peer (:obj:`InputPeer `): + Peer whose rating should be reset + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["category", "peer"] + + ID = 0x1ae373ac + QUALNAME = "functions.contacts.ResetTopPeerRating" + + def __init__(self, *, category: "raw.base.TopPeerCategory", peer: "raw.base.InputPeer") -> None: + self.category = category # TopPeerCategory + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetTopPeerRating": + # No flags + + category = TLObject.read(b) + + peer = TLObject.read(b) + + return ResetTopPeerRating(category=category, peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.category.write()) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/resolve_phone.py b/pyrogram/raw/functions/contacts/resolve_phone.py new file mode 100644 index 00000000..d7527492 --- /dev/null +++ b/pyrogram/raw/functions/contacts/resolve_phone.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResolvePhone(TLObject): # type: ignore + """Resolve a phone number to get user info, if their privacy settings allow it. + + + Details: + - Layer: ``224`` + - ID: ``8AF94344`` + + Parameters: + phone (``str``): + Phone number in international format, possibly obtained from a phone number deep link. + + Returns: + :obj:`contacts.ResolvedPeer ` + """ + + __slots__: List[str] = ["phone"] + + ID = 0x8af94344 + QUALNAME = "functions.contacts.ResolvePhone" + + def __init__(self, *, phone: str) -> None: + self.phone = phone # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResolvePhone": + # No flags + + phone = String.read(b) + + return ResolvePhone(phone=phone) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/resolve_username.py b/pyrogram/raw/functions/contacts/resolve_username.py new file mode 100644 index 00000000..17eb471b --- /dev/null +++ b/pyrogram/raw/functions/contacts/resolve_username.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResolveUsername(TLObject): # type: ignore + """Resolve a @username to get peer info + + + Details: + - Layer: ``224`` + - ID: ``725AFBBC`` + + Parameters: + username (``str``): + @username to resolve + + referer (``str``, *optional*): + N/A + + Returns: + :obj:`contacts.ResolvedPeer ` + """ + + __slots__: List[str] = ["username", "referer"] + + ID = 0x725afbbc + QUALNAME = "functions.contacts.ResolveUsername" + + def __init__(self, *, username: str, referer: Optional[str] = None) -> None: + self.username = username # string + self.referer = referer # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResolveUsername": + + flags = Int.read(b) + + username = String.read(b) + + referer = String.read(b) if flags & (1 << 0) else None + return ResolveUsername(username=username, referer=referer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.referer is not None else 0 + b.write(Int(flags)) + + b.write(String(self.username)) + + if self.referer is not None: + b.write(String(self.referer)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/search.py b/pyrogram/raw/functions/contacts/search.py new file mode 100644 index 00000000..76e17bd3 --- /dev/null +++ b/pyrogram/raw/functions/contacts/search.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Search(TLObject): # type: ignore + """Returns users found by username substring. + + + Details: + - Layer: ``224`` + - ID: ``11F812D8`` + + Parameters: + q (``str``): + Target substring + + limit (``int`` ``32-bit``): + Maximum number of users to be returned + + Returns: + :obj:`contacts.Found ` + """ + + __slots__: List[str] = ["q", "limit"] + + ID = 0x11f812d8 + QUALNAME = "functions.contacts.Search" + + def __init__(self, *, q: str, limit: int) -> None: + self.q = q # string + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Search": + # No flags + + q = String.read(b) + + limit = Int.read(b) + + return Search(q=q, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/set_blocked.py b/pyrogram/raw/functions/contacts/set_blocked.py new file mode 100644 index 00000000..5bfbf8a9 --- /dev/null +++ b/pyrogram/raw/functions/contacts/set_blocked.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBlocked(TLObject): # type: ignore + """Replace the contents of an entire blocklist, see here for more info ». + + + Details: + - Layer: ``224`` + - ID: ``94C65C76`` + + Parameters: + id (List of :obj:`InputPeer `): + Full content of the blocklist. + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + my_stories_from (``bool``, *optional*): + Whether to edit the story blocklist; if not set, will edit the main blocklist. See here » for differences between the two. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "limit", "my_stories_from"] + + ID = 0x94c65c76 + QUALNAME = "functions.contacts.SetBlocked" + + def __init__(self, *, id: List["raw.base.InputPeer"], limit: int, my_stories_from: Optional[bool] = None) -> None: + self.id = id # Vector + self.limit = limit # int + self.my_stories_from = my_stories_from # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBlocked": + + flags = Int.read(b) + + my_stories_from = True if flags & (1 << 0) else False + id = TLObject.read(b) + + limit = Int.read(b) + + return SetBlocked(id=id, limit=limit, my_stories_from=my_stories_from) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.my_stories_from else 0 + b.write(Int(flags)) + + b.write(Vector(self.id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/toggle_top_peers.py b/pyrogram/raw/functions/contacts/toggle_top_peers.py new file mode 100644 index 00000000..27bf130c --- /dev/null +++ b/pyrogram/raw/functions/contacts/toggle_top_peers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleTopPeers(TLObject): # type: ignore + """Enable/disable top peers + + + Details: + - Layer: ``224`` + - ID: ``8514BDDA`` + + Parameters: + enabled (``bool``): + Enable/disable + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["enabled"] + + ID = 0x8514bdda + QUALNAME = "functions.contacts.ToggleTopPeers" + + def __init__(self, *, enabled: bool) -> None: + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleTopPeers": + # No flags + + enabled = Bool.read(b) + + return ToggleTopPeers(enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/unblock.py b/pyrogram/raw/functions/contacts/unblock.py new file mode 100644 index 00000000..f097498a --- /dev/null +++ b/pyrogram/raw/functions/contacts/unblock.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Unblock(TLObject): # type: ignore + """Deletes a peer from a blocklist, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``B550D328`` + + Parameters: + id (:obj:`InputPeer `): + Peer + + my_stories_from (``bool``, *optional*): + Whether the peer should be removed from the story blocklist; if not set, the peer will be removed from the main blocklist, see here » for more info. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "my_stories_from"] + + ID = 0xb550d328 + QUALNAME = "functions.contacts.Unblock" + + def __init__(self, *, id: "raw.base.InputPeer", my_stories_from: Optional[bool] = None) -> None: + self.id = id # InputPeer + self.my_stories_from = my_stories_from # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Unblock": + + flags = Int.read(b) + + my_stories_from = True if flags & (1 << 0) else False + id = TLObject.read(b) + + return Unblock(id=id, my_stories_from=my_stories_from) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.my_stories_from else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contacts/update_contact_note.py b/pyrogram/raw/functions/contacts/update_contact_note.py new file mode 100644 index 00000000..a68e36b4 --- /dev/null +++ b/pyrogram/raw/functions/contacts/update_contact_note.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateContactNote(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``139F63FB`` + + Parameters: + id (:obj:`InputUser `): + N/A + + note (:obj:`TextWithEntities `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "note"] + + ID = 0x139f63fb + QUALNAME = "functions.contacts.UpdateContactNote" + + def __init__(self, *, id: "raw.base.InputUser", note: "raw.base.TextWithEntities") -> None: + self.id = id # InputUser + self.note = note # TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateContactNote": + # No flags + + id = TLObject.read(b) + + note = TLObject.read(b) + + return UpdateContactNote(id=id, note=note) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(self.note.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/contest/__init__.py b/pyrogram/raw/functions/contest/__init__.py new file mode 100644 index 00000000..d259ea2f --- /dev/null +++ b/pyrogram/raw/functions/contest/__init__.py @@ -0,0 +1,35 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .save_developer_info import SaveDeveloperInfo + + +__all__ = [ + "SaveDeveloperInfo", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/contest/save_developer_info.py b/pyrogram/raw/functions/contest/save_developer_info.py new file mode 100644 index 00000000..f656926c --- /dev/null +++ b/pyrogram/raw/functions/contest/save_developer_info.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveDeveloperInfo(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``9A5F6E95`` + + Parameters: + vk_id (``int`` ``32-bit``): + N/A + + name (``str``): + N/A + + phone_number (``str``): + N/A + + age (``int`` ``32-bit``): + N/A + + city (``str``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["vk_id", "name", "phone_number", "age", "city"] + + ID = 0x9a5f6e95 + QUALNAME = "functions.contest.SaveDeveloperInfo" + + def __init__(self, *, vk_id: int, name: str, phone_number: str, age: int, city: str) -> None: + self.vk_id = vk_id # int + self.name = name # string + self.phone_number = phone_number # string + self.age = age # int + self.city = city # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveDeveloperInfo": + # No flags + + vk_id = Int.read(b) + + name = String.read(b) + + phone_number = String.read(b) + + age = Int.read(b) + + city = String.read(b) + + return SaveDeveloperInfo(vk_id=vk_id, name=name, phone_number=phone_number, age=age, city=city) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.vk_id)) + + b.write(String(self.name)) + + b.write(String(self.phone_number)) + + b.write(Int(self.age)) + + b.write(String(self.city)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/destroy_auth_key.py b/pyrogram/raw/functions/destroy_auth_key.py new file mode 100644 index 00000000..2e4f356e --- /dev/null +++ b/pyrogram/raw/functions/destroy_auth_key.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroyAuthKey(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D1435160`` + + Parameters: + No parameters required. + + Returns: + :obj:`DestroyAuthKeyRes ` + """ + + __slots__: List[str] = [] + + ID = 0xd1435160 + QUALNAME = "functions.DestroyAuthKey" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroyAuthKey": + # No flags + + return DestroyAuthKey() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/destroy_session.py b/pyrogram/raw/functions/destroy_session.py new file mode 100644 index 00000000..8088dc08 --- /dev/null +++ b/pyrogram/raw/functions/destroy_session.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroySession(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E7512126`` + + Parameters: + session_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`DestroySessionRes ` + """ + + __slots__: List[str] = ["session_id"] + + ID = 0xe7512126 + QUALNAME = "functions.DestroySession" + + def __init__(self, *, session_id: int) -> None: + self.session_id = session_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroySession": + # No flags + + session_id = Long.read(b) + + return DestroySession(session_id=session_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.session_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/folders/__init__.py b/pyrogram/raw/functions/folders/__init__.py new file mode 100644 index 00000000..adfadf53 --- /dev/null +++ b/pyrogram/raw/functions/folders/__init__.py @@ -0,0 +1,37 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .edit_peer_folders import EditPeerFolders +from .delete_folder import DeleteFolder + + +__all__ = [ + "EditPeerFolders", + "DeleteFolder", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/folders/delete_folder.py b/pyrogram/raw/functions/folders/delete_folder.py new file mode 100644 index 00000000..6daa72c7 --- /dev/null +++ b/pyrogram/raw/functions/folders/delete_folder.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteFolder(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``1C295881`` + + Parameters: + folder_id (``int`` ``32-bit``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["folder_id"] + + ID = 0x1c295881 + QUALNAME = "functions.folders.DeleteFolder" + + def __init__(self, *, folder_id: int) -> None: + self.folder_id = folder_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteFolder": + # No flags + + folder_id = Int.read(b) + + return DeleteFolder(folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.folder_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/folders/edit_peer_folders.py b/pyrogram/raw/functions/folders/edit_peer_folders.py new file mode 100644 index 00000000..ce968803 --- /dev/null +++ b/pyrogram/raw/functions/folders/edit_peer_folders.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditPeerFolders(TLObject): # type: ignore + """Edit peers in peer folder + + + Details: + - Layer: ``224`` + - ID: ``6847D0AB`` + + Parameters: + folder_peers (List of :obj:`InputFolderPeer `): + New peer list + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["folder_peers"] + + ID = 0x6847d0ab + QUALNAME = "functions.folders.EditPeerFolders" + + def __init__(self, *, folder_peers: List["raw.base.InputFolderPeer"]) -> None: + self.folder_peers = folder_peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditPeerFolders": + # No flags + + folder_peers = TLObject.read(b) + + return EditPeerFolders(folder_peers=folder_peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.folder_peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/fragment/__init__.py b/pyrogram/raw/functions/fragment/__init__.py new file mode 100644 index 00000000..b0c8ba13 --- /dev/null +++ b/pyrogram/raw/functions/fragment/__init__.py @@ -0,0 +1,35 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_collectible_info import GetCollectibleInfo + + +__all__ = [ + "GetCollectibleInfo", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/fragment/get_collectible_info.py b/pyrogram/raw/functions/fragment/get_collectible_info.py new file mode 100644 index 00000000..60d4e4f5 --- /dev/null +++ b/pyrogram/raw/functions/fragment/get_collectible_info.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCollectibleInfo(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``BE1E85BA`` + + Parameters: + collectible (:obj:`InputCollectible `): + + + Returns: + :obj:`fragment.CollectibleInfo ` + """ + + __slots__: List[str] = ["collectible"] + + ID = 0xbe1e85ba + QUALNAME = "functions.fragment.GetCollectibleInfo" + + def __init__(self, *, collectible: "raw.base.InputCollectible") -> None: + self.collectible = collectible # InputCollectible + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCollectibleInfo": + # No flags + + collectible = TLObject.read(b) + + return GetCollectibleInfo(collectible=collectible) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.collectible.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/get_future_salts.py b/pyrogram/raw/functions/get_future_salts.py new file mode 100644 index 00000000..0cda638d --- /dev/null +++ b/pyrogram/raw/functions/get_future_salts.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFutureSalts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B921BD04`` + + Parameters: + num (``int`` ``32-bit``): + N/A + + Returns: + :obj:`FutureSalts ` + """ + + __slots__: List[str] = ["num"] + + ID = 0xb921bd04 + QUALNAME = "functions.GetFutureSalts" + + def __init__(self, *, num: int) -> None: + self.num = num # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFutureSalts": + # No flags + + num = Int.read(b) + + return GetFutureSalts(num=num) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.num)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/__init__.py b/pyrogram/raw/functions/help/__init__.py new file mode 100644 index 00000000..ffa48aae --- /dev/null +++ b/pyrogram/raw/functions/help/__init__.py @@ -0,0 +1,83 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_config import GetConfig +from .get_nearest_dc import GetNearestDc +from .get_app_update import GetAppUpdate +from .get_invite_text import GetInviteText +from .get_support import GetSupport +from .set_bot_updates_status import SetBotUpdatesStatus +from .get_cdn_config import GetCdnConfig +from .get_recent_me_urls import GetRecentMeUrls +from .get_terms_of_service_update import GetTermsOfServiceUpdate +from .accept_terms_of_service import AcceptTermsOfService +from .get_deep_link_info import GetDeepLinkInfo +from .get_app_config import GetAppConfig +from .save_app_log import SaveAppLog +from .get_passport_config import GetPassportConfig +from .get_support_name import GetSupportName +from .get_user_info import GetUserInfo +from .edit_user_info import EditUserInfo +from .get_promo_data import GetPromoData +from .hide_promo_data import HidePromoData +from .dismiss_suggestion import DismissSuggestion +from .get_countries_list import GetCountriesList +from .get_premium_promo import GetPremiumPromo +from .get_peer_colors import GetPeerColors +from .get_peer_profile_colors import GetPeerProfileColors +from .get_timezones_list import GetTimezonesList + + +__all__ = [ + "GetConfig", + "GetNearestDc", + "GetAppUpdate", + "GetInviteText", + "GetSupport", + "SetBotUpdatesStatus", + "GetCdnConfig", + "GetRecentMeUrls", + "GetTermsOfServiceUpdate", + "AcceptTermsOfService", + "GetDeepLinkInfo", + "GetAppConfig", + "SaveAppLog", + "GetPassportConfig", + "GetSupportName", + "GetUserInfo", + "EditUserInfo", + "GetPromoData", + "HidePromoData", + "DismissSuggestion", + "GetCountriesList", + "GetPremiumPromo", + "GetPeerColors", + "GetPeerProfileColors", + "GetTimezonesList", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/help/accept_terms_of_service.py b/pyrogram/raw/functions/help/accept_terms_of_service.py new file mode 100644 index 00000000..770a6ee5 --- /dev/null +++ b/pyrogram/raw/functions/help/accept_terms_of_service.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptTermsOfService(TLObject): # type: ignore + """Accept the new terms of service + + + Details: + - Layer: ``224`` + - ID: ``EE72F79A`` + + Parameters: + id (:obj:`DataJSON `): + ID of terms of service + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id"] + + ID = 0xee72f79a + QUALNAME = "functions.help.AcceptTermsOfService" + + def __init__(self, *, id: "raw.base.DataJSON") -> None: + self.id = id # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptTermsOfService": + # No flags + + id = TLObject.read(b) + + return AcceptTermsOfService(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/dismiss_suggestion.py b/pyrogram/raw/functions/help/dismiss_suggestion.py new file mode 100644 index 00000000..e1f5e623 --- /dev/null +++ b/pyrogram/raw/functions/help/dismiss_suggestion.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DismissSuggestion(TLObject): # type: ignore + """Dismiss a suggestion, see here for more info ». + + + Details: + - Layer: ``224`` + - ID: ``F50DBAA1`` + + Parameters: + peer (:obj:`InputPeer `): + In the case of pending suggestions in channels, the channel ID. + + suggestion (``str``): + Suggestion, see here for more info ». + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "suggestion"] + + ID = 0xf50dbaa1 + QUALNAME = "functions.help.DismissSuggestion" + + def __init__(self, *, peer: "raw.base.InputPeer", suggestion: str) -> None: + self.peer = peer # InputPeer + self.suggestion = suggestion # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DismissSuggestion": + # No flags + + peer = TLObject.read(b) + + suggestion = String.read(b) + + return DismissSuggestion(peer=peer, suggestion=suggestion) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.suggestion)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/edit_user_info.py b/pyrogram/raw/functions/help/edit_user_info.py new file mode 100644 index 00000000..da204c55 --- /dev/null +++ b/pyrogram/raw/functions/help/edit_user_info.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditUserInfo(TLObject): # type: ignore + """Internal use + + + Details: + - Layer: ``224`` + - ID: ``66B91B70`` + + Parameters: + user_id (:obj:`InputUser `): + User + + message (``str``): + Message + + entities (List of :obj:`MessageEntity `): + Message entities for styled text + + Returns: + :obj:`help.UserInfo ` + """ + + __slots__: List[str] = ["user_id", "message", "entities"] + + ID = 0x66b91b70 + QUALNAME = "functions.help.EditUserInfo" + + def __init__(self, *, user_id: "raw.base.InputUser", message: str, entities: List["raw.base.MessageEntity"]) -> None: + self.user_id = user_id # InputUser + self.message = message # string + self.entities = entities # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditUserInfo": + # No flags + + user_id = TLObject.read(b) + + message = String.read(b) + + entities = TLObject.read(b) + + return EditUserInfo(user_id=user_id, message=message, entities=entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(String(self.message)) + + b.write(Vector(self.entities)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_app_config.py b/pyrogram/raw/functions/help/get_app_config.py new file mode 100644 index 00000000..901760f8 --- /dev/null +++ b/pyrogram/raw/functions/help/get_app_config.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAppConfig(TLObject): # type: ignore + """Get app-specific configuration, see client configuration for more info on the result. + + + Details: + - Layer: ``224`` + - ID: ``61E3F854`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the help.appConfig.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`help.AppConfig ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x61e3f854 + QUALNAME = "functions.help.GetAppConfig" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAppConfig": + # No flags + + hash = Int.read(b) + + return GetAppConfig(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_app_update.py b/pyrogram/raw/functions/help/get_app_update.py new file mode 100644 index 00000000..e5682265 --- /dev/null +++ b/pyrogram/raw/functions/help/get_app_update.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAppUpdate(TLObject): # type: ignore + """Returns information on update availability for the current application. + + + Details: + - Layer: ``224`` + - ID: ``522D5A7D`` + + Parameters: + source (``str``): + Source + + Returns: + :obj:`help.AppUpdate ` + """ + + __slots__: List[str] = ["source"] + + ID = 0x522d5a7d + QUALNAME = "functions.help.GetAppUpdate" + + def __init__(self, *, source: str) -> None: + self.source = source # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAppUpdate": + # No flags + + source = String.read(b) + + return GetAppUpdate(source=source) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.source)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_cdn_config.py b/pyrogram/raw/functions/help/get_cdn_config.py new file mode 100644 index 00000000..9e6f8fce --- /dev/null +++ b/pyrogram/raw/functions/help/get_cdn_config.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCdnConfig(TLObject): # type: ignore + """Get configuration for CDN file downloads. + + + Details: + - Layer: ``224`` + - ID: ``52029342`` + + Parameters: + No parameters required. + + Returns: + :obj:`CdnConfig ` + """ + + __slots__: List[str] = [] + + ID = 0x52029342 + QUALNAME = "functions.help.GetCdnConfig" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCdnConfig": + # No flags + + return GetCdnConfig() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_config.py b/pyrogram/raw/functions/help/get_config.py new file mode 100644 index 00000000..7aa14a5e --- /dev/null +++ b/pyrogram/raw/functions/help/get_config.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetConfig(TLObject): # type: ignore + """Returns current configuration, including data center configuration. + + + Details: + - Layer: ``224`` + - ID: ``C4F9186B`` + + Parameters: + No parameters required. + + Returns: + :obj:`Config ` + """ + + __slots__: List[str] = [] + + ID = 0xc4f9186b + QUALNAME = "functions.help.GetConfig" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetConfig": + # No flags + + return GetConfig() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_countries_list.py b/pyrogram/raw/functions/help/get_countries_list.py new file mode 100644 index 00000000..f9800fd9 --- /dev/null +++ b/pyrogram/raw/functions/help/get_countries_list.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCountriesList(TLObject): # type: ignore + """Get name, ISO code, localized name and phone codes/patterns of all available countries + + + Details: + - Layer: ``224`` + - ID: ``735787A8`` + + Parameters: + lang_code (``str``): + Language code of the current user + + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the help.countriesList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`help.CountriesList ` + """ + + __slots__: List[str] = ["lang_code", "hash"] + + ID = 0x735787a8 + QUALNAME = "functions.help.GetCountriesList" + + def __init__(self, *, lang_code: str, hash: int) -> None: + self.lang_code = lang_code # string + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCountriesList": + # No flags + + lang_code = String.read(b) + + hash = Int.read(b) + + return GetCountriesList(lang_code=lang_code, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_deep_link_info.py b/pyrogram/raw/functions/help/get_deep_link_info.py new file mode 100644 index 00000000..e09ff066 --- /dev/null +++ b/pyrogram/raw/functions/help/get_deep_link_info.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDeepLinkInfo(TLObject): # type: ignore + """Get info about an unsupported deep link, see here for more info ». + + + Details: + - Layer: ``224`` + - ID: ``3FEDC75F`` + + Parameters: + path (``str``): + Path component of a tg: link + + Returns: + :obj:`help.DeepLinkInfo ` + """ + + __slots__: List[str] = ["path"] + + ID = 0x3fedc75f + QUALNAME = "functions.help.GetDeepLinkInfo" + + def __init__(self, *, path: str) -> None: + self.path = path # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDeepLinkInfo": + # No flags + + path = String.read(b) + + return GetDeepLinkInfo(path=path) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.path)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_invite_text.py b/pyrogram/raw/functions/help/get_invite_text.py new file mode 100644 index 00000000..b0f216a2 --- /dev/null +++ b/pyrogram/raw/functions/help/get_invite_text.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetInviteText(TLObject): # type: ignore + """Returns localized text of a text message with an invitation. + + + Details: + - Layer: ``224`` + - ID: ``4D392343`` + + Parameters: + No parameters required. + + Returns: + :obj:`help.InviteText ` + """ + + __slots__: List[str] = [] + + ID = 0x4d392343 + QUALNAME = "functions.help.GetInviteText" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetInviteText": + # No flags + + return GetInviteText() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_nearest_dc.py b/pyrogram/raw/functions/help/get_nearest_dc.py new file mode 100644 index 00000000..d5a1b313 --- /dev/null +++ b/pyrogram/raw/functions/help/get_nearest_dc.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetNearestDc(TLObject): # type: ignore + """Returns info on data center nearest to the user. + + + Details: + - Layer: ``224`` + - ID: ``1FB33026`` + + Parameters: + No parameters required. + + Returns: + :obj:`NearestDc ` + """ + + __slots__: List[str] = [] + + ID = 0x1fb33026 + QUALNAME = "functions.help.GetNearestDc" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetNearestDc": + # No flags + + return GetNearestDc() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_passport_config.py b/pyrogram/raw/functions/help/get_passport_config.py new file mode 100644 index 00000000..abdce5a3 --- /dev/null +++ b/pyrogram/raw/functions/help/get_passport_config.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPassportConfig(TLObject): # type: ignore + """Get passport configuration + + + Details: + - Layer: ``224`` + - ID: ``C661AD08`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the help.passportConfig.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`help.PassportConfig ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xc661ad08 + QUALNAME = "functions.help.GetPassportConfig" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPassportConfig": + # No flags + + hash = Int.read(b) + + return GetPassportConfig(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_peer_colors.py b/pyrogram/raw/functions/help/get_peer_colors.py new file mode 100644 index 00000000..611e75e3 --- /dev/null +++ b/pyrogram/raw/functions/help/get_peer_colors.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPeerColors(TLObject): # type: ignore + """Get the set of accent color palettes » that can be used for message accents. + + + Details: + - Layer: ``224`` + - ID: ``DA80F42F`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the help.peerColors.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`help.PeerColors ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xda80f42f + QUALNAME = "functions.help.GetPeerColors" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPeerColors": + # No flags + + hash = Int.read(b) + + return GetPeerColors(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_peer_profile_colors.py b/pyrogram/raw/functions/help/get_peer_profile_colors.py new file mode 100644 index 00000000..f625371d --- /dev/null +++ b/pyrogram/raw/functions/help/get_peer_profile_colors.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPeerProfileColors(TLObject): # type: ignore + """Get the set of accent color palettes » that can be used in profile page backgrounds. + + + Details: + - Layer: ``224`` + - ID: ``ABCFA9FD`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the help.peerColors.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`help.PeerColors ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xabcfa9fd + QUALNAME = "functions.help.GetPeerProfileColors" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPeerProfileColors": + # No flags + + hash = Int.read(b) + + return GetPeerProfileColors(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_premium_promo.py b/pyrogram/raw/functions/help/get_premium_promo.py new file mode 100644 index 00000000..ec166843 --- /dev/null +++ b/pyrogram/raw/functions/help/get_premium_promo.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPremiumPromo(TLObject): # type: ignore + """Get Telegram Premium promotion information + + + Details: + - Layer: ``224`` + - ID: ``B81B93D4`` + + Parameters: + No parameters required. + + Returns: + :obj:`help.PremiumPromo ` + """ + + __slots__: List[str] = [] + + ID = 0xb81b93d4 + QUALNAME = "functions.help.GetPremiumPromo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPremiumPromo": + # No flags + + return GetPremiumPromo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_promo_data.py b/pyrogram/raw/functions/help/get_promo_data.py new file mode 100644 index 00000000..42f1768f --- /dev/null +++ b/pyrogram/raw/functions/help/get_promo_data.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPromoData(TLObject): # type: ignore + """Get MTProxy/Public Service Announcement information + + + Details: + - Layer: ``224`` + - ID: ``C0977421`` + + Parameters: + No parameters required. + + Returns: + :obj:`help.PromoData ` + """ + + __slots__: List[str] = [] + + ID = 0xc0977421 + QUALNAME = "functions.help.GetPromoData" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPromoData": + # No flags + + return GetPromoData() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_recent_me_urls.py b/pyrogram/raw/functions/help/get_recent_me_urls.py new file mode 100644 index 00000000..559d6096 --- /dev/null +++ b/pyrogram/raw/functions/help/get_recent_me_urls.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetRecentMeUrls(TLObject): # type: ignore + """Get recently used t.me links. + + + Details: + - Layer: ``224`` + - ID: ``3DC0F114`` + + Parameters: + referer (``str``): + Referrer + + Returns: + :obj:`help.RecentMeUrls ` + """ + + __slots__: List[str] = ["referer"] + + ID = 0x3dc0f114 + QUALNAME = "functions.help.GetRecentMeUrls" + + def __init__(self, *, referer: str) -> None: + self.referer = referer # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetRecentMeUrls": + # No flags + + referer = String.read(b) + + return GetRecentMeUrls(referer=referer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.referer)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_support.py b/pyrogram/raw/functions/help/get_support.py new file mode 100644 index 00000000..bdda264b --- /dev/null +++ b/pyrogram/raw/functions/help/get_support.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSupport(TLObject): # type: ignore + """Returns the support user for the "ask a question" feature. + + + Details: + - Layer: ``224`` + - ID: ``9CDF08CD`` + + Parameters: + No parameters required. + + Returns: + :obj:`help.Support ` + """ + + __slots__: List[str] = [] + + ID = 0x9cdf08cd + QUALNAME = "functions.help.GetSupport" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSupport": + # No flags + + return GetSupport() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_support_name.py b/pyrogram/raw/functions/help/get_support_name.py new file mode 100644 index 00000000..6334c490 --- /dev/null +++ b/pyrogram/raw/functions/help/get_support_name.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSupportName(TLObject): # type: ignore + """Get localized name of the telegram support user + + + Details: + - Layer: ``224`` + - ID: ``D360E72C`` + + Parameters: + No parameters required. + + Returns: + :obj:`help.SupportName ` + """ + + __slots__: List[str] = [] + + ID = 0xd360e72c + QUALNAME = "functions.help.GetSupportName" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSupportName": + # No flags + + return GetSupportName() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_terms_of_service_update.py b/pyrogram/raw/functions/help/get_terms_of_service_update.py new file mode 100644 index 00000000..e98ff417 --- /dev/null +++ b/pyrogram/raw/functions/help/get_terms_of_service_update.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetTermsOfServiceUpdate(TLObject): # type: ignore + """Look for updates of telegram's terms of service + + + Details: + - Layer: ``224`` + - ID: ``2CA51FD1`` + + Parameters: + No parameters required. + + Returns: + :obj:`help.TermsOfServiceUpdate ` + """ + + __slots__: List[str] = [] + + ID = 0x2ca51fd1 + QUALNAME = "functions.help.GetTermsOfServiceUpdate" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetTermsOfServiceUpdate": + # No flags + + return GetTermsOfServiceUpdate() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_timezones_list.py b/pyrogram/raw/functions/help/get_timezones_list.py new file mode 100644 index 00000000..c8b7aca9 --- /dev/null +++ b/pyrogram/raw/functions/help/get_timezones_list.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetTimezonesList(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``49B30240`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the help.timezonesList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`help.TimezonesList ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x49b30240 + QUALNAME = "functions.help.GetTimezonesList" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetTimezonesList": + # No flags + + hash = Int.read(b) + + return GetTimezonesList(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/get_user_info.py b/pyrogram/raw/functions/help/get_user_info.py new file mode 100644 index 00000000..0b300058 --- /dev/null +++ b/pyrogram/raw/functions/help/get_user_info.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUserInfo(TLObject): # type: ignore + """Can only be used by TSF members to obtain internal information. + + + Details: + - Layer: ``224`` + - ID: ``38A08D3`` + + Parameters: + user_id (:obj:`InputUser `): + User ID + + Returns: + :obj:`help.UserInfo ` + """ + + __slots__: List[str] = ["user_id"] + + ID = 0x38a08d3 + QUALNAME = "functions.help.GetUserInfo" + + def __init__(self, *, user_id: "raw.base.InputUser") -> None: + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUserInfo": + # No flags + + user_id = TLObject.read(b) + + return GetUserInfo(user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/hide_promo_data.py b/pyrogram/raw/functions/help/hide_promo_data.py new file mode 100644 index 00000000..e62cd3e6 --- /dev/null +++ b/pyrogram/raw/functions/help/hide_promo_data.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HidePromoData(TLObject): # type: ignore + """Hide MTProxy/Public Service Announcement information + + + Details: + - Layer: ``224`` + - ID: ``1E251C95`` + + Parameters: + peer (:obj:`InputPeer `): + Peer to hide + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x1e251c95 + QUALNAME = "functions.help.HidePromoData" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HidePromoData": + # No flags + + peer = TLObject.read(b) + + return HidePromoData(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/save_app_log.py b/pyrogram/raw/functions/help/save_app_log.py new file mode 100644 index 00000000..0e7012ac --- /dev/null +++ b/pyrogram/raw/functions/help/save_app_log.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveAppLog(TLObject): # type: ignore + """Saves logs of application on the server. + + + Details: + - Layer: ``224`` + - ID: ``6F02F748`` + + Parameters: + events (List of :obj:`InputAppEvent `): + List of input events + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["events"] + + ID = 0x6f02f748 + QUALNAME = "functions.help.SaveAppLog" + + def __init__(self, *, events: List["raw.base.InputAppEvent"]) -> None: + self.events = events # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveAppLog": + # No flags + + events = TLObject.read(b) + + return SaveAppLog(events=events) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.events)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/help/set_bot_updates_status.py b/pyrogram/raw/functions/help/set_bot_updates_status.py new file mode 100644 index 00000000..0051a190 --- /dev/null +++ b/pyrogram/raw/functions/help/set_bot_updates_status.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotUpdatesStatus(TLObject): # type: ignore + """Informs the server about the number of pending bot updates if they haven't been processed for a long time; for bots only + + + Details: + - Layer: ``224`` + - ID: ``EC22CFCD`` + + Parameters: + pending_updates_count (``int`` ``32-bit``): + Number of pending updates + + message (``str``): + Error message, if present + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["pending_updates_count", "message"] + + ID = 0xec22cfcd + QUALNAME = "functions.help.SetBotUpdatesStatus" + + def __init__(self, *, pending_updates_count: int, message: str) -> None: + self.pending_updates_count = pending_updates_count # int + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotUpdatesStatus": + # No flags + + pending_updates_count = Int.read(b) + + message = String.read(b) + + return SetBotUpdatesStatus(pending_updates_count=pending_updates_count, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.pending_updates_count)) + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/init_connection.py b/pyrogram/raw/functions/init_connection.py new file mode 100644 index 00000000..9dc79619 --- /dev/null +++ b/pyrogram/raw/functions/init_connection.py @@ -0,0 +1,133 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InitConnection(TLObject): # type: ignore + """Initialize connection + + + Details: + - Layer: ``224`` + - ID: ``C1CD5EA9`` + + Parameters: + api_id (``int`` ``32-bit``): + Application identifier (see. App configuration) + + device_model (``str``): + Device model + + system_version (``str``): + Operation system version + + app_version (``str``): + Application version + + system_lang_code (``str``): + Code for the language used on the device's OS, ISO 639-1 standard + + lang_pack (``str``): + Language pack to use + + lang_code (``str``): + Code for the language used on the client, ISO 639-1 standard + + query (Any function from :obj:`~pyrogram.raw.functions`): + The query itself + + proxy (:obj:`InputClientProxy `, *optional*): + Info about an MTProto proxy + + params (:obj:`JSONValue `, *optional*): + Additional initConnection parameters. For now, only the tz_offset field is supported, for specifying timezone offset in seconds. + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["api_id", "device_model", "system_version", "app_version", "system_lang_code", "lang_pack", "lang_code", "query", "proxy", "params"] + + ID = 0xc1cd5ea9 + QUALNAME = "functions.InitConnection" + + def __init__(self, *, api_id: int, device_model: str, system_version: str, app_version: str, system_lang_code: str, lang_pack: str, lang_code: str, query: TLObject, proxy: "raw.base.InputClientProxy" = None, params: "raw.base.JSONValue" = None) -> None: + self.api_id = api_id # int + self.device_model = device_model # string + self.system_version = system_version # string + self.app_version = app_version # string + self.system_lang_code = system_lang_code # string + self.lang_pack = lang_pack # string + self.lang_code = lang_code # string + self.query = query # !X + self.proxy = proxy # flags.0?InputClientProxy + self.params = params # flags.1?JSONValue + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InitConnection": + + flags = Int.read(b) + + api_id = Int.read(b) + + device_model = String.read(b) + + system_version = String.read(b) + + app_version = String.read(b) + + system_lang_code = String.read(b) + + lang_pack = String.read(b) + + lang_code = String.read(b) + + proxy = TLObject.read(b) if flags & (1 << 0) else None + + params = TLObject.read(b) if flags & (1 << 1) else None + + query = TLObject.read(b) + + return InitConnection(api_id=api_id, device_model=device_model, system_version=system_version, app_version=app_version, system_lang_code=system_lang_code, lang_pack=lang_pack, lang_code=lang_code, query=query, proxy=proxy, params=params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.proxy is not None else 0 + flags |= (1 << 1) if self.params is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.api_id)) + + b.write(String(self.device_model)) + + b.write(String(self.system_version)) + + b.write(String(self.app_version)) + + b.write(String(self.system_lang_code)) + + b.write(String(self.lang_pack)) + + b.write(String(self.lang_code)) + + if self.proxy is not None: + b.write(self.proxy.write()) + + if self.params is not None: + b.write(self.params.write()) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_after_msg.py b/pyrogram/raw/functions/invoke_after_msg.py new file mode 100644 index 00000000..bc9b13a1 --- /dev/null +++ b/pyrogram/raw/functions/invoke_after_msg.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeAfterMsg(TLObject): # type: ignore + """Invokes a query after successful completion of one of the previous queries. + + + Details: + - Layer: ``224`` + - ID: ``CB9F372D`` + + Parameters: + msg_id (``int`` ``64-bit``): + Message identifier on which a current query depends + + query (Any function from :obj:`~pyrogram.raw.functions`): + The query itself + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["msg_id", "query"] + + ID = 0xcb9f372d + QUALNAME = "functions.InvokeAfterMsg" + + def __init__(self, *, msg_id: int, query: TLObject) -> None: + self.msg_id = msg_id # long + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeAfterMsg": + # No flags + + msg_id = Long.read(b) + + query = TLObject.read(b) + + return InvokeAfterMsg(msg_id=msg_id, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.msg_id)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_after_msgs.py b/pyrogram/raw/functions/invoke_after_msgs.py new file mode 100644 index 00000000..6f9fd661 --- /dev/null +++ b/pyrogram/raw/functions/invoke_after_msgs.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeAfterMsgs(TLObject): # type: ignore + """Invokes a query after a successful completion of previous queries + + + Details: + - Layer: ``224`` + - ID: ``3DC4B4F0`` + + Parameters: + msg_ids (List of ``int`` ``64-bit``): + List of messages on which a current query depends + + query (Any function from :obj:`~pyrogram.raw.functions`): + The query itself + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["msg_ids", "query"] + + ID = 0x3dc4b4f0 + QUALNAME = "functions.InvokeAfterMsgs" + + def __init__(self, *, msg_ids: List[int], query: TLObject) -> None: + self.msg_ids = msg_ids # Vector + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeAfterMsgs": + # No flags + + msg_ids = TLObject.read(b, Long) + + query = TLObject.read(b) + + return InvokeAfterMsgs(msg_ids=msg_ids, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.msg_ids, Long)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_apns_secret.py b/pyrogram/raw/functions/invoke_with_apns_secret.py new file mode 100644 index 00000000..6e3eb018 --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_apns_secret.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithApnsSecret(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``DAE54F8`` + + Parameters: + nonce (``str``): + + + secret (``str``): + + + query (Any function from :obj:`~pyrogram.raw.functions`): + + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["nonce", "secret", "query"] + + ID = 0xdae54f8 + QUALNAME = "functions.InvokeWithApnsSecret" + + def __init__(self, *, nonce: str, secret: str, query: TLObject) -> None: + self.nonce = nonce # string + self.secret = secret # string + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithApnsSecret": + # No flags + + nonce = String.read(b) + + secret = String.read(b) + + query = TLObject.read(b) + + return InvokeWithApnsSecret(nonce=nonce, secret=secret, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.nonce)) + + b.write(String(self.secret)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_business_connection.py b/pyrogram/raw/functions/invoke_with_business_connection.py new file mode 100644 index 00000000..4e072b2d --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_business_connection.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithBusinessConnection(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``DD289F8E`` + + Parameters: + connection_id (``str``): + + + query (Any function from :obj:`~pyrogram.raw.functions`): + + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["connection_id", "query"] + + ID = 0xdd289f8e + QUALNAME = "functions.InvokeWithBusinessConnection" + + def __init__(self, *, connection_id: str, query: TLObject) -> None: + self.connection_id = connection_id # string + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithBusinessConnection": + # No flags + + connection_id = String.read(b) + + query = TLObject.read(b) + + return InvokeWithBusinessConnection(connection_id=connection_id, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.connection_id)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_google_play_integrity.py b/pyrogram/raw/functions/invoke_with_google_play_integrity.py new file mode 100644 index 00000000..6a3c56c6 --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_google_play_integrity.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithGooglePlayIntegrity(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``1DF92984`` + + Parameters: + nonce (``str``): + + + token (``str``): + + + query (Any function from :obj:`~pyrogram.raw.functions`): + + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["nonce", "token", "query"] + + ID = 0x1df92984 + QUALNAME = "functions.InvokeWithGooglePlayIntegrity" + + def __init__(self, *, nonce: str, token: str, query: TLObject) -> None: + self.nonce = nonce # string + self.token = token # string + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithGooglePlayIntegrity": + # No flags + + nonce = String.read(b) + + token = String.read(b) + + query = TLObject.read(b) + + return InvokeWithGooglePlayIntegrity(nonce=nonce, token=token, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.nonce)) + + b.write(String(self.token)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_layer.py b/pyrogram/raw/functions/invoke_with_layer.py new file mode 100644 index 00000000..ed95d776 --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_layer.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithLayer(TLObject): # type: ignore + """Invoke the specified query using the specified API layer + + + Details: + - Layer: ``224`` + - ID: ``DA9B0D0D`` + + Parameters: + layer (``int`` ``32-bit``): + The layer to use + + query (Any function from :obj:`~pyrogram.raw.functions`): + The query + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["layer", "query"] + + ID = 0xda9b0d0d + QUALNAME = "functions.InvokeWithLayer" + + def __init__(self, *, layer: int, query: TLObject) -> None: + self.layer = layer # int + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithLayer": + # No flags + + layer = Int.read(b) + + query = TLObject.read(b) + + return InvokeWithLayer(layer=layer, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.layer)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_messages_range.py b/pyrogram/raw/functions/invoke_with_messages_range.py new file mode 100644 index 00000000..99f353e6 --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_messages_range.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithMessagesRange(TLObject): # type: ignore + """Invoke with the given message range + + + Details: + - Layer: ``224`` + - ID: ``365275F2`` + + Parameters: + range (:obj:`MessageRange `): + Message range + + query (Any function from :obj:`~pyrogram.raw.functions`): + Query + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["range", "query"] + + ID = 0x365275f2 + QUALNAME = "functions.InvokeWithMessagesRange" + + def __init__(self, *, range: "raw.base.MessageRange", query: TLObject) -> None: + self.range = range # MessageRange + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithMessagesRange": + # No flags + + range = TLObject.read(b) + + query = TLObject.read(b) + + return InvokeWithMessagesRange(range=range, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.range.write()) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_re_captcha.py b/pyrogram/raw/functions/invoke_with_re_captcha.py new file mode 100644 index 00000000..abae93f5 --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_re_captcha.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithReCaptcha(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``ADBB0F94`` + + Parameters: + token (``str``): + N/A + + query (Any function from :obj:`~pyrogram.raw.functions`): + N/A + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["token", "query"] + + ID = 0xadbb0f94 + QUALNAME = "functions.InvokeWithReCaptcha" + + def __init__(self, *, token: str, query: TLObject) -> None: + self.token = token # string + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithReCaptcha": + # No flags + + token = String.read(b) + + query = TLObject.read(b) + + return InvokeWithReCaptcha(token=token, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.token)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_with_takeout.py b/pyrogram/raw/functions/invoke_with_takeout.py new file mode 100644 index 00000000..12a588b9 --- /dev/null +++ b/pyrogram/raw/functions/invoke_with_takeout.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithTakeout(TLObject): # type: ignore + """Invoke a method within a takeout session, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``ACA9FD2E`` + + Parameters: + takeout_id (``int`` ``64-bit``): + Takeout session ID » + + query (Any function from :obj:`~pyrogram.raw.functions`): + Query + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["takeout_id", "query"] + + ID = 0xaca9fd2e + QUALNAME = "functions.InvokeWithTakeout" + + def __init__(self, *, takeout_id: int, query: TLObject) -> None: + self.takeout_id = takeout_id # long + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithTakeout": + # No flags + + takeout_id = Long.read(b) + + query = TLObject.read(b) + + return InvokeWithTakeout(takeout_id=takeout_id, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.takeout_id)) + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/invoke_without_updates.py b/pyrogram/raw/functions/invoke_without_updates.py new file mode 100644 index 00000000..b2a1eb28 --- /dev/null +++ b/pyrogram/raw/functions/invoke_without_updates.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvokeWithoutUpdates(TLObject): # type: ignore + """Invoke a request without subscribing the used connection for updates (this is enabled by default for file queries). + + + Details: + - Layer: ``224`` + - ID: ``BF9459B7`` + + Parameters: + query (Any function from :obj:`~pyrogram.raw.functions`): + The query + + Returns: + Any object from :obj:`~pyrogram.raw.types` + """ + + __slots__: List[str] = ["query"] + + ID = 0xbf9459b7 + QUALNAME = "functions.InvokeWithoutUpdates" + + def __init__(self, *, query: TLObject) -> None: + self.query = query # !X + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvokeWithoutUpdates": + # No flags + + query = TLObject.read(b) + + return InvokeWithoutUpdates(query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.query.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/langpack/__init__.py b/pyrogram/raw/functions/langpack/__init__.py new file mode 100644 index 00000000..fb273097 --- /dev/null +++ b/pyrogram/raw/functions/langpack/__init__.py @@ -0,0 +1,43 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_lang_pack import GetLangPack +from .get_strings import GetStrings +from .get_difference import GetDifference +from .get_languages import GetLanguages +from .get_language import GetLanguage + + +__all__ = [ + "GetLangPack", + "GetStrings", + "GetDifference", + "GetLanguages", + "GetLanguage", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/langpack/get_difference.py b/pyrogram/raw/functions/langpack/get_difference.py new file mode 100644 index 00000000..ff259445 --- /dev/null +++ b/pyrogram/raw/functions/langpack/get_difference.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDifference(TLObject): # type: ignore + """Get new strings in language pack + + + Details: + - Layer: ``224`` + - ID: ``CD984AA5`` + + Parameters: + lang_pack (``str``): + Language pack + + lang_code (``str``): + Language code + + from_version (``int`` ``32-bit``): + Previous localization pack version + + Returns: + :obj:`LangPackDifference ` + """ + + __slots__: List[str] = ["lang_pack", "lang_code", "from_version"] + + ID = 0xcd984aa5 + QUALNAME = "functions.langpack.GetDifference" + + def __init__(self, *, lang_pack: str, lang_code: str, from_version: int) -> None: + self.lang_pack = lang_pack # string + self.lang_code = lang_code # string + self.from_version = from_version # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDifference": + # No flags + + lang_pack = String.read(b) + + lang_code = String.read(b) + + from_version = Int.read(b) + + return GetDifference(lang_pack=lang_pack, lang_code=lang_code, from_version=from_version) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_pack)) + + b.write(String(self.lang_code)) + + b.write(Int(self.from_version)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/langpack/get_lang_pack.py b/pyrogram/raw/functions/langpack/get_lang_pack.py new file mode 100644 index 00000000..06785657 --- /dev/null +++ b/pyrogram/raw/functions/langpack/get_lang_pack.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetLangPack(TLObject): # type: ignore + """Get localization pack strings + + + Details: + - Layer: ``224`` + - ID: ``F2F2330A`` + + Parameters: + lang_pack (``str``): + Language pack name, usually obtained from a language pack link + + lang_code (``str``): + Language code + + Returns: + :obj:`LangPackDifference ` + """ + + __slots__: List[str] = ["lang_pack", "lang_code"] + + ID = 0xf2f2330a + QUALNAME = "functions.langpack.GetLangPack" + + def __init__(self, *, lang_pack: str, lang_code: str) -> None: + self.lang_pack = lang_pack # string + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetLangPack": + # No flags + + lang_pack = String.read(b) + + lang_code = String.read(b) + + return GetLangPack(lang_pack=lang_pack, lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_pack)) + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/langpack/get_language.py b/pyrogram/raw/functions/langpack/get_language.py new file mode 100644 index 00000000..ad48abcf --- /dev/null +++ b/pyrogram/raw/functions/langpack/get_language.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetLanguage(TLObject): # type: ignore + """Get information about a language in a localization pack + + + Details: + - Layer: ``224`` + - ID: ``6A596502`` + + Parameters: + lang_pack (``str``): + Language pack name, usually obtained from a language pack link + + lang_code (``str``): + Language code + + Returns: + :obj:`LangPackLanguage ` + """ + + __slots__: List[str] = ["lang_pack", "lang_code"] + + ID = 0x6a596502 + QUALNAME = "functions.langpack.GetLanguage" + + def __init__(self, *, lang_pack: str, lang_code: str) -> None: + self.lang_pack = lang_pack # string + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetLanguage": + # No flags + + lang_pack = String.read(b) + + lang_code = String.read(b) + + return GetLanguage(lang_pack=lang_pack, lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_pack)) + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/langpack/get_languages.py b/pyrogram/raw/functions/langpack/get_languages.py new file mode 100644 index 00000000..0d67054b --- /dev/null +++ b/pyrogram/raw/functions/langpack/get_languages.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetLanguages(TLObject): # type: ignore + """Get information about all languages in a localization pack + + + Details: + - Layer: ``224`` + - ID: ``42C6978F`` + + Parameters: + lang_pack (``str``): + Language pack + + Returns: + List of :obj:`LangPackLanguage ` + """ + + __slots__: List[str] = ["lang_pack"] + + ID = 0x42c6978f + QUALNAME = "functions.langpack.GetLanguages" + + def __init__(self, *, lang_pack: str) -> None: + self.lang_pack = lang_pack # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetLanguages": + # No flags + + lang_pack = String.read(b) + + return GetLanguages(lang_pack=lang_pack) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_pack)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/langpack/get_strings.py b/pyrogram/raw/functions/langpack/get_strings.py new file mode 100644 index 00000000..747a9c41 --- /dev/null +++ b/pyrogram/raw/functions/langpack/get_strings.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStrings(TLObject): # type: ignore + """Get strings from a language pack + + + Details: + - Layer: ``224`` + - ID: ``EFEA3803`` + + Parameters: + lang_pack (``str``): + Language pack name, usually obtained from a language pack link + + lang_code (``str``): + Language code + + keys (List of ``str``): + Strings to get + + Returns: + List of :obj:`LangPackString ` + """ + + __slots__: List[str] = ["lang_pack", "lang_code", "keys"] + + ID = 0xefea3803 + QUALNAME = "functions.langpack.GetStrings" + + def __init__(self, *, lang_pack: str, lang_code: str, keys: List[str]) -> None: + self.lang_pack = lang_pack # string + self.lang_code = lang_code # string + self.keys = keys # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStrings": + # No flags + + lang_pack = String.read(b) + + lang_code = String.read(b) + + keys = TLObject.read(b, String) + + return GetStrings(lang_pack=lang_pack, lang_code=lang_code, keys=keys) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_pack)) + + b.write(String(self.lang_code)) + + b.write(Vector(self.keys, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/__init__.py b/pyrogram/raw/functions/messages/__init__.py new file mode 100644 index 00000000..d13c9164 --- /dev/null +++ b/pyrogram/raw/functions/messages/__init__.py @@ -0,0 +1,525 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_messages import GetMessages +from .get_dialogs import GetDialogs +from .get_history import GetHistory +from .search import Search +from .read_history import ReadHistory +from .delete_history import DeleteHistory +from .delete_messages import DeleteMessages +from .received_messages import ReceivedMessages +from .set_typing import SetTyping +from .send_message import SendMessage +from .send_media import SendMedia +from .forward_messages import ForwardMessages +from .report_spam import ReportSpam +from .get_peer_settings import GetPeerSettings +from .report import Report +from .get_chats import GetChats +from .get_full_chat import GetFullChat +from .edit_chat_title import EditChatTitle +from .edit_chat_photo import EditChatPhoto +from .add_chat_user import AddChatUser +from .delete_chat_user import DeleteChatUser +from .create_chat import CreateChat +from .get_dh_config import GetDhConfig +from .request_encryption import RequestEncryption +from .accept_encryption import AcceptEncryption +from .discard_encryption import DiscardEncryption +from .set_encrypted_typing import SetEncryptedTyping +from .read_encrypted_history import ReadEncryptedHistory +from .send_encrypted import SendEncrypted +from .send_encrypted_file import SendEncryptedFile +from .send_encrypted_service import SendEncryptedService +from .received_queue import ReceivedQueue +from .report_encrypted_spam import ReportEncryptedSpam +from .read_message_contents import ReadMessageContents +from .get_stickers import GetStickers +from .get_all_stickers import GetAllStickers +from .get_web_page_preview import GetWebPagePreview +from .export_chat_invite import ExportChatInvite +from .check_chat_invite import CheckChatInvite +from .import_chat_invite import ImportChatInvite +from .get_sticker_set import GetStickerSet +from .install_sticker_set import InstallStickerSet +from .uninstall_sticker_set import UninstallStickerSet +from .start_bot import StartBot +from .get_messages_views import GetMessagesViews +from .edit_chat_admin import EditChatAdmin +from .migrate_chat import MigrateChat +from .search_global import SearchGlobal +from .reorder_sticker_sets import ReorderStickerSets +from .get_document_by_hash import GetDocumentByHash +from .get_saved_gifs import GetSavedGifs +from .save_gif import SaveGif +from .get_inline_bot_results import GetInlineBotResults +from .set_inline_bot_results import SetInlineBotResults +from .send_inline_bot_result import SendInlineBotResult +from .get_message_edit_data import GetMessageEditData +from .edit_message import EditMessage +from .edit_inline_bot_message import EditInlineBotMessage +from .get_bot_callback_answer import GetBotCallbackAnswer +from .set_bot_callback_answer import SetBotCallbackAnswer +from .get_peer_dialogs import GetPeerDialogs +from .save_draft import SaveDraft +from .get_all_drafts import GetAllDrafts +from .get_featured_stickers import GetFeaturedStickers +from .read_featured_stickers import ReadFeaturedStickers +from .get_recent_stickers import GetRecentStickers +from .save_recent_sticker import SaveRecentSticker +from .clear_recent_stickers import ClearRecentStickers +from .get_archived_stickers import GetArchivedStickers +from .get_mask_stickers import GetMaskStickers +from .get_attached_stickers import GetAttachedStickers +from .set_game_score import SetGameScore +from .set_inline_game_score import SetInlineGameScore +from .get_game_high_scores import GetGameHighScores +from .get_inline_game_high_scores import GetInlineGameHighScores +from .get_common_chats import GetCommonChats +from .get_web_page import GetWebPage +from .toggle_dialog_pin import ToggleDialogPin +from .reorder_pinned_dialogs import ReorderPinnedDialogs +from .get_pinned_dialogs import GetPinnedDialogs +from .set_bot_shipping_results import SetBotShippingResults +from .set_bot_precheckout_results import SetBotPrecheckoutResults +from .upload_media import UploadMedia +from .send_screenshot_notification import SendScreenshotNotification +from .get_faved_stickers import GetFavedStickers +from .fave_sticker import FaveSticker +from .get_unread_mentions import GetUnreadMentions +from .read_mentions import ReadMentions +from .get_recent_locations import GetRecentLocations +from .send_multi_media import SendMultiMedia +from .upload_encrypted_file import UploadEncryptedFile +from .search_sticker_sets import SearchStickerSets +from .get_split_ranges import GetSplitRanges +from .mark_dialog_unread import MarkDialogUnread +from .get_dialog_unread_marks import GetDialogUnreadMarks +from .clear_all_drafts import ClearAllDrafts +from .update_pinned_message import UpdatePinnedMessage +from .send_vote import SendVote +from .get_poll_results import GetPollResults +from .get_onlines import GetOnlines +from .edit_chat_about import EditChatAbout +from .edit_chat_default_banned_rights import EditChatDefaultBannedRights +from .get_emoji_keywords import GetEmojiKeywords +from .get_emoji_keywords_difference import GetEmojiKeywordsDifference +from .get_emoji_keywords_languages import GetEmojiKeywordsLanguages +from .get_emoji_url import GetEmojiURL +from .get_search_counters import GetSearchCounters +from .request_url_auth import RequestUrlAuth +from .accept_url_auth import AcceptUrlAuth +from .hide_peer_settings_bar import HidePeerSettingsBar +from .get_scheduled_history import GetScheduledHistory +from .get_scheduled_messages import GetScheduledMessages +from .send_scheduled_messages import SendScheduledMessages +from .delete_scheduled_messages import DeleteScheduledMessages +from .get_poll_votes import GetPollVotes +from .toggle_sticker_sets import ToggleStickerSets +from .get_dialog_filters import GetDialogFilters +from .get_suggested_dialog_filters import GetSuggestedDialogFilters +from .update_dialog_filter import UpdateDialogFilter +from .update_dialog_filters_order import UpdateDialogFiltersOrder +from .get_old_featured_stickers import GetOldFeaturedStickers +from .get_replies import GetReplies +from .get_discussion_message import GetDiscussionMessage +from .read_discussion import ReadDiscussion +from .unpin_all_messages import UnpinAllMessages +from .delete_chat import DeleteChat +from .delete_phone_call_history import DeletePhoneCallHistory +from .check_history_import import CheckHistoryImport +from .init_history_import import InitHistoryImport +from .upload_imported_media import UploadImportedMedia +from .start_history_import import StartHistoryImport +from .get_exported_chat_invites import GetExportedChatInvites +from .get_exported_chat_invite import GetExportedChatInvite +from .edit_exported_chat_invite import EditExportedChatInvite +from .delete_revoked_exported_chat_invites import DeleteRevokedExportedChatInvites +from .delete_exported_chat_invite import DeleteExportedChatInvite +from .get_admins_with_invites import GetAdminsWithInvites +from .get_chat_invite_importers import GetChatInviteImporters +from .set_history_ttl import SetHistoryTTL +from .check_history_import_peer import CheckHistoryImportPeer +from .set_chat_theme import SetChatTheme +from .get_message_read_participants import GetMessageReadParticipants +from .get_search_results_calendar import GetSearchResultsCalendar +from .get_search_results_positions import GetSearchResultsPositions +from .hide_chat_join_request import HideChatJoinRequest +from .hide_all_chat_join_requests import HideAllChatJoinRequests +from .toggle_no_forwards import ToggleNoForwards +from .save_default_send_as import SaveDefaultSendAs +from .send_reaction import SendReaction +from .get_messages_reactions import GetMessagesReactions +from .get_message_reactions_list import GetMessageReactionsList +from .set_chat_available_reactions import SetChatAvailableReactions +from .get_available_reactions import GetAvailableReactions +from .set_default_reaction import SetDefaultReaction +from .translate_text import TranslateText +from .get_unread_reactions import GetUnreadReactions +from .read_reactions import ReadReactions +from .search_sent_media import SearchSentMedia +from .get_attach_menu_bots import GetAttachMenuBots +from .get_attach_menu_bot import GetAttachMenuBot +from .toggle_bot_in_attach_menu import ToggleBotInAttachMenu +from .request_web_view import RequestWebView +from .prolong_web_view import ProlongWebView +from .request_simple_web_view import RequestSimpleWebView +from .send_web_view_result_message import SendWebViewResultMessage +from .send_web_view_data import SendWebViewData +from .transcribe_audio import TranscribeAudio +from .rate_transcribed_audio import RateTranscribedAudio +from .get_custom_emoji_documents import GetCustomEmojiDocuments +from .get_emoji_stickers import GetEmojiStickers +from .get_featured_emoji_stickers import GetFeaturedEmojiStickers +from .report_reaction import ReportReaction +from .get_top_reactions import GetTopReactions +from .get_recent_reactions import GetRecentReactions +from .clear_recent_reactions import ClearRecentReactions +from .get_extended_media import GetExtendedMedia +from .set_default_history_ttl import SetDefaultHistoryTTL +from .get_default_history_ttl import GetDefaultHistoryTTL +from .send_bot_requested_peer import SendBotRequestedPeer +from .get_emoji_groups import GetEmojiGroups +from .get_emoji_status_groups import GetEmojiStatusGroups +from .get_emoji_profile_photo_groups import GetEmojiProfilePhotoGroups +from .search_custom_emoji import SearchCustomEmoji +from .toggle_peer_translations import TogglePeerTranslations +from .get_bot_app import GetBotApp +from .request_app_web_view import RequestAppWebView +from .set_chat_wall_paper import SetChatWallPaper +from .search_emoji_sticker_sets import SearchEmojiStickerSets +from .get_saved_dialogs import GetSavedDialogs +from .get_saved_history import GetSavedHistory +from .delete_saved_history import DeleteSavedHistory +from .get_pinned_saved_dialogs import GetPinnedSavedDialogs +from .toggle_saved_dialog_pin import ToggleSavedDialogPin +from .reorder_pinned_saved_dialogs import ReorderPinnedSavedDialogs +from .get_saved_reaction_tags import GetSavedReactionTags +from .update_saved_reaction_tag import UpdateSavedReactionTag +from .get_default_tag_reactions import GetDefaultTagReactions +from .get_outbox_read_date import GetOutboxReadDate +from .get_quick_replies import GetQuickReplies +from .reorder_quick_replies import ReorderQuickReplies +from .check_quick_reply_shortcut import CheckQuickReplyShortcut +from .edit_quick_reply_shortcut import EditQuickReplyShortcut +from .delete_quick_reply_shortcut import DeleteQuickReplyShortcut +from .get_quick_reply_messages import GetQuickReplyMessages +from .send_quick_reply_messages import SendQuickReplyMessages +from .delete_quick_reply_messages import DeleteQuickReplyMessages +from .toggle_dialog_filter_tags import ToggleDialogFilterTags +from .get_my_stickers import GetMyStickers +from .get_emoji_sticker_groups import GetEmojiStickerGroups +from .get_available_effects import GetAvailableEffects +from .edit_fact_check import EditFactCheck +from .delete_fact_check import DeleteFactCheck +from .get_fact_check import GetFactCheck +from .request_main_web_view import RequestMainWebView +from .send_paid_reaction import SendPaidReaction +from .toggle_paid_reaction_privacy import TogglePaidReactionPrivacy +from .get_paid_reaction_privacy import GetPaidReactionPrivacy +from .view_sponsored_message import ViewSponsoredMessage +from .click_sponsored_message import ClickSponsoredMessage +from .report_sponsored_message import ReportSponsoredMessage +from .get_sponsored_messages import GetSponsoredMessages +from .save_prepared_inline_message import SavePreparedInlineMessage +from .get_prepared_inline_message import GetPreparedInlineMessage +from .search_stickers import SearchStickers +from .report_messages_delivery import ReportMessagesDelivery +from .get_saved_dialogs_by_id import GetSavedDialogsByID +from .read_saved_history import ReadSavedHistory +from .toggle_todo_completed import ToggleTodoCompleted +from .append_todo_list import AppendTodoList +from .toggle_suggested_post_approval import ToggleSuggestedPostApproval +from .get_forum_topics import GetForumTopics +from .get_forum_topics_by_id import GetForumTopicsByID +from .edit_forum_topic import EditForumTopic +from .update_pinned_forum_topic import UpdatePinnedForumTopic +from .reorder_pinned_forum_topics import ReorderPinnedForumTopics +from .create_forum_topic import CreateForumTopic +from .delete_topic_history import DeleteTopicHistory +from .get_emoji_game_info import GetEmojiGameInfo +from .summarize_text import SummarizeText +from .get_web_view_result import GetWebViewResult +from .forward_message import ForwardMessage +from .get_stats_url import GetStatsURL +from .get_all_chats import GetAllChats +from .craft_star_gift import CraftStarGift +from .set_web_view_result import SetWebViewResult +from .get_craft_star_gifts import GetCraftStarGifts + + +__all__ = [ + "GetMessages", + "GetDialogs", + "GetHistory", + "Search", + "ReadHistory", + "DeleteHistory", + "DeleteMessages", + "ReceivedMessages", + "SetTyping", + "SendMessage", + "SendMedia", + "ForwardMessages", + "ReportSpam", + "GetPeerSettings", + "Report", + "GetChats", + "GetFullChat", + "EditChatTitle", + "EditChatPhoto", + "AddChatUser", + "DeleteChatUser", + "CreateChat", + "GetDhConfig", + "RequestEncryption", + "AcceptEncryption", + "DiscardEncryption", + "SetEncryptedTyping", + "ReadEncryptedHistory", + "SendEncrypted", + "SendEncryptedFile", + "SendEncryptedService", + "ReceivedQueue", + "ReportEncryptedSpam", + "ReadMessageContents", + "GetStickers", + "GetAllStickers", + "GetWebPagePreview", + "ExportChatInvite", + "CheckChatInvite", + "ImportChatInvite", + "GetStickerSet", + "InstallStickerSet", + "UninstallStickerSet", + "StartBot", + "GetMessagesViews", + "EditChatAdmin", + "MigrateChat", + "SearchGlobal", + "ReorderStickerSets", + "GetDocumentByHash", + "GetSavedGifs", + "SaveGif", + "GetInlineBotResults", + "SetInlineBotResults", + "SendInlineBotResult", + "GetMessageEditData", + "EditMessage", + "EditInlineBotMessage", + "GetBotCallbackAnswer", + "SetBotCallbackAnswer", + "GetPeerDialogs", + "SaveDraft", + "GetAllDrafts", + "GetFeaturedStickers", + "ReadFeaturedStickers", + "GetRecentStickers", + "SaveRecentSticker", + "ClearRecentStickers", + "GetArchivedStickers", + "GetMaskStickers", + "GetAttachedStickers", + "SetGameScore", + "SetInlineGameScore", + "GetGameHighScores", + "GetInlineGameHighScores", + "GetCommonChats", + "GetWebPage", + "ToggleDialogPin", + "ReorderPinnedDialogs", + "GetPinnedDialogs", + "SetBotShippingResults", + "SetBotPrecheckoutResults", + "UploadMedia", + "SendScreenshotNotification", + "GetFavedStickers", + "FaveSticker", + "GetUnreadMentions", + "ReadMentions", + "GetRecentLocations", + "SendMultiMedia", + "UploadEncryptedFile", + "SearchStickerSets", + "GetSplitRanges", + "MarkDialogUnread", + "GetDialogUnreadMarks", + "ClearAllDrafts", + "UpdatePinnedMessage", + "SendVote", + "GetPollResults", + "GetOnlines", + "EditChatAbout", + "EditChatDefaultBannedRights", + "GetEmojiKeywords", + "GetEmojiKeywordsDifference", + "GetEmojiKeywordsLanguages", + "GetEmojiURL", + "GetSearchCounters", + "RequestUrlAuth", + "AcceptUrlAuth", + "HidePeerSettingsBar", + "GetScheduledHistory", + "GetScheduledMessages", + "SendScheduledMessages", + "DeleteScheduledMessages", + "GetPollVotes", + "ToggleStickerSets", + "GetDialogFilters", + "GetSuggestedDialogFilters", + "UpdateDialogFilter", + "UpdateDialogFiltersOrder", + "GetOldFeaturedStickers", + "GetReplies", + "GetDiscussionMessage", + "ReadDiscussion", + "UnpinAllMessages", + "DeleteChat", + "DeletePhoneCallHistory", + "CheckHistoryImport", + "InitHistoryImport", + "UploadImportedMedia", + "StartHistoryImport", + "GetExportedChatInvites", + "GetExportedChatInvite", + "EditExportedChatInvite", + "DeleteRevokedExportedChatInvites", + "DeleteExportedChatInvite", + "GetAdminsWithInvites", + "GetChatInviteImporters", + "SetHistoryTTL", + "CheckHistoryImportPeer", + "SetChatTheme", + "GetMessageReadParticipants", + "GetSearchResultsCalendar", + "GetSearchResultsPositions", + "HideChatJoinRequest", + "HideAllChatJoinRequests", + "ToggleNoForwards", + "SaveDefaultSendAs", + "SendReaction", + "GetMessagesReactions", + "GetMessageReactionsList", + "SetChatAvailableReactions", + "GetAvailableReactions", + "SetDefaultReaction", + "TranslateText", + "GetUnreadReactions", + "ReadReactions", + "SearchSentMedia", + "GetAttachMenuBots", + "GetAttachMenuBot", + "ToggleBotInAttachMenu", + "RequestWebView", + "ProlongWebView", + "RequestSimpleWebView", + "SendWebViewResultMessage", + "SendWebViewData", + "TranscribeAudio", + "RateTranscribedAudio", + "GetCustomEmojiDocuments", + "GetEmojiStickers", + "GetFeaturedEmojiStickers", + "ReportReaction", + "GetTopReactions", + "GetRecentReactions", + "ClearRecentReactions", + "GetExtendedMedia", + "SetDefaultHistoryTTL", + "GetDefaultHistoryTTL", + "SendBotRequestedPeer", + "GetEmojiGroups", + "GetEmojiStatusGroups", + "GetEmojiProfilePhotoGroups", + "SearchCustomEmoji", + "TogglePeerTranslations", + "GetBotApp", + "RequestAppWebView", + "SetChatWallPaper", + "SearchEmojiStickerSets", + "GetSavedDialogs", + "GetSavedHistory", + "DeleteSavedHistory", + "GetPinnedSavedDialogs", + "ToggleSavedDialogPin", + "ReorderPinnedSavedDialogs", + "GetSavedReactionTags", + "UpdateSavedReactionTag", + "GetDefaultTagReactions", + "GetOutboxReadDate", + "GetQuickReplies", + "ReorderQuickReplies", + "CheckQuickReplyShortcut", + "EditQuickReplyShortcut", + "DeleteQuickReplyShortcut", + "GetQuickReplyMessages", + "SendQuickReplyMessages", + "DeleteQuickReplyMessages", + "ToggleDialogFilterTags", + "GetMyStickers", + "GetEmojiStickerGroups", + "GetAvailableEffects", + "EditFactCheck", + "DeleteFactCheck", + "GetFactCheck", + "RequestMainWebView", + "SendPaidReaction", + "TogglePaidReactionPrivacy", + "GetPaidReactionPrivacy", + "ViewSponsoredMessage", + "ClickSponsoredMessage", + "ReportSponsoredMessage", + "GetSponsoredMessages", + "SavePreparedInlineMessage", + "GetPreparedInlineMessage", + "SearchStickers", + "ReportMessagesDelivery", + "GetSavedDialogsByID", + "ReadSavedHistory", + "ToggleTodoCompleted", + "AppendTodoList", + "ToggleSuggestedPostApproval", + "GetForumTopics", + "GetForumTopicsByID", + "EditForumTopic", + "UpdatePinnedForumTopic", + "ReorderPinnedForumTopics", + "CreateForumTopic", + "DeleteTopicHistory", + "GetEmojiGameInfo", + "SummarizeText", + "GetWebViewResult", + "ForwardMessage", + "GetStatsURL", + "GetAllChats", + "CraftStarGift", + "SetWebViewResult", + "GetCraftStarGifts", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/messages/accept_encryption.py b/pyrogram/raw/functions/messages/accept_encryption.py new file mode 100644 index 00000000..00c43cb0 --- /dev/null +++ b/pyrogram/raw/functions/messages/accept_encryption.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptEncryption(TLObject): # type: ignore + """Confirms creation of a secret chat + + + Details: + - Layer: ``224`` + - ID: ``3DBC0415`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + Secret chat ID + + g_b (``bytes``): + B = g ^ b mod p, see Wikipedia + + key_fingerprint (``int`` ``64-bit``): + 64-bit fingerprint of the received key + + Returns: + :obj:`EncryptedChat ` + """ + + __slots__: List[str] = ["peer", "g_b", "key_fingerprint"] + + ID = 0x3dbc0415 + QUALNAME = "functions.messages.AcceptEncryption" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", g_b: bytes, key_fingerprint: int) -> None: + self.peer = peer # InputEncryptedChat + self.g_b = g_b # bytes + self.key_fingerprint = key_fingerprint # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptEncryption": + # No flags + + peer = TLObject.read(b) + + g_b = Bytes.read(b) + + key_fingerprint = Long.read(b) + + return AcceptEncryption(peer=peer, g_b=g_b, key_fingerprint=key_fingerprint) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bytes(self.g_b)) + + b.write(Long(self.key_fingerprint)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/accept_url_auth.py b/pyrogram/raw/functions/messages/accept_url_auth.py new file mode 100644 index 00000000..6d75aa19 --- /dev/null +++ b/pyrogram/raw/functions/messages/accept_url_auth.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptUrlAuth(TLObject): # type: ignore + """Use this to accept a Seamless Telegram Login authorization request, for more info click here » + + + Details: + - Layer: ``224`` + - ID: ``B12C7125`` + + Parameters: + write_allowed (``bool``, *optional*): + Set this flag to allow the bot to send messages to you (if requested) + + share_phone_number (``bool``, *optional*): + N/A + + peer (:obj:`InputPeer `, *optional*): + The location of the message + + msg_id (``int`` ``32-bit``, *optional*): + Message ID of the message with the login button + + button_id (``int`` ``32-bit``, *optional*): + ID of the login button + + url (``str``, *optional*): + URL used for link URL authorization, click here for more info » + + Returns: + :obj:`UrlAuthResult ` + """ + + __slots__: List[str] = ["write_allowed", "share_phone_number", "peer", "msg_id", "button_id", "url"] + + ID = 0xb12c7125 + QUALNAME = "functions.messages.AcceptUrlAuth" + + def __init__(self, *, write_allowed: Optional[bool] = None, share_phone_number: Optional[bool] = None, peer: "raw.base.InputPeer" = None, msg_id: Optional[int] = None, button_id: Optional[int] = None, url: Optional[str] = None) -> None: + self.write_allowed = write_allowed # flags.0?true + self.share_phone_number = share_phone_number # flags.3?true + self.peer = peer # flags.1?InputPeer + self.msg_id = msg_id # flags.1?int + self.button_id = button_id # flags.1?int + self.url = url # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptUrlAuth": + + flags = Int.read(b) + + write_allowed = True if flags & (1 << 0) else False + share_phone_number = True if flags & (1 << 3) else False + peer = TLObject.read(b) if flags & (1 << 1) else None + + msg_id = Int.read(b) if flags & (1 << 1) else None + button_id = Int.read(b) if flags & (1 << 1) else None + url = String.read(b) if flags & (1 << 2) else None + return AcceptUrlAuth(write_allowed=write_allowed, share_phone_number=share_phone_number, peer=peer, msg_id=msg_id, button_id=button_id, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.write_allowed else 0 + flags |= (1 << 3) if self.share_phone_number else 0 + flags |= (1 << 1) if self.peer is not None else 0 + flags |= (1 << 1) if self.msg_id is not None else 0 + flags |= (1 << 1) if self.button_id is not None else 0 + flags |= (1 << 2) if self.url is not None else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + if self.msg_id is not None: + b.write(Int(self.msg_id)) + + if self.button_id is not None: + b.write(Int(self.button_id)) + + if self.url is not None: + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/add_chat_user.py b/pyrogram/raw/functions/messages/add_chat_user.py new file mode 100644 index 00000000..113eae27 --- /dev/null +++ b/pyrogram/raw/functions/messages/add_chat_user.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AddChatUser(TLObject): # type: ignore + """Adds a user to a chat and sends a service message on it. + + + Details: + - Layer: ``224`` + - ID: ``CBC6D107`` + + Parameters: + chat_id (``int`` ``64-bit``): + Chat ID + + user_id (:obj:`InputUser `): + User ID to be added + + fwd_limit (``int`` ``32-bit``): + Number of last messages to be forwarded + + Returns: + :obj:`messages.InvitedUsers ` + """ + + __slots__: List[str] = ["chat_id", "user_id", "fwd_limit"] + + ID = 0xcbc6d107 + QUALNAME = "functions.messages.AddChatUser" + + def __init__(self, *, chat_id: int, user_id: "raw.base.InputUser", fwd_limit: int) -> None: + self.chat_id = chat_id # long + self.user_id = user_id # InputUser + self.fwd_limit = fwd_limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AddChatUser": + # No flags + + chat_id = Long.read(b) + + user_id = TLObject.read(b) + + fwd_limit = Int.read(b) + + return AddChatUser(chat_id=chat_id, user_id=user_id, fwd_limit=fwd_limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + b.write(self.user_id.write()) + + b.write(Int(self.fwd_limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/append_todo_list.py b/pyrogram/raw/functions/messages/append_todo_list.py new file mode 100644 index 00000000..74c7a38f --- /dev/null +++ b/pyrogram/raw/functions/messages/append_todo_list.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AppendTodoList(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``21A61057`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + msg_id (``int`` ``32-bit``): + N/A + + list (List of :obj:`TodoItem `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "list"] + + ID = 0x21a61057 + QUALNAME = "functions.messages.AppendTodoList" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, list: List["raw.base.TodoItem"]) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.list = list # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AppendTodoList": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + list = TLObject.read(b) + + return AppendTodoList(peer=peer, msg_id=msg_id, list=list) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Vector(self.list)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/check_chat_invite.py b/pyrogram/raw/functions/messages/check_chat_invite.py new file mode 100644 index 00000000..faf1f485 --- /dev/null +++ b/pyrogram/raw/functions/messages/check_chat_invite.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckChatInvite(TLObject): # type: ignore + """Check the validity of a chat invite link and get basic info about it + + + Details: + - Layer: ``224`` + - ID: ``3EADB1BB`` + + Parameters: + hash (``str``): + Invite hash from chat invite deep link ». + + Returns: + :obj:`ChatInvite ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x3eadb1bb + QUALNAME = "functions.messages.CheckChatInvite" + + def __init__(self, *, hash: str) -> None: + self.hash = hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckChatInvite": + # No flags + + hash = String.read(b) + + return CheckChatInvite(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/check_history_import.py b/pyrogram/raw/functions/messages/check_history_import.py new file mode 100644 index 00000000..82c547df --- /dev/null +++ b/pyrogram/raw/functions/messages/check_history_import.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckHistoryImport(TLObject): # type: ignore + """Obtains information about a chat export file, generated by a foreign chat app, click here for more info about imported chats ». + + + Details: + - Layer: ``224`` + - ID: ``43FE19F3`` + + Parameters: + import_head (``str``): + Beginning of the message file; up to 100 lines. + + Returns: + :obj:`messages.HistoryImportParsed ` + """ + + __slots__: List[str] = ["import_head"] + + ID = 0x43fe19f3 + QUALNAME = "functions.messages.CheckHistoryImport" + + def __init__(self, *, import_head: str) -> None: + self.import_head = import_head # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckHistoryImport": + # No flags + + import_head = String.read(b) + + return CheckHistoryImport(import_head=import_head) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.import_head)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/check_history_import_peer.py b/pyrogram/raw/functions/messages/check_history_import_peer.py new file mode 100644 index 00000000..7bac09ce --- /dev/null +++ b/pyrogram/raw/functions/messages/check_history_import_peer.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckHistoryImportPeer(TLObject): # type: ignore + """Check whether chat history exported from another chat app can be imported into a specific Telegram chat, click here for more info ». + + + Details: + - Layer: ``224`` + - ID: ``5DC60F03`` + + Parameters: + peer (:obj:`InputPeer `): + The chat where we want to import history ». + + Returns: + :obj:`messages.CheckedHistoryImportPeer ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x5dc60f03 + QUALNAME = "functions.messages.CheckHistoryImportPeer" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckHistoryImportPeer": + # No flags + + peer = TLObject.read(b) + + return CheckHistoryImportPeer(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/check_quick_reply_shortcut.py b/pyrogram/raw/functions/messages/check_quick_reply_shortcut.py new file mode 100644 index 00000000..de6e9de7 --- /dev/null +++ b/pyrogram/raw/functions/messages/check_quick_reply_shortcut.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckQuickReplyShortcut(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``F1D0FBD3`` + + Parameters: + shortcut (``str``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["shortcut"] + + ID = 0xf1d0fbd3 + QUALNAME = "functions.messages.CheckQuickReplyShortcut" + + def __init__(self, *, shortcut: str) -> None: + self.shortcut = shortcut # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckQuickReplyShortcut": + # No flags + + shortcut = String.read(b) + + return CheckQuickReplyShortcut(shortcut=shortcut) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.shortcut)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/clear_all_drafts.py b/pyrogram/raw/functions/messages/clear_all_drafts.py new file mode 100644 index 00000000..8e7b874a --- /dev/null +++ b/pyrogram/raw/functions/messages/clear_all_drafts.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClearAllDrafts(TLObject): # type: ignore + """Clear all drafts. + + + Details: + - Layer: ``224`` + - ID: ``7E58EE9C`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x7e58ee9c + QUALNAME = "functions.messages.ClearAllDrafts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClearAllDrafts": + # No flags + + return ClearAllDrafts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/clear_recent_reactions.py b/pyrogram/raw/functions/messages/clear_recent_reactions.py new file mode 100644 index 00000000..030891e8 --- /dev/null +++ b/pyrogram/raw/functions/messages/clear_recent_reactions.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClearRecentReactions(TLObject): # type: ignore + """Clear recently used message reactions + + + Details: + - Layer: ``224`` + - ID: ``9DFEEFB4`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x9dfeefb4 + QUALNAME = "functions.messages.ClearRecentReactions" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClearRecentReactions": + # No flags + + return ClearRecentReactions() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/clear_recent_stickers.py b/pyrogram/raw/functions/messages/clear_recent_stickers.py new file mode 100644 index 00000000..4dd7afe8 --- /dev/null +++ b/pyrogram/raw/functions/messages/clear_recent_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClearRecentStickers(TLObject): # type: ignore + """Clear recent stickers + + + Details: + - Layer: ``224`` + - ID: ``8999602D`` + + Parameters: + attached (``bool``, *optional*): + Set this flag to clear the list of stickers recently attached to photo or video files + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["attached"] + + ID = 0x8999602d + QUALNAME = "functions.messages.ClearRecentStickers" + + def __init__(self, *, attached: Optional[bool] = None) -> None: + self.attached = attached # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClearRecentStickers": + + flags = Int.read(b) + + attached = True if flags & (1 << 0) else False + return ClearRecentStickers(attached=attached) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.attached else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/click_sponsored_message.py b/pyrogram/raw/functions/messages/click_sponsored_message.py new file mode 100644 index 00000000..66b57548 --- /dev/null +++ b/pyrogram/raw/functions/messages/click_sponsored_message.py @@ -0,0 +1,68 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClickSponsoredMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8235057E`` + + Parameters: + random_id (``bytes``): + N/A + + media (``bool``, *optional*): + N/A + + fullscreen (``bool``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["random_id", "media", "fullscreen"] + + ID = 0x8235057e + QUALNAME = "functions.messages.ClickSponsoredMessage" + + def __init__(self, *, random_id: bytes, media: Optional[bool] = None, fullscreen: Optional[bool] = None) -> None: + self.random_id = random_id # bytes + self.media = media # flags.0?true + self.fullscreen = fullscreen # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClickSponsoredMessage": + + flags = Int.read(b) + + media = True if flags & (1 << 0) else False + fullscreen = True if flags & (1 << 1) else False + random_id = Bytes.read(b) + + return ClickSponsoredMessage(random_id=random_id, media=media, fullscreen=fullscreen) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.media else 0 + flags |= (1 << 1) if self.fullscreen else 0 + b.write(Int(flags)) + + b.write(Bytes(self.random_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/craft_star_gift.py b/pyrogram/raw/functions/messages/craft_star_gift.py new file mode 100644 index 00000000..5d4758ac --- /dev/null +++ b/pyrogram/raw/functions/messages/craft_star_gift.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CraftStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B0F9684F`` + + Parameters: + stargift (List of :obj:`InputSavedStarGift `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["stargift"] + + ID = 0xb0f9684f + QUALNAME = "functions.messages.CraftStarGift" + + def __init__(self, *, stargift: List["raw.base.InputSavedStarGift"]) -> None: + self.stargift = stargift # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CraftStarGift": + # No flags + + stargift = TLObject.read(b) + + return CraftStarGift(stargift=stargift) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.stargift)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/create_chat.py b/pyrogram/raw/functions/messages/create_chat.py new file mode 100644 index 00000000..6f6399fa --- /dev/null +++ b/pyrogram/raw/functions/messages/create_chat.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateChat(TLObject): # type: ignore + """Creates a new chat. + + + Details: + - Layer: ``224`` + - ID: ``92CEDDD4`` + + Parameters: + users (List of :obj:`InputUser `): + List of user IDs to be invited + + title (``str``): + Chat name + + ttl_period (``int`` ``32-bit``, *optional*): + Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use messages.setDefaultHistoryTTL to edit this value later. + + Returns: + :obj:`messages.InvitedUsers ` + """ + + __slots__: List[str] = ["users", "title", "ttl_period"] + + ID = 0x92ceddd4 + QUALNAME = "functions.messages.CreateChat" + + def __init__(self, *, users: List["raw.base.InputUser"], title: str, ttl_period: Optional[int] = None) -> None: + self.users = users # Vector + self.title = title # string + self.ttl_period = ttl_period # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateChat": + + flags = Int.read(b) + + users = TLObject.read(b) + + title = String.read(b) + + ttl_period = Int.read(b) if flags & (1 << 0) else None + return CreateChat(users=users, title=title, ttl_period=ttl_period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.ttl_period is not None else 0 + b.write(Int(flags)) + + b.write(Vector(self.users)) + + b.write(String(self.title)) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/create_forum_topic.py b/pyrogram/raw/functions/messages/create_forum_topic.py new file mode 100644 index 00000000..dc88dced --- /dev/null +++ b/pyrogram/raw/functions/messages/create_forum_topic.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateForumTopic(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``2F98C3D5`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + title (``str``): + N/A + + random_id (``int`` ``64-bit``): + N/A + + title_missing (``bool``, *optional*): + N/A + + icon_color (``int`` ``32-bit``, *optional*): + N/A + + icon_emoji_id (``int`` ``64-bit``, *optional*): + N/A + + send_as (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "title", "random_id", "title_missing", "icon_color", "icon_emoji_id", "send_as"] + + ID = 0x2f98c3d5 + QUALNAME = "functions.messages.CreateForumTopic" + + def __init__(self, *, peer: "raw.base.InputPeer", title: str, random_id: int, title_missing: Optional[bool] = None, icon_color: Optional[int] = None, icon_emoji_id: Optional[int] = None, send_as: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.title = title # string + self.random_id = random_id # long + self.title_missing = title_missing # flags.4?true + self.icon_color = icon_color # flags.0?int + self.icon_emoji_id = icon_emoji_id # flags.3?long + self.send_as = send_as # flags.2?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateForumTopic": + + flags = Int.read(b) + + title_missing = True if flags & (1 << 4) else False + peer = TLObject.read(b) + + title = String.read(b) + + icon_color = Int.read(b) if flags & (1 << 0) else None + icon_emoji_id = Long.read(b) if flags & (1 << 3) else None + random_id = Long.read(b) + + send_as = TLObject.read(b) if flags & (1 << 2) else None + + return CreateForumTopic(peer=peer, title=title, random_id=random_id, title_missing=title_missing, icon_color=icon_color, icon_emoji_id=icon_emoji_id, send_as=send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 4) if self.title_missing else 0 + flags |= (1 << 0) if self.icon_color is not None else 0 + flags |= (1 << 3) if self.icon_emoji_id is not None else 0 + flags |= (1 << 2) if self.send_as is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.title)) + + if self.icon_color is not None: + b.write(Int(self.icon_color)) + + if self.icon_emoji_id is not None: + b.write(Long(self.icon_emoji_id)) + + b.write(Long(self.random_id)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_chat.py b/pyrogram/raw/functions/messages/delete_chat.py new file mode 100644 index 00000000..c6d12f95 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_chat.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteChat(TLObject): # type: ignore + """Delete a chat + + + Details: + - Layer: ``224`` + - ID: ``5BD0EE50`` + + Parameters: + chat_id (``int`` ``64-bit``): + Chat ID + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["chat_id"] + + ID = 0x5bd0ee50 + QUALNAME = "functions.messages.DeleteChat" + + def __init__(self, *, chat_id: int) -> None: + self.chat_id = chat_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteChat": + # No flags + + chat_id = Long.read(b) + + return DeleteChat(chat_id=chat_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_chat_user.py b/pyrogram/raw/functions/messages/delete_chat_user.py new file mode 100644 index 00000000..9363d39b --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_chat_user.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteChatUser(TLObject): # type: ignore + """Deletes a user from a chat and sends a service message on it. + + + Details: + - Layer: ``224`` + - ID: ``A2185CAB`` + + Parameters: + chat_id (``int`` ``64-bit``): + Chat ID + + user_id (:obj:`InputUser `): + User ID to be deleted + + revoke_history (``bool``, *optional*): + Remove the entire chat history of the specified user in this chat. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["chat_id", "user_id", "revoke_history"] + + ID = 0xa2185cab + QUALNAME = "functions.messages.DeleteChatUser" + + def __init__(self, *, chat_id: int, user_id: "raw.base.InputUser", revoke_history: Optional[bool] = None) -> None: + self.chat_id = chat_id # long + self.user_id = user_id # InputUser + self.revoke_history = revoke_history # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteChatUser": + + flags = Int.read(b) + + revoke_history = True if flags & (1 << 0) else False + chat_id = Long.read(b) + + user_id = TLObject.read(b) + + return DeleteChatUser(chat_id=chat_id, user_id=user_id, revoke_history=revoke_history) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoke_history else 0 + b.write(Int(flags)) + + b.write(Long(self.chat_id)) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_exported_chat_invite.py b/pyrogram/raw/functions/messages/delete_exported_chat_invite.py new file mode 100644 index 00000000..7affdd9d --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_exported_chat_invite.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteExportedChatInvite(TLObject): # type: ignore + """Delete a chat invite + + + Details: + - Layer: ``224`` + - ID: ``D464A42B`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + link (``str``): + Invite link + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "link"] + + ID = 0xd464a42b + QUALNAME = "functions.messages.DeleteExportedChatInvite" + + def __init__(self, *, peer: "raw.base.InputPeer", link: str) -> None: + self.peer = peer # InputPeer + self.link = link # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteExportedChatInvite": + # No flags + + peer = TLObject.read(b) + + link = String.read(b) + + return DeleteExportedChatInvite(peer=peer, link=link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.link)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_fact_check.py b/pyrogram/raw/functions/messages/delete_fact_check.py new file mode 100644 index 00000000..7fe925a0 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_fact_check.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteFactCheck(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``D1DA940C`` + + Parameters: + peer (:obj:`InputPeer `): + + + msg_id (``int`` ``32-bit``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0xd1da940c + QUALNAME = "functions.messages.DeleteFactCheck" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteFactCheck": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return DeleteFactCheck(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_history.py b/pyrogram/raw/functions/messages/delete_history.py new file mode 100644 index 00000000..096c0f75 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_history.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteHistory(TLObject): # type: ignore + """Deletes communication history. + + + Details: + - Layer: ``224`` + - ID: ``B08F922A`` + + Parameters: + peer (:obj:`InputPeer `): + User or chat, communication history of which will be deleted + + max_id (``int`` ``32-bit``): + Maximum ID of message to delete + + just_clear (``bool``, *optional*): + Just clear history for the current user, without actually removing messages for every chat user + + revoke (``bool``, *optional*): + Whether to delete the message history for all chat participants + + min_date (``int`` ``32-bit``, *optional*): + Delete all messages newer than this UNIX timestamp + + max_date (``int`` ``32-bit``, *optional*): + Delete all messages older than this UNIX timestamp + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["peer", "max_id", "just_clear", "revoke", "min_date", "max_date"] + + ID = 0xb08f922a + QUALNAME = "functions.messages.DeleteHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", max_id: int, just_clear: Optional[bool] = None, revoke: Optional[bool] = None, min_date: Optional[int] = None, max_date: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.max_id = max_id # int + self.just_clear = just_clear # flags.0?true + self.revoke = revoke # flags.1?true + self.min_date = min_date # flags.2?int + self.max_date = max_date # flags.3?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteHistory": + + flags = Int.read(b) + + just_clear = True if flags & (1 << 0) else False + revoke = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + max_id = Int.read(b) + + min_date = Int.read(b) if flags & (1 << 2) else None + max_date = Int.read(b) if flags & (1 << 3) else None + return DeleteHistory(peer=peer, max_id=max_id, just_clear=just_clear, revoke=revoke, min_date=min_date, max_date=max_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.just_clear else 0 + flags |= (1 << 1) if self.revoke else 0 + flags |= (1 << 2) if self.min_date is not None else 0 + flags |= (1 << 3) if self.max_date is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.max_id)) + + if self.min_date is not None: + b.write(Int(self.min_date)) + + if self.max_date is not None: + b.write(Int(self.max_date)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_messages.py b/pyrogram/raw/functions/messages/delete_messages.py new file mode 100644 index 00000000..8856e55b --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteMessages(TLObject): # type: ignore + """Deletes messages by their identifiers. + + + Details: + - Layer: ``224`` + - ID: ``E58E95D2`` + + Parameters: + id (List of ``int`` ``32-bit``): + Message ID list + + revoke (``bool``, *optional*): + Whether to delete messages for all participants of the chat + + Returns: + :obj:`messages.AffectedMessages ` + """ + + __slots__: List[str] = ["id", "revoke"] + + ID = 0xe58e95d2 + QUALNAME = "functions.messages.DeleteMessages" + + def __init__(self, *, id: List[int], revoke: Optional[bool] = None) -> None: + self.id = id # Vector + self.revoke = revoke # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteMessages": + + flags = Int.read(b) + + revoke = True if flags & (1 << 0) else False + id = TLObject.read(b, Int) + + return DeleteMessages(id=id, revoke=revoke) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoke else 0 + b.write(Int(flags)) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_phone_call_history.py b/pyrogram/raw/functions/messages/delete_phone_call_history.py new file mode 100644 index 00000000..2dd5d466 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_phone_call_history.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeletePhoneCallHistory(TLObject): # type: ignore + """Delete the entire phone call history. + + + Details: + - Layer: ``224`` + - ID: ``F9CBE409`` + + Parameters: + revoke (``bool``, *optional*): + Whether to remove phone call history for participants as well + + Returns: + :obj:`messages.AffectedFoundMessages ` + """ + + __slots__: List[str] = ["revoke"] + + ID = 0xf9cbe409 + QUALNAME = "functions.messages.DeletePhoneCallHistory" + + def __init__(self, *, revoke: Optional[bool] = None) -> None: + self.revoke = revoke # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeletePhoneCallHistory": + + flags = Int.read(b) + + revoke = True if flags & (1 << 0) else False + return DeletePhoneCallHistory(revoke=revoke) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoke else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_quick_reply_messages.py b/pyrogram/raw/functions/messages/delete_quick_reply_messages.py new file mode 100644 index 00000000..b5392fb1 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_quick_reply_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteQuickReplyMessages(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``E105E910`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + id (List of ``int`` ``32-bit``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["shortcut_id", "id"] + + ID = 0xe105e910 + QUALNAME = "functions.messages.DeleteQuickReplyMessages" + + def __init__(self, *, shortcut_id: int, id: List[int]) -> None: + self.shortcut_id = shortcut_id # int + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteQuickReplyMessages": + # No flags + + shortcut_id = Int.read(b) + + id = TLObject.read(b, Int) + + return DeleteQuickReplyMessages(shortcut_id=shortcut_id, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.shortcut_id)) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_quick_reply_shortcut.py b/pyrogram/raw/functions/messages/delete_quick_reply_shortcut.py new file mode 100644 index 00000000..200dc4e7 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_quick_reply_shortcut.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteQuickReplyShortcut(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``3CC04740`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["shortcut_id"] + + ID = 0x3cc04740 + QUALNAME = "functions.messages.DeleteQuickReplyShortcut" + + def __init__(self, *, shortcut_id: int) -> None: + self.shortcut_id = shortcut_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteQuickReplyShortcut": + # No flags + + shortcut_id = Int.read(b) + + return DeleteQuickReplyShortcut(shortcut_id=shortcut_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.shortcut_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_revoked_exported_chat_invites.py b/pyrogram/raw/functions/messages/delete_revoked_exported_chat_invites.py new file mode 100644 index 00000000..b8f2f14b --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_revoked_exported_chat_invites.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteRevokedExportedChatInvites(TLObject): # type: ignore + """Delete all revoked chat invites + + + Details: + - Layer: ``224`` + - ID: ``56987BD5`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + admin_id (:obj:`InputUser `): + ID of the admin that originally generated the revoked chat invites + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "admin_id"] + + ID = 0x56987bd5 + QUALNAME = "functions.messages.DeleteRevokedExportedChatInvites" + + def __init__(self, *, peer: "raw.base.InputPeer", admin_id: "raw.base.InputUser") -> None: + self.peer = peer # InputPeer + self.admin_id = admin_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteRevokedExportedChatInvites": + # No flags + + peer = TLObject.read(b) + + admin_id = TLObject.read(b) + + return DeleteRevokedExportedChatInvites(peer=peer, admin_id=admin_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.admin_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_saved_history.py b/pyrogram/raw/functions/messages/delete_saved_history.py new file mode 100644 index 00000000..710db13e --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_saved_history.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteSavedHistory(TLObject): # type: ignore + """Deletes messages forwarded from a specific peer to saved messages ». + + + Details: + - Layer: ``224`` + - ID: ``4DC5085F`` + + Parameters: + peer (:obj:`InputPeer `): + Peer, whose messages will be deleted from saved messages » + + max_id (``int`` ``32-bit``): + Maximum ID of message to delete + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + min_date (``int`` ``32-bit``, *optional*): + Delete all messages newer than this UNIX timestamp + + max_date (``int`` ``32-bit``, *optional*): + Delete all messages older than this UNIX timestamp + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["peer", "max_id", "parent_peer", "min_date", "max_date"] + + ID = 0x4dc5085f + QUALNAME = "functions.messages.DeleteSavedHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", max_id: int, parent_peer: "raw.base.InputPeer" = None, min_date: Optional[int] = None, max_date: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.max_id = max_id # int + self.parent_peer = parent_peer # flags.0?InputPeer + self.min_date = min_date # flags.2?int + self.max_date = max_date # flags.3?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteSavedHistory": + + flags = Int.read(b) + + parent_peer = TLObject.read(b) if flags & (1 << 0) else None + + peer = TLObject.read(b) + + max_id = Int.read(b) + + min_date = Int.read(b) if flags & (1 << 2) else None + max_date = Int.read(b) if flags & (1 << 3) else None + return DeleteSavedHistory(peer=peer, max_id=max_id, parent_peer=parent_peer, min_date=min_date, max_date=max_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.parent_peer is not None else 0 + flags |= (1 << 2) if self.min_date is not None else 0 + flags |= (1 << 3) if self.max_date is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(self.peer.write()) + + b.write(Int(self.max_id)) + + if self.min_date is not None: + b.write(Int(self.min_date)) + + if self.max_date is not None: + b.write(Int(self.max_date)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_scheduled_messages.py b/pyrogram/raw/functions/messages/delete_scheduled_messages.py new file mode 100644 index 00000000..48bcc2dd --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_scheduled_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteScheduledMessages(TLObject): # type: ignore + """Delete scheduled messages + + + Details: + - Layer: ``224`` + - ID: ``59AE2B16`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (List of ``int`` ``32-bit``): + Scheduled message IDs + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x59ae2b16 + QUALNAME = "functions.messages.DeleteScheduledMessages" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteScheduledMessages": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return DeleteScheduledMessages(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/delete_topic_history.py b/pyrogram/raw/functions/messages/delete_topic_history.py new file mode 100644 index 00000000..9ac140d2 --- /dev/null +++ b/pyrogram/raw/functions/messages/delete_topic_history.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteTopicHistory(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D2816F10`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + top_msg_id (``int`` ``32-bit``): + N/A + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["peer", "top_msg_id"] + + ID = 0xd2816f10 + QUALNAME = "functions.messages.DeleteTopicHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", top_msg_id: int) -> None: + self.peer = peer # InputPeer + self.top_msg_id = top_msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteTopicHistory": + # No flags + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) + + return DeleteTopicHistory(peer=peer, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.top_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/discard_encryption.py b/pyrogram/raw/functions/messages/discard_encryption.py new file mode 100644 index 00000000..a18d1fb2 --- /dev/null +++ b/pyrogram/raw/functions/messages/discard_encryption.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DiscardEncryption(TLObject): # type: ignore + """Cancels a request for creation and/or delete info on secret chat. + + + Details: + - Layer: ``224`` + - ID: ``F393AEA0`` + + Parameters: + chat_id (``int`` ``32-bit``): + Secret chat ID + + delete_history (``bool``, *optional*): + Whether to delete the entire chat history for the other user as well + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["chat_id", "delete_history"] + + ID = 0xf393aea0 + QUALNAME = "functions.messages.DiscardEncryption" + + def __init__(self, *, chat_id: int, delete_history: Optional[bool] = None) -> None: + self.chat_id = chat_id # int + self.delete_history = delete_history # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DiscardEncryption": + + flags = Int.read(b) + + delete_history = True if flags & (1 << 0) else False + chat_id = Int.read(b) + + return DiscardEncryption(chat_id=chat_id, delete_history=delete_history) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.delete_history else 0 + b.write(Int(flags)) + + b.write(Int(self.chat_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_chat_about.py b/pyrogram/raw/functions/messages/edit_chat_about.py new file mode 100644 index 00000000..e63bc87e --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_chat_about.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditChatAbout(TLObject): # type: ignore + """Edit the description of a group/supergroup/channel. + + + Details: + - Layer: ``224`` + - ID: ``DEF60797`` + + Parameters: + peer (:obj:`InputPeer `): + The group/supergroup/channel. + + about (``str``): + The new description + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "about"] + + ID = 0xdef60797 + QUALNAME = "functions.messages.EditChatAbout" + + def __init__(self, *, peer: "raw.base.InputPeer", about: str) -> None: + self.peer = peer # InputPeer + self.about = about # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditChatAbout": + # No flags + + peer = TLObject.read(b) + + about = String.read(b) + + return EditChatAbout(peer=peer, about=about) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.about)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_chat_admin.py b/pyrogram/raw/functions/messages/edit_chat_admin.py new file mode 100644 index 00000000..14b1fcc3 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_chat_admin.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditChatAdmin(TLObject): # type: ignore + """Make a user admin in a basic group. + + + Details: + - Layer: ``224`` + - ID: ``A85BD1C2`` + + Parameters: + chat_id (``int`` ``64-bit``): + The ID of the group + + user_id (:obj:`InputUser `): + The user to make admin + + is_admin (``bool``): + Whether to make them admin + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["chat_id", "user_id", "is_admin"] + + ID = 0xa85bd1c2 + QUALNAME = "functions.messages.EditChatAdmin" + + def __init__(self, *, chat_id: int, user_id: "raw.base.InputUser", is_admin: bool) -> None: + self.chat_id = chat_id # long + self.user_id = user_id # InputUser + self.is_admin = is_admin # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditChatAdmin": + # No flags + + chat_id = Long.read(b) + + user_id = TLObject.read(b) + + is_admin = Bool.read(b) + + return EditChatAdmin(chat_id=chat_id, user_id=user_id, is_admin=is_admin) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + b.write(self.user_id.write()) + + b.write(Bool(self.is_admin)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_chat_default_banned_rights.py b/pyrogram/raw/functions/messages/edit_chat_default_banned_rights.py new file mode 100644 index 00000000..d3e4d8d3 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_chat_default_banned_rights.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditChatDefaultBannedRights(TLObject): # type: ignore + """Edit the default banned rights of a channel/supergroup/group. + + + Details: + - Layer: ``224`` + - ID: ``A5866B41`` + + Parameters: + peer (:obj:`InputPeer `): + The peer + + banned_rights (:obj:`ChatBannedRights `): + The new global rights + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "banned_rights"] + + ID = 0xa5866b41 + QUALNAME = "functions.messages.EditChatDefaultBannedRights" + + def __init__(self, *, peer: "raw.base.InputPeer", banned_rights: "raw.base.ChatBannedRights") -> None: + self.peer = peer # InputPeer + self.banned_rights = banned_rights # ChatBannedRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditChatDefaultBannedRights": + # No flags + + peer = TLObject.read(b) + + banned_rights = TLObject.read(b) + + return EditChatDefaultBannedRights(peer=peer, banned_rights=banned_rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.banned_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_chat_photo.py b/pyrogram/raw/functions/messages/edit_chat_photo.py new file mode 100644 index 00000000..c9fe1ba1 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_chat_photo.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditChatPhoto(TLObject): # type: ignore + """Changes chat photo and sends a service message on it + + + Details: + - Layer: ``224`` + - ID: ``35DDD674`` + + Parameters: + chat_id (``int`` ``64-bit``): + Chat ID + + photo (:obj:`InputChatPhoto `): + Photo to be set + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["chat_id", "photo"] + + ID = 0x35ddd674 + QUALNAME = "functions.messages.EditChatPhoto" + + def __init__(self, *, chat_id: int, photo: "raw.base.InputChatPhoto") -> None: + self.chat_id = chat_id # long + self.photo = photo # InputChatPhoto + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditChatPhoto": + # No flags + + chat_id = Long.read(b) + + photo = TLObject.read(b) + + return EditChatPhoto(chat_id=chat_id, photo=photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + b.write(self.photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_chat_title.py b/pyrogram/raw/functions/messages/edit_chat_title.py new file mode 100644 index 00000000..dcbfec80 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_chat_title.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditChatTitle(TLObject): # type: ignore + """Changes chat name and sends a service message on it. + + + Details: + - Layer: ``224`` + - ID: ``73783FFD`` + + Parameters: + chat_id (``int`` ``64-bit``): + Chat ID + + title (``str``): + New chat name, different from the old one + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["chat_id", "title"] + + ID = 0x73783ffd + QUALNAME = "functions.messages.EditChatTitle" + + def __init__(self, *, chat_id: int, title: str) -> None: + self.chat_id = chat_id # long + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditChatTitle": + # No flags + + chat_id = Long.read(b) + + title = String.read(b) + + return EditChatTitle(chat_id=chat_id, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_exported_chat_invite.py b/pyrogram/raw/functions/messages/edit_exported_chat_invite.py new file mode 100644 index 00000000..fb54da21 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_exported_chat_invite.py @@ -0,0 +1,107 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditExportedChatInvite(TLObject): # type: ignore + """Edit an exported chat invite + + + Details: + - Layer: ``224`` + - ID: ``BDCA2F75`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + link (``str``): + Invite link + + revoked (``bool``, *optional*): + Whether to revoke the chat invite + + expire_date (``int`` ``32-bit``, *optional*): + New expiration date + + usage_limit (``int`` ``32-bit``, *optional*): + Maximum number of users that can join using this link + + request_needed (``bool``, *optional*): + Whether admin confirmation is required before admitting each separate user into the chat + + title (``str``, *optional*): + Description of the invite link, visible only to administrators + + Returns: + :obj:`messages.ExportedChatInvite ` + """ + + __slots__: List[str] = ["peer", "link", "revoked", "expire_date", "usage_limit", "request_needed", "title"] + + ID = 0xbdca2f75 + QUALNAME = "functions.messages.EditExportedChatInvite" + + def __init__(self, *, peer: "raw.base.InputPeer", link: str, revoked: Optional[bool] = None, expire_date: Optional[int] = None, usage_limit: Optional[int] = None, request_needed: Optional[bool] = None, title: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.link = link # string + self.revoked = revoked # flags.2?true + self.expire_date = expire_date # flags.0?int + self.usage_limit = usage_limit # flags.1?int + self.request_needed = request_needed # flags.3?Bool + self.title = title # flags.4?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditExportedChatInvite": + + flags = Int.read(b) + + revoked = True if flags & (1 << 2) else False + peer = TLObject.read(b) + + link = String.read(b) + + expire_date = Int.read(b) if flags & (1 << 0) else None + usage_limit = Int.read(b) if flags & (1 << 1) else None + request_needed = Bool.read(b) if flags & (1 << 3) else None + title = String.read(b) if flags & (1 << 4) else None + return EditExportedChatInvite(peer=peer, link=link, revoked=revoked, expire_date=expire_date, usage_limit=usage_limit, request_needed=request_needed, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.revoked else 0 + flags |= (1 << 0) if self.expire_date is not None else 0 + flags |= (1 << 1) if self.usage_limit is not None else 0 + flags |= (1 << 3) if self.request_needed is not None else 0 + flags |= (1 << 4) if self.title is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.link)) + + if self.expire_date is not None: + b.write(Int(self.expire_date)) + + if self.usage_limit is not None: + b.write(Int(self.usage_limit)) + + if self.request_needed is not None: + b.write(Bool(self.request_needed)) + + if self.title is not None: + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_fact_check.py b/pyrogram/raw/functions/messages/edit_fact_check.py new file mode 100644 index 00000000..cbb312ef --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_fact_check.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditFactCheck(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``589EE75`` + + Parameters: + peer (:obj:`InputPeer `): + + + msg_id (``int`` ``32-bit``): + + + text (:obj:`TextWithEntities `): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "text"] + + ID = 0x589ee75 + QUALNAME = "functions.messages.EditFactCheck" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, text: "raw.base.TextWithEntities") -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.text = text # TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditFactCheck": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + text = TLObject.read(b) + + return EditFactCheck(peer=peer, msg_id=msg_id, text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(self.text.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_forum_topic.py b/pyrogram/raw/functions/messages/edit_forum_topic.py new file mode 100644 index 00000000..adc2ed35 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_forum_topic.py @@ -0,0 +1,100 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditForumTopic(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``CECC1134`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + topic_id (``int`` ``32-bit``): + N/A + + title (``str``, *optional*): + N/A + + icon_emoji_id (``int`` ``64-bit``, *optional*): + N/A + + closed (``bool``, *optional*): + N/A + + hidden (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "topic_id", "title", "icon_emoji_id", "closed", "hidden"] + + ID = 0xcecc1134 + QUALNAME = "functions.messages.EditForumTopic" + + def __init__(self, *, peer: "raw.base.InputPeer", topic_id: int, title: Optional[str] = None, icon_emoji_id: Optional[int] = None, closed: Optional[bool] = None, hidden: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.topic_id = topic_id # int + self.title = title # flags.0?string + self.icon_emoji_id = icon_emoji_id # flags.1?long + self.closed = closed # flags.2?Bool + self.hidden = hidden # flags.3?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditForumTopic": + + flags = Int.read(b) + + peer = TLObject.read(b) + + topic_id = Int.read(b) + + title = String.read(b) if flags & (1 << 0) else None + icon_emoji_id = Long.read(b) if flags & (1 << 1) else None + closed = Bool.read(b) if flags & (1 << 2) else None + hidden = Bool.read(b) if flags & (1 << 3) else None + return EditForumTopic(peer=peer, topic_id=topic_id, title=title, icon_emoji_id=icon_emoji_id, closed=closed, hidden=hidden) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.title is not None else 0 + flags |= (1 << 1) if self.icon_emoji_id is not None else 0 + flags |= (1 << 2) if self.closed is not None else 0 + flags |= (1 << 3) if self.hidden is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.topic_id)) + + if self.title is not None: + b.write(String(self.title)) + + if self.icon_emoji_id is not None: + b.write(Long(self.icon_emoji_id)) + + if self.closed is not None: + b.write(Bool(self.closed)) + + if self.hidden is not None: + b.write(Bool(self.hidden)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_inline_bot_message.py b/pyrogram/raw/functions/messages/edit_inline_bot_message.py new file mode 100644 index 00000000..5557e448 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_inline_bot_message.py @@ -0,0 +1,108 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditInlineBotMessage(TLObject): # type: ignore + """Edit an inline bot message + + + Details: + - Layer: ``224`` + - ID: ``83557DBA`` + + Parameters: + id (:obj:`InputBotInlineMessageID `): + Sent inline message ID + + no_webpage (``bool``, *optional*): + Disable webpage preview + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + message (``str``, *optional*): + Message + + media (:obj:`InputMedia `, *optional*): + Media + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup for inline keyboards + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "no_webpage", "invert_media", "message", "media", "reply_markup", "entities"] + + ID = 0x83557dba + QUALNAME = "functions.messages.EditInlineBotMessage" + + def __init__(self, *, id: "raw.base.InputBotInlineMessageID", no_webpage: Optional[bool] = None, invert_media: Optional[bool] = None, message: Optional[str] = None, media: "raw.base.InputMedia" = None, reply_markup: "raw.base.ReplyMarkup" = None, entities: Optional[List["raw.base.MessageEntity"]] = None) -> None: + self.id = id # InputBotInlineMessageID + self.no_webpage = no_webpage # flags.1?true + self.invert_media = invert_media # flags.16?true + self.message = message # flags.11?string + self.media = media # flags.14?InputMedia + self.reply_markup = reply_markup # flags.2?ReplyMarkup + self.entities = entities # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditInlineBotMessage": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 1) else False + invert_media = True if flags & (1 << 16) else False + id = TLObject.read(b) + + message = String.read(b) if flags & (1 << 11) else None + media = TLObject.read(b) if flags & (1 << 14) else None + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + return EditInlineBotMessage(id=id, no_webpage=no_webpage, invert_media=invert_media, message=message, media=media, reply_markup=reply_markup, entities=entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.no_webpage else 0 + flags |= (1 << 16) if self.invert_media else 0 + flags |= (1 << 11) if self.message is not None else 0 + flags |= (1 << 14) if self.media is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + flags |= (1 << 3) if self.entities else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + if self.message is not None: + b.write(String(self.message)) + + if self.media is not None: + b.write(self.media.write()) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + if self.entities is not None: + b.write(Vector(self.entities)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_message.py b/pyrogram/raw/functions/messages/edit_message.py new file mode 100644 index 00000000..0d876b5a --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_message.py @@ -0,0 +1,143 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditMessage(TLObject): # type: ignore + """Edit message + + + Details: + - Layer: ``224`` + - ID: ``51E842E1`` + + Parameters: + peer (:obj:`InputPeer `): + Where was the message sent + + id (``int`` ``32-bit``): + ID of the message to edit + + no_webpage (``bool``, *optional*): + Disable webpage preview + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + message (``str``, *optional*): + New message + + media (:obj:`InputMedia `, *optional*): + New attached media + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup for inline keyboards + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + schedule_date (``int`` ``32-bit``, *optional*): + Scheduled message date for scheduled messages + + schedule_repeat_period (``int`` ``32-bit``, *optional*): + N/A + + quick_reply_shortcut_id (``int`` ``32-bit``, *optional*): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id", "no_webpage", "invert_media", "message", "media", "reply_markup", "entities", "schedule_date", "schedule_repeat_period", "quick_reply_shortcut_id"] + + ID = 0x51e842e1 + QUALNAME = "functions.messages.EditMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, no_webpage: Optional[bool] = None, invert_media: Optional[bool] = None, message: Optional[str] = None, media: "raw.base.InputMedia" = None, reply_markup: "raw.base.ReplyMarkup" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, schedule_date: Optional[int] = None, schedule_repeat_period: Optional[int] = None, quick_reply_shortcut_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.no_webpage = no_webpage # flags.1?true + self.invert_media = invert_media # flags.16?true + self.message = message # flags.11?string + self.media = media # flags.14?InputMedia + self.reply_markup = reply_markup # flags.2?ReplyMarkup + self.entities = entities # flags.3?Vector + self.schedule_date = schedule_date # flags.15?int + self.schedule_repeat_period = schedule_repeat_period # flags.18?int + self.quick_reply_shortcut_id = quick_reply_shortcut_id # flags.17?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditMessage": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 1) else False + invert_media = True if flags & (1 << 16) else False + peer = TLObject.read(b) + + id = Int.read(b) + + message = String.read(b) if flags & (1 << 11) else None + media = TLObject.read(b) if flags & (1 << 14) else None + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + schedule_date = Int.read(b) if flags & (1 << 15) else None + schedule_repeat_period = Int.read(b) if flags & (1 << 18) else None + quick_reply_shortcut_id = Int.read(b) if flags & (1 << 17) else None + return EditMessage(peer=peer, id=id, no_webpage=no_webpage, invert_media=invert_media, message=message, media=media, reply_markup=reply_markup, entities=entities, schedule_date=schedule_date, schedule_repeat_period=schedule_repeat_period, quick_reply_shortcut_id=quick_reply_shortcut_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.no_webpage else 0 + flags |= (1 << 16) if self.invert_media else 0 + flags |= (1 << 11) if self.message is not None else 0 + flags |= (1 << 14) if self.media is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + flags |= (1 << 3) if self.entities else 0 + flags |= (1 << 15) if self.schedule_date is not None else 0 + flags |= (1 << 18) if self.schedule_repeat_period is not None else 0 + flags |= (1 << 17) if self.quick_reply_shortcut_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.message is not None: + b.write(String(self.message)) + + if self.media is not None: + b.write(self.media.write()) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.schedule_repeat_period is not None: + b.write(Int(self.schedule_repeat_period)) + + if self.quick_reply_shortcut_id is not None: + b.write(Int(self.quick_reply_shortcut_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/edit_quick_reply_shortcut.py b/pyrogram/raw/functions/messages/edit_quick_reply_shortcut.py new file mode 100644 index 00000000..61004712 --- /dev/null +++ b/pyrogram/raw/functions/messages/edit_quick_reply_shortcut.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditQuickReplyShortcut(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``5C003CEF`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + shortcut (``str``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["shortcut_id", "shortcut"] + + ID = 0x5c003cef + QUALNAME = "functions.messages.EditQuickReplyShortcut" + + def __init__(self, *, shortcut_id: int, shortcut: str) -> None: + self.shortcut_id = shortcut_id # int + self.shortcut = shortcut # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditQuickReplyShortcut": + # No flags + + shortcut_id = Int.read(b) + + shortcut = String.read(b) + + return EditQuickReplyShortcut(shortcut_id=shortcut_id, shortcut=shortcut) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.shortcut_id)) + + b.write(String(self.shortcut)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/export_chat_invite.py b/pyrogram/raw/functions/messages/export_chat_invite.py new file mode 100644 index 00000000..dd6ffd57 --- /dev/null +++ b/pyrogram/raw/functions/messages/export_chat_invite.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportChatInvite(TLObject): # type: ignore + """Export an invite link for a chat + + + Details: + - Layer: ``224`` + - ID: ``A455DE90`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + legacy_revoke_permanent (``bool``, *optional*): + Legacy flag, reproducing legacy behavior of this method: if set, revokes all previous links before creating a new one. Kept for bot API BC, should not be used by modern clients. + + request_needed (``bool``, *optional*): + Whether admin confirmation is required before admitting each separate user into the chat + + expire_date (``int`` ``32-bit``, *optional*): + Expiration date + + usage_limit (``int`` ``32-bit``, *optional*): + Maximum number of users that can join using this link + + title (``str``, *optional*): + Description of the invite link, visible only to administrators + + subscription_pricing (:obj:`StarsSubscriptionPricing `, *optional*): + N/A + + Returns: + :obj:`ExportedChatInvite ` + """ + + __slots__: List[str] = ["peer", "legacy_revoke_permanent", "request_needed", "expire_date", "usage_limit", "title", "subscription_pricing"] + + ID = 0xa455de90 + QUALNAME = "functions.messages.ExportChatInvite" + + def __init__(self, *, peer: "raw.base.InputPeer", legacy_revoke_permanent: Optional[bool] = None, request_needed: Optional[bool] = None, expire_date: Optional[int] = None, usage_limit: Optional[int] = None, title: Optional[str] = None, subscription_pricing: "raw.base.StarsSubscriptionPricing" = None) -> None: + self.peer = peer # InputPeer + self.legacy_revoke_permanent = legacy_revoke_permanent # flags.2?true + self.request_needed = request_needed # flags.3?true + self.expire_date = expire_date # flags.0?int + self.usage_limit = usage_limit # flags.1?int + self.title = title # flags.4?string + self.subscription_pricing = subscription_pricing # flags.5?StarsSubscriptionPricing + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportChatInvite": + + flags = Int.read(b) + + legacy_revoke_permanent = True if flags & (1 << 2) else False + request_needed = True if flags & (1 << 3) else False + peer = TLObject.read(b) + + expire_date = Int.read(b) if flags & (1 << 0) else None + usage_limit = Int.read(b) if flags & (1 << 1) else None + title = String.read(b) if flags & (1 << 4) else None + subscription_pricing = TLObject.read(b) if flags & (1 << 5) else None + + return ExportChatInvite(peer=peer, legacy_revoke_permanent=legacy_revoke_permanent, request_needed=request_needed, expire_date=expire_date, usage_limit=usage_limit, title=title, subscription_pricing=subscription_pricing) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.legacy_revoke_permanent else 0 + flags |= (1 << 3) if self.request_needed else 0 + flags |= (1 << 0) if self.expire_date is not None else 0 + flags |= (1 << 1) if self.usage_limit is not None else 0 + flags |= (1 << 4) if self.title is not None else 0 + flags |= (1 << 5) if self.subscription_pricing is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.expire_date is not None: + b.write(Int(self.expire_date)) + + if self.usage_limit is not None: + b.write(Int(self.usage_limit)) + + if self.title is not None: + b.write(String(self.title)) + + if self.subscription_pricing is not None: + b.write(self.subscription_pricing.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/fave_sticker.py b/pyrogram/raw/functions/messages/fave_sticker.py new file mode 100644 index 00000000..575926bc --- /dev/null +++ b/pyrogram/raw/functions/messages/fave_sticker.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FaveSticker(TLObject): # type: ignore + """Mark or unmark a sticker as favorite + + + Details: + - Layer: ``224`` + - ID: ``B9FFC55B`` + + Parameters: + id (:obj:`InputDocument `): + Sticker in question + + unfave (``bool``): + Whether to add or remove a sticker from favorites + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "unfave"] + + ID = 0xb9ffc55b + QUALNAME = "functions.messages.FaveSticker" + + def __init__(self, *, id: "raw.base.InputDocument", unfave: bool) -> None: + self.id = id # InputDocument + self.unfave = unfave # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FaveSticker": + # No flags + + id = TLObject.read(b) + + unfave = Bool.read(b) + + return FaveSticker(id=id, unfave=unfave) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(Bool(self.unfave)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/forward_message.py b/pyrogram/raw/functions/messages/forward_message.py new file mode 100644 index 00000000..71cb59c9 --- /dev/null +++ b/pyrogram/raw/functions/messages/forward_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ForwardMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``33963BF9`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + id (``int`` ``32-bit``): + N/A + + random_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id", "random_id"] + + ID = 0x33963bf9 + QUALNAME = "functions.messages.ForwardMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, random_id: int) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.random_id = random_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ForwardMessage": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + random_id = Long.read(b) + + return ForwardMessage(peer=peer, id=id, random_id=random_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + b.write(Long(self.random_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/forward_messages.py b/pyrogram/raw/functions/messages/forward_messages.py new file mode 100644 index 00000000..1d72b766 --- /dev/null +++ b/pyrogram/raw/functions/messages/forward_messages.py @@ -0,0 +1,217 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ForwardMessages(TLObject): # type: ignore + """Forwards messages by their IDs. + + + Details: + - Layer: ``224`` + - ID: ``13704A7C`` + + Parameters: + from_peer (:obj:`InputPeer `): + Source of messages + + id (List of ``int`` ``32-bit``): + IDs of messages + + random_id (List of ``int`` ``64-bit``): + Random ID to prevent resending of messages + + to_peer (:obj:`InputPeer `): + Destination peer + + silent (``bool``, *optional*): + Whether to send messages silently (no notification will be triggered on the destination clients) + + background (``bool``, *optional*): + Whether to send the message in background + + with_my_score (``bool``, *optional*): + When forwarding games, whether to include your score in the game + + drop_author (``bool``, *optional*): + Whether to forward messages without quoting the original author + + drop_media_captions (``bool``, *optional*): + Whether to strip captions from media + + noforwards (``bool``, *optional*): + Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled + + allow_paid_floodskip (``bool``, *optional*): + N/A + + top_msg_id (``int`` ``32-bit``, *optional*): + Destination forum topic + + reply_to (:obj:`InputReplyTo `, *optional*): + N/A + + schedule_date (``int`` ``32-bit``, *optional*): + Scheduled message date for scheduled messages + + schedule_repeat_period (``int`` ``32-bit``, *optional*): + N/A + + send_as (:obj:`InputPeer `, *optional*): + Forward the messages as the specified peer + + quick_reply_shortcut (:obj:`InputQuickReplyShortcut `, *optional*): + + + effect (``int`` ``64-bit``, *optional*): + N/A + + video_timestamp (``int`` ``32-bit``, *optional*): + N/A + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + suggested_post (:obj:`SuggestedPost `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["from_peer", "id", "random_id", "to_peer", "silent", "background", "with_my_score", "drop_author", "drop_media_captions", "noforwards", "allow_paid_floodskip", "top_msg_id", "reply_to", "schedule_date", "schedule_repeat_period", "send_as", "quick_reply_shortcut", "effect", "video_timestamp", "allow_paid_stars", "suggested_post"] + + ID = 0x13704a7c + QUALNAME = "functions.messages.ForwardMessages" + + def __init__(self, *, from_peer: "raw.base.InputPeer", id: List[int], random_id: List[int], to_peer: "raw.base.InputPeer", silent: Optional[bool] = None, background: Optional[bool] = None, with_my_score: Optional[bool] = None, drop_author: Optional[bool] = None, drop_media_captions: Optional[bool] = None, noforwards: Optional[bool] = None, allow_paid_floodskip: Optional[bool] = None, top_msg_id: Optional[int] = None, reply_to: "raw.base.InputReplyTo" = None, schedule_date: Optional[int] = None, schedule_repeat_period: Optional[int] = None, send_as: "raw.base.InputPeer" = None, quick_reply_shortcut: "raw.base.InputQuickReplyShortcut" = None, effect: Optional[int] = None, video_timestamp: Optional[int] = None, allow_paid_stars: Optional[int] = None, suggested_post: "raw.base.SuggestedPost" = None) -> None: + self.from_peer = from_peer # InputPeer + self.id = id # Vector + self.random_id = random_id # Vector + self.to_peer = to_peer # InputPeer + self.silent = silent # flags.5?true + self.background = background # flags.6?true + self.with_my_score = with_my_score # flags.8?true + self.drop_author = drop_author # flags.11?true + self.drop_media_captions = drop_media_captions # flags.12?true + self.noforwards = noforwards # flags.14?true + self.allow_paid_floodskip = allow_paid_floodskip # flags.19?true + self.top_msg_id = top_msg_id # flags.9?int + self.reply_to = reply_to # flags.22?InputReplyTo + self.schedule_date = schedule_date # flags.10?int + self.schedule_repeat_period = schedule_repeat_period # flags.24?int + self.send_as = send_as # flags.13?InputPeer + self.quick_reply_shortcut = quick_reply_shortcut # flags.17?InputQuickReplyShortcut + self.effect = effect # flags.18?long + self.video_timestamp = video_timestamp # flags.20?int + self.allow_paid_stars = allow_paid_stars # flags.21?long + self.suggested_post = suggested_post # flags.23?SuggestedPost + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ForwardMessages": + + flags = Int.read(b) + + silent = True if flags & (1 << 5) else False + background = True if flags & (1 << 6) else False + with_my_score = True if flags & (1 << 8) else False + drop_author = True if flags & (1 << 11) else False + drop_media_captions = True if flags & (1 << 12) else False + noforwards = True if flags & (1 << 14) else False + allow_paid_floodskip = True if flags & (1 << 19) else False + from_peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + random_id = TLObject.read(b, Long) + + to_peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 9) else None + reply_to = TLObject.read(b) if flags & (1 << 22) else None + + schedule_date = Int.read(b) if flags & (1 << 10) else None + schedule_repeat_period = Int.read(b) if flags & (1 << 24) else None + send_as = TLObject.read(b) if flags & (1 << 13) else None + + quick_reply_shortcut = TLObject.read(b) if flags & (1 << 17) else None + + effect = Long.read(b) if flags & (1 << 18) else None + video_timestamp = Int.read(b) if flags & (1 << 20) else None + allow_paid_stars = Long.read(b) if flags & (1 << 21) else None + suggested_post = TLObject.read(b) if flags & (1 << 23) else None + + return ForwardMessages(from_peer=from_peer, id=id, random_id=random_id, to_peer=to_peer, silent=silent, background=background, with_my_score=with_my_score, drop_author=drop_author, drop_media_captions=drop_media_captions, noforwards=noforwards, allow_paid_floodskip=allow_paid_floodskip, top_msg_id=top_msg_id, reply_to=reply_to, schedule_date=schedule_date, schedule_repeat_period=schedule_repeat_period, send_as=send_as, quick_reply_shortcut=quick_reply_shortcut, effect=effect, video_timestamp=video_timestamp, allow_paid_stars=allow_paid_stars, suggested_post=suggested_post) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 6) if self.background else 0 + flags |= (1 << 8) if self.with_my_score else 0 + flags |= (1 << 11) if self.drop_author else 0 + flags |= (1 << 12) if self.drop_media_captions else 0 + flags |= (1 << 14) if self.noforwards else 0 + flags |= (1 << 19) if self.allow_paid_floodskip else 0 + flags |= (1 << 9) if self.top_msg_id is not None else 0 + flags |= (1 << 22) if self.reply_to is not None else 0 + flags |= (1 << 10) if self.schedule_date is not None else 0 + flags |= (1 << 24) if self.schedule_repeat_period is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + flags |= (1 << 17) if self.quick_reply_shortcut is not None else 0 + flags |= (1 << 18) if self.effect is not None else 0 + flags |= (1 << 20) if self.video_timestamp is not None else 0 + flags |= (1 << 21) if self.allow_paid_stars is not None else 0 + flags |= (1 << 23) if self.suggested_post is not None else 0 + b.write(Int(flags)) + + b.write(self.from_peer.write()) + + b.write(Vector(self.id, Int)) + + b.write(Vector(self.random_id, Long)) + + b.write(self.to_peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.schedule_repeat_period is not None: + b.write(Int(self.schedule_repeat_period)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + if self.quick_reply_shortcut is not None: + b.write(self.quick_reply_shortcut.write()) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.video_timestamp is not None: + b.write(Int(self.video_timestamp)) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + if self.suggested_post is not None: + b.write(self.suggested_post.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_admins_with_invites.py b/pyrogram/raw/functions/messages/get_admins_with_invites.py new file mode 100644 index 00000000..10d68901 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_admins_with_invites.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAdminsWithInvites(TLObject): # type: ignore + """Get info about chat invites generated by admins. + + + Details: + - Layer: ``224`` + - ID: ``3920E6EF`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + Returns: + :obj:`messages.ChatAdminsWithInvites ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x3920e6ef + QUALNAME = "functions.messages.GetAdminsWithInvites" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAdminsWithInvites": + # No flags + + peer = TLObject.read(b) + + return GetAdminsWithInvites(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_all_chats.py b/pyrogram/raw/functions/messages/get_all_chats.py new file mode 100644 index 00000000..56ea7176 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_all_chats.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAllChats(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``875F74BE`` + + Parameters: + except_ids (List of ``int`` ``64-bit``): + N/A + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["except_ids"] + + ID = 0x875f74be + QUALNAME = "functions.messages.GetAllChats" + + def __init__(self, *, except_ids: List[int]) -> None: + self.except_ids = except_ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAllChats": + # No flags + + except_ids = TLObject.read(b, Long) + + return GetAllChats(except_ids=except_ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.except_ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_all_drafts.py b/pyrogram/raw/functions/messages/get_all_drafts.py new file mode 100644 index 00000000..da835b53 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_all_drafts.py @@ -0,0 +1,51 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAllDrafts(TLObject): # type: ignore + """Return all message drafts. +Returns all the latest updateDraftMessage updates related to all chats with drafts. + + + Details: + - Layer: ``224`` + - ID: ``6A3F8D65`` + + Parameters: + No parameters required. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = [] + + ID = 0x6a3f8d65 + QUALNAME = "functions.messages.GetAllDrafts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAllDrafts": + # No flags + + return GetAllDrafts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_all_stickers.py b/pyrogram/raw/functions/messages/get_all_stickers.py new file mode 100644 index 00000000..44ed310e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_all_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAllStickers(TLObject): # type: ignore + """Get all installed stickers + + + Details: + - Layer: ``224`` + - ID: ``B8A0A1A8`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.allStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.AllStickers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xb8a0a1a8 + QUALNAME = "functions.messages.GetAllStickers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAllStickers": + # No flags + + hash = Long.read(b) + + return GetAllStickers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_archived_stickers.py b/pyrogram/raw/functions/messages/get_archived_stickers.py new file mode 100644 index 00000000..687f0259 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_archived_stickers.py @@ -0,0 +1,77 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetArchivedStickers(TLObject): # type: ignore + """Get all archived stickers + + + Details: + - Layer: ``224`` + - ID: ``57F17692`` + + Parameters: + offset_id (``int`` ``64-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + masks (``bool``, *optional*): + Get mask stickers + + emojis (``bool``, *optional*): + Get custom emoji stickers + + Returns: + :obj:`messages.ArchivedStickers ` + """ + + __slots__: List[str] = ["offset_id", "limit", "masks", "emojis"] + + ID = 0x57f17692 + QUALNAME = "functions.messages.GetArchivedStickers" + + def __init__(self, *, offset_id: int, limit: int, masks: Optional[bool] = None, emojis: Optional[bool] = None) -> None: + self.offset_id = offset_id # long + self.limit = limit # int + self.masks = masks # flags.0?true + self.emojis = emojis # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetArchivedStickers": + + flags = Int.read(b) + + masks = True if flags & (1 << 0) else False + emojis = True if flags & (1 << 1) else False + offset_id = Long.read(b) + + limit = Int.read(b) + + return GetArchivedStickers(offset_id=offset_id, limit=limit, masks=masks, emojis=emojis) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.masks else 0 + flags |= (1 << 1) if self.emojis else 0 + b.write(Int(flags)) + + b.write(Long(self.offset_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_attach_menu_bot.py b/pyrogram/raw/functions/messages/get_attach_menu_bot.py new file mode 100644 index 00000000..0b3660be --- /dev/null +++ b/pyrogram/raw/functions/messages/get_attach_menu_bot.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAttachMenuBot(TLObject): # type: ignore + """Returns attachment menu entry for a bot mini app that can be launched from the attachment menu » + + + Details: + - Layer: ``224`` + - ID: ``77216192`` + + Parameters: + bot (:obj:`InputUser `): + Bot ID + + Returns: + :obj:`AttachMenuBotsBot ` + """ + + __slots__: List[str] = ["bot"] + + ID = 0x77216192 + QUALNAME = "functions.messages.GetAttachMenuBot" + + def __init__(self, *, bot: "raw.base.InputUser") -> None: + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAttachMenuBot": + # No flags + + bot = TLObject.read(b) + + return GetAttachMenuBot(bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_attach_menu_bots.py b/pyrogram/raw/functions/messages/get_attach_menu_bots.py new file mode 100644 index 00000000..78653570 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_attach_menu_bots.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAttachMenuBots(TLObject): # type: ignore + """Returns installed attachment menu bot mini apps » + + + Details: + - Layer: ``224`` + - ID: ``16FCC2CB`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the attachMenuBots.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`AttachMenuBots ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x16fcc2cb + QUALNAME = "functions.messages.GetAttachMenuBots" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAttachMenuBots": + # No flags + + hash = Long.read(b) + + return GetAttachMenuBots(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_attached_stickers.py b/pyrogram/raw/functions/messages/get_attached_stickers.py new file mode 100644 index 00000000..6d615e13 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_attached_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAttachedStickers(TLObject): # type: ignore + """Get stickers attached to a photo or video + + + Details: + - Layer: ``224`` + - ID: ``CC5B67CC`` + + Parameters: + media (:obj:`InputStickeredMedia `): + Stickered media + + Returns: + List of :obj:`StickerSetCovered ` + """ + + __slots__: List[str] = ["media"] + + ID = 0xcc5b67cc + QUALNAME = "functions.messages.GetAttachedStickers" + + def __init__(self, *, media: "raw.base.InputStickeredMedia") -> None: + self.media = media # InputStickeredMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAttachedStickers": + # No flags + + media = TLObject.read(b) + + return GetAttachedStickers(media=media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_available_effects.py b/pyrogram/raw/functions/messages/get_available_effects.py new file mode 100644 index 00000000..f26c3af9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_available_effects.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAvailableEffects(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``DEA20A39`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.availableEffects.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.AvailableEffects ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xdea20a39 + QUALNAME = "functions.messages.GetAvailableEffects" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAvailableEffects": + # No flags + + hash = Int.read(b) + + return GetAvailableEffects(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_available_reactions.py b/pyrogram/raw/functions/messages/get_available_reactions.py new file mode 100644 index 00000000..e62b5bed --- /dev/null +++ b/pyrogram/raw/functions/messages/get_available_reactions.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAvailableReactions(TLObject): # type: ignore + """Obtain available message reactions » + + + Details: + - Layer: ``224`` + - ID: ``18DEA0AC`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.availableReactions.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.AvailableReactions ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x18dea0ac + QUALNAME = "functions.messages.GetAvailableReactions" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAvailableReactions": + # No flags + + hash = Int.read(b) + + return GetAvailableReactions(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_bot_app.py b/pyrogram/raw/functions/messages/get_bot_app.py new file mode 100644 index 00000000..964293c4 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_bot_app.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotApp(TLObject): # type: ignore + """Obtain information about a direct link Mini App + + + Details: + - Layer: ``224`` + - ID: ``34FDC5C3`` + + Parameters: + app (:obj:`InputBotApp `): + Bot app information obtained from a Direct Mini App deep link ». + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.BotApp ` + """ + + __slots__: List[str] = ["app", "hash"] + + ID = 0x34fdc5c3 + QUALNAME = "functions.messages.GetBotApp" + + def __init__(self, *, app: "raw.base.InputBotApp", hash: int) -> None: + self.app = app # InputBotApp + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotApp": + # No flags + + app = TLObject.read(b) + + hash = Long.read(b) + + return GetBotApp(app=app, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.app.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_bot_callback_answer.py b/pyrogram/raw/functions/messages/get_bot_callback_answer.py new file mode 100644 index 00000000..27117fe5 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_bot_callback_answer.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBotCallbackAnswer(TLObject): # type: ignore + """Press an inline callback button and get a callback answer from the bot + + + Details: + - Layer: ``224`` + - ID: ``9342CA07`` + + Parameters: + peer (:obj:`InputPeer `): + Where was the inline keyboard sent + + msg_id (``int`` ``32-bit``): + ID of the Message with the inline keyboard + + game (``bool``, *optional*): + Whether this is a "play game" button + + data (``bytes``, *optional*): + Callback data + + password (:obj:`InputCheckPasswordSRP `, *optional*): + For buttons requiring you to verify your identity with your 2FA password, the SRP payload generated using SRP. + + Returns: + :obj:`messages.BotCallbackAnswer ` + """ + + __slots__: List[str] = ["peer", "msg_id", "game", "data", "password"] + + ID = 0x9342ca07 + QUALNAME = "functions.messages.GetBotCallbackAnswer" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, game: Optional[bool] = None, data: Optional[bytes] = None, password: "raw.base.InputCheckPasswordSRP" = None) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.game = game # flags.1?true + self.data = data # flags.0?bytes + self.password = password # flags.2?InputCheckPasswordSRP + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBotCallbackAnswer": + + flags = Int.read(b) + + game = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + msg_id = Int.read(b) + + data = Bytes.read(b) if flags & (1 << 0) else None + password = TLObject.read(b) if flags & (1 << 2) else None + + return GetBotCallbackAnswer(peer=peer, msg_id=msg_id, game=game, data=data, password=password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.game else 0 + flags |= (1 << 0) if self.data is not None else 0 + flags |= (1 << 2) if self.password is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + if self.data is not None: + b.write(Bytes(self.data)) + + if self.password is not None: + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_chat_invite_importers.py b/pyrogram/raw/functions/messages/get_chat_invite_importers.py new file mode 100644 index 00000000..93b3935e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_chat_invite_importers.py @@ -0,0 +1,111 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChatInviteImporters(TLObject): # type: ignore + """Get info about the users that joined the chat using a specific chat invite + + + Details: + - Layer: ``224`` + - ID: ``DF04DD4E`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + offset_date (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + offset_user (:obj:`InputUser `): + User ID for pagination: if set, offset_date must also be set. + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + requested (``bool``, *optional*): + If set, only returns info about users with pending join requests » + + subscription_expired (``bool``, *optional*): + N/A + + link (``str``, *optional*): + Invite link + + q (``str``, *optional*): + Search for a user in the pending join requests » list: only available when the requested flag is set, cannot be used together with a specific link. + + Returns: + :obj:`messages.ChatInviteImporters ` + """ + + __slots__: List[str] = ["peer", "offset_date", "offset_user", "limit", "requested", "subscription_expired", "link", "q"] + + ID = 0xdf04dd4e + QUALNAME = "functions.messages.GetChatInviteImporters" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_date: int, offset_user: "raw.base.InputUser", limit: int, requested: Optional[bool] = None, subscription_expired: Optional[bool] = None, link: Optional[str] = None, q: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.offset_date = offset_date # int + self.offset_user = offset_user # InputUser + self.limit = limit # int + self.requested = requested # flags.0?true + self.subscription_expired = subscription_expired # flags.3?true + self.link = link # flags.1?string + self.q = q # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChatInviteImporters": + + flags = Int.read(b) + + requested = True if flags & (1 << 0) else False + subscription_expired = True if flags & (1 << 3) else False + peer = TLObject.read(b) + + link = String.read(b) if flags & (1 << 1) else None + q = String.read(b) if flags & (1 << 2) else None + offset_date = Int.read(b) + + offset_user = TLObject.read(b) + + limit = Int.read(b) + + return GetChatInviteImporters(peer=peer, offset_date=offset_date, offset_user=offset_user, limit=limit, requested=requested, subscription_expired=subscription_expired, link=link, q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.requested else 0 + flags |= (1 << 3) if self.subscription_expired else 0 + flags |= (1 << 1) if self.link is not None else 0 + flags |= (1 << 2) if self.q is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.link is not None: + b.write(String(self.link)) + + if self.q is not None: + b.write(String(self.q)) + + b.write(Int(self.offset_date)) + + b.write(self.offset_user.write()) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_chats.py b/pyrogram/raw/functions/messages/get_chats.py new file mode 100644 index 00000000..cef4efda --- /dev/null +++ b/pyrogram/raw/functions/messages/get_chats.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChats(TLObject): # type: ignore + """Returns chat basic info on their IDs. + + + Details: + - Layer: ``224`` + - ID: ``49E9528F`` + + Parameters: + id (List of ``int`` ``64-bit``): + List of chat IDs + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["id"] + + ID = 0x49e9528f + QUALNAME = "functions.messages.GetChats" + + def __init__(self, *, id: List[int]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChats": + # No flags + + id = TLObject.read(b, Long) + + return GetChats(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_common_chats.py b/pyrogram/raw/functions/messages/get_common_chats.py new file mode 100644 index 00000000..03ccb4b1 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_common_chats.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCommonChats(TLObject): # type: ignore + """Get chats in common with a user + + + Details: + - Layer: ``224`` + - ID: ``E40CA104`` + + Parameters: + user_id (:obj:`InputUser `): + User ID + + max_id (``int`` ``64-bit``): + Maximum ID of chat to return (see pagination) + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = ["user_id", "max_id", "limit"] + + ID = 0xe40ca104 + QUALNAME = "functions.messages.GetCommonChats" + + def __init__(self, *, user_id: "raw.base.InputUser", max_id: int, limit: int) -> None: + self.user_id = user_id # InputUser + self.max_id = max_id # long + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCommonChats": + # No flags + + user_id = TLObject.read(b) + + max_id = Long.read(b) + + limit = Int.read(b) + + return GetCommonChats(user_id=user_id, max_id=max_id, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(Long(self.max_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_craft_star_gifts.py b/pyrogram/raw/functions/messages/get_craft_star_gifts.py new file mode 100644 index 00000000..9190eeb9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_craft_star_gifts.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCraftStarGifts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``FD05DD00`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + Returns: + :obj:`payments.SavedStarGifts ` + """ + + __slots__: List[str] = ["gift_id", "offset", "limit"] + + ID = 0xfd05dd00 + QUALNAME = "functions.messages.GetCraftStarGifts" + + def __init__(self, *, gift_id: int, offset: str, limit: int) -> None: + self.gift_id = gift_id # long + self.offset = offset # string + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCraftStarGifts": + # No flags + + gift_id = Long.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetCraftStarGifts(gift_id=gift_id, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.gift_id)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_custom_emoji_documents.py b/pyrogram/raw/functions/messages/get_custom_emoji_documents.py new file mode 100644 index 00000000..df3c02f6 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_custom_emoji_documents.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCustomEmojiDocuments(TLObject): # type: ignore + """Fetch custom emoji stickers ». + + + Details: + - Layer: ``224`` + - ID: ``D9AB0F54`` + + Parameters: + document_id (List of ``int`` ``64-bit``): + Custom emoji IDs from a messageEntityCustomEmoji. + + Returns: + List of :obj:`Document ` + """ + + __slots__: List[str] = ["document_id"] + + ID = 0xd9ab0f54 + QUALNAME = "functions.messages.GetCustomEmojiDocuments" + + def __init__(self, *, document_id: List[int]) -> None: + self.document_id = document_id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCustomEmojiDocuments": + # No flags + + document_id = TLObject.read(b, Long) + + return GetCustomEmojiDocuments(document_id=document_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.document_id, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_default_history_ttl.py b/pyrogram/raw/functions/messages/get_default_history_ttl.py new file mode 100644 index 00000000..60fdc964 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_default_history_ttl.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDefaultHistoryTTL(TLObject): # type: ignore + """Gets the default value of the Time-To-Live setting, applied to all new chats. + + + Details: + - Layer: ``224`` + - ID: ``658B7188`` + + Parameters: + No parameters required. + + Returns: + :obj:`DefaultHistoryTTL ` + """ + + __slots__: List[str] = [] + + ID = 0x658b7188 + QUALNAME = "functions.messages.GetDefaultHistoryTTL" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDefaultHistoryTTL": + # No flags + + return GetDefaultHistoryTTL() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_default_tag_reactions.py b/pyrogram/raw/functions/messages/get_default_tag_reactions.py new file mode 100644 index 00000000..8a6cc334 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_default_tag_reactions.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDefaultTagReactions(TLObject): # type: ignore + """Fetch a default recommended list of saved message tag reactions. + + + Details: + - Layer: ``224`` + - ID: ``BDF93428`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.reactions.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.Reactions ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xbdf93428 + QUALNAME = "functions.messages.GetDefaultTagReactions" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDefaultTagReactions": + # No flags + + hash = Long.read(b) + + return GetDefaultTagReactions(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_dh_config.py b/pyrogram/raw/functions/messages/get_dh_config.py new file mode 100644 index 00000000..e4ebd4c9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_dh_config.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDhConfig(TLObject): # type: ignore + """Returns configuration parameters for Diffie-Hellman key generation. Can also return a random sequence of bytes of required length. + + + Details: + - Layer: ``224`` + - ID: ``26CF8950`` + + Parameters: + version (``int`` ``32-bit``): + Value of the version parameter from messages.dhConfig, available at the client + + random_length (``int`` ``32-bit``): + Length of the required random sequence + + Returns: + :obj:`messages.DhConfig ` + """ + + __slots__: List[str] = ["version", "random_length"] + + ID = 0x26cf8950 + QUALNAME = "functions.messages.GetDhConfig" + + def __init__(self, *, version: int, random_length: int) -> None: + self.version = version # int + self.random_length = random_length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDhConfig": + # No flags + + version = Int.read(b) + + random_length = Int.read(b) + + return GetDhConfig(version=version, random_length=random_length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.version)) + + b.write(Int(self.random_length)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_dialog_filters.py b/pyrogram/raw/functions/messages/get_dialog_filters.py new file mode 100644 index 00000000..c971d41a --- /dev/null +++ b/pyrogram/raw/functions/messages/get_dialog_filters.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDialogFilters(TLObject): # type: ignore + """Get folders + + + Details: + - Layer: ``224`` + - ID: ``EFD48C89`` + + Parameters: + No parameters required. + + Returns: + :obj:`messages.DialogFilters ` + """ + + __slots__: List[str] = [] + + ID = 0xefd48c89 + QUALNAME = "functions.messages.GetDialogFilters" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDialogFilters": + # No flags + + return GetDialogFilters() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_dialog_unread_marks.py b/pyrogram/raw/functions/messages/get_dialog_unread_marks.py new file mode 100644 index 00000000..4ea4e55c --- /dev/null +++ b/pyrogram/raw/functions/messages/get_dialog_unread_marks.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDialogUnreadMarks(TLObject): # type: ignore + """Get dialogs manually marked as unread + + + Details: + - Layer: ``224`` + - ID: ``21202222`` + + Parameters: + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + List of :obj:`DialogPeer ` + """ + + __slots__: List[str] = ["parent_peer"] + + ID = 0x21202222 + QUALNAME = "functions.messages.GetDialogUnreadMarks" + + def __init__(self, *, parent_peer: "raw.base.InputPeer" = None) -> None: + self.parent_peer = parent_peer # flags.0?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDialogUnreadMarks": + + flags = Int.read(b) + + parent_peer = TLObject.read(b) if flags & (1 << 0) else None + + return GetDialogUnreadMarks(parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_dialogs.py b/pyrogram/raw/functions/messages/get_dialogs.py new file mode 100644 index 00000000..14e3352e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_dialogs.py @@ -0,0 +1,104 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDialogs(TLObject): # type: ignore + """Returns the current user dialog list. + + + Details: + - Layer: ``224`` + - ID: ``A0F4CB4F`` + + Parameters: + offset_date (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here (top_message ID used for pagination) + + offset_peer (:obj:`InputPeer `): + Offset peer for pagination + + limit (``int`` ``32-bit``): + Number of list elements to be returned + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + exclude_pinned (``bool``, *optional*): + Exclude pinned dialogs + + folder_id (``int`` ``32-bit``, *optional*): + Peer folder ID, for more info click here + + Returns: + :obj:`messages.Dialogs ` + """ + + __slots__: List[str] = ["offset_date", "offset_id", "offset_peer", "limit", "hash", "exclude_pinned", "folder_id"] + + ID = 0xa0f4cb4f + QUALNAME = "functions.messages.GetDialogs" + + def __init__(self, *, offset_date: int, offset_id: int, offset_peer: "raw.base.InputPeer", limit: int, hash: int, exclude_pinned: Optional[bool] = None, folder_id: Optional[int] = None) -> None: + self.offset_date = offset_date # int + self.offset_id = offset_id # int + self.offset_peer = offset_peer # InputPeer + self.limit = limit # int + self.hash = hash # long + self.exclude_pinned = exclude_pinned # flags.0?true + self.folder_id = folder_id # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDialogs": + + flags = Int.read(b) + + exclude_pinned = True if flags & (1 << 0) else False + folder_id = Int.read(b) if flags & (1 << 1) else None + offset_date = Int.read(b) + + offset_id = Int.read(b) + + offset_peer = TLObject.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetDialogs(offset_date=offset_date, offset_id=offset_id, offset_peer=offset_peer, limit=limit, hash=hash, exclude_pinned=exclude_pinned, folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.exclude_pinned else 0 + flags |= (1 << 1) if self.folder_id is not None else 0 + b.write(Int(flags)) + + if self.folder_id is not None: + b.write(Int(self.folder_id)) + + b.write(Int(self.offset_date)) + + b.write(Int(self.offset_id)) + + b.write(self.offset_peer.write()) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_discussion_message.py b/pyrogram/raw/functions/messages/get_discussion_message.py new file mode 100644 index 00000000..a4ae26cd --- /dev/null +++ b/pyrogram/raw/functions/messages/get_discussion_message.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDiscussionMessage(TLObject): # type: ignore + """Get discussion message from the associated discussion group of a channel to show it on top of the comment section, without actually joining the group + + + Details: + - Layer: ``224`` + - ID: ``446972FD`` + + Parameters: + peer (:obj:`InputPeer `): + Channel ID + + msg_id (``int`` ``32-bit``): + Message ID + + Returns: + :obj:`messages.DiscussionMessage ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x446972fd + QUALNAME = "functions.messages.GetDiscussionMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDiscussionMessage": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return GetDiscussionMessage(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_document_by_hash.py b/pyrogram/raw/functions/messages/get_document_by_hash.py new file mode 100644 index 00000000..4ae2142c --- /dev/null +++ b/pyrogram/raw/functions/messages/get_document_by_hash.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDocumentByHash(TLObject): # type: ignore + """Get a document by its SHA256 hash, mainly used for gifs + + + Details: + - Layer: ``224`` + - ID: ``B1F2061F`` + + Parameters: + sha256 (``bytes``): + SHA256 of file + + size (``int`` ``64-bit``): + Size of the file in bytes + + mime_type (``str``): + Mime type + + Returns: + :obj:`Document ` + """ + + __slots__: List[str] = ["sha256", "size", "mime_type"] + + ID = 0xb1f2061f + QUALNAME = "functions.messages.GetDocumentByHash" + + def __init__(self, *, sha256: bytes, size: int, mime_type: str) -> None: + self.sha256 = sha256 # bytes + self.size = size # long + self.mime_type = mime_type # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDocumentByHash": + # No flags + + sha256 = Bytes.read(b) + + size = Long.read(b) + + mime_type = String.read(b) + + return GetDocumentByHash(sha256=sha256, size=size, mime_type=mime_type) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.sha256)) + + b.write(Long(self.size)) + + b.write(String(self.mime_type)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_game_info.py b/pyrogram/raw/functions/messages/get_emoji_game_info.py new file mode 100644 index 00000000..8fadbc3a --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_game_info.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiGameInfo(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``FB7E8CA7`` + + Parameters: + No parameters required. + + Returns: + :obj:`messages.EmojiGameInfo ` + """ + + __slots__: List[str] = [] + + ID = 0xfb7e8ca7 + QUALNAME = "functions.messages.GetEmojiGameInfo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiGameInfo": + # No flags + + return GetEmojiGameInfo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_groups.py b/pyrogram/raw/functions/messages/get_emoji_groups.py new file mode 100644 index 00000000..b6df32af --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_groups.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiGroups(TLObject): # type: ignore + """Represents a list of emoji categories, to be used when selecting custom emojis. + + + Details: + - Layer: ``224`` + - ID: ``7488CE5B`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.emojiGroups.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.EmojiGroups ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x7488ce5b + QUALNAME = "functions.messages.GetEmojiGroups" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiGroups": + # No flags + + hash = Int.read(b) + + return GetEmojiGroups(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_keywords.py b/pyrogram/raw/functions/messages/get_emoji_keywords.py new file mode 100644 index 00000000..081f7ef0 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_keywords.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiKeywords(TLObject): # type: ignore + """Get localized emoji keywords ». + + + Details: + - Layer: ``224`` + - ID: ``35A0E062`` + + Parameters: + lang_code (``str``): + Language code + + Returns: + :obj:`EmojiKeywordsDifference ` + """ + + __slots__: List[str] = ["lang_code"] + + ID = 0x35a0e062 + QUALNAME = "functions.messages.GetEmojiKeywords" + + def __init__(self, *, lang_code: str) -> None: + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiKeywords": + # No flags + + lang_code = String.read(b) + + return GetEmojiKeywords(lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_keywords_difference.py b/pyrogram/raw/functions/messages/get_emoji_keywords_difference.py new file mode 100644 index 00000000..29c91fa2 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_keywords_difference.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiKeywordsDifference(TLObject): # type: ignore + """Get changed emoji keywords ». + + + Details: + - Layer: ``224`` + - ID: ``1508B6AF`` + + Parameters: + lang_code (``str``): + Language code + + from_version (``int`` ``32-bit``): + Previous stored emoji keyword list version + + Returns: + :obj:`EmojiKeywordsDifference ` + """ + + __slots__: List[str] = ["lang_code", "from_version"] + + ID = 0x1508b6af + QUALNAME = "functions.messages.GetEmojiKeywordsDifference" + + def __init__(self, *, lang_code: str, from_version: int) -> None: + self.lang_code = lang_code # string + self.from_version = from_version # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiKeywordsDifference": + # No flags + + lang_code = String.read(b) + + from_version = Int.read(b) + + return GetEmojiKeywordsDifference(lang_code=lang_code, from_version=from_version) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + b.write(Int(self.from_version)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_keywords_languages.py b/pyrogram/raw/functions/messages/get_emoji_keywords_languages.py new file mode 100644 index 00000000..04748b02 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_keywords_languages.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiKeywordsLanguages(TLObject): # type: ignore + """Obtain a list of related languages that must be used when fetching emoji keyword lists ». + + + Details: + - Layer: ``224`` + - ID: ``4E9963B2`` + + Parameters: + lang_codes (List of ``str``): + The user's language codes + + Returns: + List of :obj:`EmojiLanguage ` + """ + + __slots__: List[str] = ["lang_codes"] + + ID = 0x4e9963b2 + QUALNAME = "functions.messages.GetEmojiKeywordsLanguages" + + def __init__(self, *, lang_codes: List[str]) -> None: + self.lang_codes = lang_codes # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiKeywordsLanguages": + # No flags + + lang_codes = TLObject.read(b, String) + + return GetEmojiKeywordsLanguages(lang_codes=lang_codes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.lang_codes, String)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_profile_photo_groups.py b/pyrogram/raw/functions/messages/get_emoji_profile_photo_groups.py new file mode 100644 index 00000000..28f0b8d0 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_profile_photo_groups.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiProfilePhotoGroups(TLObject): # type: ignore + """Represents a list of emoji categories, to be used when selecting custom emojis to set as profile picture. + + + Details: + - Layer: ``224`` + - ID: ``21A548F3`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.emojiGroups.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.EmojiGroups ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x21a548f3 + QUALNAME = "functions.messages.GetEmojiProfilePhotoGroups" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiProfilePhotoGroups": + # No flags + + hash = Int.read(b) + + return GetEmojiProfilePhotoGroups(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_status_groups.py b/pyrogram/raw/functions/messages/get_emoji_status_groups.py new file mode 100644 index 00000000..8aa17e5e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_status_groups.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiStatusGroups(TLObject): # type: ignore + """Represents a list of emoji categories, to be used when selecting custom emojis to set as custom emoji status. + + + Details: + - Layer: ``224`` + - ID: ``2ECD56CD`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.emojiGroups.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.EmojiGroups ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x2ecd56cd + QUALNAME = "functions.messages.GetEmojiStatusGroups" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiStatusGroups": + # No flags + + hash = Int.read(b) + + return GetEmojiStatusGroups(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_sticker_groups.py b/pyrogram/raw/functions/messages/get_emoji_sticker_groups.py new file mode 100644 index 00000000..a1989da2 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_sticker_groups.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiStickerGroups(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``1DD840F5`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.emojiGroups.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.EmojiGroups ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x1dd840f5 + QUALNAME = "functions.messages.GetEmojiStickerGroups" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiStickerGroups": + # No flags + + hash = Int.read(b) + + return GetEmojiStickerGroups(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_stickers.py b/pyrogram/raw/functions/messages/get_emoji_stickers.py new file mode 100644 index 00000000..d1644cf2 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiStickers(TLObject): # type: ignore + """Gets the list of currently installed custom emoji stickersets. + + + Details: + - Layer: ``224`` + - ID: ``FBFCA18F`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.allStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.AllStickers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xfbfca18f + QUALNAME = "functions.messages.GetEmojiStickers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiStickers": + # No flags + + hash = Long.read(b) + + return GetEmojiStickers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_emoji_url.py b/pyrogram/raw/functions/messages/get_emoji_url.py new file mode 100644 index 00000000..6be06d52 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_emoji_url.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetEmojiURL(TLObject): # type: ignore + """Returns an HTTP URL which can be used to automatically log in into translation platform and suggest new emoji keywords ». The URL will be valid for 30 seconds after generation. + + + Details: + - Layer: ``224`` + - ID: ``D5B10C26`` + + Parameters: + lang_code (``str``): + Language code for which the emoji keywords will be suggested + + Returns: + :obj:`EmojiURL ` + """ + + __slots__: List[str] = ["lang_code"] + + ID = 0xd5b10c26 + QUALNAME = "functions.messages.GetEmojiURL" + + def __init__(self, *, lang_code: str) -> None: + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetEmojiURL": + # No flags + + lang_code = String.read(b) + + return GetEmojiURL(lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_exported_chat_invite.py b/pyrogram/raw/functions/messages/get_exported_chat_invite.py new file mode 100644 index 00000000..1ecac941 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_exported_chat_invite.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetExportedChatInvite(TLObject): # type: ignore + """Get info about a chat invite + + + Details: + - Layer: ``224`` + - ID: ``73746F5C`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + link (``str``): + Invite link + + Returns: + :obj:`messages.ExportedChatInvite ` + """ + + __slots__: List[str] = ["peer", "link"] + + ID = 0x73746f5c + QUALNAME = "functions.messages.GetExportedChatInvite" + + def __init__(self, *, peer: "raw.base.InputPeer", link: str) -> None: + self.peer = peer # InputPeer + self.link = link # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetExportedChatInvite": + # No flags + + peer = TLObject.read(b) + + link = String.read(b) + + return GetExportedChatInvite(peer=peer, link=link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.link)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_exported_chat_invites.py b/pyrogram/raw/functions/messages/get_exported_chat_invites.py new file mode 100644 index 00000000..4411226e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_exported_chat_invites.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetExportedChatInvites(TLObject): # type: ignore + """Get info about the chat invites of a specific chat + + + Details: + - Layer: ``224`` + - ID: ``A2B5A3F6`` + + Parameters: + peer (:obj:`InputPeer `): + Chat + + admin_id (:obj:`InputUser `): + Whether to only fetch chat invites from this admin + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + revoked (``bool``, *optional*): + Whether to fetch revoked chat invites + + offset_date (``int`` ``32-bit``, *optional*): + Offsets for pagination, for more info click here + + offset_link (``str``, *optional*): + Offsets for pagination, for more info click here + + Returns: + :obj:`messages.ExportedChatInvites ` + """ + + __slots__: List[str] = ["peer", "admin_id", "limit", "revoked", "offset_date", "offset_link"] + + ID = 0xa2b5a3f6 + QUALNAME = "functions.messages.GetExportedChatInvites" + + def __init__(self, *, peer: "raw.base.InputPeer", admin_id: "raw.base.InputUser", limit: int, revoked: Optional[bool] = None, offset_date: Optional[int] = None, offset_link: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.admin_id = admin_id # InputUser + self.limit = limit # int + self.revoked = revoked # flags.3?true + self.offset_date = offset_date # flags.2?int + self.offset_link = offset_link # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetExportedChatInvites": + + flags = Int.read(b) + + revoked = True if flags & (1 << 3) else False + peer = TLObject.read(b) + + admin_id = TLObject.read(b) + + offset_date = Int.read(b) if flags & (1 << 2) else None + offset_link = String.read(b) if flags & (1 << 2) else None + limit = Int.read(b) + + return GetExportedChatInvites(peer=peer, admin_id=admin_id, limit=limit, revoked=revoked, offset_date=offset_date, offset_link=offset_link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.revoked else 0 + flags |= (1 << 2) if self.offset_date is not None else 0 + flags |= (1 << 2) if self.offset_link is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.admin_id.write()) + + if self.offset_date is not None: + b.write(Int(self.offset_date)) + + if self.offset_link is not None: + b.write(String(self.offset_link)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_extended_media.py b/pyrogram/raw/functions/messages/get_extended_media.py new file mode 100644 index 00000000..e0320b15 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_extended_media.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetExtendedMedia(TLObject): # type: ignore + """Get information about extended media + + + Details: + - Layer: ``224`` + - ID: ``84F80814`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (List of ``int`` ``32-bit``): + Message IDs + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x84f80814 + QUALNAME = "functions.messages.GetExtendedMedia" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetExtendedMedia": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return GetExtendedMedia(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_fact_check.py b/pyrogram/raw/functions/messages/get_fact_check.py new file mode 100644 index 00000000..af6fbf21 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_fact_check.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFactCheck(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``B9CDC5EE`` + + Parameters: + peer (:obj:`InputPeer `): + + + msg_id (List of ``int`` ``32-bit``): + + + Returns: + List of :obj:`FactCheck ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0xb9cdc5ee + QUALNAME = "functions.messages.GetFactCheck" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: List[int]) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFactCheck": + # No flags + + peer = TLObject.read(b) + + msg_id = TLObject.read(b, Int) + + return GetFactCheck(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.msg_id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_faved_stickers.py b/pyrogram/raw/functions/messages/get_faved_stickers.py new file mode 100644 index 00000000..b2c70011 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_faved_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFavedStickers(TLObject): # type: ignore + """Get faved stickers + + + Details: + - Layer: ``224`` + - ID: ``4F1AAA9`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.favedStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.FavedStickers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x4f1aaa9 + QUALNAME = "functions.messages.GetFavedStickers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFavedStickers": + # No flags + + hash = Long.read(b) + + return GetFavedStickers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_featured_emoji_stickers.py b/pyrogram/raw/functions/messages/get_featured_emoji_stickers.py new file mode 100644 index 00000000..be9d8536 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_featured_emoji_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFeaturedEmojiStickers(TLObject): # type: ignore + """Gets featured custom emoji stickersets. + + + Details: + - Layer: ``224`` + - ID: ``ECF6736`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.featuredStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.FeaturedStickers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xecf6736 + QUALNAME = "functions.messages.GetFeaturedEmojiStickers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFeaturedEmojiStickers": + # No flags + + hash = Long.read(b) + + return GetFeaturedEmojiStickers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_featured_stickers.py b/pyrogram/raw/functions/messages/get_featured_stickers.py new file mode 100644 index 00000000..5c40db0e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_featured_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFeaturedStickers(TLObject): # type: ignore + """Get featured stickers + + + Details: + - Layer: ``224`` + - ID: ``64780B14`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.featuredStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.FeaturedStickers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x64780b14 + QUALNAME = "functions.messages.GetFeaturedStickers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFeaturedStickers": + # No flags + + hash = Long.read(b) + + return GetFeaturedStickers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_forum_topics.py b/pyrogram/raw/functions/messages/get_forum_topics.py new file mode 100644 index 00000000..4d36b4a4 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_forum_topics.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetForumTopics(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``3BA47BFF`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + offset_date (``int`` ``32-bit``): + N/A + + offset_id (``int`` ``32-bit``): + N/A + + offset_topic (``int`` ``32-bit``): + N/A + + limit (``int`` ``32-bit``): + N/A + + q (``str``, *optional*): + N/A + + Returns: + :obj:`messages.ForumTopics ` + """ + + __slots__: List[str] = ["peer", "offset_date", "offset_id", "offset_topic", "limit", "q"] + + ID = 0x3ba47bff + QUALNAME = "functions.messages.GetForumTopics" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_date: int, offset_id: int, offset_topic: int, limit: int, q: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.offset_date = offset_date # int + self.offset_id = offset_id # int + self.offset_topic = offset_topic # int + self.limit = limit # int + self.q = q # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetForumTopics": + + flags = Int.read(b) + + peer = TLObject.read(b) + + q = String.read(b) if flags & (1 << 0) else None + offset_date = Int.read(b) + + offset_id = Int.read(b) + + offset_topic = Int.read(b) + + limit = Int.read(b) + + return GetForumTopics(peer=peer, offset_date=offset_date, offset_id=offset_id, offset_topic=offset_topic, limit=limit, q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.q is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.q is not None: + b.write(String(self.q)) + + b.write(Int(self.offset_date)) + + b.write(Int(self.offset_id)) + + b.write(Int(self.offset_topic)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_forum_topics_by_id.py b/pyrogram/raw/functions/messages/get_forum_topics_by_id.py new file mode 100644 index 00000000..40f4001e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_forum_topics_by_id.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetForumTopicsByID(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``AF0A4A08`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + topics (List of ``int`` ``32-bit``): + N/A + + Returns: + :obj:`messages.ForumTopics ` + """ + + __slots__: List[str] = ["peer", "topics"] + + ID = 0xaf0a4a08 + QUALNAME = "functions.messages.GetForumTopicsByID" + + def __init__(self, *, peer: "raw.base.InputPeer", topics: List[int]) -> None: + self.peer = peer # InputPeer + self.topics = topics # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetForumTopicsByID": + # No flags + + peer = TLObject.read(b) + + topics = TLObject.read(b, Int) + + return GetForumTopicsByID(peer=peer, topics=topics) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.topics, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_full_chat.py b/pyrogram/raw/functions/messages/get_full_chat.py new file mode 100644 index 00000000..a15c0199 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_full_chat.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFullChat(TLObject): # type: ignore + """Get full info about a basic group. + + + Details: + - Layer: ``224`` + - ID: ``AEB00B34`` + + Parameters: + chat_id (``int`` ``64-bit``): + Basic group ID. + + Returns: + :obj:`messages.ChatFull ` + """ + + __slots__: List[str] = ["chat_id"] + + ID = 0xaeb00b34 + QUALNAME = "functions.messages.GetFullChat" + + def __init__(self, *, chat_id: int) -> None: + self.chat_id = chat_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFullChat": + # No flags + + chat_id = Long.read(b) + + return GetFullChat(chat_id=chat_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_game_high_scores.py b/pyrogram/raw/functions/messages/get_game_high_scores.py new file mode 100644 index 00000000..0697362f --- /dev/null +++ b/pyrogram/raw/functions/messages/get_game_high_scores.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGameHighScores(TLObject): # type: ignore + """Get highscores of a game + + + Details: + - Layer: ``224`` + - ID: ``E822649D`` + + Parameters: + peer (:obj:`InputPeer `): + Where was the game sent + + id (``int`` ``32-bit``): + ID of message with game media attachment + + user_id (:obj:`InputUser `): + Get high scores made by a certain user + + Returns: + :obj:`messages.HighScores ` + """ + + __slots__: List[str] = ["peer", "id", "user_id"] + + ID = 0xe822649d + QUALNAME = "functions.messages.GetGameHighScores" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, user_id: "raw.base.InputUser") -> None: + self.peer = peer # InputPeer + self.id = id # int + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGameHighScores": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + user_id = TLObject.read(b) + + return GetGameHighScores(peer=peer, id=id, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_history.py b/pyrogram/raw/functions/messages/get_history.py new file mode 100644 index 00000000..e622987f --- /dev/null +++ b/pyrogram/raw/functions/messages/get_history.py @@ -0,0 +1,111 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetHistory(TLObject): # type: ignore + """Returns the conversation history with one interlocutor / within a chat + + + Details: + - Layer: ``224`` + - ID: ``4423E6C5`` + + Parameters: + peer (:obj:`InputPeer `): + Target peer + + offset_id (``int`` ``32-bit``): + Only return messages starting from the specified message ID + + offset_date (``int`` ``32-bit``): + Only return messages sent before the specified date + + add_offset (``int`` ``32-bit``): + Number of list elements to be skipped, negative values are also accepted. + + limit (``int`` ``32-bit``): + Number of results to return + + max_id (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with IDs less than max_id + + min_id (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with IDs more than min_id + + hash (``int`` ``64-bit``): + Result hash + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "offset_id", "offset_date", "add_offset", "limit", "max_id", "min_id", "hash"] + + ID = 0x4423e6c5 + QUALNAME = "functions.messages.GetHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_id: int, offset_date: int, add_offset: int, limit: int, max_id: int, min_id: int, hash: int) -> None: + self.peer = peer # InputPeer + self.offset_id = offset_id # int + self.offset_date = offset_date # int + self.add_offset = add_offset # int + self.limit = limit # int + self.max_id = max_id # int + self.min_id = min_id # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetHistory": + # No flags + + peer = TLObject.read(b) + + offset_id = Int.read(b) + + offset_date = Int.read(b) + + add_offset = Int.read(b) + + limit = Int.read(b) + + max_id = Int.read(b) + + min_id = Int.read(b) + + hash = Long.read(b) + + return GetHistory(peer=peer, offset_id=offset_id, offset_date=offset_date, add_offset=add_offset, limit=limit, max_id=max_id, min_id=min_id, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.offset_date)) + + b.write(Int(self.add_offset)) + + b.write(Int(self.limit)) + + b.write(Int(self.max_id)) + + b.write(Int(self.min_id)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_inline_bot_results.py b/pyrogram/raw/functions/messages/get_inline_bot_results.py new file mode 100644 index 00000000..fb456e41 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_inline_bot_results.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetInlineBotResults(TLObject): # type: ignore + """Query an inline bot + + + Details: + - Layer: ``224`` + - ID: ``514E999D`` + + Parameters: + bot (:obj:`InputUser `): + The bot to query + + peer (:obj:`InputPeer `): + The currently opened chat + + query (``str``): + The query + + offset (``str``): + The offset within the results, will be passed directly as-is to the bot. + + geo_point (:obj:`InputGeoPoint `, *optional*): + The geolocation, if requested + + Returns: + :obj:`messages.BotResults ` + """ + + __slots__: List[str] = ["bot", "peer", "query", "offset", "geo_point"] + + ID = 0x514e999d + QUALNAME = "functions.messages.GetInlineBotResults" + + def __init__(self, *, bot: "raw.base.InputUser", peer: "raw.base.InputPeer", query: str, offset: str, geo_point: "raw.base.InputGeoPoint" = None) -> None: + self.bot = bot # InputUser + self.peer = peer # InputPeer + self.query = query # string + self.offset = offset # string + self.geo_point = geo_point # flags.0?InputGeoPoint + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetInlineBotResults": + + flags = Int.read(b) + + bot = TLObject.read(b) + + peer = TLObject.read(b) + + geo_point = TLObject.read(b) if flags & (1 << 0) else None + + query = String.read(b) + + offset = String.read(b) + + return GetInlineBotResults(bot=bot, peer=peer, query=query, offset=offset, geo_point=geo_point) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.geo_point is not None else 0 + b.write(Int(flags)) + + b.write(self.bot.write()) + + b.write(self.peer.write()) + + if self.geo_point is not None: + b.write(self.geo_point.write()) + + b.write(String(self.query)) + + b.write(String(self.offset)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_inline_game_high_scores.py b/pyrogram/raw/functions/messages/get_inline_game_high_scores.py new file mode 100644 index 00000000..295691ee --- /dev/null +++ b/pyrogram/raw/functions/messages/get_inline_game_high_scores.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetInlineGameHighScores(TLObject): # type: ignore + """Get highscores of a game sent using an inline bot + + + Details: + - Layer: ``224`` + - ID: ``F635E1B`` + + Parameters: + id (:obj:`InputBotInlineMessageID `): + ID of inline message + + user_id (:obj:`InputUser `): + Get high scores of a certain user + + Returns: + :obj:`messages.HighScores ` + """ + + __slots__: List[str] = ["id", "user_id"] + + ID = 0xf635e1b + QUALNAME = "functions.messages.GetInlineGameHighScores" + + def __init__(self, *, id: "raw.base.InputBotInlineMessageID", user_id: "raw.base.InputUser") -> None: + self.id = id # InputBotInlineMessageID + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetInlineGameHighScores": + # No flags + + id = TLObject.read(b) + + user_id = TLObject.read(b) + + return GetInlineGameHighScores(id=id, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_mask_stickers.py b/pyrogram/raw/functions/messages/get_mask_stickers.py new file mode 100644 index 00000000..84a74af9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_mask_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMaskStickers(TLObject): # type: ignore + """Get installed mask stickers + + + Details: + - Layer: ``224`` + - ID: ``640F82B8`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.allStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.AllStickers ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x640f82b8 + QUALNAME = "functions.messages.GetMaskStickers" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMaskStickers": + # No flags + + hash = Long.read(b) + + return GetMaskStickers(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_message_edit_data.py b/pyrogram/raw/functions/messages/get_message_edit_data.py new file mode 100644 index 00000000..817bd35f --- /dev/null +++ b/pyrogram/raw/functions/messages/get_message_edit_data.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessageEditData(TLObject): # type: ignore + """Find out if a media message's caption can be edited + + + Details: + - Layer: ``224`` + - ID: ``FDA68D36`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the media was sent + + id (``int`` ``32-bit``): + ID of message + + Returns: + :obj:`messages.MessageEditData ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0xfda68d36 + QUALNAME = "functions.messages.GetMessageEditData" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int) -> None: + self.peer = peer # InputPeer + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessageEditData": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + return GetMessageEditData(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_message_reactions_list.py b/pyrogram/raw/functions/messages/get_message_reactions_list.py new file mode 100644 index 00000000..a6f976db --- /dev/null +++ b/pyrogram/raw/functions/messages/get_message_reactions_list.py @@ -0,0 +1,92 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessageReactionsList(TLObject): # type: ignore + """Get message reaction list, along with the sender of each reaction. + + + Details: + - Layer: ``224`` + - ID: ``461B3F48`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (``int`` ``32-bit``): + Message ID + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + reaction (:obj:`Reaction `, *optional*): + Get only reactions of this type + + offset (``str``, *optional*): + Offset for pagination (taken from the next_offset field of the returned messages.MessageReactionsList); empty in the first request. + + Returns: + :obj:`messages.MessageReactionsList ` + """ + + __slots__: List[str] = ["peer", "id", "limit", "reaction", "offset"] + + ID = 0x461b3f48 + QUALNAME = "functions.messages.GetMessageReactionsList" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, limit: int, reaction: "raw.base.Reaction" = None, offset: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.limit = limit # int + self.reaction = reaction # flags.0?Reaction + self.offset = offset # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessageReactionsList": + + flags = Int.read(b) + + peer = TLObject.read(b) + + id = Int.read(b) + + reaction = TLObject.read(b) if flags & (1 << 0) else None + + offset = String.read(b) if flags & (1 << 1) else None + limit = Int.read(b) + + return GetMessageReactionsList(peer=peer, id=id, limit=limit, reaction=reaction, offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.reaction is not None else 0 + flags |= (1 << 1) if self.offset is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.reaction is not None: + b.write(self.reaction.write()) + + if self.offset is not None: + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_message_read_participants.py b/pyrogram/raw/functions/messages/get_message_read_participants.py new file mode 100644 index 00000000..2bc4d8a9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_message_read_participants.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessageReadParticipants(TLObject): # type: ignore + """Get which users read a specific message: only available for groups and supergroups with less than chat_read_mark_size_threshold members, read receipts will be stored for chat_read_mark_expire_period seconds after the message was sent, see client configuration for more info ». + + + Details: + - Layer: ``224`` + - ID: ``31C1C44F`` + + Parameters: + peer (:obj:`InputPeer `): + Dialog + + msg_id (``int`` ``32-bit``): + Message ID + + Returns: + List of :obj:`ReadParticipantDate ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x31c1c44f + QUALNAME = "functions.messages.GetMessageReadParticipants" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessageReadParticipants": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return GetMessageReadParticipants(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_messages.py b/pyrogram/raw/functions/messages/get_messages.py new file mode 100644 index 00000000..7765384d --- /dev/null +++ b/pyrogram/raw/functions/messages/get_messages.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessages(TLObject): # type: ignore + """Returns the list of messages by their IDs. + + + Details: + - Layer: ``224`` + - ID: ``63C66506`` + + Parameters: + id (List of :obj:`InputMessage `): + Message ID list + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["id"] + + ID = 0x63c66506 + QUALNAME = "functions.messages.GetMessages" + + def __init__(self, *, id: List["raw.base.InputMessage"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessages": + # No flags + + id = TLObject.read(b) + + return GetMessages(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_messages_reactions.py b/pyrogram/raw/functions/messages/get_messages_reactions.py new file mode 100644 index 00000000..a670d360 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_messages_reactions.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessagesReactions(TLObject): # type: ignore + """Get message reactions » + + + Details: + - Layer: ``224`` + - ID: ``8BBA90E6`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (List of ``int`` ``32-bit``): + Message IDs + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x8bba90e6 + QUALNAME = "functions.messages.GetMessagesReactions" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessagesReactions": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return GetMessagesReactions(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_messages_views.py b/pyrogram/raw/functions/messages/get_messages_views.py new file mode 100644 index 00000000..773d74e8 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_messages_views.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessagesViews(TLObject): # type: ignore + """Get and increase the view counter of a message sent or forwarded from a channel + + + Details: + - Layer: ``224`` + - ID: ``5784D3E1`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the message was found + + id (List of ``int`` ``32-bit``): + ID of message + + increment (``bool``): + Whether to mark the message as viewed and increment the view counter + + Returns: + :obj:`messages.MessageViews ` + """ + + __slots__: List[str] = ["peer", "id", "increment"] + + ID = 0x5784d3e1 + QUALNAME = "functions.messages.GetMessagesViews" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int], increment: bool) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + self.increment = increment # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessagesViews": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + increment = Bool.read(b) + + return GetMessagesViews(peer=peer, id=id, increment=increment) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + b.write(Bool(self.increment)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_my_stickers.py b/pyrogram/raw/functions/messages/get_my_stickers.py new file mode 100644 index 00000000..07b3feec --- /dev/null +++ b/pyrogram/raw/functions/messages/get_my_stickers.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMyStickers(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``D0B5E1FC`` + + Parameters: + offset_id (``int`` ``64-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`messages.MyStickers ` + """ + + __slots__: List[str] = ["offset_id", "limit"] + + ID = 0xd0b5e1fc + QUALNAME = "functions.messages.GetMyStickers" + + def __init__(self, *, offset_id: int, limit: int) -> None: + self.offset_id = offset_id # long + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMyStickers": + # No flags + + offset_id = Long.read(b) + + limit = Int.read(b) + + return GetMyStickers(offset_id=offset_id, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.offset_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_old_featured_stickers.py b/pyrogram/raw/functions/messages/get_old_featured_stickers.py new file mode 100644 index 00000000..1a2b49f7 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_old_featured_stickers.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetOldFeaturedStickers(TLObject): # type: ignore + """Method for fetching previously featured stickers + + + Details: + - Layer: ``224`` + - ID: ``7ED094A1`` + + Parameters: + offset (``int`` ``32-bit``): + Offset + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.featuredStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.FeaturedStickers ` + """ + + __slots__: List[str] = ["offset", "limit", "hash"] + + ID = 0x7ed094a1 + QUALNAME = "functions.messages.GetOldFeaturedStickers" + + def __init__(self, *, offset: int, limit: int, hash: int) -> None: + self.offset = offset # int + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetOldFeaturedStickers": + # No flags + + offset = Int.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetOldFeaturedStickers(offset=offset, limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_onlines.py b/pyrogram/raw/functions/messages/get_onlines.py new file mode 100644 index 00000000..c9158611 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_onlines.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetOnlines(TLObject): # type: ignore + """Get count of online users in a chat + + + Details: + - Layer: ``224`` + - ID: ``6E2BE050`` + + Parameters: + peer (:obj:`InputPeer `): + The chat + + Returns: + :obj:`ChatOnlines ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x6e2be050 + QUALNAME = "functions.messages.GetOnlines" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetOnlines": + # No flags + + peer = TLObject.read(b) + + return GetOnlines(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_outbox_read_date.py b/pyrogram/raw/functions/messages/get_outbox_read_date.py new file mode 100644 index 00000000..bb25fadb --- /dev/null +++ b/pyrogram/raw/functions/messages/get_outbox_read_date.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetOutboxReadDate(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``8C4BFE5D`` + + Parameters: + peer (:obj:`InputPeer `): + + + msg_id (``int`` ``32-bit``): + + + Returns: + :obj:`OutboxReadDate ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x8c4bfe5d + QUALNAME = "functions.messages.GetOutboxReadDate" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetOutboxReadDate": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return GetOutboxReadDate(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_paid_reaction_privacy.py b/pyrogram/raw/functions/messages/get_paid_reaction_privacy.py new file mode 100644 index 00000000..bd7656c1 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_paid_reaction_privacy.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPaidReactionPrivacy(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``472455AA`` + + Parameters: + No parameters required. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = [] + + ID = 0x472455aa + QUALNAME = "functions.messages.GetPaidReactionPrivacy" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPaidReactionPrivacy": + # No flags + + return GetPaidReactionPrivacy() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_peer_dialogs.py b/pyrogram/raw/functions/messages/get_peer_dialogs.py new file mode 100644 index 00000000..2706cb1f --- /dev/null +++ b/pyrogram/raw/functions/messages/get_peer_dialogs.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPeerDialogs(TLObject): # type: ignore + """Get dialog info of specified peers + + + Details: + - Layer: ``224`` + - ID: ``E470BCFD`` + + Parameters: + peers (List of :obj:`InputDialogPeer `): + Peers + + Returns: + :obj:`messages.PeerDialogs ` + """ + + __slots__: List[str] = ["peers"] + + ID = 0xe470bcfd + QUALNAME = "functions.messages.GetPeerDialogs" + + def __init__(self, *, peers: List["raw.base.InputDialogPeer"]) -> None: + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPeerDialogs": + # No flags + + peers = TLObject.read(b) + + return GetPeerDialogs(peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_peer_settings.py b/pyrogram/raw/functions/messages/get_peer_settings.py new file mode 100644 index 00000000..04533f4a --- /dev/null +++ b/pyrogram/raw/functions/messages/get_peer_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPeerSettings(TLObject): # type: ignore + """Get peer settings + + + Details: + - Layer: ``224`` + - ID: ``EFD9A6A2`` + + Parameters: + peer (:obj:`InputPeer `): + The peer + + Returns: + :obj:`messages.PeerSettings ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0xefd9a6a2 + QUALNAME = "functions.messages.GetPeerSettings" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPeerSettings": + # No flags + + peer = TLObject.read(b) + + return GetPeerSettings(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_pinned_dialogs.py b/pyrogram/raw/functions/messages/get_pinned_dialogs.py new file mode 100644 index 00000000..5c9eade7 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_pinned_dialogs.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPinnedDialogs(TLObject): # type: ignore + """Get pinned dialogs + + + Details: + - Layer: ``224`` + - ID: ``D6B94DF2`` + + Parameters: + folder_id (``int`` ``32-bit``): + Peer folder ID, for more info click here + + Returns: + :obj:`messages.PeerDialogs ` + """ + + __slots__: List[str] = ["folder_id"] + + ID = 0xd6b94df2 + QUALNAME = "functions.messages.GetPinnedDialogs" + + def __init__(self, *, folder_id: int) -> None: + self.folder_id = folder_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPinnedDialogs": + # No flags + + folder_id = Int.read(b) + + return GetPinnedDialogs(folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.folder_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_pinned_saved_dialogs.py b/pyrogram/raw/functions/messages/get_pinned_saved_dialogs.py new file mode 100644 index 00000000..512d22e3 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_pinned_saved_dialogs.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPinnedSavedDialogs(TLObject): # type: ignore + """Get pinned saved dialogs, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``D63D94E0`` + + Parameters: + No parameters required. + + Returns: + :obj:`messages.SavedDialogs ` + """ + + __slots__: List[str] = [] + + ID = 0xd63d94e0 + QUALNAME = "functions.messages.GetPinnedSavedDialogs" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPinnedSavedDialogs": + # No flags + + return GetPinnedSavedDialogs() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_poll_results.py b/pyrogram/raw/functions/messages/get_poll_results.py new file mode 100644 index 00000000..7f90907a --- /dev/null +++ b/pyrogram/raw/functions/messages/get_poll_results.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPollResults(TLObject): # type: ignore + """Get poll results + + + Details: + - Layer: ``224`` + - ID: ``73BB643B`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the poll was found + + msg_id (``int`` ``32-bit``): + Message ID of poll message + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x73bb643b + QUALNAME = "functions.messages.GetPollResults" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPollResults": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return GetPollResults(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_poll_votes.py b/pyrogram/raw/functions/messages/get_poll_votes.py new file mode 100644 index 00000000..77b94962 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_poll_votes.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPollVotes(TLObject): # type: ignore + """Get poll results for non-anonymous polls + + + Details: + - Layer: ``224`` + - ID: ``B86E380E`` + + Parameters: + peer (:obj:`InputPeer `): + Chat where the poll was sent + + id (``int`` ``32-bit``): + Message ID + + limit (``int`` ``32-bit``): + Number of results to return + + option (``bytes``, *optional*): + Get only results for the specified poll option + + offset (``str``, *optional*): + Offset for results, taken from the next_offset field of messages.votesList, initially an empty string. Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in messages.votesList if it is empty, to avoid an infinite loop. + + Returns: + :obj:`messages.VotesList ` + """ + + __slots__: List[str] = ["peer", "id", "limit", "option", "offset"] + + ID = 0xb86e380e + QUALNAME = "functions.messages.GetPollVotes" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, limit: int, option: Optional[bytes] = None, offset: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.limit = limit # int + self.option = option # flags.0?bytes + self.offset = offset # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPollVotes": + + flags = Int.read(b) + + peer = TLObject.read(b) + + id = Int.read(b) + + option = Bytes.read(b) if flags & (1 << 0) else None + offset = String.read(b) if flags & (1 << 1) else None + limit = Int.read(b) + + return GetPollVotes(peer=peer, id=id, limit=limit, option=option, offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.option is not None else 0 + flags |= (1 << 1) if self.offset is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.option is not None: + b.write(Bytes(self.option)) + + if self.offset is not None: + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_prepared_inline_message.py b/pyrogram/raw/functions/messages/get_prepared_inline_message.py new file mode 100644 index 00000000..fbb3d96b --- /dev/null +++ b/pyrogram/raw/functions/messages/get_prepared_inline_message.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPreparedInlineMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``857EBDB8`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + id (``str``): + N/A + + Returns: + :obj:`messages.PreparedInlineMessage ` + """ + + __slots__: List[str] = ["bot", "id"] + + ID = 0x857ebdb8 + QUALNAME = "functions.messages.GetPreparedInlineMessage" + + def __init__(self, *, bot: "raw.base.InputUser", id: str) -> None: + self.bot = bot # InputUser + self.id = id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPreparedInlineMessage": + # No flags + + bot = TLObject.read(b) + + id = String.read(b) + + return GetPreparedInlineMessage(bot=bot, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(String(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_quick_replies.py b/pyrogram/raw/functions/messages/get_quick_replies.py new file mode 100644 index 00000000..bb1c6ea4 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_quick_replies.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetQuickReplies(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``D483F2A8`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.QuickReplies ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xd483f2a8 + QUALNAME = "functions.messages.GetQuickReplies" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetQuickReplies": + # No flags + + hash = Long.read(b) + + return GetQuickReplies(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_quick_reply_messages.py b/pyrogram/raw/functions/messages/get_quick_reply_messages.py new file mode 100644 index 00000000..6df6ebee --- /dev/null +++ b/pyrogram/raw/functions/messages/get_quick_reply_messages.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetQuickReplyMessages(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``94A495C3`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + id (List of ``int`` ``32-bit``, *optional*): + + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["shortcut_id", "hash", "id"] + + ID = 0x94a495c3 + QUALNAME = "functions.messages.GetQuickReplyMessages" + + def __init__(self, *, shortcut_id: int, hash: int, id: Optional[List[int]] = None) -> None: + self.shortcut_id = shortcut_id # int + self.hash = hash # long + self.id = id # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetQuickReplyMessages": + + flags = Int.read(b) + + shortcut_id = Int.read(b) + + id = TLObject.read(b, Int) if flags & (1 << 0) else [] + + hash = Long.read(b) + + return GetQuickReplyMessages(shortcut_id=shortcut_id, hash=hash, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.id else 0 + b.write(Int(flags)) + + b.write(Int(self.shortcut_id)) + + if self.id is not None: + b.write(Vector(self.id, Int)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_recent_locations.py b/pyrogram/raw/functions/messages/get_recent_locations.py new file mode 100644 index 00000000..62e0283e --- /dev/null +++ b/pyrogram/raw/functions/messages/get_recent_locations.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetRecentLocations(TLObject): # type: ignore + """Get live location history of a certain user + + + Details: + - Layer: ``224`` + - ID: ``702A40E0`` + + Parameters: + peer (:obj:`InputPeer `): + User + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "limit", "hash"] + + ID = 0x702a40e0 + QUALNAME = "functions.messages.GetRecentLocations" + + def __init__(self, *, peer: "raw.base.InputPeer", limit: int, hash: int) -> None: + self.peer = peer # InputPeer + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetRecentLocations": + # No flags + + peer = TLObject.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetRecentLocations(peer=peer, limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_recent_reactions.py b/pyrogram/raw/functions/messages/get_recent_reactions.py new file mode 100644 index 00000000..a295d1a9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_recent_reactions.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetRecentReactions(TLObject): # type: ignore + """Get recently used message reactions + + + Details: + - Layer: ``224`` + - ID: ``39461DB2`` + + Parameters: + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.reactions.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.Reactions ` + """ + + __slots__: List[str] = ["limit", "hash"] + + ID = 0x39461db2 + QUALNAME = "functions.messages.GetRecentReactions" + + def __init__(self, *, limit: int, hash: int) -> None: + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetRecentReactions": + # No flags + + limit = Int.read(b) + + hash = Long.read(b) + + return GetRecentReactions(limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_recent_stickers.py b/pyrogram/raw/functions/messages/get_recent_stickers.py new file mode 100644 index 00000000..2a2a1e45 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_recent_stickers.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetRecentStickers(TLObject): # type: ignore + """Get recent stickers + + + Details: + - Layer: ``224`` + - ID: ``9DA9403B`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.recentStickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + attached (``bool``, *optional*): + Get stickers recently attached to photo or video files + + Returns: + :obj:`messages.RecentStickers ` + """ + + __slots__: List[str] = ["hash", "attached"] + + ID = 0x9da9403b + QUALNAME = "functions.messages.GetRecentStickers" + + def __init__(self, *, hash: int, attached: Optional[bool] = None) -> None: + self.hash = hash # long + self.attached = attached # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetRecentStickers": + + flags = Int.read(b) + + attached = True if flags & (1 << 0) else False + hash = Long.read(b) + + return GetRecentStickers(hash=hash, attached=attached) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.attached else 0 + b.write(Int(flags)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_replies.py b/pyrogram/raw/functions/messages/get_replies.py new file mode 100644 index 00000000..5907f813 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_replies.py @@ -0,0 +1,119 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetReplies(TLObject): # type: ignore + """Get messages in a reply thread + + + Details: + - Layer: ``224`` + - ID: ``22DDD30C`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + msg_id (``int`` ``32-bit``): + Message ID + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + offset_date (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + add_offset (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + max_id (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with ID smaller than max_id + + min_id (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with ID bigger than min_id + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "msg_id", "offset_id", "offset_date", "add_offset", "limit", "max_id", "min_id", "hash"] + + ID = 0x22ddd30c + QUALNAME = "functions.messages.GetReplies" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, offset_id: int, offset_date: int, add_offset: int, limit: int, max_id: int, min_id: int, hash: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.offset_id = offset_id # int + self.offset_date = offset_date # int + self.add_offset = add_offset # int + self.limit = limit # int + self.max_id = max_id # int + self.min_id = min_id # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetReplies": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + offset_id = Int.read(b) + + offset_date = Int.read(b) + + add_offset = Int.read(b) + + limit = Int.read(b) + + max_id = Int.read(b) + + min_id = Int.read(b) + + hash = Long.read(b) + + return GetReplies(peer=peer, msg_id=msg_id, offset_id=offset_id, offset_date=offset_date, add_offset=add_offset, limit=limit, max_id=max_id, min_id=min_id, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Int(self.offset_id)) + + b.write(Int(self.offset_date)) + + b.write(Int(self.add_offset)) + + b.write(Int(self.limit)) + + b.write(Int(self.max_id)) + + b.write(Int(self.min_id)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_saved_dialogs.py b/pyrogram/raw/functions/messages/get_saved_dialogs.py new file mode 100644 index 00000000..b39971ed --- /dev/null +++ b/pyrogram/raw/functions/messages/get_saved_dialogs.py @@ -0,0 +1,105 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedDialogs(TLObject): # type: ignore + """Returns the current saved dialog list, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``1E91FC99`` + + Parameters: + offset_date (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here (top_message ID used for pagination) + + offset_peer (:obj:`InputPeer `): + Offset peer for pagination + + limit (``int`` ``32-bit``): + Number of list elements to be returned + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + exclude_pinned (``bool``, *optional*): + Exclude pinned dialogs + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`messages.SavedDialogs ` + """ + + __slots__: List[str] = ["offset_date", "offset_id", "offset_peer", "limit", "hash", "exclude_pinned", "parent_peer"] + + ID = 0x1e91fc99 + QUALNAME = "functions.messages.GetSavedDialogs" + + def __init__(self, *, offset_date: int, offset_id: int, offset_peer: "raw.base.InputPeer", limit: int, hash: int, exclude_pinned: Optional[bool] = None, parent_peer: "raw.base.InputPeer" = None) -> None: + self.offset_date = offset_date # int + self.offset_id = offset_id # int + self.offset_peer = offset_peer # InputPeer + self.limit = limit # int + self.hash = hash # long + self.exclude_pinned = exclude_pinned # flags.0?true + self.parent_peer = parent_peer # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedDialogs": + + flags = Int.read(b) + + exclude_pinned = True if flags & (1 << 0) else False + parent_peer = TLObject.read(b) if flags & (1 << 1) else None + + offset_date = Int.read(b) + + offset_id = Int.read(b) + + offset_peer = TLObject.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetSavedDialogs(offset_date=offset_date, offset_id=offset_id, offset_peer=offset_peer, limit=limit, hash=hash, exclude_pinned=exclude_pinned, parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.exclude_pinned else 0 + flags |= (1 << 1) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(Int(self.offset_date)) + + b.write(Int(self.offset_id)) + + b.write(self.offset_peer.write()) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_saved_dialogs_by_id.py b/pyrogram/raw/functions/messages/get_saved_dialogs_by_id.py new file mode 100644 index 00000000..3987abe5 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_saved_dialogs_by_id.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedDialogsByID(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``6F6F9C96`` + + Parameters: + ids (List of :obj:`InputPeer `): + N/A + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`messages.SavedDialogs ` + """ + + __slots__: List[str] = ["ids", "parent_peer"] + + ID = 0x6f6f9c96 + QUALNAME = "functions.messages.GetSavedDialogsByID" + + def __init__(self, *, ids: List["raw.base.InputPeer"], parent_peer: "raw.base.InputPeer" = None) -> None: + self.ids = ids # Vector + self.parent_peer = parent_peer # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedDialogsByID": + + flags = Int.read(b) + + parent_peer = TLObject.read(b) if flags & (1 << 1) else None + + ids = TLObject.read(b) + + return GetSavedDialogsByID(ids=ids, parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(Vector(self.ids)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_saved_gifs.py b/pyrogram/raw/functions/messages/get_saved_gifs.py new file mode 100644 index 00000000..c2e6c0ec --- /dev/null +++ b/pyrogram/raw/functions/messages/get_saved_gifs.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedGifs(TLObject): # type: ignore + """Get saved GIFs. + + + Details: + - Layer: ``224`` + - ID: ``5CF09635`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.savedGifs.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.SavedGifs ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x5cf09635 + QUALNAME = "functions.messages.GetSavedGifs" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedGifs": + # No flags + + hash = Long.read(b) + + return GetSavedGifs(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_saved_history.py b/pyrogram/raw/functions/messages/get_saved_history.py new file mode 100644 index 00000000..7e88f2aa --- /dev/null +++ b/pyrogram/raw/functions/messages/get_saved_history.py @@ -0,0 +1,123 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedHistory(TLObject): # type: ignore + """Returns saved messages » forwarded from a specific peer + + + Details: + - Layer: ``224`` + - ID: ``998AB009`` + + Parameters: + peer (:obj:`InputPeer `): + Target peer + + offset_id (``int`` ``32-bit``): + Only return messages starting from the specified message ID + + offset_date (``int`` ``32-bit``): + Only return messages sent before the specified date + + add_offset (``int`` ``32-bit``): + Number of list elements to be skipped, negative values are also accepted. + + limit (``int`` ``32-bit``): + Number of results to return + + max_id (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with IDs less than max_id + + min_id (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with IDs more than min_id + + hash (``int`` ``64-bit``): + Result hash + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "offset_id", "offset_date", "add_offset", "limit", "max_id", "min_id", "hash", "parent_peer"] + + ID = 0x998ab009 + QUALNAME = "functions.messages.GetSavedHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_id: int, offset_date: int, add_offset: int, limit: int, max_id: int, min_id: int, hash: int, parent_peer: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.offset_id = offset_id # int + self.offset_date = offset_date # int + self.add_offset = add_offset # int + self.limit = limit # int + self.max_id = max_id # int + self.min_id = min_id # int + self.hash = hash # long + self.parent_peer = parent_peer # flags.0?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedHistory": + + flags = Int.read(b) + + parent_peer = TLObject.read(b) if flags & (1 << 0) else None + + peer = TLObject.read(b) + + offset_id = Int.read(b) + + offset_date = Int.read(b) + + add_offset = Int.read(b) + + limit = Int.read(b) + + max_id = Int.read(b) + + min_id = Int.read(b) + + hash = Long.read(b) + + return GetSavedHistory(peer=peer, offset_id=offset_id, offset_date=offset_date, add_offset=add_offset, limit=limit, max_id=max_id, min_id=min_id, hash=hash, parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(self.peer.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.offset_date)) + + b.write(Int(self.add_offset)) + + b.write(Int(self.limit)) + + b.write(Int(self.max_id)) + + b.write(Int(self.min_id)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_saved_reaction_tags.py b/pyrogram/raw/functions/messages/get_saved_reaction_tags.py new file mode 100644 index 00000000..473c7f42 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_saved_reaction_tags.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedReactionTags(TLObject): # type: ignore + """Fetch the full list of saved message tags created by the user. + + + Details: + - Layer: ``224`` + - ID: ``3637E05B`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.savedReactionTags.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + peer (:obj:`InputPeer `, *optional*): + If set, returns tags only used in the specified saved message dialog. + + Returns: + :obj:`messages.SavedReactionTags ` + """ + + __slots__: List[str] = ["hash", "peer"] + + ID = 0x3637e05b + QUALNAME = "functions.messages.GetSavedReactionTags" + + def __init__(self, *, hash: int, peer: "raw.base.InputPeer" = None) -> None: + self.hash = hash # long + self.peer = peer # flags.0?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedReactionTags": + + flags = Int.read(b) + + peer = TLObject.read(b) if flags & (1 << 0) else None + + hash = Long.read(b) + + return GetSavedReactionTags(hash=hash, peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.peer is not None else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_scheduled_history.py b/pyrogram/raw/functions/messages/get_scheduled_history.py new file mode 100644 index 00000000..a3f8b6f9 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_scheduled_history.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetScheduledHistory(TLObject): # type: ignore + """Get scheduled messages + + + Details: + - Layer: ``224`` + - ID: ``F516760B`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "hash"] + + ID = 0xf516760b + QUALNAME = "functions.messages.GetScheduledHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", hash: int) -> None: + self.peer = peer # InputPeer + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetScheduledHistory": + # No flags + + peer = TLObject.read(b) + + hash = Long.read(b) + + return GetScheduledHistory(peer=peer, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_scheduled_messages.py b/pyrogram/raw/functions/messages/get_scheduled_messages.py new file mode 100644 index 00000000..4324fcd1 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_scheduled_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetScheduledMessages(TLObject): # type: ignore + """Get scheduled messages + + + Details: + - Layer: ``224`` + - ID: ``BDBB0464`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (List of ``int`` ``32-bit``): + IDs of scheduled messages + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0xbdbb0464 + QUALNAME = "functions.messages.GetScheduledMessages" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetScheduledMessages": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return GetScheduledMessages(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_search_counters.py b/pyrogram/raw/functions/messages/get_search_counters.py new file mode 100644 index 00000000..24324760 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_search_counters.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSearchCounters(TLObject): # type: ignore + """Get the number of results that would be found by a messages.search call with the same parameters + + + Details: + - Layer: ``224`` + - ID: ``1BBCF300`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where to search + + filters (List of :obj:`MessagesFilter `): + Search filters + + saved_peer_id (:obj:`InputPeer `, *optional*): + Search within the saved message dialog » with this ID. + + top_msg_id (``int`` ``32-bit``, *optional*): + If set, consider only messages within the specified forum topic + + Returns: + List of :obj:`messages.SearchCounter ` + """ + + __slots__: List[str] = ["peer", "filters", "saved_peer_id", "top_msg_id"] + + ID = 0x1bbcf300 + QUALNAME = "functions.messages.GetSearchCounters" + + def __init__(self, *, peer: "raw.base.InputPeer", filters: List["raw.base.MessagesFilter"], saved_peer_id: "raw.base.InputPeer" = None, top_msg_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.filters = filters # Vector + self.saved_peer_id = saved_peer_id # flags.2?InputPeer + self.top_msg_id = top_msg_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSearchCounters": + + flags = Int.read(b) + + peer = TLObject.read(b) + + saved_peer_id = TLObject.read(b) if flags & (1 << 2) else None + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + filters = TLObject.read(b) + + return GetSearchCounters(peer=peer, filters=filters, saved_peer_id=saved_peer_id, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.saved_peer_id is not None else 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + b.write(Vector(self.filters)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_search_results_calendar.py b/pyrogram/raw/functions/messages/get_search_results_calendar.py new file mode 100644 index 00000000..d2216724 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_search_results_calendar.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSearchResultsCalendar(TLObject): # type: ignore + """Returns information about the next messages of the specified type in the chat split by days. + + + Details: + - Layer: ``224`` + - ID: ``6AA3F6BD`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where to search + + filter (:obj:`MessagesFilter `): + Message filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method. + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + offset_date (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + saved_peer_id (:obj:`InputPeer `, *optional*): + Search within the saved message dialog » with this ID. + + Returns: + :obj:`messages.SearchResultsCalendar ` + """ + + __slots__: List[str] = ["peer", "filter", "offset_id", "offset_date", "saved_peer_id"] + + ID = 0x6aa3f6bd + QUALNAME = "functions.messages.GetSearchResultsCalendar" + + def __init__(self, *, peer: "raw.base.InputPeer", filter: "raw.base.MessagesFilter", offset_id: int, offset_date: int, saved_peer_id: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.filter = filter # MessagesFilter + self.offset_id = offset_id # int + self.offset_date = offset_date # int + self.saved_peer_id = saved_peer_id # flags.2?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSearchResultsCalendar": + + flags = Int.read(b) + + peer = TLObject.read(b) + + saved_peer_id = TLObject.read(b) if flags & (1 << 2) else None + + filter = TLObject.read(b) + + offset_id = Int.read(b) + + offset_date = Int.read(b) + + return GetSearchResultsCalendar(peer=peer, filter=filter, offset_id=offset_id, offset_date=offset_date, saved_peer_id=saved_peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.saved_peer_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + b.write(self.filter.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.offset_date)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_search_results_positions.py b/pyrogram/raw/functions/messages/get_search_results_positions.py new file mode 100644 index 00000000..f65c4d03 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_search_results_positions.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSearchResultsPositions(TLObject): # type: ignore + """Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. + + + Details: + - Layer: ``224`` + - ID: ``9C7F2F10`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where to search + + filter (:obj:`MessagesFilter `): + Message filter, inputMessagesFilterEmpty, inputMessagesFilterMyMentions filters are not supported by this method. + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + saved_peer_id (:obj:`InputPeer `, *optional*): + Search within the saved message dialog » with this ID. + + Returns: + :obj:`messages.SearchResultsPositions ` + """ + + __slots__: List[str] = ["peer", "filter", "offset_id", "limit", "saved_peer_id"] + + ID = 0x9c7f2f10 + QUALNAME = "functions.messages.GetSearchResultsPositions" + + def __init__(self, *, peer: "raw.base.InputPeer", filter: "raw.base.MessagesFilter", offset_id: int, limit: int, saved_peer_id: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.filter = filter # MessagesFilter + self.offset_id = offset_id # int + self.limit = limit # int + self.saved_peer_id = saved_peer_id # flags.2?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSearchResultsPositions": + + flags = Int.read(b) + + peer = TLObject.read(b) + + saved_peer_id = TLObject.read(b) if flags & (1 << 2) else None + + filter = TLObject.read(b) + + offset_id = Int.read(b) + + limit = Int.read(b) + + return GetSearchResultsPositions(peer=peer, filter=filter, offset_id=offset_id, limit=limit, saved_peer_id=saved_peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.saved_peer_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + b.write(self.filter.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_split_ranges.py b/pyrogram/raw/functions/messages/get_split_ranges.py new file mode 100644 index 00000000..8a6f3b70 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_split_ranges.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSplitRanges(TLObject): # type: ignore + """Get message ranges for saving the user's chat history + + + Details: + - Layer: ``224`` + - ID: ``1CFF7E08`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`MessageRange ` + """ + + __slots__: List[str] = [] + + ID = 0x1cff7e08 + QUALNAME = "functions.messages.GetSplitRanges" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSplitRanges": + # No flags + + return GetSplitRanges() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_sponsored_messages.py b/pyrogram/raw/functions/messages/get_sponsored_messages.py new file mode 100644 index 00000000..d6e99fb5 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_sponsored_messages.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSponsoredMessages(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``3D6CE850`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + msg_id (``int`` ``32-bit``, *optional*): + N/A + + Returns: + :obj:`messages.SponsoredMessages ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x3d6ce850 + QUALNAME = "functions.messages.GetSponsoredMessages" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSponsoredMessages": + + flags = Int.read(b) + + peer = TLObject.read(b) + + msg_id = Int.read(b) if flags & (1 << 0) else None + return GetSponsoredMessages(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.msg_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.msg_id is not None: + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_stats_url.py b/pyrogram/raw/functions/messages/get_stats_url.py new file mode 100644 index 00000000..3926b482 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_stats_url.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStatsURL(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``812C2AE6`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + params (``str``): + N/A + + dark (``bool``, *optional*): + N/A + + Returns: + :obj:`StatsURL ` + """ + + __slots__: List[str] = ["peer", "params", "dark"] + + ID = 0x812c2ae6 + QUALNAME = "functions.messages.GetStatsURL" + + def __init__(self, *, peer: "raw.base.InputPeer", params: str, dark: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.params = params # string + self.dark = dark # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStatsURL": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + params = String.read(b) + + return GetStatsURL(peer=peer, params=params, dark=dark) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.params)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_sticker_set.py b/pyrogram/raw/functions/messages/get_sticker_set.py new file mode 100644 index 00000000..a745acc3 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_sticker_set.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStickerSet(TLObject): # type: ignore + """Get info about a stickerset + + + Details: + - Layer: ``224`` + - ID: ``C8A0EC74`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + Stickerset + + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["stickerset", "hash"] + + ID = 0xc8a0ec74 + QUALNAME = "functions.messages.GetStickerSet" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet", hash: int) -> None: + self.stickerset = stickerset # InputStickerSet + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStickerSet": + # No flags + + stickerset = TLObject.read(b) + + hash = Int.read(b) + + return GetStickerSet(stickerset=stickerset, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_stickers.py b/pyrogram/raw/functions/messages/get_stickers.py new file mode 100644 index 00000000..3ed09576 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_stickers.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStickers(TLObject): # type: ignore + """Get stickers by emoji + + + Details: + - Layer: ``224`` + - ID: ``D5A5D3A1`` + + Parameters: + emoticon (``str``): + The emoji + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.stickers.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.Stickers ` + """ + + __slots__: List[str] = ["emoticon", "hash"] + + ID = 0xd5a5d3a1 + QUALNAME = "functions.messages.GetStickers" + + def __init__(self, *, emoticon: str, hash: int) -> None: + self.emoticon = emoticon # string + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStickers": + # No flags + + emoticon = String.read(b) + + hash = Long.read(b) + + return GetStickers(emoticon=emoticon, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.emoticon)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_suggested_dialog_filters.py b/pyrogram/raw/functions/messages/get_suggested_dialog_filters.py new file mode 100644 index 00000000..460f66b3 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_suggested_dialog_filters.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSuggestedDialogFilters(TLObject): # type: ignore + """Get suggested folders + + + Details: + - Layer: ``224`` + - ID: ``A29CD42C`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`DialogFilterSuggested ` + """ + + __slots__: List[str] = [] + + ID = 0xa29cd42c + QUALNAME = "functions.messages.GetSuggestedDialogFilters" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSuggestedDialogFilters": + # No flags + + return GetSuggestedDialogFilters() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_top_reactions.py b/pyrogram/raw/functions/messages/get_top_reactions.py new file mode 100644 index 00000000..d75fbd98 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_top_reactions.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetTopReactions(TLObject): # type: ignore + """Got popular message reactions + + + Details: + - Layer: ``224`` + - ID: ``BB8125BA`` + + Parameters: + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.reactions.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`messages.Reactions ` + """ + + __slots__: List[str] = ["limit", "hash"] + + ID = 0xbb8125ba + QUALNAME = "functions.messages.GetTopReactions" + + def __init__(self, *, limit: int, hash: int) -> None: + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetTopReactions": + # No flags + + limit = Int.read(b) + + hash = Long.read(b) + + return GetTopReactions(limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_unread_mentions.py b/pyrogram/raw/functions/messages/get_unread_mentions.py new file mode 100644 index 00000000..2f60fdbe --- /dev/null +++ b/pyrogram/raw/functions/messages/get_unread_mentions.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUnreadMentions(TLObject): # type: ignore + """Get unread messages where we were mentioned + + + Details: + - Layer: ``224`` + - ID: ``F107E790`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where to look for mentions + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + add_offset (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + max_id (``int`` ``32-bit``): + Maximum message ID to return, see pagination + + min_id (``int`` ``32-bit``): + Minimum message ID to return, see pagination + + top_msg_id (``int`` ``32-bit``, *optional*): + If set, considers only messages within the specified forum topic + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "offset_id", "add_offset", "limit", "max_id", "min_id", "top_msg_id"] + + ID = 0xf107e790 + QUALNAME = "functions.messages.GetUnreadMentions" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_id: int, add_offset: int, limit: int, max_id: int, min_id: int, top_msg_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.offset_id = offset_id # int + self.add_offset = add_offset # int + self.limit = limit # int + self.max_id = max_id # int + self.min_id = min_id # int + self.top_msg_id = top_msg_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUnreadMentions": + + flags = Int.read(b) + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + offset_id = Int.read(b) + + add_offset = Int.read(b) + + limit = Int.read(b) + + max_id = Int.read(b) + + min_id = Int.read(b) + + return GetUnreadMentions(peer=peer, offset_id=offset_id, add_offset=add_offset, limit=limit, max_id=max_id, min_id=min_id, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + b.write(Int(self.offset_id)) + + b.write(Int(self.add_offset)) + + b.write(Int(self.limit)) + + b.write(Int(self.max_id)) + + b.write(Int(self.min_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_unread_reactions.py b/pyrogram/raw/functions/messages/get_unread_reactions.py new file mode 100644 index 00000000..7e9b69f7 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_unread_reactions.py @@ -0,0 +1,116 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUnreadReactions(TLObject): # type: ignore + """Get unread reactions to messages you sent + + + Details: + - Layer: ``224`` + - ID: ``BD7F90AC`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + add_offset (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + max_id (``int`` ``32-bit``): + Only return reactions for messages up until this message ID + + min_id (``int`` ``32-bit``): + Only return reactions for messages starting from this message ID + + top_msg_id (``int`` ``32-bit``, *optional*): + If set, considers only reactions to messages within the specified forum topic + + saved_peer_id (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "offset_id", "add_offset", "limit", "max_id", "min_id", "top_msg_id", "saved_peer_id"] + + ID = 0xbd7f90ac + QUALNAME = "functions.messages.GetUnreadReactions" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_id: int, add_offset: int, limit: int, max_id: int, min_id: int, top_msg_id: Optional[int] = None, saved_peer_id: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.offset_id = offset_id # int + self.add_offset = add_offset # int + self.limit = limit # int + self.max_id = max_id # int + self.min_id = min_id # int + self.top_msg_id = top_msg_id # flags.0?int + self.saved_peer_id = saved_peer_id # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUnreadReactions": + + flags = Int.read(b) + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None + + offset_id = Int.read(b) + + add_offset = Int.read(b) + + limit = Int.read(b) + + max_id = Int.read(b) + + min_id = Int.read(b) + + return GetUnreadReactions(peer=peer, offset_id=offset_id, add_offset=add_offset, limit=limit, max_id=max_id, min_id=min_id, top_msg_id=top_msg_id, saved_peer_id=saved_peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + flags |= (1 << 1) if self.saved_peer_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.add_offset)) + + b.write(Int(self.limit)) + + b.write(Int(self.max_id)) + + b.write(Int(self.min_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_web_page.py b/pyrogram/raw/functions/messages/get_web_page.py new file mode 100644 index 00000000..32e63166 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_web_page.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWebPage(TLObject): # type: ignore + """Get instant view page + + + Details: + - Layer: ``224`` + - ID: ``8D9692A3`` + + Parameters: + url (``str``): + URL of IV page to fetch + + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + Returns: + :obj:`messages.WebPage ` + """ + + __slots__: List[str] = ["url", "hash"] + + ID = 0x8d9692a3 + QUALNAME = "functions.messages.GetWebPage" + + def __init__(self, *, url: str, hash: int) -> None: + self.url = url # string + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWebPage": + # No flags + + url = String.read(b) + + hash = Int.read(b) + + return GetWebPage(url=url, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_web_page_preview.py b/pyrogram/raw/functions/messages/get_web_page_preview.py new file mode 100644 index 00000000..05fddff4 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_web_page_preview.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWebPagePreview(TLObject): # type: ignore + """Get preview of webpage + + + Details: + - Layer: ``224`` + - ID: ``570D6F6F`` + + Parameters: + message (``str``): + Message from which to extract the preview + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + Returns: + :obj:`messages.WebPagePreview ` + """ + + __slots__: List[str] = ["message", "entities"] + + ID = 0x570d6f6f + QUALNAME = "functions.messages.GetWebPagePreview" + + def __init__(self, *, message: str, entities: Optional[List["raw.base.MessageEntity"]] = None) -> None: + self.message = message # string + self.entities = entities # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWebPagePreview": + + flags = Int.read(b) + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + return GetWebPagePreview(message=message, entities=entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.entities else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/get_web_view_result.py b/pyrogram/raw/functions/messages/get_web_view_result.py new file mode 100644 index 00000000..71c9aec6 --- /dev/null +++ b/pyrogram/raw/functions/messages/get_web_view_result.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWebViewResult(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``22B6C214`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + bot (:obj:`InputUser `): + N/A + + query_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`messages.WebViewResult ` + """ + + __slots__: List[str] = ["peer", "bot", "query_id"] + + ID = 0x22b6c214 + QUALNAME = "functions.messages.GetWebViewResult" + + def __init__(self, *, peer: "raw.base.InputPeer", bot: "raw.base.InputUser", query_id: int) -> None: + self.peer = peer # InputPeer + self.bot = bot # InputUser + self.query_id = query_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWebViewResult": + # No flags + + peer = TLObject.read(b) + + bot = TLObject.read(b) + + query_id = Long.read(b) + + return GetWebViewResult(peer=peer, bot=bot, query_id=query_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.bot.write()) + + b.write(Long(self.query_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/hide_all_chat_join_requests.py b/pyrogram/raw/functions/messages/hide_all_chat_join_requests.py new file mode 100644 index 00000000..bca0d48f --- /dev/null +++ b/pyrogram/raw/functions/messages/hide_all_chat_join_requests.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HideAllChatJoinRequests(TLObject): # type: ignore + """Dismiss or approve all join requests related to a specific chat or channel. + + + Details: + - Layer: ``224`` + - ID: ``E085F4EA`` + + Parameters: + peer (:obj:`InputPeer `): + The chat or channel + + approved (``bool``, *optional*): + Whether to dismiss or approve all chat join requests » + + link (``str``, *optional*): + Only dismiss or approve join requests » initiated using this invite link + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "approved", "link"] + + ID = 0xe085f4ea + QUALNAME = "functions.messages.HideAllChatJoinRequests" + + def __init__(self, *, peer: "raw.base.InputPeer", approved: Optional[bool] = None, link: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.approved = approved # flags.0?true + self.link = link # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HideAllChatJoinRequests": + + flags = Int.read(b) + + approved = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + link = String.read(b) if flags & (1 << 1) else None + return HideAllChatJoinRequests(peer=peer, approved=approved, link=link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.approved else 0 + flags |= (1 << 1) if self.link is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.link is not None: + b.write(String(self.link)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/hide_chat_join_request.py b/pyrogram/raw/functions/messages/hide_chat_join_request.py new file mode 100644 index 00000000..cbc5b75e --- /dev/null +++ b/pyrogram/raw/functions/messages/hide_chat_join_request.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HideChatJoinRequest(TLObject): # type: ignore + """Dismiss or approve a chat join request related to a specific chat or channel. + + + Details: + - Layer: ``224`` + - ID: ``7FE7E815`` + + Parameters: + peer (:obj:`InputPeer `): + The chat or channel + + user_id (:obj:`InputUser `): + The user whose join request » should be dismissed or approved + + approved (``bool``, *optional*): + Whether to dismiss or approve the chat join request » + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "user_id", "approved"] + + ID = 0x7fe7e815 + QUALNAME = "functions.messages.HideChatJoinRequest" + + def __init__(self, *, peer: "raw.base.InputPeer", user_id: "raw.base.InputUser", approved: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.user_id = user_id # InputUser + self.approved = approved # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HideChatJoinRequest": + + flags = Int.read(b) + + approved = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + user_id = TLObject.read(b) + + return HideChatJoinRequest(peer=peer, user_id=user_id, approved=approved) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.approved else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/hide_peer_settings_bar.py b/pyrogram/raw/functions/messages/hide_peer_settings_bar.py new file mode 100644 index 00000000..27e44692 --- /dev/null +++ b/pyrogram/raw/functions/messages/hide_peer_settings_bar.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HidePeerSettingsBar(TLObject): # type: ignore + """Should be called after the user hides the report spam/add as contact bar of a new chat, effectively prevents the user from executing the actions specified in the action bar ». + + + Details: + - Layer: ``224`` + - ID: ``4FACB138`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x4facb138 + QUALNAME = "functions.messages.HidePeerSettingsBar" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HidePeerSettingsBar": + # No flags + + peer = TLObject.read(b) + + return HidePeerSettingsBar(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/import_chat_invite.py b/pyrogram/raw/functions/messages/import_chat_invite.py new file mode 100644 index 00000000..489eb990 --- /dev/null +++ b/pyrogram/raw/functions/messages/import_chat_invite.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportChatInvite(TLObject): # type: ignore + """Import a chat invite and join a private chat/supergroup/channel + + + Details: + - Layer: ``224`` + - ID: ``6C50051C`` + + Parameters: + hash (``str``): + hash from a chat invite deep link + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0x6c50051c + QUALNAME = "functions.messages.ImportChatInvite" + + def __init__(self, *, hash: str) -> None: + self.hash = hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportChatInvite": + # No flags + + hash = String.read(b) + + return ImportChatInvite(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/init_history_import.py b/pyrogram/raw/functions/messages/init_history_import.py new file mode 100644 index 00000000..ba9ca017 --- /dev/null +++ b/pyrogram/raw/functions/messages/init_history_import.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InitHistoryImport(TLObject): # type: ignore + """Import chat history from a foreign chat app into a specific Telegram chat, click here for more info about imported chats ». + + + Details: + - Layer: ``224`` + - ID: ``34090C3B`` + + Parameters: + peer (:obj:`InputPeer `): + The Telegram chat where the history should be imported. + + file (:obj:`InputFile `): + File with messages to import. + + media_count (``int`` ``32-bit``): + Number of media files associated with the chat that will be uploaded using messages.uploadImportedMedia. + + Returns: + :obj:`messages.HistoryImport ` + """ + + __slots__: List[str] = ["peer", "file", "media_count"] + + ID = 0x34090c3b + QUALNAME = "functions.messages.InitHistoryImport" + + def __init__(self, *, peer: "raw.base.InputPeer", file: "raw.base.InputFile", media_count: int) -> None: + self.peer = peer # InputPeer + self.file = file # InputFile + self.media_count = media_count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InitHistoryImport": + # No flags + + peer = TLObject.read(b) + + file = TLObject.read(b) + + media_count = Int.read(b) + + return InitHistoryImport(peer=peer, file=file, media_count=media_count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.file.write()) + + b.write(Int(self.media_count)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/install_sticker_set.py b/pyrogram/raw/functions/messages/install_sticker_set.py new file mode 100644 index 00000000..d8869912 --- /dev/null +++ b/pyrogram/raw/functions/messages/install_sticker_set.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InstallStickerSet(TLObject): # type: ignore + """Install a stickerset + + + Details: + - Layer: ``224`` + - ID: ``C78FE460`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + Stickerset to install + + archived (``bool``): + Whether to archive stickerset + + Returns: + :obj:`messages.StickerSetInstallResult ` + """ + + __slots__: List[str] = ["stickerset", "archived"] + + ID = 0xc78fe460 + QUALNAME = "functions.messages.InstallStickerSet" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet", archived: bool) -> None: + self.stickerset = stickerset # InputStickerSet + self.archived = archived # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InstallStickerSet": + # No flags + + stickerset = TLObject.read(b) + + archived = Bool.read(b) + + return InstallStickerSet(stickerset=stickerset, archived=archived) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + b.write(Bool(self.archived)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/mark_dialog_unread.py b/pyrogram/raw/functions/messages/mark_dialog_unread.py new file mode 100644 index 00000000..28fedd2a --- /dev/null +++ b/pyrogram/raw/functions/messages/mark_dialog_unread.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MarkDialogUnread(TLObject): # type: ignore + """Manually mark dialog as unread + + + Details: + - Layer: ``224`` + - ID: ``8C5006F8`` + + Parameters: + peer (:obj:`InputDialogPeer `): + Dialog + + unread (``bool``, *optional*): + Mark as unread/read + + parent_peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "unread", "parent_peer"] + + ID = 0x8c5006f8 + QUALNAME = "functions.messages.MarkDialogUnread" + + def __init__(self, *, peer: "raw.base.InputDialogPeer", unread: Optional[bool] = None, parent_peer: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputDialogPeer + self.unread = unread # flags.0?true + self.parent_peer = parent_peer # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MarkDialogUnread": + + flags = Int.read(b) + + unread = True if flags & (1 << 0) else False + parent_peer = TLObject.read(b) if flags & (1 << 1) else None + + peer = TLObject.read(b) + + return MarkDialogUnread(peer=peer, unread=unread, parent_peer=parent_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.unread else 0 + flags |= (1 << 1) if self.parent_peer is not None else 0 + b.write(Int(flags)) + + if self.parent_peer is not None: + b.write(self.parent_peer.write()) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/migrate_chat.py b/pyrogram/raw/functions/messages/migrate_chat.py new file mode 100644 index 00000000..e886305f --- /dev/null +++ b/pyrogram/raw/functions/messages/migrate_chat.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MigrateChat(TLObject): # type: ignore + """Turn a basic group into a supergroup + + + Details: + - Layer: ``224`` + - ID: ``A2875319`` + + Parameters: + chat_id (``int`` ``64-bit``): + Basic group to migrate + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["chat_id"] + + ID = 0xa2875319 + QUALNAME = "functions.messages.MigrateChat" + + def __init__(self, *, chat_id: int) -> None: + self.chat_id = chat_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MigrateChat": + # No flags + + chat_id = Long.read(b) + + return MigrateChat(chat_id=chat_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/prolong_web_view.py b/pyrogram/raw/functions/messages/prolong_web_view.py new file mode 100644 index 00000000..5d58c0e4 --- /dev/null +++ b/pyrogram/raw/functions/messages/prolong_web_view.py @@ -0,0 +1,99 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ProlongWebView(TLObject): # type: ignore + """Indicate to the server (from the user side) that the user is still using a web app. + + + Details: + - Layer: ``224`` + - ID: ``B0D81A83`` + + Parameters: + peer (:obj:`InputPeer `): + Dialog where the web app was opened. + + bot (:obj:`InputUser `): + Bot that owns the web app + + query_id (``int`` ``64-bit``): + Web app interaction ID obtained from messages.requestWebView + + silent (``bool``, *optional*): + Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent silently (no notifications for the receivers). + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story. + + send_as (:obj:`InputPeer `, *optional*): + Open the web app as the specified peer + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "bot", "query_id", "silent", "reply_to", "send_as"] + + ID = 0xb0d81a83 + QUALNAME = "functions.messages.ProlongWebView" + + def __init__(self, *, peer: "raw.base.InputPeer", bot: "raw.base.InputUser", query_id: int, silent: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, send_as: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.bot = bot # InputUser + self.query_id = query_id # long + self.silent = silent # flags.5?true + self.reply_to = reply_to # flags.0?InputReplyTo + self.send_as = send_as # flags.13?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ProlongWebView": + + flags = Int.read(b) + + silent = True if flags & (1 << 5) else False + peer = TLObject.read(b) + + bot = TLObject.read(b) + + query_id = Long.read(b) + + reply_to = TLObject.read(b) if flags & (1 << 0) else None + + send_as = TLObject.read(b) if flags & (1 << 13) else None + + return ProlongWebView(peer=peer, bot=bot, query_id=query_id, silent=silent, reply_to=reply_to, send_as=send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 0) if self.reply_to is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.bot.write()) + + b.write(Long(self.query_id)) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + if self.send_as is not None: + b.write(self.send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/rate_transcribed_audio.py b/pyrogram/raw/functions/messages/rate_transcribed_audio.py new file mode 100644 index 00000000..6fa0f1b9 --- /dev/null +++ b/pyrogram/raw/functions/messages/rate_transcribed_audio.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RateTranscribedAudio(TLObject): # type: ignore + """Rate transcribed voice message + + + Details: + - Layer: ``224`` + - ID: ``7F1D072F`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the voice message was sent + + msg_id (``int`` ``32-bit``): + Message ID + + transcription_id (``int`` ``64-bit``): + Transcription ID + + good (``bool``): + Whether the transcription was correct + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "msg_id", "transcription_id", "good"] + + ID = 0x7f1d072f + QUALNAME = "functions.messages.RateTranscribedAudio" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, transcription_id: int, good: bool) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.transcription_id = transcription_id # long + self.good = good # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RateTranscribedAudio": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + transcription_id = Long.read(b) + + good = Bool.read(b) + + return RateTranscribedAudio(peer=peer, msg_id=msg_id, transcription_id=transcription_id, good=good) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Long(self.transcription_id)) + + b.write(Bool(self.good)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_discussion.py b/pyrogram/raw/functions/messages/read_discussion.py new file mode 100644 index 00000000..98a3f2bc --- /dev/null +++ b/pyrogram/raw/functions/messages/read_discussion.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadDiscussion(TLObject): # type: ignore + """Mark a thread as read + + + Details: + - Layer: ``224`` + - ID: ``F731A9F4`` + + Parameters: + peer (:obj:`InputPeer `): + Group ID + + msg_id (``int`` ``32-bit``): + ID of message that started the thread + + read_max_id (``int`` ``32-bit``): + ID up to which thread messages were read + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "msg_id", "read_max_id"] + + ID = 0xf731a9f4 + QUALNAME = "functions.messages.ReadDiscussion" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, read_max_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.read_max_id = read_max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadDiscussion": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + read_max_id = Int.read(b) + + return ReadDiscussion(peer=peer, msg_id=msg_id, read_max_id=read_max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Int(self.read_max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_encrypted_history.py b/pyrogram/raw/functions/messages/read_encrypted_history.py new file mode 100644 index 00000000..5494b133 --- /dev/null +++ b/pyrogram/raw/functions/messages/read_encrypted_history.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadEncryptedHistory(TLObject): # type: ignore + """Marks message history within a secret chat as read. + + + Details: + - Layer: ``224`` + - ID: ``7F4B690A`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + Secret chat ID + + max_date (``int`` ``32-bit``): + Maximum date value for received messages in history + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "max_date"] + + ID = 0x7f4b690a + QUALNAME = "functions.messages.ReadEncryptedHistory" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", max_date: int) -> None: + self.peer = peer # InputEncryptedChat + self.max_date = max_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadEncryptedHistory": + # No flags + + peer = TLObject.read(b) + + max_date = Int.read(b) + + return ReadEncryptedHistory(peer=peer, max_date=max_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.max_date)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_featured_stickers.py b/pyrogram/raw/functions/messages/read_featured_stickers.py new file mode 100644 index 00000000..c8e1f1b2 --- /dev/null +++ b/pyrogram/raw/functions/messages/read_featured_stickers.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadFeaturedStickers(TLObject): # type: ignore + """Mark new featured stickers as read + + + Details: + - Layer: ``224`` + - ID: ``5B118126`` + + Parameters: + id (List of ``int`` ``64-bit``): + IDs of stickersets to mark as read + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id"] + + ID = 0x5b118126 + QUALNAME = "functions.messages.ReadFeaturedStickers" + + def __init__(self, *, id: List[int]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadFeaturedStickers": + # No flags + + id = TLObject.read(b, Long) + + return ReadFeaturedStickers(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_history.py b/pyrogram/raw/functions/messages/read_history.py new file mode 100644 index 00000000..fd2155da --- /dev/null +++ b/pyrogram/raw/functions/messages/read_history.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadHistory(TLObject): # type: ignore + """Marks message history as read. + + + Details: + - Layer: ``224`` + - ID: ``E306D3A`` + + Parameters: + peer (:obj:`InputPeer `): + Target user or group + + max_id (``int`` ``32-bit``): + If a positive value is passed, only messages with identifiers less or equal than the given one will be read + + Returns: + :obj:`messages.AffectedMessages ` + """ + + __slots__: List[str] = ["peer", "max_id"] + + ID = 0xe306d3a + QUALNAME = "functions.messages.ReadHistory" + + def __init__(self, *, peer: "raw.base.InputPeer", max_id: int) -> None: + self.peer = peer # InputPeer + self.max_id = max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadHistory": + # No flags + + peer = TLObject.read(b) + + max_id = Int.read(b) + + return ReadHistory(peer=peer, max_id=max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_mentions.py b/pyrogram/raw/functions/messages/read_mentions.py new file mode 100644 index 00000000..39c42a9c --- /dev/null +++ b/pyrogram/raw/functions/messages/read_mentions.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadMentions(TLObject): # type: ignore + """Mark mentions as read + + + Details: + - Layer: ``224`` + - ID: ``36E5BF4D`` + + Parameters: + peer (:obj:`InputPeer `): + Dialog + + top_msg_id (``int`` ``32-bit``, *optional*): + Mark as read only mentions within the specified forum topic + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["peer", "top_msg_id"] + + ID = 0x36e5bf4d + QUALNAME = "functions.messages.ReadMentions" + + def __init__(self, *, peer: "raw.base.InputPeer", top_msg_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.top_msg_id = top_msg_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadMentions": + + flags = Int.read(b) + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + return ReadMentions(peer=peer, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_message_contents.py b/pyrogram/raw/functions/messages/read_message_contents.py new file mode 100644 index 00000000..7a92f424 --- /dev/null +++ b/pyrogram/raw/functions/messages/read_message_contents.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadMessageContents(TLObject): # type: ignore + """Notifies the sender about the recipient having listened a voice message or watched a video. + + + Details: + - Layer: ``224`` + - ID: ``36A73F77`` + + Parameters: + id (List of ``int`` ``32-bit``): + Message ID list + + Returns: + :obj:`messages.AffectedMessages ` + """ + + __slots__: List[str] = ["id"] + + ID = 0x36a73f77 + QUALNAME = "functions.messages.ReadMessageContents" + + def __init__(self, *, id: List[int]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadMessageContents": + # No flags + + id = TLObject.read(b, Int) + + return ReadMessageContents(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_reactions.py b/pyrogram/raw/functions/messages/read_reactions.py new file mode 100644 index 00000000..cd3b732e --- /dev/null +++ b/pyrogram/raw/functions/messages/read_reactions.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadReactions(TLObject): # type: ignore + """Mark message reactions » as read + + + Details: + - Layer: ``224`` + - ID: ``9EC44F93`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + top_msg_id (``int`` ``32-bit``, *optional*): + Mark as read only reactions to messages within the specified forum topic + + saved_peer_id (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["peer", "top_msg_id", "saved_peer_id"] + + ID = 0x9ec44f93 + QUALNAME = "functions.messages.ReadReactions" + + def __init__(self, *, peer: "raw.base.InputPeer", top_msg_id: Optional[int] = None, saved_peer_id: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.top_msg_id = top_msg_id # flags.0?int + self.saved_peer_id = saved_peer_id # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadReactions": + + flags = Int.read(b) + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None + + return ReadReactions(peer=peer, top_msg_id=top_msg_id, saved_peer_id=saved_peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + flags |= (1 << 1) if self.saved_peer_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/read_saved_history.py b/pyrogram/raw/functions/messages/read_saved_history.py new file mode 100644 index 00000000..028fe327 --- /dev/null +++ b/pyrogram/raw/functions/messages/read_saved_history.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadSavedHistory(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``BA4A3B5B`` + + Parameters: + parent_peer (:obj:`InputPeer `): + N/A + + peer (:obj:`InputPeer `): + N/A + + max_id (``int`` ``32-bit``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["parent_peer", "peer", "max_id"] + + ID = 0xba4a3b5b + QUALNAME = "functions.messages.ReadSavedHistory" + + def __init__(self, *, parent_peer: "raw.base.InputPeer", peer: "raw.base.InputPeer", max_id: int) -> None: + self.parent_peer = parent_peer # InputPeer + self.peer = peer # InputPeer + self.max_id = max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadSavedHistory": + # No flags + + parent_peer = TLObject.read(b) + + peer = TLObject.read(b) + + max_id = Int.read(b) + + return ReadSavedHistory(parent_peer=parent_peer, peer=peer, max_id=max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.parent_peer.write()) + + b.write(self.peer.write()) + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/received_messages.py b/pyrogram/raw/functions/messages/received_messages.py new file mode 100644 index 00000000..fee66bd5 --- /dev/null +++ b/pyrogram/raw/functions/messages/received_messages.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReceivedMessages(TLObject): # type: ignore + """Confirms receipt of messages by a client, cancels PUSH-notification sending. + + + Details: + - Layer: ``224`` + - ID: ``5A954C0`` + + Parameters: + max_id (``int`` ``32-bit``): + Maximum message ID available in a client. + + Returns: + List of :obj:`ReceivedNotifyMessage ` + """ + + __slots__: List[str] = ["max_id"] + + ID = 0x5a954c0 + QUALNAME = "functions.messages.ReceivedMessages" + + def __init__(self, *, max_id: int) -> None: + self.max_id = max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReceivedMessages": + # No flags + + max_id = Int.read(b) + + return ReceivedMessages(max_id=max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/received_queue.py b/pyrogram/raw/functions/messages/received_queue.py new file mode 100644 index 00000000..46666979 --- /dev/null +++ b/pyrogram/raw/functions/messages/received_queue.py @@ -0,0 +1,56 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReceivedQueue(TLObject): # type: ignore + """Confirms receipt of messages in a secret chat by client, cancels push notifications. +The method returns a list of random_ids of messages for which push notifications were cancelled. + + + Details: + - Layer: ``224`` + - ID: ``55A5BB66`` + + Parameters: + max_qts (``int`` ``32-bit``): + Maximum qts value available at the client + + Returns: + List of ``int`` ``64-bit`` + """ + + __slots__: List[str] = ["max_qts"] + + ID = 0x55a5bb66 + QUALNAME = "functions.messages.ReceivedQueue" + + def __init__(self, *, max_qts: int) -> None: + self.max_qts = max_qts # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReceivedQueue": + # No flags + + max_qts = Int.read(b) + + return ReceivedQueue(max_qts=max_qts) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.max_qts)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/reorder_pinned_dialogs.py b/pyrogram/raw/functions/messages/reorder_pinned_dialogs.py new file mode 100644 index 00000000..e36982a5 --- /dev/null +++ b/pyrogram/raw/functions/messages/reorder_pinned_dialogs.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderPinnedDialogs(TLObject): # type: ignore + """Reorder pinned dialogs + + + Details: + - Layer: ``224`` + - ID: ``3B1ADF37`` + + Parameters: + folder_id (``int`` ``32-bit``): + Peer folder ID, for more info click here + + order (List of :obj:`InputDialogPeer `): + New dialog order + + force (``bool``, *optional*): + If set, dialogs pinned server-side but not present in the order field will be unpinned. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["folder_id", "order", "force"] + + ID = 0x3b1adf37 + QUALNAME = "functions.messages.ReorderPinnedDialogs" + + def __init__(self, *, folder_id: int, order: List["raw.base.InputDialogPeer"], force: Optional[bool] = None) -> None: + self.folder_id = folder_id # int + self.order = order # Vector + self.force = force # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderPinnedDialogs": + + flags = Int.read(b) + + force = True if flags & (1 << 0) else False + folder_id = Int.read(b) + + order = TLObject.read(b) + + return ReorderPinnedDialogs(folder_id=folder_id, order=order, force=force) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.force else 0 + b.write(Int(flags)) + + b.write(Int(self.folder_id)) + + b.write(Vector(self.order)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/reorder_pinned_forum_topics.py b/pyrogram/raw/functions/messages/reorder_pinned_forum_topics.py new file mode 100644 index 00000000..e26519eb --- /dev/null +++ b/pyrogram/raw/functions/messages/reorder_pinned_forum_topics.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderPinnedForumTopics(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E7841F0`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + order (List of ``int`` ``32-bit``): + N/A + + force (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "order", "force"] + + ID = 0xe7841f0 + QUALNAME = "functions.messages.ReorderPinnedForumTopics" + + def __init__(self, *, peer: "raw.base.InputPeer", order: List[int], force: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.order = order # Vector + self.force = force # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderPinnedForumTopics": + + flags = Int.read(b) + + force = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + order = TLObject.read(b, Int) + + return ReorderPinnedForumTopics(peer=peer, order=order, force=force) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.force else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Vector(self.order, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/reorder_pinned_saved_dialogs.py b/pyrogram/raw/functions/messages/reorder_pinned_saved_dialogs.py new file mode 100644 index 00000000..a6af82ed --- /dev/null +++ b/pyrogram/raw/functions/messages/reorder_pinned_saved_dialogs.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderPinnedSavedDialogs(TLObject): # type: ignore + """Reorder pinned saved message dialogs ». + + + Details: + - Layer: ``224`` + - ID: ``8B716587`` + + Parameters: + order (List of :obj:`InputDialogPeer `): + New dialog order + + force (``bool``, *optional*): + If set, dialogs pinned server-side but not present in the order field will be unpinned. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["order", "force"] + + ID = 0x8b716587 + QUALNAME = "functions.messages.ReorderPinnedSavedDialogs" + + def __init__(self, *, order: List["raw.base.InputDialogPeer"], force: Optional[bool] = None) -> None: + self.order = order # Vector + self.force = force # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderPinnedSavedDialogs": + + flags = Int.read(b) + + force = True if flags & (1 << 0) else False + order = TLObject.read(b) + + return ReorderPinnedSavedDialogs(order=order, force=force) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.force else 0 + b.write(Int(flags)) + + b.write(Vector(self.order)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/reorder_quick_replies.py b/pyrogram/raw/functions/messages/reorder_quick_replies.py new file mode 100644 index 00000000..0399c1b8 --- /dev/null +++ b/pyrogram/raw/functions/messages/reorder_quick_replies.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderQuickReplies(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``60331907`` + + Parameters: + order (List of ``int`` ``32-bit``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["order"] + + ID = 0x60331907 + QUALNAME = "functions.messages.ReorderQuickReplies" + + def __init__(self, *, order: List[int]) -> None: + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderQuickReplies": + # No flags + + order = TLObject.read(b, Int) + + return ReorderQuickReplies(order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.order, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/reorder_sticker_sets.py b/pyrogram/raw/functions/messages/reorder_sticker_sets.py new file mode 100644 index 00000000..211ac06c --- /dev/null +++ b/pyrogram/raw/functions/messages/reorder_sticker_sets.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderStickerSets(TLObject): # type: ignore + """Reorder installed stickersets + + + Details: + - Layer: ``224`` + - ID: ``78337739`` + + Parameters: + order (List of ``int`` ``64-bit``): + New stickerset order by stickerset IDs + + masks (``bool``, *optional*): + Reorder mask stickersets + + emojis (``bool``, *optional*): + Reorder custom emoji stickersets + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["order", "masks", "emojis"] + + ID = 0x78337739 + QUALNAME = "functions.messages.ReorderStickerSets" + + def __init__(self, *, order: List[int], masks: Optional[bool] = None, emojis: Optional[bool] = None) -> None: + self.order = order # Vector + self.masks = masks # flags.0?true + self.emojis = emojis # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderStickerSets": + + flags = Int.read(b) + + masks = True if flags & (1 << 0) else False + emojis = True if flags & (1 << 1) else False + order = TLObject.read(b, Long) + + return ReorderStickerSets(order=order, masks=masks, emojis=emojis) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.masks else 0 + flags |= (1 << 1) if self.emojis else 0 + b.write(Int(flags)) + + b.write(Vector(self.order, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/report.py b/pyrogram/raw/functions/messages/report.py new file mode 100644 index 00000000..5e7ee6f9 --- /dev/null +++ b/pyrogram/raw/functions/messages/report.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Report(TLObject): # type: ignore + """Report a message in a chat for violation of telegram's Terms of Service + + + Details: + - Layer: ``224`` + - ID: ``FC78AF9B`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (List of ``int`` ``32-bit``): + IDs of messages to report + + option (``bytes``): + N/A + + message (``str``): + Comment for report moderation + + Returns: + :obj:`ReportResult ` + """ + + __slots__: List[str] = ["peer", "id", "option", "message"] + + ID = 0xfc78af9b + QUALNAME = "functions.messages.Report" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int], option: bytes, message: str) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + self.option = option # bytes + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Report": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + option = Bytes.read(b) + + message = String.read(b) + + return Report(peer=peer, id=id, option=option, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + b.write(Bytes(self.option)) + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/report_encrypted_spam.py b/pyrogram/raw/functions/messages/report_encrypted_spam.py new file mode 100644 index 00000000..12356d97 --- /dev/null +++ b/pyrogram/raw/functions/messages/report_encrypted_spam.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportEncryptedSpam(TLObject): # type: ignore + """Report a secret chat for spam + + + Details: + - Layer: ``224`` + - ID: ``4B0C8C0F`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + The secret chat to report + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x4b0c8c0f + QUALNAME = "functions.messages.ReportEncryptedSpam" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat") -> None: + self.peer = peer # InputEncryptedChat + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportEncryptedSpam": + # No flags + + peer = TLObject.read(b) + + return ReportEncryptedSpam(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/report_messages_delivery.py b/pyrogram/raw/functions/messages/report_messages_delivery.py new file mode 100644 index 00000000..515d2cd6 --- /dev/null +++ b/pyrogram/raw/functions/messages/report_messages_delivery.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportMessagesDelivery(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``5A6D7395`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + id (List of ``int`` ``32-bit``): + N/A + + push (``bool``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "id", "push"] + + ID = 0x5a6d7395 + QUALNAME = "functions.messages.ReportMessagesDelivery" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int], push: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + self.push = push # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportMessagesDelivery": + + flags = Int.read(b) + + push = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return ReportMessagesDelivery(peer=peer, id=id, push=push) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.push else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/report_reaction.py b/pyrogram/raw/functions/messages/report_reaction.py new file mode 100644 index 00000000..109c797b --- /dev/null +++ b/pyrogram/raw/functions/messages/report_reaction.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportReaction(TLObject): # type: ignore + """Report a message reaction + + + Details: + - Layer: ``224`` + - ID: ``3F64C076`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the message was sent + + id (``int`` ``32-bit``): + Message ID + + reaction_peer (:obj:`InputPeer `): + Peer that sent the reaction + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "id", "reaction_peer"] + + ID = 0x3f64c076 + QUALNAME = "functions.messages.ReportReaction" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, reaction_peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + self.id = id # int + self.reaction_peer = reaction_peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportReaction": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + reaction_peer = TLObject.read(b) + + return ReportReaction(peer=peer, id=id, reaction_peer=reaction_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + b.write(self.reaction_peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/report_spam.py b/pyrogram/raw/functions/messages/report_spam.py new file mode 100644 index 00000000..3fb86ae1 --- /dev/null +++ b/pyrogram/raw/functions/messages/report_spam.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportSpam(TLObject): # type: ignore + """Report a new incoming chat for spam, if the peer settings of the chat allow us to do that + + + Details: + - Layer: ``224`` + - ID: ``CF1592DB`` + + Parameters: + peer (:obj:`InputPeer `): + Peer to report + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer"] + + ID = 0xcf1592db + QUALNAME = "functions.messages.ReportSpam" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportSpam": + # No flags + + peer = TLObject.read(b) + + return ReportSpam(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/report_sponsored_message.py b/pyrogram/raw/functions/messages/report_sponsored_message.py new file mode 100644 index 00000000..5bd87bf0 --- /dev/null +++ b/pyrogram/raw/functions/messages/report_sponsored_message.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReportSponsoredMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``12CBF0C4`` + + Parameters: + random_id (``bytes``): + N/A + + option (``bytes``): + N/A + + Returns: + :obj:`channels.SponsoredMessageReportResult ` + """ + + __slots__: List[str] = ["random_id", "option"] + + ID = 0x12cbf0c4 + QUALNAME = "functions.messages.ReportSponsoredMessage" + + def __init__(self, *, random_id: bytes, option: bytes) -> None: + self.random_id = random_id # bytes + self.option = option # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReportSponsoredMessage": + # No flags + + random_id = Bytes.read(b) + + option = Bytes.read(b) + + return ReportSponsoredMessage(random_id=random_id, option=option) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.random_id)) + + b.write(Bytes(self.option)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/request_app_web_view.py b/pyrogram/raw/functions/messages/request_app_web_view.py new file mode 100644 index 00000000..52d92aa8 --- /dev/null +++ b/pyrogram/raw/functions/messages/request_app_web_view.py @@ -0,0 +1,110 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestAppWebView(TLObject): # type: ignore + """Open a bot mini app from a direct Mini App deep link, sending over user information after user confirmation. + + + Details: + - Layer: ``224`` + - ID: ``53618BCE`` + + Parameters: + peer (:obj:`InputPeer `): + If the client has clicked on the link in a Telegram chat, pass the chat's peer information; otherwise pass the bot's peer information, instead. + + app (:obj:`InputBotApp `): + The app obtained by invoking messages.getBotApp as specified in the direct Mini App deep link docs. + + platform (``str``): + Short name of the application; 0-64 English letters, digits, and underscores + + write_allowed (``bool``, *optional*): + Set this flag if the bot is asking permission to send messages to the user as specified in the direct Mini App deep link docs, and the user agreed. + + compact (``bool``, *optional*): + N/A + + fullscreen (``bool``, *optional*): + N/A + + start_param (``str``, *optional*): + If the startapp query string parameter is present in the direct Mini App deep link, pass it to start_param. + + theme_params (:obj:`DataJSON `, *optional*): + Theme parameters » + + Returns: + :obj:`WebViewResult ` + """ + + __slots__: List[str] = ["peer", "app", "platform", "write_allowed", "compact", "fullscreen", "start_param", "theme_params"] + + ID = 0x53618bce + QUALNAME = "functions.messages.RequestAppWebView" + + def __init__(self, *, peer: "raw.base.InputPeer", app: "raw.base.InputBotApp", platform: str, write_allowed: Optional[bool] = None, compact: Optional[bool] = None, fullscreen: Optional[bool] = None, start_param: Optional[str] = None, theme_params: "raw.base.DataJSON" = None) -> None: + self.peer = peer # InputPeer + self.app = app # InputBotApp + self.platform = platform # string + self.write_allowed = write_allowed # flags.0?true + self.compact = compact # flags.7?true + self.fullscreen = fullscreen # flags.8?true + self.start_param = start_param # flags.1?string + self.theme_params = theme_params # flags.2?DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestAppWebView": + + flags = Int.read(b) + + write_allowed = True if flags & (1 << 0) else False + compact = True if flags & (1 << 7) else False + fullscreen = True if flags & (1 << 8) else False + peer = TLObject.read(b) + + app = TLObject.read(b) + + start_param = String.read(b) if flags & (1 << 1) else None + theme_params = TLObject.read(b) if flags & (1 << 2) else None + + platform = String.read(b) + + return RequestAppWebView(peer=peer, app=app, platform=platform, write_allowed=write_allowed, compact=compact, fullscreen=fullscreen, start_param=start_param, theme_params=theme_params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.write_allowed else 0 + flags |= (1 << 7) if self.compact else 0 + flags |= (1 << 8) if self.fullscreen else 0 + flags |= (1 << 1) if self.start_param is not None else 0 + flags |= (1 << 2) if self.theme_params is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.app.write()) + + if self.start_param is not None: + b.write(String(self.start_param)) + + if self.theme_params is not None: + b.write(self.theme_params.write()) + + b.write(String(self.platform)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/request_encryption.py b/pyrogram/raw/functions/messages/request_encryption.py new file mode 100644 index 00000000..3af75b49 --- /dev/null +++ b/pyrogram/raw/functions/messages/request_encryption.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestEncryption(TLObject): # type: ignore + """Sends a request to start a secret chat to the user. + + + Details: + - Layer: ``224`` + - ID: ``F64DAF43`` + + Parameters: + user_id (:obj:`InputUser `): + User ID + + random_id (``int`` ``32-bit``): + Unique client request ID required to prevent resending. This also doubles as the chat ID. + + g_a (``bytes``): + A = g ^ a mod p, see Wikipedia + + Returns: + :obj:`EncryptedChat ` + """ + + __slots__: List[str] = ["user_id", "random_id", "g_a"] + + ID = 0xf64daf43 + QUALNAME = "functions.messages.RequestEncryption" + + def __init__(self, *, user_id: "raw.base.InputUser", random_id: int, g_a: bytes) -> None: + self.user_id = user_id # InputUser + self.random_id = random_id # int + self.g_a = g_a # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestEncryption": + # No flags + + user_id = TLObject.read(b) + + random_id = Int.read(b) + + g_a = Bytes.read(b) + + return RequestEncryption(user_id=user_id, random_id=random_id, g_a=g_a) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(Int(self.random_id)) + + b.write(Bytes(self.g_a)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/request_main_web_view.py b/pyrogram/raw/functions/messages/request_main_web_view.py new file mode 100644 index 00000000..3588a222 --- /dev/null +++ b/pyrogram/raw/functions/messages/request_main_web_view.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestMainWebView(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C9E01E7B`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + bot (:obj:`InputUser `): + N/A + + platform (``str``): + N/A + + compact (``bool``, *optional*): + N/A + + fullscreen (``bool``, *optional*): + N/A + + start_param (``str``, *optional*): + N/A + + theme_params (:obj:`DataJSON `, *optional*): + N/A + + Returns: + :obj:`WebViewResult ` + """ + + __slots__: List[str] = ["peer", "bot", "platform", "compact", "fullscreen", "start_param", "theme_params"] + + ID = 0xc9e01e7b + QUALNAME = "functions.messages.RequestMainWebView" + + def __init__(self, *, peer: "raw.base.InputPeer", bot: "raw.base.InputUser", platform: str, compact: Optional[bool] = None, fullscreen: Optional[bool] = None, start_param: Optional[str] = None, theme_params: "raw.base.DataJSON" = None) -> None: + self.peer = peer # InputPeer + self.bot = bot # InputUser + self.platform = platform # string + self.compact = compact # flags.7?true + self.fullscreen = fullscreen # flags.8?true + self.start_param = start_param # flags.1?string + self.theme_params = theme_params # flags.0?DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestMainWebView": + + flags = Int.read(b) + + compact = True if flags & (1 << 7) else False + fullscreen = True if flags & (1 << 8) else False + peer = TLObject.read(b) + + bot = TLObject.read(b) + + start_param = String.read(b) if flags & (1 << 1) else None + theme_params = TLObject.read(b) if flags & (1 << 0) else None + + platform = String.read(b) + + return RequestMainWebView(peer=peer, bot=bot, platform=platform, compact=compact, fullscreen=fullscreen, start_param=start_param, theme_params=theme_params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 7) if self.compact else 0 + flags |= (1 << 8) if self.fullscreen else 0 + flags |= (1 << 1) if self.start_param is not None else 0 + flags |= (1 << 0) if self.theme_params is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.bot.write()) + + if self.start_param is not None: + b.write(String(self.start_param)) + + if self.theme_params is not None: + b.write(self.theme_params.write()) + + b.write(String(self.platform)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/request_simple_web_view.py b/pyrogram/raw/functions/messages/request_simple_web_view.py new file mode 100644 index 00000000..d50121b2 --- /dev/null +++ b/pyrogram/raw/functions/messages/request_simple_web_view.py @@ -0,0 +1,117 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestSimpleWebView(TLObject): # type: ignore + """Open a bot mini app. + + + Details: + - Layer: ``224`` + - ID: ``413A3E73`` + + Parameters: + bot (:obj:`InputUser `): + Bot that owns the mini app + + platform (``str``): + Short name of the application; 0-64 English letters, digits, and underscores + + from_switch_webview (``bool``, *optional*): + Whether the webapp was opened by clicking on the switch_webview button shown on top of the inline results list returned by messages.getInlineBotResults. + + from_side_menu (``bool``, *optional*): + Set this flag if opening the Mini App from the installed side menu entry » or from a Mini App link ». + + compact (``bool``, *optional*): + N/A + + fullscreen (``bool``, *optional*): + N/A + + url (``str``, *optional*): + Web app URL, if opening from a keyboard button or inline result + + start_param (``str``, *optional*): + Start parameter, if opening from a Mini App link ». + + theme_params (:obj:`DataJSON `, *optional*): + Theme parameters » + + Returns: + :obj:`WebViewResult ` + """ + + __slots__: List[str] = ["bot", "platform", "from_switch_webview", "from_side_menu", "compact", "fullscreen", "url", "start_param", "theme_params"] + + ID = 0x413a3e73 + QUALNAME = "functions.messages.RequestSimpleWebView" + + def __init__(self, *, bot: "raw.base.InputUser", platform: str, from_switch_webview: Optional[bool] = None, from_side_menu: Optional[bool] = None, compact: Optional[bool] = None, fullscreen: Optional[bool] = None, url: Optional[str] = None, start_param: Optional[str] = None, theme_params: "raw.base.DataJSON" = None) -> None: + self.bot = bot # InputUser + self.platform = platform # string + self.from_switch_webview = from_switch_webview # flags.1?true + self.from_side_menu = from_side_menu # flags.2?true + self.compact = compact # flags.7?true + self.fullscreen = fullscreen # flags.8?true + self.url = url # flags.3?string + self.start_param = start_param # flags.4?string + self.theme_params = theme_params # flags.0?DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestSimpleWebView": + + flags = Int.read(b) + + from_switch_webview = True if flags & (1 << 1) else False + from_side_menu = True if flags & (1 << 2) else False + compact = True if flags & (1 << 7) else False + fullscreen = True if flags & (1 << 8) else False + bot = TLObject.read(b) + + url = String.read(b) if flags & (1 << 3) else None + start_param = String.read(b) if flags & (1 << 4) else None + theme_params = TLObject.read(b) if flags & (1 << 0) else None + + platform = String.read(b) + + return RequestSimpleWebView(bot=bot, platform=platform, from_switch_webview=from_switch_webview, from_side_menu=from_side_menu, compact=compact, fullscreen=fullscreen, url=url, start_param=start_param, theme_params=theme_params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.from_switch_webview else 0 + flags |= (1 << 2) if self.from_side_menu else 0 + flags |= (1 << 7) if self.compact else 0 + flags |= (1 << 8) if self.fullscreen else 0 + flags |= (1 << 3) if self.url is not None else 0 + flags |= (1 << 4) if self.start_param is not None else 0 + flags |= (1 << 0) if self.theme_params is not None else 0 + b.write(Int(flags)) + + b.write(self.bot.write()) + + if self.url is not None: + b.write(String(self.url)) + + if self.start_param is not None: + b.write(String(self.start_param)) + + if self.theme_params is not None: + b.write(self.theme_params.write()) + + b.write(String(self.platform)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/request_url_auth.py b/pyrogram/raw/functions/messages/request_url_auth.py new file mode 100644 index 00000000..55d97d2c --- /dev/null +++ b/pyrogram/raw/functions/messages/request_url_auth.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestUrlAuth(TLObject): # type: ignore + """Get more info about a Seamless Telegram Login authorization request, for more info click here » + + + Details: + - Layer: ``224`` + - ID: ``198FB446`` + + Parameters: + peer (:obj:`InputPeer `, *optional*): + Peer where the message is located + + msg_id (``int`` ``32-bit``, *optional*): + The message + + button_id (``int`` ``32-bit``, *optional*): + The ID of the button with the authorization request + + url (``str``, *optional*): + URL used for link URL authorization, click here for more info » + + Returns: + :obj:`UrlAuthResult ` + """ + + __slots__: List[str] = ["peer", "msg_id", "button_id", "url"] + + ID = 0x198fb446 + QUALNAME = "functions.messages.RequestUrlAuth" + + def __init__(self, *, peer: "raw.base.InputPeer" = None, msg_id: Optional[int] = None, button_id: Optional[int] = None, url: Optional[str] = None) -> None: + self.peer = peer # flags.1?InputPeer + self.msg_id = msg_id # flags.1?int + self.button_id = button_id # flags.1?int + self.url = url # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestUrlAuth": + + flags = Int.read(b) + + peer = TLObject.read(b) if flags & (1 << 1) else None + + msg_id = Int.read(b) if flags & (1 << 1) else None + button_id = Int.read(b) if flags & (1 << 1) else None + url = String.read(b) if flags & (1 << 2) else None + return RequestUrlAuth(peer=peer, msg_id=msg_id, button_id=button_id, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.peer is not None else 0 + flags |= (1 << 1) if self.msg_id is not None else 0 + flags |= (1 << 1) if self.button_id is not None else 0 + flags |= (1 << 2) if self.url is not None else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + if self.msg_id is not None: + b.write(Int(self.msg_id)) + + if self.button_id is not None: + b.write(Int(self.button_id)) + + if self.url is not None: + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/request_web_view.py b/pyrogram/raw/functions/messages/request_web_view.py new file mode 100644 index 00000000..427bf577 --- /dev/null +++ b/pyrogram/raw/functions/messages/request_web_view.py @@ -0,0 +1,145 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestWebView(TLObject): # type: ignore + """Open a bot mini app, sending over user information after user confirmation. + + + Details: + - Layer: ``224`` + - ID: ``269DC2C1`` + + Parameters: + peer (:obj:`InputPeer `): + Dialog where the web app is being opened, and where the resulting message will be sent (see the docs for more info »). + + bot (:obj:`InputUser `): + Bot that owns the web app + + platform (``str``): + Short name of the application; 0-64 English letters, digits, and underscores + + from_bot_menu (``bool``, *optional*): + Whether the webview was opened by clicking on the bot's menu button ». + + silent (``bool``, *optional*): + Whether the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent silently (no notifications for the receivers). + + compact (``bool``, *optional*): + N/A + + fullscreen (``bool``, *optional*): + N/A + + url (``str``, *optional*): + Web app URL + + start_param (``str``, *optional*): + If the web app was opened from the attachment menu using a attachment menu deep link, start_param should contain the data from the startattach parameter. + + theme_params (:obj:`DataJSON `, *optional*): + Theme parameters » + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the inline message that will be sent by the bot on behalf of the user once the web app interaction is terminated should be sent in reply to the specified message or story. + + send_as (:obj:`InputPeer `, *optional*): + Open the web app as the specified peer, sending the resulting the message as the specified peer. + + Returns: + :obj:`WebViewResult ` + """ + + __slots__: List[str] = ["peer", "bot", "platform", "from_bot_menu", "silent", "compact", "fullscreen", "url", "start_param", "theme_params", "reply_to", "send_as"] + + ID = 0x269dc2c1 + QUALNAME = "functions.messages.RequestWebView" + + def __init__(self, *, peer: "raw.base.InputPeer", bot: "raw.base.InputUser", platform: str, from_bot_menu: Optional[bool] = None, silent: Optional[bool] = None, compact: Optional[bool] = None, fullscreen: Optional[bool] = None, url: Optional[str] = None, start_param: Optional[str] = None, theme_params: "raw.base.DataJSON" = None, reply_to: "raw.base.InputReplyTo" = None, send_as: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.bot = bot # InputUser + self.platform = platform # string + self.from_bot_menu = from_bot_menu # flags.4?true + self.silent = silent # flags.5?true + self.compact = compact # flags.7?true + self.fullscreen = fullscreen # flags.8?true + self.url = url # flags.1?string + self.start_param = start_param # flags.3?string + self.theme_params = theme_params # flags.2?DataJSON + self.reply_to = reply_to # flags.0?InputReplyTo + self.send_as = send_as # flags.13?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestWebView": + + flags = Int.read(b) + + from_bot_menu = True if flags & (1 << 4) else False + silent = True if flags & (1 << 5) else False + compact = True if flags & (1 << 7) else False + fullscreen = True if flags & (1 << 8) else False + peer = TLObject.read(b) + + bot = TLObject.read(b) + + url = String.read(b) if flags & (1 << 1) else None + start_param = String.read(b) if flags & (1 << 3) else None + theme_params = TLObject.read(b) if flags & (1 << 2) else None + + platform = String.read(b) + + reply_to = TLObject.read(b) if flags & (1 << 0) else None + + send_as = TLObject.read(b) if flags & (1 << 13) else None + + return RequestWebView(peer=peer, bot=bot, platform=platform, from_bot_menu=from_bot_menu, silent=silent, compact=compact, fullscreen=fullscreen, url=url, start_param=start_param, theme_params=theme_params, reply_to=reply_to, send_as=send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 4) if self.from_bot_menu else 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 7) if self.compact else 0 + flags |= (1 << 8) if self.fullscreen else 0 + flags |= (1 << 1) if self.url is not None else 0 + flags |= (1 << 3) if self.start_param is not None else 0 + flags |= (1 << 2) if self.theme_params is not None else 0 + flags |= (1 << 0) if self.reply_to is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.bot.write()) + + if self.url is not None: + b.write(String(self.url)) + + if self.start_param is not None: + b.write(String(self.start_param)) + + if self.theme_params is not None: + b.write(self.theme_params.write()) + + b.write(String(self.platform)) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + if self.send_as is not None: + b.write(self.send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/save_default_send_as.py b/pyrogram/raw/functions/messages/save_default_send_as.py new file mode 100644 index 00000000..cf3a3d4c --- /dev/null +++ b/pyrogram/raw/functions/messages/save_default_send_as.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveDefaultSendAs(TLObject): # type: ignore + """Change the default peer that should be used when sending messages, reactions, poll votes to a specific group + + + Details: + - Layer: ``224`` + - ID: ``CCFDDF96`` + + Parameters: + peer (:obj:`InputPeer `): + Group + + send_as (:obj:`InputPeer `): + The default peer that should be used when sending messages to the group + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "send_as"] + + ID = 0xccfddf96 + QUALNAME = "functions.messages.SaveDefaultSendAs" + + def __init__(self, *, peer: "raw.base.InputPeer", send_as: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + self.send_as = send_as # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveDefaultSendAs": + # No flags + + peer = TLObject.read(b) + + send_as = TLObject.read(b) + + return SaveDefaultSendAs(peer=peer, send_as=send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/save_draft.py b/pyrogram/raw/functions/messages/save_draft.py new file mode 100644 index 00000000..db832941 --- /dev/null +++ b/pyrogram/raw/functions/messages/save_draft.py @@ -0,0 +1,126 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveDraft(TLObject): # type: ignore + """Save a message draft associated to a chat. + + + Details: + - Layer: ``224`` + - ID: ``54AE308E`` + + Parameters: + peer (:obj:`InputPeer `): + Destination of the message that should be sent + + message (``str``): + The draft + + no_webpage (``bool``, *optional*): + Disable generation of the webpage preview + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the message should be sent in reply to the specified message or story. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + media (:obj:`InputMedia `, *optional*): + Attached media + + effect (``int`` ``64-bit``, *optional*): + N/A + + suggested_post (:obj:`SuggestedPost `, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "message", "no_webpage", "invert_media", "reply_to", "entities", "media", "effect", "suggested_post"] + + ID = 0x54ae308e + QUALNAME = "functions.messages.SaveDraft" + + def __init__(self, *, peer: "raw.base.InputPeer", message: str, no_webpage: Optional[bool] = None, invert_media: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, media: "raw.base.InputMedia" = None, effect: Optional[int] = None, suggested_post: "raw.base.SuggestedPost" = None) -> None: + self.peer = peer # InputPeer + self.message = message # string + self.no_webpage = no_webpage # flags.1?true + self.invert_media = invert_media # flags.6?true + self.reply_to = reply_to # flags.4?InputReplyTo + self.entities = entities # flags.3?Vector + self.media = media # flags.5?InputMedia + self.effect = effect # flags.7?long + self.suggested_post = suggested_post # flags.8?SuggestedPost + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveDraft": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 1) else False + invert_media = True if flags & (1 << 6) else False + reply_to = TLObject.read(b) if flags & (1 << 4) else None + + peer = TLObject.read(b) + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + media = TLObject.read(b) if flags & (1 << 5) else None + + effect = Long.read(b) if flags & (1 << 7) else None + suggested_post = TLObject.read(b) if flags & (1 << 8) else None + + return SaveDraft(peer=peer, message=message, no_webpage=no_webpage, invert_media=invert_media, reply_to=reply_to, entities=entities, media=media, effect=effect, suggested_post=suggested_post) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.no_webpage else 0 + flags |= (1 << 6) if self.invert_media else 0 + flags |= (1 << 4) if self.reply_to is not None else 0 + flags |= (1 << 3) if self.entities else 0 + flags |= (1 << 5) if self.media is not None else 0 + flags |= (1 << 7) if self.effect is not None else 0 + flags |= (1 << 8) if self.suggested_post is not None else 0 + b.write(Int(flags)) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(self.peer.write()) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.media is not None: + b.write(self.media.write()) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.suggested_post is not None: + b.write(self.suggested_post.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/save_gif.py b/pyrogram/raw/functions/messages/save_gif.py new file mode 100644 index 00000000..ad491fe3 --- /dev/null +++ b/pyrogram/raw/functions/messages/save_gif.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveGif(TLObject): # type: ignore + """Add GIF to saved gifs list + + + Details: + - Layer: ``224`` + - ID: ``327A30CB`` + + Parameters: + id (:obj:`InputDocument `): + GIF to save + + unsave (``bool``): + Whether to remove GIF from saved gifs list + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "unsave"] + + ID = 0x327a30cb + QUALNAME = "functions.messages.SaveGif" + + def __init__(self, *, id: "raw.base.InputDocument", unsave: bool) -> None: + self.id = id # InputDocument + self.unsave = unsave # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveGif": + # No flags + + id = TLObject.read(b) + + unsave = Bool.read(b) + + return SaveGif(id=id, unsave=unsave) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(Bool(self.unsave)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/save_prepared_inline_message.py b/pyrogram/raw/functions/messages/save_prepared_inline_message.py new file mode 100644 index 00000000..421c25f4 --- /dev/null +++ b/pyrogram/raw/functions/messages/save_prepared_inline_message.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavePreparedInlineMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``F21F7F2F`` + + Parameters: + result (:obj:`InputBotInlineResult `): + N/A + + user_id (:obj:`InputUser `): + N/A + + peer_types (List of :obj:`InlineQueryPeerType `, *optional*): + N/A + + Returns: + :obj:`messages.BotPreparedInlineMessage ` + """ + + __slots__: List[str] = ["result", "user_id", "peer_types"] + + ID = 0xf21f7f2f + QUALNAME = "functions.messages.SavePreparedInlineMessage" + + def __init__(self, *, result: "raw.base.InputBotInlineResult", user_id: "raw.base.InputUser", peer_types: Optional[List["raw.base.InlineQueryPeerType"]] = None) -> None: + self.result = result # InputBotInlineResult + self.user_id = user_id # InputUser + self.peer_types = peer_types # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavePreparedInlineMessage": + + flags = Int.read(b) + + result = TLObject.read(b) + + user_id = TLObject.read(b) + + peer_types = TLObject.read(b) if flags & (1 << 0) else [] + + return SavePreparedInlineMessage(result=result, user_id=user_id, peer_types=peer_types) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.peer_types else 0 + b.write(Int(flags)) + + b.write(self.result.write()) + + b.write(self.user_id.write()) + + if self.peer_types is not None: + b.write(Vector(self.peer_types)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/save_recent_sticker.py b/pyrogram/raw/functions/messages/save_recent_sticker.py new file mode 100644 index 00000000..d44b4c80 --- /dev/null +++ b/pyrogram/raw/functions/messages/save_recent_sticker.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveRecentSticker(TLObject): # type: ignore + """Add/remove sticker from recent stickers list + + + Details: + - Layer: ``224`` + - ID: ``392718F8`` + + Parameters: + id (:obj:`InputDocument `): + Sticker + + unsave (``bool``): + Whether to save or unsave the sticker + + attached (``bool``, *optional*): + Whether to add/remove stickers recently attached to photo or video files + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "unsave", "attached"] + + ID = 0x392718f8 + QUALNAME = "functions.messages.SaveRecentSticker" + + def __init__(self, *, id: "raw.base.InputDocument", unsave: bool, attached: Optional[bool] = None) -> None: + self.id = id # InputDocument + self.unsave = unsave # Bool + self.attached = attached # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveRecentSticker": + + flags = Int.read(b) + + attached = True if flags & (1 << 0) else False + id = TLObject.read(b) + + unsave = Bool.read(b) + + return SaveRecentSticker(id=id, unsave=unsave, attached=attached) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.attached else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + b.write(Bool(self.unsave)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search.py b/pyrogram/raw/functions/messages/search.py new file mode 100644 index 00000000..ab78b9c4 --- /dev/null +++ b/pyrogram/raw/functions/messages/search.py @@ -0,0 +1,176 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Search(TLObject): # type: ignore + """Search for messages. + + + Details: + - Layer: ``224`` + - ID: ``29EE847A`` + + Parameters: + peer (:obj:`InputPeer `): + User or chat, histories with which are searched, or (inputPeerEmpty) constructor to search in all private chats and normal groups (not channels) ». Use messages.searchGlobal to search globally in all chats, groups, supergroups and channels. + + q (``str``): + Text search request + + filter (:obj:`MessagesFilter `): + Filter to return only specified message types + + min_date (``int`` ``32-bit``): + If a positive value was transferred, only messages with a sending date bigger than the transferred one will be returned + + max_date (``int`` ``32-bit``): + If a positive value was transferred, only messages with a sending date smaller than the transferred one will be returned + + offset_id (``int`` ``32-bit``): + Only return messages starting from the specified message ID + + add_offset (``int`` ``32-bit``): + Additional offset + + limit (``int`` ``32-bit``): + Number of results to return + + max_id (``int`` ``32-bit``): + Maximum message ID to return + + min_id (``int`` ``32-bit``): + Minimum message ID to return + + hash (``int`` ``64-bit``): + Hash + + from_id (:obj:`InputPeer `, *optional*): + Only return messages sent by the specified user ID + + saved_peer_id (:obj:`InputPeer `, *optional*): + Search within the saved message dialog » with this ID. + + saved_reaction (List of :obj:`Reaction `, *optional*): + + + top_msg_id (``int`` ``32-bit``, *optional*): + Thread ID + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["peer", "q", "filter", "min_date", "max_date", "offset_id", "add_offset", "limit", "max_id", "min_id", "hash", "from_id", "saved_peer_id", "saved_reaction", "top_msg_id"] + + ID = 0x29ee847a + QUALNAME = "functions.messages.Search" + + def __init__(self, *, peer: "raw.base.InputPeer", q: str, filter: "raw.base.MessagesFilter", min_date: int, max_date: int, offset_id: int, add_offset: int, limit: int, max_id: int, min_id: int, hash: int, from_id: "raw.base.InputPeer" = None, saved_peer_id: "raw.base.InputPeer" = None, saved_reaction: Optional[List["raw.base.Reaction"]] = None, top_msg_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.q = q # string + self.filter = filter # MessagesFilter + self.min_date = min_date # int + self.max_date = max_date # int + self.offset_id = offset_id # int + self.add_offset = add_offset # int + self.limit = limit # int + self.max_id = max_id # int + self.min_id = min_id # int + self.hash = hash # long + self.from_id = from_id # flags.0?InputPeer + self.saved_peer_id = saved_peer_id # flags.2?InputPeer + self.saved_reaction = saved_reaction # flags.3?Vector + self.top_msg_id = top_msg_id # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Search": + + flags = Int.read(b) + + peer = TLObject.read(b) + + q = String.read(b) + + from_id = TLObject.read(b) if flags & (1 << 0) else None + + saved_peer_id = TLObject.read(b) if flags & (1 << 2) else None + + saved_reaction = TLObject.read(b) if flags & (1 << 3) else [] + + top_msg_id = Int.read(b) if flags & (1 << 1) else None + filter = TLObject.read(b) + + min_date = Int.read(b) + + max_date = Int.read(b) + + offset_id = Int.read(b) + + add_offset = Int.read(b) + + limit = Int.read(b) + + max_id = Int.read(b) + + min_id = Int.read(b) + + hash = Long.read(b) + + return Search(peer=peer, q=q, filter=filter, min_date=min_date, max_date=max_date, offset_id=offset_id, add_offset=add_offset, limit=limit, max_id=max_id, min_id=min_id, hash=hash, from_id=from_id, saved_peer_id=saved_peer_id, saved_reaction=saved_reaction, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.from_id is not None else 0 + flags |= (1 << 2) if self.saved_peer_id is not None else 0 + flags |= (1 << 3) if self.saved_reaction else 0 + flags |= (1 << 1) if self.top_msg_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.q)) + + if self.from_id is not None: + b.write(self.from_id.write()) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + if self.saved_reaction is not None: + b.write(Vector(self.saved_reaction)) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + b.write(self.filter.write()) + + b.write(Int(self.min_date)) + + b.write(Int(self.max_date)) + + b.write(Int(self.offset_id)) + + b.write(Int(self.add_offset)) + + b.write(Int(self.limit)) + + b.write(Int(self.max_id)) + + b.write(Int(self.min_id)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search_custom_emoji.py b/pyrogram/raw/functions/messages/search_custom_emoji.py new file mode 100644 index 00000000..a91b4779 --- /dev/null +++ b/pyrogram/raw/functions/messages/search_custom_emoji.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchCustomEmoji(TLObject): # type: ignore + """Look for custom emojis associated to a UTF8 emoji + + + Details: + - Layer: ``224`` + - ID: ``2C11C0D7`` + + Parameters: + emoticon (``str``): + The emoji + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the emojiList.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + Returns: + :obj:`EmojiList ` + """ + + __slots__: List[str] = ["emoticon", "hash"] + + ID = 0x2c11c0d7 + QUALNAME = "functions.messages.SearchCustomEmoji" + + def __init__(self, *, emoticon: str, hash: int) -> None: + self.emoticon = emoticon # string + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchCustomEmoji": + # No flags + + emoticon = String.read(b) + + hash = Long.read(b) + + return SearchCustomEmoji(emoticon=emoticon, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.emoticon)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search_emoji_sticker_sets.py b/pyrogram/raw/functions/messages/search_emoji_sticker_sets.py new file mode 100644 index 00000000..5fa5b422 --- /dev/null +++ b/pyrogram/raw/functions/messages/search_emoji_sticker_sets.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchEmojiStickerSets(TLObject): # type: ignore + """Search for custom emoji stickersets » + + + Details: + - Layer: ``224`` + - ID: ``92B4494C`` + + Parameters: + q (``str``): + Query string + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.foundStickerSets.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + exclude_featured (``bool``, *optional*): + Exclude featured stickersets from results + + Returns: + :obj:`messages.FoundStickerSets ` + """ + + __slots__: List[str] = ["q", "hash", "exclude_featured"] + + ID = 0x92b4494c + QUALNAME = "functions.messages.SearchEmojiStickerSets" + + def __init__(self, *, q: str, hash: int, exclude_featured: Optional[bool] = None) -> None: + self.q = q # string + self.hash = hash # long + self.exclude_featured = exclude_featured # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchEmojiStickerSets": + + flags = Int.read(b) + + exclude_featured = True if flags & (1 << 0) else False + q = String.read(b) + + hash = Long.read(b) + + return SearchEmojiStickerSets(q=q, hash=hash, exclude_featured=exclude_featured) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.exclude_featured else 0 + b.write(Int(flags)) + + b.write(String(self.q)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search_global.py b/pyrogram/raw/functions/messages/search_global.py new file mode 100644 index 00000000..21eb779c --- /dev/null +++ b/pyrogram/raw/functions/messages/search_global.py @@ -0,0 +1,140 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchGlobal(TLObject): # type: ignore + """Search for messages and peers globally + + + Details: + - Layer: ``224`` + - ID: ``4BC6589A`` + + Parameters: + q (``str``): + Query + + filter (:obj:`MessagesFilter `): + Global search filter + + min_date (``int`` ``32-bit``): + If a positive value was specified, the method will return only messages with date bigger than min_date + + max_date (``int`` ``32-bit``): + If a positive value was transferred, the method will return only messages with date smaller than max_date + + offset_rate (``int`` ``32-bit``): + Initially 0, then set to the next_rate parameter of messages.messagesSlice + + offset_peer (:obj:`InputPeer `): + Offsets for pagination, for more info click here + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + broadcasts_only (``bool``, *optional*): + + + groups_only (``bool``, *optional*): + N/A + + users_only (``bool``, *optional*): + N/A + + folder_id (``int`` ``32-bit``, *optional*): + Peer folder ID, for more info click here + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["q", "filter", "min_date", "max_date", "offset_rate", "offset_peer", "offset_id", "limit", "broadcasts_only", "groups_only", "users_only", "folder_id"] + + ID = 0x4bc6589a + QUALNAME = "functions.messages.SearchGlobal" + + def __init__(self, *, q: str, filter: "raw.base.MessagesFilter", min_date: int, max_date: int, offset_rate: int, offset_peer: "raw.base.InputPeer", offset_id: int, limit: int, broadcasts_only: Optional[bool] = None, groups_only: Optional[bool] = None, users_only: Optional[bool] = None, folder_id: Optional[int] = None) -> None: + self.q = q # string + self.filter = filter # MessagesFilter + self.min_date = min_date # int + self.max_date = max_date # int + self.offset_rate = offset_rate # int + self.offset_peer = offset_peer # InputPeer + self.offset_id = offset_id # int + self.limit = limit # int + self.broadcasts_only = broadcasts_only # flags.1?true + self.groups_only = groups_only # flags.2?true + self.users_only = users_only # flags.3?true + self.folder_id = folder_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchGlobal": + + flags = Int.read(b) + + broadcasts_only = True if flags & (1 << 1) else False + groups_only = True if flags & (1 << 2) else False + users_only = True if flags & (1 << 3) else False + folder_id = Int.read(b) if flags & (1 << 0) else None + q = String.read(b) + + filter = TLObject.read(b) + + min_date = Int.read(b) + + max_date = Int.read(b) + + offset_rate = Int.read(b) + + offset_peer = TLObject.read(b) + + offset_id = Int.read(b) + + limit = Int.read(b) + + return SearchGlobal(q=q, filter=filter, min_date=min_date, max_date=max_date, offset_rate=offset_rate, offset_peer=offset_peer, offset_id=offset_id, limit=limit, broadcasts_only=broadcasts_only, groups_only=groups_only, users_only=users_only, folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.broadcasts_only else 0 + flags |= (1 << 2) if self.groups_only else 0 + flags |= (1 << 3) if self.users_only else 0 + flags |= (1 << 0) if self.folder_id is not None else 0 + b.write(Int(flags)) + + if self.folder_id is not None: + b.write(Int(self.folder_id)) + + b.write(String(self.q)) + + b.write(self.filter.write()) + + b.write(Int(self.min_date)) + + b.write(Int(self.max_date)) + + b.write(Int(self.offset_rate)) + + b.write(self.offset_peer.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search_sent_media.py b/pyrogram/raw/functions/messages/search_sent_media.py new file mode 100644 index 00000000..ad72d991 --- /dev/null +++ b/pyrogram/raw/functions/messages/search_sent_media.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchSentMedia(TLObject): # type: ignore + """View and search recently sent media. +This method does not support pagination. + + + Details: + - Layer: ``224`` + - ID: ``107E31A0`` + + Parameters: + q (``str``): + Optional search query + + filter (:obj:`MessagesFilter `): + Message filter + + limit (``int`` ``32-bit``): + Maximum number of results to return (max 100). + + Returns: + :obj:`messages.Messages ` + """ + + __slots__: List[str] = ["q", "filter", "limit"] + + ID = 0x107e31a0 + QUALNAME = "functions.messages.SearchSentMedia" + + def __init__(self, *, q: str, filter: "raw.base.MessagesFilter", limit: int) -> None: + self.q = q # string + self.filter = filter # MessagesFilter + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchSentMedia": + # No flags + + q = String.read(b) + + filter = TLObject.read(b) + + limit = Int.read(b) + + return SearchSentMedia(q=q, filter=filter, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + b.write(self.filter.write()) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search_sticker_sets.py b/pyrogram/raw/functions/messages/search_sticker_sets.py new file mode 100644 index 00000000..a2d796a4 --- /dev/null +++ b/pyrogram/raw/functions/messages/search_sticker_sets.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchStickerSets(TLObject): # type: ignore + """Search for stickersets + + + Details: + - Layer: ``224`` + - ID: ``35705B8A`` + + Parameters: + q (``str``): + Query string + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here.Note: the usual hash generation algorithm cannot be used in this case, please re-use the messages.foundStickerSets.hash field returned by a previous call to the method, or pass 0 if this is the first call. + + exclude_featured (``bool``, *optional*): + Exclude featured stickersets from results + + Returns: + :obj:`messages.FoundStickerSets ` + """ + + __slots__: List[str] = ["q", "hash", "exclude_featured"] + + ID = 0x35705b8a + QUALNAME = "functions.messages.SearchStickerSets" + + def __init__(self, *, q: str, hash: int, exclude_featured: Optional[bool] = None) -> None: + self.q = q # string + self.hash = hash # long + self.exclude_featured = exclude_featured # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchStickerSets": + + flags = Int.read(b) + + exclude_featured = True if flags & (1 << 0) else False + q = String.read(b) + + hash = Long.read(b) + + return SearchStickerSets(q=q, hash=hash, exclude_featured=exclude_featured) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.exclude_featured else 0 + b.write(Int(flags)) + + b.write(String(self.q)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/search_stickers.py b/pyrogram/raw/functions/messages/search_stickers.py new file mode 100644 index 00000000..4856a6c4 --- /dev/null +++ b/pyrogram/raw/functions/messages/search_stickers.py @@ -0,0 +1,102 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchStickers(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``29B1C66A`` + + Parameters: + q (``str``): + N/A + + emoticon (``str``): + N/A + + lang_code (List of ``str``): + N/A + + offset (``int`` ``32-bit``): + N/A + + limit (``int`` ``32-bit``): + N/A + + hash (``int`` ``64-bit``): + N/A + + emojis (``bool``, *optional*): + N/A + + Returns: + :obj:`messages.FoundStickers ` + """ + + __slots__: List[str] = ["q", "emoticon", "lang_code", "offset", "limit", "hash", "emojis"] + + ID = 0x29b1c66a + QUALNAME = "functions.messages.SearchStickers" + + def __init__(self, *, q: str, emoticon: str, lang_code: List[str], offset: int, limit: int, hash: int, emojis: Optional[bool] = None) -> None: + self.q = q # string + self.emoticon = emoticon # string + self.lang_code = lang_code # Vector + self.offset = offset # int + self.limit = limit # int + self.hash = hash # long + self.emojis = emojis # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchStickers": + + flags = Int.read(b) + + emojis = True if flags & (1 << 0) else False + q = String.read(b) + + emoticon = String.read(b) + + lang_code = TLObject.read(b, String) + + offset = Int.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return SearchStickers(q=q, emoticon=emoticon, lang_code=lang_code, offset=offset, limit=limit, hash=hash, emojis=emojis) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.emojis else 0 + b.write(Int(flags)) + + b.write(String(self.q)) + + b.write(String(self.emoticon)) + + b.write(Vector(self.lang_code, String)) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_bot_requested_peer.py b/pyrogram/raw/functions/messages/send_bot_requested_peer.py new file mode 100644 index 00000000..5c7ac72f --- /dev/null +++ b/pyrogram/raw/functions/messages/send_bot_requested_peer.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendBotRequestedPeer(TLObject): # type: ignore + """Send one or more chosen peers, as requested by a keyboardButtonRequestPeer button. + + + Details: + - Layer: ``224`` + - ID: ``91B2D060`` + + Parameters: + peer (:obj:`InputPeer `): + The bot that sent the keyboardButtonRequestPeer button. + + msg_id (``int`` ``32-bit``): + ID of the message that contained the reply keyboard with the keyboardButtonRequestPeer button. + + button_id (``int`` ``32-bit``): + The button_id field from the keyboardButtonRequestPeer constructor. + + requested_peers (List of :obj:`InputPeer `): + The chosen peers. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "button_id", "requested_peers"] + + ID = 0x91b2d060 + QUALNAME = "functions.messages.SendBotRequestedPeer" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, button_id: int, requested_peers: List["raw.base.InputPeer"]) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.button_id = button_id # int + self.requested_peers = requested_peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendBotRequestedPeer": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + button_id = Int.read(b) + + requested_peers = TLObject.read(b) + + return SendBotRequestedPeer(peer=peer, msg_id=msg_id, button_id=button_id, requested_peers=requested_peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Int(self.button_id)) + + b.write(Vector(self.requested_peers)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_encrypted.py b/pyrogram/raw/functions/messages/send_encrypted.py new file mode 100644 index 00000000..c545e692 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_encrypted.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendEncrypted(TLObject): # type: ignore + """Sends a text message to a secret chat. + + + Details: + - Layer: ``224`` + - ID: ``44FA7A15`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + Secret chat ID + + random_id (``int`` ``64-bit``): + Unique client message ID, necessary to avoid message resending + + data (``bytes``): + TL-serialization of DecryptedMessage type, encrypted with a key that was created during chat initialization + + silent (``bool``, *optional*): + Send encrypted message without a notification + + Returns: + :obj:`messages.SentEncryptedMessage ` + """ + + __slots__: List[str] = ["peer", "random_id", "data", "silent"] + + ID = 0x44fa7a15 + QUALNAME = "functions.messages.SendEncrypted" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", random_id: int, data: bytes, silent: Optional[bool] = None) -> None: + self.peer = peer # InputEncryptedChat + self.random_id = random_id # long + self.data = data # bytes + self.silent = silent # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendEncrypted": + + flags = Int.read(b) + + silent = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + random_id = Long.read(b) + + data = Bytes.read(b) + + return SendEncrypted(peer=peer, random_id=random_id, data=data, silent=silent) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.silent else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Long(self.random_id)) + + b.write(Bytes(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_encrypted_file.py b/pyrogram/raw/functions/messages/send_encrypted_file.py new file mode 100644 index 00000000..3d650b06 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_encrypted_file.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendEncryptedFile(TLObject): # type: ignore + """Sends a message with a file attachment to a secret chat + + + Details: + - Layer: ``224`` + - ID: ``5559481D`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + Secret chat ID + + random_id (``int`` ``64-bit``): + Unique client message ID necessary to prevent message resending + + data (``bytes``): + TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization + + file (:obj:`InputEncryptedFile `): + File attachment for the secret chat + + silent (``bool``, *optional*): + Whether to send the file without triggering a notification + + Returns: + :obj:`messages.SentEncryptedMessage ` + """ + + __slots__: List[str] = ["peer", "random_id", "data", "file", "silent"] + + ID = 0x5559481d + QUALNAME = "functions.messages.SendEncryptedFile" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", random_id: int, data: bytes, file: "raw.base.InputEncryptedFile", silent: Optional[bool] = None) -> None: + self.peer = peer # InputEncryptedChat + self.random_id = random_id # long + self.data = data # bytes + self.file = file # InputEncryptedFile + self.silent = silent # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendEncryptedFile": + + flags = Int.read(b) + + silent = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + random_id = Long.read(b) + + data = Bytes.read(b) + + file = TLObject.read(b) + + return SendEncryptedFile(peer=peer, random_id=random_id, data=data, file=file, silent=silent) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.silent else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Long(self.random_id)) + + b.write(Bytes(self.data)) + + b.write(self.file.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_encrypted_service.py b/pyrogram/raw/functions/messages/send_encrypted_service.py new file mode 100644 index 00000000..e46ea8d0 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_encrypted_service.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendEncryptedService(TLObject): # type: ignore + """Sends a service message to a secret chat. + + + Details: + - Layer: ``224`` + - ID: ``32D439A4`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + Secret chat ID + + random_id (``int`` ``64-bit``): + Unique client message ID required to prevent message resending + + data (``bytes``): + TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization + + Returns: + :obj:`messages.SentEncryptedMessage ` + """ + + __slots__: List[str] = ["peer", "random_id", "data"] + + ID = 0x32d439a4 + QUALNAME = "functions.messages.SendEncryptedService" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", random_id: int, data: bytes) -> None: + self.peer = peer # InputEncryptedChat + self.random_id = random_id # long + self.data = data # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendEncryptedService": + # No flags + + peer = TLObject.read(b) + + random_id = Long.read(b) + + data = Bytes.read(b) + + return SendEncryptedService(peer=peer, random_id=random_id, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.random_id)) + + b.write(Bytes(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_inline_bot_result.py b/pyrogram/raw/functions/messages/send_inline_bot_result.py new file mode 100644 index 00000000..bec54aed --- /dev/null +++ b/pyrogram/raw/functions/messages/send_inline_bot_result.py @@ -0,0 +1,153 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendInlineBotResult(TLObject): # type: ignore + """Send a result obtained using messages.getInlineBotResults. + + + Details: + - Layer: ``224`` + - ID: ``C0CF7646`` + + Parameters: + peer (:obj:`InputPeer `): + Destination + + random_id (``int`` ``64-bit``): + Random ID to avoid resending the same query + + query_id (``int`` ``64-bit``): + Query ID from messages.getInlineBotResults + + id (``str``): + Result ID from messages.getInlineBotResults + + silent (``bool``, *optional*): + Whether to send the message silently (no notification will be triggered on the other client) + + background (``bool``, *optional*): + Whether to send the message in background + + clear_draft (``bool``, *optional*): + Whether to clear the draft + + hide_via (``bool``, *optional*): + Whether to hide the via @botname in the resulting message (only for bot usernames encountered in the config) + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the message should be sent in reply to the specified message or story. + + schedule_date (``int`` ``32-bit``, *optional*): + Scheduled message date for scheduled messages + + send_as (:obj:`InputPeer `, *optional*): + Send this message as the specified peer + + quick_reply_shortcut (:obj:`InputQuickReplyShortcut `, *optional*): + + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "random_id", "query_id", "id", "silent", "background", "clear_draft", "hide_via", "reply_to", "schedule_date", "send_as", "quick_reply_shortcut", "allow_paid_stars"] + + ID = 0xc0cf7646 + QUALNAME = "functions.messages.SendInlineBotResult" + + def __init__(self, *, peer: "raw.base.InputPeer", random_id: int, query_id: int, id: str, silent: Optional[bool] = None, background: Optional[bool] = None, clear_draft: Optional[bool] = None, hide_via: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, schedule_date: Optional[int] = None, send_as: "raw.base.InputPeer" = None, quick_reply_shortcut: "raw.base.InputQuickReplyShortcut" = None, allow_paid_stars: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.random_id = random_id # long + self.query_id = query_id # long + self.id = id # string + self.silent = silent # flags.5?true + self.background = background # flags.6?true + self.clear_draft = clear_draft # flags.7?true + self.hide_via = hide_via # flags.11?true + self.reply_to = reply_to # flags.0?InputReplyTo + self.schedule_date = schedule_date # flags.10?int + self.send_as = send_as # flags.13?InputPeer + self.quick_reply_shortcut = quick_reply_shortcut # flags.17?InputQuickReplyShortcut + self.allow_paid_stars = allow_paid_stars # flags.21?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendInlineBotResult": + + flags = Int.read(b) + + silent = True if flags & (1 << 5) else False + background = True if flags & (1 << 6) else False + clear_draft = True if flags & (1 << 7) else False + hide_via = True if flags & (1 << 11) else False + peer = TLObject.read(b) + + reply_to = TLObject.read(b) if flags & (1 << 0) else None + + random_id = Long.read(b) + + query_id = Long.read(b) + + id = String.read(b) + + schedule_date = Int.read(b) if flags & (1 << 10) else None + send_as = TLObject.read(b) if flags & (1 << 13) else None + + quick_reply_shortcut = TLObject.read(b) if flags & (1 << 17) else None + + allow_paid_stars = Long.read(b) if flags & (1 << 21) else None + return SendInlineBotResult(peer=peer, random_id=random_id, query_id=query_id, id=id, silent=silent, background=background, clear_draft=clear_draft, hide_via=hide_via, reply_to=reply_to, schedule_date=schedule_date, send_as=send_as, quick_reply_shortcut=quick_reply_shortcut, allow_paid_stars=allow_paid_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 6) if self.background else 0 + flags |= (1 << 7) if self.clear_draft else 0 + flags |= (1 << 11) if self.hide_via else 0 + flags |= (1 << 0) if self.reply_to is not None else 0 + flags |= (1 << 10) if self.schedule_date is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + flags |= (1 << 17) if self.quick_reply_shortcut is not None else 0 + flags |= (1 << 21) if self.allow_paid_stars is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(Long(self.random_id)) + + b.write(Long(self.query_id)) + + b.write(String(self.id)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + if self.quick_reply_shortcut is not None: + b.write(self.quick_reply_shortcut.write()) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_media.py b/pyrogram/raw/functions/messages/send_media.py new file mode 100644 index 00000000..dc113ab1 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_media.py @@ -0,0 +1,219 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendMedia(TLObject): # type: ignore + """Send a media + + + Details: + - Layer: ``224`` + - ID: ``330E77F`` + + Parameters: + peer (:obj:`InputPeer `): + Destination + + media (:obj:`InputMedia `): + Attached media + + message (``str``): + Caption + + random_id (``int`` ``64-bit``): + Random ID to avoid resending the same message + + silent (``bool``, *optional*): + Send message silently (no notification should be triggered) + + background (``bool``, *optional*): + Send message in background + + clear_draft (``bool``, *optional*): + Clear the draft + + noforwards (``bool``, *optional*): + Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled + + update_stickersets_order (``bool``, *optional*): + Whether to move used stickersets to top, see here for more info on this flag » + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + allow_paid_floodskip (``bool``, *optional*): + N/A + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the message should be sent in reply to the specified message or story. + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup for bot keyboards + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + schedule_date (``int`` ``32-bit``, *optional*): + Scheduled message date for scheduled messages + + schedule_repeat_period (``int`` ``32-bit``, *optional*): + N/A + + send_as (:obj:`InputPeer `, *optional*): + Send this message as the specified peer + + quick_reply_shortcut (:obj:`InputQuickReplyShortcut `, *optional*): + + + effect (``int`` ``64-bit``, *optional*): + + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + suggested_post (:obj:`SuggestedPost `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "media", "message", "random_id", "silent", "background", "clear_draft", "noforwards", "update_stickersets_order", "invert_media", "allow_paid_floodskip", "reply_to", "reply_markup", "entities", "schedule_date", "schedule_repeat_period", "send_as", "quick_reply_shortcut", "effect", "allow_paid_stars", "suggested_post"] + + ID = 0x330e77f + QUALNAME = "functions.messages.SendMedia" + + def __init__(self, *, peer: "raw.base.InputPeer", media: "raw.base.InputMedia", message: str, random_id: int, silent: Optional[bool] = None, background: Optional[bool] = None, clear_draft: Optional[bool] = None, noforwards: Optional[bool] = None, update_stickersets_order: Optional[bool] = None, invert_media: Optional[bool] = None, allow_paid_floodskip: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, reply_markup: "raw.base.ReplyMarkup" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, schedule_date: Optional[int] = None, schedule_repeat_period: Optional[int] = None, send_as: "raw.base.InputPeer" = None, quick_reply_shortcut: "raw.base.InputQuickReplyShortcut" = None, effect: Optional[int] = None, allow_paid_stars: Optional[int] = None, suggested_post: "raw.base.SuggestedPost" = None) -> None: + self.peer = peer # InputPeer + self.media = media # InputMedia + self.message = message # string + self.random_id = random_id # long + self.silent = silent # flags.5?true + self.background = background # flags.6?true + self.clear_draft = clear_draft # flags.7?true + self.noforwards = noforwards # flags.14?true + self.update_stickersets_order = update_stickersets_order # flags.15?true + self.invert_media = invert_media # flags.16?true + self.allow_paid_floodskip = allow_paid_floodskip # flags.19?true + self.reply_to = reply_to # flags.0?InputReplyTo + self.reply_markup = reply_markup # flags.2?ReplyMarkup + self.entities = entities # flags.3?Vector + self.schedule_date = schedule_date # flags.10?int + self.schedule_repeat_period = schedule_repeat_period # flags.24?int + self.send_as = send_as # flags.13?InputPeer + self.quick_reply_shortcut = quick_reply_shortcut # flags.17?InputQuickReplyShortcut + self.effect = effect # flags.18?long + self.allow_paid_stars = allow_paid_stars # flags.21?long + self.suggested_post = suggested_post # flags.22?SuggestedPost + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendMedia": + + flags = Int.read(b) + + silent = True if flags & (1 << 5) else False + background = True if flags & (1 << 6) else False + clear_draft = True if flags & (1 << 7) else False + noforwards = True if flags & (1 << 14) else False + update_stickersets_order = True if flags & (1 << 15) else False + invert_media = True if flags & (1 << 16) else False + allow_paid_floodskip = True if flags & (1 << 19) else False + peer = TLObject.read(b) + + reply_to = TLObject.read(b) if flags & (1 << 0) else None + + media = TLObject.read(b) + + message = String.read(b) + + random_id = Long.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + schedule_date = Int.read(b) if flags & (1 << 10) else None + schedule_repeat_period = Int.read(b) if flags & (1 << 24) else None + send_as = TLObject.read(b) if flags & (1 << 13) else None + + quick_reply_shortcut = TLObject.read(b) if flags & (1 << 17) else None + + effect = Long.read(b) if flags & (1 << 18) else None + allow_paid_stars = Long.read(b) if flags & (1 << 21) else None + suggested_post = TLObject.read(b) if flags & (1 << 22) else None + + return SendMedia(peer=peer, media=media, message=message, random_id=random_id, silent=silent, background=background, clear_draft=clear_draft, noforwards=noforwards, update_stickersets_order=update_stickersets_order, invert_media=invert_media, allow_paid_floodskip=allow_paid_floodskip, reply_to=reply_to, reply_markup=reply_markup, entities=entities, schedule_date=schedule_date, schedule_repeat_period=schedule_repeat_period, send_as=send_as, quick_reply_shortcut=quick_reply_shortcut, effect=effect, allow_paid_stars=allow_paid_stars, suggested_post=suggested_post) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 6) if self.background else 0 + flags |= (1 << 7) if self.clear_draft else 0 + flags |= (1 << 14) if self.noforwards else 0 + flags |= (1 << 15) if self.update_stickersets_order else 0 + flags |= (1 << 16) if self.invert_media else 0 + flags |= (1 << 19) if self.allow_paid_floodskip else 0 + flags |= (1 << 0) if self.reply_to is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + flags |= (1 << 3) if self.entities else 0 + flags |= (1 << 10) if self.schedule_date is not None else 0 + flags |= (1 << 24) if self.schedule_repeat_period is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + flags |= (1 << 17) if self.quick_reply_shortcut is not None else 0 + flags |= (1 << 18) if self.effect is not None else 0 + flags |= (1 << 21) if self.allow_paid_stars is not None else 0 + flags |= (1 << 22) if self.suggested_post is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(self.media.write()) + + b.write(String(self.message)) + + b.write(Long(self.random_id)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.schedule_repeat_period is not None: + b.write(Int(self.schedule_repeat_period)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + if self.quick_reply_shortcut is not None: + b.write(self.quick_reply_shortcut.write()) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + if self.suggested_post is not None: + b.write(self.suggested_post.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_message.py b/pyrogram/raw/functions/messages/send_message.py new file mode 100644 index 00000000..a93eca22 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_message.py @@ -0,0 +1,217 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendMessage(TLObject): # type: ignore + """Sends a message to a chat + + + Details: + - Layer: ``224`` + - ID: ``545CD15A`` + + Parameters: + peer (:obj:`InputPeer `): + The destination where the message will be sent + + message (``str``): + The message + + random_id (``int`` ``64-bit``): + Unique client message ID required to prevent message resending + + no_webpage (``bool``, *optional*): + Set this flag to disable generation of the webpage preview + + silent (``bool``, *optional*): + Send this message silently (no notifications for the receivers) + + background (``bool``, *optional*): + Send this message as background message + + clear_draft (``bool``, *optional*): + Clear the draft field + + noforwards (``bool``, *optional*): + Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled + + update_stickersets_order (``bool``, *optional*): + Whether to move used stickersets to top, see here for more info on this flag » + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + allow_paid_floodskip (``bool``, *optional*): + N/A + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the message should be sent in reply to the specified message or story. Also used to quote other messages. + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup for sending bot buttons + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for sending styled text + + schedule_date (``int`` ``32-bit``, *optional*): + Scheduled message date for scheduled messages + + schedule_repeat_period (``int`` ``32-bit``, *optional*): + N/A + + send_as (:obj:`InputPeer `, *optional*): + Send this message as the specified peer + + quick_reply_shortcut (:obj:`InputQuickReplyShortcut `, *optional*): + + + effect (``int`` ``64-bit``, *optional*): + + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + suggested_post (:obj:`SuggestedPost `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "message", "random_id", "no_webpage", "silent", "background", "clear_draft", "noforwards", "update_stickersets_order", "invert_media", "allow_paid_floodskip", "reply_to", "reply_markup", "entities", "schedule_date", "schedule_repeat_period", "send_as", "quick_reply_shortcut", "effect", "allow_paid_stars", "suggested_post"] + + ID = 0x545cd15a + QUALNAME = "functions.messages.SendMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", message: str, random_id: int, no_webpage: Optional[bool] = None, silent: Optional[bool] = None, background: Optional[bool] = None, clear_draft: Optional[bool] = None, noforwards: Optional[bool] = None, update_stickersets_order: Optional[bool] = None, invert_media: Optional[bool] = None, allow_paid_floodskip: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, reply_markup: "raw.base.ReplyMarkup" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, schedule_date: Optional[int] = None, schedule_repeat_period: Optional[int] = None, send_as: "raw.base.InputPeer" = None, quick_reply_shortcut: "raw.base.InputQuickReplyShortcut" = None, effect: Optional[int] = None, allow_paid_stars: Optional[int] = None, suggested_post: "raw.base.SuggestedPost" = None) -> None: + self.peer = peer # InputPeer + self.message = message # string + self.random_id = random_id # long + self.no_webpage = no_webpage # flags.1?true + self.silent = silent # flags.5?true + self.background = background # flags.6?true + self.clear_draft = clear_draft # flags.7?true + self.noforwards = noforwards # flags.14?true + self.update_stickersets_order = update_stickersets_order # flags.15?true + self.invert_media = invert_media # flags.16?true + self.allow_paid_floodskip = allow_paid_floodskip # flags.19?true + self.reply_to = reply_to # flags.0?InputReplyTo + self.reply_markup = reply_markup # flags.2?ReplyMarkup + self.entities = entities # flags.3?Vector + self.schedule_date = schedule_date # flags.10?int + self.schedule_repeat_period = schedule_repeat_period # flags.24?int + self.send_as = send_as # flags.13?InputPeer + self.quick_reply_shortcut = quick_reply_shortcut # flags.17?InputQuickReplyShortcut + self.effect = effect # flags.18?long + self.allow_paid_stars = allow_paid_stars # flags.21?long + self.suggested_post = suggested_post # flags.22?SuggestedPost + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendMessage": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 1) else False + silent = True if flags & (1 << 5) else False + background = True if flags & (1 << 6) else False + clear_draft = True if flags & (1 << 7) else False + noforwards = True if flags & (1 << 14) else False + update_stickersets_order = True if flags & (1 << 15) else False + invert_media = True if flags & (1 << 16) else False + allow_paid_floodskip = True if flags & (1 << 19) else False + peer = TLObject.read(b) + + reply_to = TLObject.read(b) if flags & (1 << 0) else None + + message = String.read(b) + + random_id = Long.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + schedule_date = Int.read(b) if flags & (1 << 10) else None + schedule_repeat_period = Int.read(b) if flags & (1 << 24) else None + send_as = TLObject.read(b) if flags & (1 << 13) else None + + quick_reply_shortcut = TLObject.read(b) if flags & (1 << 17) else None + + effect = Long.read(b) if flags & (1 << 18) else None + allow_paid_stars = Long.read(b) if flags & (1 << 21) else None + suggested_post = TLObject.read(b) if flags & (1 << 22) else None + + return SendMessage(peer=peer, message=message, random_id=random_id, no_webpage=no_webpage, silent=silent, background=background, clear_draft=clear_draft, noforwards=noforwards, update_stickersets_order=update_stickersets_order, invert_media=invert_media, allow_paid_floodskip=allow_paid_floodskip, reply_to=reply_to, reply_markup=reply_markup, entities=entities, schedule_date=schedule_date, schedule_repeat_period=schedule_repeat_period, send_as=send_as, quick_reply_shortcut=quick_reply_shortcut, effect=effect, allow_paid_stars=allow_paid_stars, suggested_post=suggested_post) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.no_webpage else 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 6) if self.background else 0 + flags |= (1 << 7) if self.clear_draft else 0 + flags |= (1 << 14) if self.noforwards else 0 + flags |= (1 << 15) if self.update_stickersets_order else 0 + flags |= (1 << 16) if self.invert_media else 0 + flags |= (1 << 19) if self.allow_paid_floodskip else 0 + flags |= (1 << 0) if self.reply_to is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + flags |= (1 << 3) if self.entities else 0 + flags |= (1 << 10) if self.schedule_date is not None else 0 + flags |= (1 << 24) if self.schedule_repeat_period is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + flags |= (1 << 17) if self.quick_reply_shortcut is not None else 0 + flags |= (1 << 18) if self.effect is not None else 0 + flags |= (1 << 21) if self.allow_paid_stars is not None else 0 + flags |= (1 << 22) if self.suggested_post is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(String(self.message)) + + b.write(Long(self.random_id)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.schedule_repeat_period is not None: + b.write(Int(self.schedule_repeat_period)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + if self.quick_reply_shortcut is not None: + b.write(self.quick_reply_shortcut.write()) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + if self.suggested_post is not None: + b.write(self.suggested_post.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_multi_media.py b/pyrogram/raw/functions/messages/send_multi_media.py new file mode 100644 index 00000000..3e88ae3f --- /dev/null +++ b/pyrogram/raw/functions/messages/send_multi_media.py @@ -0,0 +1,164 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendMultiMedia(TLObject): # type: ignore + """Send an album or grouped media + + + Details: + - Layer: ``224`` + - ID: ``1BF89D74`` + + Parameters: + peer (:obj:`InputPeer `): + The destination chat + + multi_media (List of :obj:`InputSingleMedia `): + The medias to send: note that they must be separately uploaded using messages.uploadMedia first, using raw inputMediaUploaded* constructors is not supported. + + silent (``bool``, *optional*): + Whether to send the album silently (no notification triggered) + + background (``bool``, *optional*): + Send in background? + + clear_draft (``bool``, *optional*): + Whether to clear drafts + + noforwards (``bool``, *optional*): + Only for bots, disallows forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled + + update_stickersets_order (``bool``, *optional*): + Whether to move used stickersets to top, see here for more info on this flag » + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + allow_paid_floodskip (``bool``, *optional*): + N/A + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the message should be sent in reply to the specified message or story. + + schedule_date (``int`` ``32-bit``, *optional*): + Scheduled message date for scheduled messages + + send_as (:obj:`InputPeer `, *optional*): + Send this message as the specified peer + + quick_reply_shortcut (:obj:`InputQuickReplyShortcut `, *optional*): + + + effect (``int`` ``64-bit``, *optional*): + + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "multi_media", "silent", "background", "clear_draft", "noforwards", "update_stickersets_order", "invert_media", "allow_paid_floodskip", "reply_to", "schedule_date", "send_as", "quick_reply_shortcut", "effect", "allow_paid_stars"] + + ID = 0x1bf89d74 + QUALNAME = "functions.messages.SendMultiMedia" + + def __init__(self, *, peer: "raw.base.InputPeer", multi_media: List["raw.base.InputSingleMedia"], silent: Optional[bool] = None, background: Optional[bool] = None, clear_draft: Optional[bool] = None, noforwards: Optional[bool] = None, update_stickersets_order: Optional[bool] = None, invert_media: Optional[bool] = None, allow_paid_floodskip: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, schedule_date: Optional[int] = None, send_as: "raw.base.InputPeer" = None, quick_reply_shortcut: "raw.base.InputQuickReplyShortcut" = None, effect: Optional[int] = None, allow_paid_stars: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.multi_media = multi_media # Vector + self.silent = silent # flags.5?true + self.background = background # flags.6?true + self.clear_draft = clear_draft # flags.7?true + self.noforwards = noforwards # flags.14?true + self.update_stickersets_order = update_stickersets_order # flags.15?true + self.invert_media = invert_media # flags.16?true + self.allow_paid_floodskip = allow_paid_floodskip # flags.19?true + self.reply_to = reply_to # flags.0?InputReplyTo + self.schedule_date = schedule_date # flags.10?int + self.send_as = send_as # flags.13?InputPeer + self.quick_reply_shortcut = quick_reply_shortcut # flags.17?InputQuickReplyShortcut + self.effect = effect # flags.18?long + self.allow_paid_stars = allow_paid_stars # flags.21?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendMultiMedia": + + flags = Int.read(b) + + silent = True if flags & (1 << 5) else False + background = True if flags & (1 << 6) else False + clear_draft = True if flags & (1 << 7) else False + noforwards = True if flags & (1 << 14) else False + update_stickersets_order = True if flags & (1 << 15) else False + invert_media = True if flags & (1 << 16) else False + allow_paid_floodskip = True if flags & (1 << 19) else False + peer = TLObject.read(b) + + reply_to = TLObject.read(b) if flags & (1 << 0) else None + + multi_media = TLObject.read(b) + + schedule_date = Int.read(b) if flags & (1 << 10) else None + send_as = TLObject.read(b) if flags & (1 << 13) else None + + quick_reply_shortcut = TLObject.read(b) if flags & (1 << 17) else None + + effect = Long.read(b) if flags & (1 << 18) else None + allow_paid_stars = Long.read(b) if flags & (1 << 21) else None + return SendMultiMedia(peer=peer, multi_media=multi_media, silent=silent, background=background, clear_draft=clear_draft, noforwards=noforwards, update_stickersets_order=update_stickersets_order, invert_media=invert_media, allow_paid_floodskip=allow_paid_floodskip, reply_to=reply_to, schedule_date=schedule_date, send_as=send_as, quick_reply_shortcut=quick_reply_shortcut, effect=effect, allow_paid_stars=allow_paid_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 5) if self.silent else 0 + flags |= (1 << 6) if self.background else 0 + flags |= (1 << 7) if self.clear_draft else 0 + flags |= (1 << 14) if self.noforwards else 0 + flags |= (1 << 15) if self.update_stickersets_order else 0 + flags |= (1 << 16) if self.invert_media else 0 + flags |= (1 << 19) if self.allow_paid_floodskip else 0 + flags |= (1 << 0) if self.reply_to is not None else 0 + flags |= (1 << 10) if self.schedule_date is not None else 0 + flags |= (1 << 13) if self.send_as is not None else 0 + flags |= (1 << 17) if self.quick_reply_shortcut is not None else 0 + flags |= (1 << 18) if self.effect is not None else 0 + flags |= (1 << 21) if self.allow_paid_stars is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(Vector(self.multi_media)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + if self.quick_reply_shortcut is not None: + b.write(self.quick_reply_shortcut.write()) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_paid_reaction.py b/pyrogram/raw/functions/messages/send_paid_reaction.py new file mode 100644 index 00000000..677c7c2b --- /dev/null +++ b/pyrogram/raw/functions/messages/send_paid_reaction.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendPaidReaction(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``58BBCB50`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + msg_id (``int`` ``32-bit``): + N/A + + count (``int`` ``32-bit``): + N/A + + random_id (``int`` ``64-bit``): + N/A + + private (:obj:`PaidReactionPrivacy `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "count", "random_id", "private"] + + ID = 0x58bbcb50 + QUALNAME = "functions.messages.SendPaidReaction" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, count: int, random_id: int, private: "raw.base.PaidReactionPrivacy" = None) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.count = count # int + self.random_id = random_id # long + self.private = private # flags.0?PaidReactionPrivacy + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendPaidReaction": + + flags = Int.read(b) + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + count = Int.read(b) + + random_id = Long.read(b) + + private = TLObject.read(b) if flags & (1 << 0) else None + + return SendPaidReaction(peer=peer, msg_id=msg_id, count=count, random_id=random_id, private=private) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.private is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Int(self.count)) + + b.write(Long(self.random_id)) + + if self.private is not None: + b.write(self.private.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_quick_reply_messages.py b/pyrogram/raw/functions/messages/send_quick_reply_messages.py new file mode 100644 index 00000000..871cbf8e --- /dev/null +++ b/pyrogram/raw/functions/messages/send_quick_reply_messages.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendQuickReplyMessages(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``6C750DE1`` + + Parameters: + peer (:obj:`InputPeer `): + + + shortcut_id (``int`` ``32-bit``): + + + id (List of ``int`` ``32-bit``): + + + random_id (List of ``int`` ``64-bit``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "shortcut_id", "id", "random_id"] + + ID = 0x6c750de1 + QUALNAME = "functions.messages.SendQuickReplyMessages" + + def __init__(self, *, peer: "raw.base.InputPeer", shortcut_id: int, id: List[int], random_id: List[int]) -> None: + self.peer = peer # InputPeer + self.shortcut_id = shortcut_id # int + self.id = id # Vector + self.random_id = random_id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendQuickReplyMessages": + # No flags + + peer = TLObject.read(b) + + shortcut_id = Int.read(b) + + id = TLObject.read(b, Int) + + random_id = TLObject.read(b, Long) + + return SendQuickReplyMessages(peer=peer, shortcut_id=shortcut_id, id=id, random_id=random_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.shortcut_id)) + + b.write(Vector(self.id, Int)) + + b.write(Vector(self.random_id, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_reaction.py b/pyrogram/raw/functions/messages/send_reaction.py new file mode 100644 index 00000000..e3066c63 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_reaction.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendReaction(TLObject): # type: ignore + """React to message. + + + Details: + - Layer: ``224`` + - ID: ``D30D78D4`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + msg_id (``int`` ``32-bit``): + Message ID to react to + + big (``bool``, *optional*): + Whether a bigger and longer reaction should be shown + + add_to_recent (``bool``, *optional*): + Whether to add this reaction to the recent reactions list ». + + reaction (List of :obj:`Reaction `, *optional*): + A list of reactions + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "big", "add_to_recent", "reaction"] + + ID = 0xd30d78d4 + QUALNAME = "functions.messages.SendReaction" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, big: Optional[bool] = None, add_to_recent: Optional[bool] = None, reaction: Optional[List["raw.base.Reaction"]] = None) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.big = big # flags.1?true + self.add_to_recent = add_to_recent # flags.2?true + self.reaction = reaction # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendReaction": + + flags = Int.read(b) + + big = True if flags & (1 << 1) else False + add_to_recent = True if flags & (1 << 2) else False + peer = TLObject.read(b) + + msg_id = Int.read(b) + + reaction = TLObject.read(b) if flags & (1 << 0) else [] + + return SendReaction(peer=peer, msg_id=msg_id, big=big, add_to_recent=add_to_recent, reaction=reaction) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.big else 0 + flags |= (1 << 2) if self.add_to_recent else 0 + flags |= (1 << 0) if self.reaction else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + if self.reaction is not None: + b.write(Vector(self.reaction)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_scheduled_messages.py b/pyrogram/raw/functions/messages/send_scheduled_messages.py new file mode 100644 index 00000000..3743194a --- /dev/null +++ b/pyrogram/raw/functions/messages/send_scheduled_messages.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendScheduledMessages(TLObject): # type: ignore + """Send scheduled messages right away + + + Details: + - Layer: ``224`` + - ID: ``BD38850A`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + id (List of ``int`` ``32-bit``): + Scheduled message IDs + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0xbd38850a + QUALNAME = "functions.messages.SendScheduledMessages" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendScheduledMessages": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return SendScheduledMessages(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_screenshot_notification.py b/pyrogram/raw/functions/messages/send_screenshot_notification.py new file mode 100644 index 00000000..7cd06757 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_screenshot_notification.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendScreenshotNotification(TLObject): # type: ignore + """Notify the other user in a private chat that a screenshot of the chat was taken + + + Details: + - Layer: ``224`` + - ID: ``A1405817`` + + Parameters: + peer (:obj:`InputPeer `): + Other user + + reply_to (:obj:`InputReplyTo `): + Indicates the message that was screenshotted (the specified message ID can also be 0 to avoid indicating any specific message). + + random_id (``int`` ``64-bit``): + Random ID to avoid message resending + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "reply_to", "random_id"] + + ID = 0xa1405817 + QUALNAME = "functions.messages.SendScreenshotNotification" + + def __init__(self, *, peer: "raw.base.InputPeer", reply_to: "raw.base.InputReplyTo", random_id: int) -> None: + self.peer = peer # InputPeer + self.reply_to = reply_to # InputReplyTo + self.random_id = random_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendScreenshotNotification": + # No flags + + peer = TLObject.read(b) + + reply_to = TLObject.read(b) + + random_id = Long.read(b) + + return SendScreenshotNotification(peer=peer, reply_to=reply_to, random_id=random_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.reply_to.write()) + + b.write(Long(self.random_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_vote.py b/pyrogram/raw/functions/messages/send_vote.py new file mode 100644 index 00000000..cde3ac62 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_vote.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendVote(TLObject): # type: ignore + """Vote in a poll + + + Details: + - Layer: ``224`` + - ID: ``10EA6184`` + + Parameters: + peer (:obj:`InputPeer `): + The chat where the poll was sent + + msg_id (``int`` ``32-bit``): + The message ID of the poll + + options (List of ``bytes``): + The options that were chosen + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "options"] + + ID = 0x10ea6184 + QUALNAME = "functions.messages.SendVote" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, options: List[bytes]) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.options = options # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendVote": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + options = TLObject.read(b, Bytes) + + return SendVote(peer=peer, msg_id=msg_id, options=options) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Vector(self.options, Bytes)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_web_view_data.py b/pyrogram/raw/functions/messages/send_web_view_data.py new file mode 100644 index 00000000..3aa0d9b8 --- /dev/null +++ b/pyrogram/raw/functions/messages/send_web_view_data.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendWebViewData(TLObject): # type: ignore + """Used by the user to relay data from an opened reply keyboard bot mini app to the bot that owns it. + + + Details: + - Layer: ``224`` + - ID: ``DC0242C8`` + + Parameters: + bot (:obj:`InputUser `): + Bot that owns the web app + + random_id (``int`` ``64-bit``): + Unique client message ID to prevent duplicate sending of the same event + + button_text (``str``): + Text of the keyboardButtonSimpleWebView that was pressed to open the web app. + + data (``str``): + Data to relay to the bot, obtained from a web_app_data_send JS event. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["bot", "random_id", "button_text", "data"] + + ID = 0xdc0242c8 + QUALNAME = "functions.messages.SendWebViewData" + + def __init__(self, *, bot: "raw.base.InputUser", random_id: int, button_text: str, data: str) -> None: + self.bot = bot # InputUser + self.random_id = random_id # long + self.button_text = button_text # string + self.data = data # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendWebViewData": + # No flags + + bot = TLObject.read(b) + + random_id = Long.read(b) + + button_text = String.read(b) + + data = String.read(b) + + return SendWebViewData(bot=bot, random_id=random_id, button_text=button_text, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(Long(self.random_id)) + + b.write(String(self.button_text)) + + b.write(String(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/send_web_view_result_message.py b/pyrogram/raw/functions/messages/send_web_view_result_message.py new file mode 100644 index 00000000..c3aac9cf --- /dev/null +++ b/pyrogram/raw/functions/messages/send_web_view_result_message.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendWebViewResultMessage(TLObject): # type: ignore + """Terminate webview interaction started with messages.requestWebView, sending the specified message to the chat on behalf of the user. + + + Details: + - Layer: ``224`` + - ID: ``A4314F5`` + + Parameters: + bot_query_id (``str``): + Webview interaction ID obtained from messages.requestWebView + + result (:obj:`InputBotInlineResult `): + Message to send + + Returns: + :obj:`WebViewMessageSent ` + """ + + __slots__: List[str] = ["bot_query_id", "result"] + + ID = 0xa4314f5 + QUALNAME = "functions.messages.SendWebViewResultMessage" + + def __init__(self, *, bot_query_id: str, result: "raw.base.InputBotInlineResult") -> None: + self.bot_query_id = bot_query_id # string + self.result = result # InputBotInlineResult + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendWebViewResultMessage": + # No flags + + bot_query_id = String.read(b) + + result = TLObject.read(b) + + return SendWebViewResultMessage(bot_query_id=bot_query_id, result=result) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.bot_query_id)) + + b.write(self.result.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_bot_callback_answer.py b/pyrogram/raw/functions/messages/set_bot_callback_answer.py new file mode 100644 index 00000000..eac45fe4 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_bot_callback_answer.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotCallbackAnswer(TLObject): # type: ignore + """Set the callback answer to a user button press (bots only) + + + Details: + - Layer: ``224`` + - ID: ``D58F130A`` + + Parameters: + query_id (``int`` ``64-bit``): + Query ID + + cache_time (``int`` ``32-bit``): + Cache validity + + alert (``bool``, *optional*): + Whether to show the message as a popup instead of a toast notification + + message (``str``, *optional*): + Popup to show + + url (``str``, *optional*): + URL to open + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["query_id", "cache_time", "alert", "message", "url"] + + ID = 0xd58f130a + QUALNAME = "functions.messages.SetBotCallbackAnswer" + + def __init__(self, *, query_id: int, cache_time: int, alert: Optional[bool] = None, message: Optional[str] = None, url: Optional[str] = None) -> None: + self.query_id = query_id # long + self.cache_time = cache_time # int + self.alert = alert # flags.1?true + self.message = message # flags.0?string + self.url = url # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotCallbackAnswer": + + flags = Int.read(b) + + alert = True if flags & (1 << 1) else False + query_id = Long.read(b) + + message = String.read(b) if flags & (1 << 0) else None + url = String.read(b) if flags & (1 << 2) else None + cache_time = Int.read(b) + + return SetBotCallbackAnswer(query_id=query_id, cache_time=cache_time, alert=alert, message=message, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.alert else 0 + flags |= (1 << 0) if self.message is not None else 0 + flags |= (1 << 2) if self.url is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.query_id)) + + if self.message is not None: + b.write(String(self.message)) + + if self.url is not None: + b.write(String(self.url)) + + b.write(Int(self.cache_time)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_bot_precheckout_results.py b/pyrogram/raw/functions/messages/set_bot_precheckout_results.py new file mode 100644 index 00000000..c976d633 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_bot_precheckout_results.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotPrecheckoutResults(TLObject): # type: ignore + """Once the user has confirmed their payment and shipping details, the bot receives an updateBotPrecheckoutQuery update. +Use this method to respond to such pre-checkout queries. +Note: Telegram must receive an answer within 10 seconds after the pre-checkout query was sent. + + + Details: + - Layer: ``224`` + - ID: ``9C2DD95`` + + Parameters: + query_id (``int`` ``64-bit``): + Unique identifier for the query to be answered + + success (``bool``, *optional*): + Set this flag if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order, otherwise do not set it, and set the error field, instead + + error (``str``, *optional*): + Required if the success isn't set. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["query_id", "success", "error"] + + ID = 0x9c2dd95 + QUALNAME = "functions.messages.SetBotPrecheckoutResults" + + def __init__(self, *, query_id: int, success: Optional[bool] = None, error: Optional[str] = None) -> None: + self.query_id = query_id # long + self.success = success # flags.1?true + self.error = error # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotPrecheckoutResults": + + flags = Int.read(b) + + success = True if flags & (1 << 1) else False + query_id = Long.read(b) + + error = String.read(b) if flags & (1 << 0) else None + return SetBotPrecheckoutResults(query_id=query_id, success=success, error=error) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.success else 0 + flags |= (1 << 0) if self.error is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.query_id)) + + if self.error is not None: + b.write(String(self.error)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_bot_shipping_results.py b/pyrogram/raw/functions/messages/set_bot_shipping_results.py new file mode 100644 index 00000000..59ec2004 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_bot_shipping_results.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetBotShippingResults(TLObject): # type: ignore + """If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the bot will receive an updateBotShippingQuery update. Use this method to reply to shipping queries. + + + Details: + - Layer: ``224`` + - ID: ``E5F672FA`` + + Parameters: + query_id (``int`` ``64-bit``): + Unique identifier for the query to be answered + + error (``str``, *optional*): + Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable"). Telegram will display this message to the user. + + shipping_options (List of :obj:`ShippingOption `, *optional*): + A vector of available shipping options. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["query_id", "error", "shipping_options"] + + ID = 0xe5f672fa + QUALNAME = "functions.messages.SetBotShippingResults" + + def __init__(self, *, query_id: int, error: Optional[str] = None, shipping_options: Optional[List["raw.base.ShippingOption"]] = None) -> None: + self.query_id = query_id # long + self.error = error # flags.0?string + self.shipping_options = shipping_options # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetBotShippingResults": + + flags = Int.read(b) + + query_id = Long.read(b) + + error = String.read(b) if flags & (1 << 0) else None + shipping_options = TLObject.read(b) if flags & (1 << 1) else [] + + return SetBotShippingResults(query_id=query_id, error=error, shipping_options=shipping_options) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.error is not None else 0 + flags |= (1 << 1) if self.shipping_options else 0 + b.write(Int(flags)) + + b.write(Long(self.query_id)) + + if self.error is not None: + b.write(String(self.error)) + + if self.shipping_options is not None: + b.write(Vector(self.shipping_options)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_chat_available_reactions.py b/pyrogram/raw/functions/messages/set_chat_available_reactions.py new file mode 100644 index 00000000..5a0ff675 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_chat_available_reactions.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetChatAvailableReactions(TLObject): # type: ignore + """Change the set of message reactions » that can be used in a certain group, supergroup or channel + + + Details: + - Layer: ``224`` + - ID: ``864B2581`` + + Parameters: + peer (:obj:`InputPeer `): + Group where to apply changes + + available_reactions (:obj:`ChatReactions `): + Allowed reaction emojis + + reactions_limit (``int`` ``32-bit``, *optional*): + + + paid_enabled (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "available_reactions", "reactions_limit", "paid_enabled"] + + ID = 0x864b2581 + QUALNAME = "functions.messages.SetChatAvailableReactions" + + def __init__(self, *, peer: "raw.base.InputPeer", available_reactions: "raw.base.ChatReactions", reactions_limit: Optional[int] = None, paid_enabled: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.available_reactions = available_reactions # ChatReactions + self.reactions_limit = reactions_limit # flags.0?int + self.paid_enabled = paid_enabled # flags.1?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetChatAvailableReactions": + + flags = Int.read(b) + + peer = TLObject.read(b) + + available_reactions = TLObject.read(b) + + reactions_limit = Int.read(b) if flags & (1 << 0) else None + paid_enabled = Bool.read(b) if flags & (1 << 1) else None + return SetChatAvailableReactions(peer=peer, available_reactions=available_reactions, reactions_limit=reactions_limit, paid_enabled=paid_enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.reactions_limit is not None else 0 + flags |= (1 << 1) if self.paid_enabled is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.available_reactions.write()) + + if self.reactions_limit is not None: + b.write(Int(self.reactions_limit)) + + if self.paid_enabled is not None: + b.write(Bool(self.paid_enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_chat_theme.py b/pyrogram/raw/functions/messages/set_chat_theme.py new file mode 100644 index 00000000..ab95beaa --- /dev/null +++ b/pyrogram/raw/functions/messages/set_chat_theme.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetChatTheme(TLObject): # type: ignore + """Change the chat theme of a certain chat + + + Details: + - Layer: ``224`` + - ID: ``81202C9`` + + Parameters: + peer (:obj:`InputPeer `): + Private chat where to change theme + + theme (:obj:`InputChatTheme `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "theme"] + + ID = 0x81202c9 + QUALNAME = "functions.messages.SetChatTheme" + + def __init__(self, *, peer: "raw.base.InputPeer", theme: "raw.base.InputChatTheme") -> None: + self.peer = peer # InputPeer + self.theme = theme # InputChatTheme + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetChatTheme": + # No flags + + peer = TLObject.read(b) + + theme = TLObject.read(b) + + return SetChatTheme(peer=peer, theme=theme) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.theme.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_chat_wall_paper.py b/pyrogram/raw/functions/messages/set_chat_wall_paper.py new file mode 100644 index 00000000..56ccf794 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_chat_wall_paper.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetChatWallPaper(TLObject): # type: ignore + """Set a custom wallpaper » in a specific private chat with another user. + + + Details: + - Layer: ``224`` + - ID: ``8FFACAE1`` + + Parameters: + peer (:obj:`InputPeer `): + The private chat where the wallpaper will be set + + for_both (``bool``, *optional*): + Only for Premium users, sets the specified wallpaper for both users of the chat, without requiring confirmation from the other user. + + revert (``bool``, *optional*): + If we don't like the new wallpaper the other user of the chat has chosen for us using the for_both flag, we can re-set our previous wallpaper just on our side using this flag. + + wallpaper (:obj:`InputWallPaper `, *optional*): + The wallpaper », obtained as described in the wallpaper documentation »; must not be provided when installing a wallpaper obtained from a messageActionSetChatWallPaper service message (id must be provided, instead). + + settings (:obj:`WallPaperSettings `, *optional*): + Wallpaper settings, obtained as described in the wallpaper documentation » or from messageActionSetChatWallPaper.wallpaper.settings. + + id (``int`` ``32-bit``, *optional*): + If the wallpaper was obtained from a messageActionSetChatWallPaper service message, must contain the ID of that message. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "for_both", "revert", "wallpaper", "settings", "id"] + + ID = 0x8ffacae1 + QUALNAME = "functions.messages.SetChatWallPaper" + + def __init__(self, *, peer: "raw.base.InputPeer", for_both: Optional[bool] = None, revert: Optional[bool] = None, wallpaper: "raw.base.InputWallPaper" = None, settings: "raw.base.WallPaperSettings" = None, id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.for_both = for_both # flags.3?true + self.revert = revert # flags.4?true + self.wallpaper = wallpaper # flags.0?InputWallPaper + self.settings = settings # flags.2?WallPaperSettings + self.id = id # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetChatWallPaper": + + flags = Int.read(b) + + for_both = True if flags & (1 << 3) else False + revert = True if flags & (1 << 4) else False + peer = TLObject.read(b) + + wallpaper = TLObject.read(b) if flags & (1 << 0) else None + + settings = TLObject.read(b) if flags & (1 << 2) else None + + id = Int.read(b) if flags & (1 << 1) else None + return SetChatWallPaper(peer=peer, for_both=for_both, revert=revert, wallpaper=wallpaper, settings=settings, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.for_both else 0 + flags |= (1 << 4) if self.revert else 0 + flags |= (1 << 0) if self.wallpaper is not None else 0 + flags |= (1 << 2) if self.settings is not None else 0 + flags |= (1 << 1) if self.id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.wallpaper is not None: + b.write(self.wallpaper.write()) + + if self.settings is not None: + b.write(self.settings.write()) + + if self.id is not None: + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_default_history_ttl.py b/pyrogram/raw/functions/messages/set_default_history_ttl.py new file mode 100644 index 00000000..93b43061 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_default_history_ttl.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetDefaultHistoryTTL(TLObject): # type: ignore + """Changes the default value of the Time-To-Live setting, applied to all new chats. + + + Details: + - Layer: ``224`` + - ID: ``9EB51445`` + + Parameters: + period (``int`` ``32-bit``): + The new default Time-To-Live of all messages sent in new chats. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["period"] + + ID = 0x9eb51445 + QUALNAME = "functions.messages.SetDefaultHistoryTTL" + + def __init__(self, *, period: int) -> None: + self.period = period # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetDefaultHistoryTTL": + # No flags + + period = Int.read(b) + + return SetDefaultHistoryTTL(period=period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.period)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_default_reaction.py b/pyrogram/raw/functions/messages/set_default_reaction.py new file mode 100644 index 00000000..c25963eb --- /dev/null +++ b/pyrogram/raw/functions/messages/set_default_reaction.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetDefaultReaction(TLObject): # type: ignore + """Change default emoji reaction to use in the quick reaction menu: the value is synced across devices and can be fetched using help.getConfig, reactions_default field. + + + Details: + - Layer: ``224`` + - ID: ``4F47A016`` + + Parameters: + reaction (:obj:`Reaction `): + New emoji reaction + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["reaction"] + + ID = 0x4f47a016 + QUALNAME = "functions.messages.SetDefaultReaction" + + def __init__(self, *, reaction: "raw.base.Reaction") -> None: + self.reaction = reaction # Reaction + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetDefaultReaction": + # No flags + + reaction = TLObject.read(b) + + return SetDefaultReaction(reaction=reaction) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.reaction.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_encrypted_typing.py b/pyrogram/raw/functions/messages/set_encrypted_typing.py new file mode 100644 index 00000000..b718127e --- /dev/null +++ b/pyrogram/raw/functions/messages/set_encrypted_typing.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetEncryptedTyping(TLObject): # type: ignore + """Send typing event by the current user to a secret chat. + + + Details: + - Layer: ``224`` + - ID: ``791451ED`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + Secret chat ID + + typing (``bool``): + Typing.Possible values:(boolTrue), if the user started typing and more than 5 seconds have passed since the last request(boolFalse), if the user stopped typing + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "typing"] + + ID = 0x791451ed + QUALNAME = "functions.messages.SetEncryptedTyping" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", typing: bool) -> None: + self.peer = peer # InputEncryptedChat + self.typing = typing # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetEncryptedTyping": + # No flags + + peer = TLObject.read(b) + + typing = Bool.read(b) + + return SetEncryptedTyping(peer=peer, typing=typing) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bool(self.typing)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_game_score.py b/pyrogram/raw/functions/messages/set_game_score.py new file mode 100644 index 00000000..f5d64b6b --- /dev/null +++ b/pyrogram/raw/functions/messages/set_game_score.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetGameScore(TLObject): # type: ignore + """Use this method to set the score of the specified user in a game sent as a normal message (bots only). + + + Details: + - Layer: ``224`` + - ID: ``8EF8ECC0`` + + Parameters: + peer (:obj:`InputPeer `): + Unique identifier of target chat + + id (``int`` ``32-bit``): + Identifier of the sent message + + user_id (:obj:`InputUser `): + User identifier + + score (``int`` ``32-bit``): + New score + + edit_message (``bool``, *optional*): + Set this flag if the game message should be automatically edited to include the current scoreboard + + force (``bool``, *optional*): + Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id", "user_id", "score", "edit_message", "force"] + + ID = 0x8ef8ecc0 + QUALNAME = "functions.messages.SetGameScore" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, user_id: "raw.base.InputUser", score: int, edit_message: Optional[bool] = None, force: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.user_id = user_id # InputUser + self.score = score # int + self.edit_message = edit_message # flags.0?true + self.force = force # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetGameScore": + + flags = Int.read(b) + + edit_message = True if flags & (1 << 0) else False + force = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + id = Int.read(b) + + user_id = TLObject.read(b) + + score = Int.read(b) + + return SetGameScore(peer=peer, id=id, user_id=user_id, score=score, edit_message=edit_message, force=force) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.edit_message else 0 + flags |= (1 << 1) if self.force else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + b.write(self.user_id.write()) + + b.write(Int(self.score)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_history_ttl.py b/pyrogram/raw/functions/messages/set_history_ttl.py new file mode 100644 index 00000000..cfe836d1 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_history_ttl.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetHistoryTTL(TLObject): # type: ignore + """Set maximum Time-To-Live of all messages in the specified chat + + + Details: + - Layer: ``224`` + - ID: ``B80E5FE4`` + + Parameters: + peer (:obj:`InputPeer `): + The dialog + + period (``int`` ``32-bit``): + Automatically delete all messages sent in the chat after this many seconds + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "period"] + + ID = 0xb80e5fe4 + QUALNAME = "functions.messages.SetHistoryTTL" + + def __init__(self, *, peer: "raw.base.InputPeer", period: int) -> None: + self.peer = peer # InputPeer + self.period = period # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetHistoryTTL": + # No flags + + peer = TLObject.read(b) + + period = Int.read(b) + + return SetHistoryTTL(peer=peer, period=period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.period)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_inline_bot_results.py b/pyrogram/raw/functions/messages/set_inline_bot_results.py new file mode 100644 index 00000000..6d366150 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_inline_bot_results.py @@ -0,0 +1,114 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetInlineBotResults(TLObject): # type: ignore + """Answer an inline query, for bots only + + + Details: + - Layer: ``224`` + - ID: ``BB12A419`` + + Parameters: + query_id (``int`` ``64-bit``): + Unique identifier for the answered query + + results (List of :obj:`InputBotInlineResult `): + Vector of results for the inline query + + cache_time (``int`` ``32-bit``): + The maximum amount of time in seconds that the result of the inline query may be cached on the server. Defaults to 300. + + gallery (``bool``, *optional*): + Set this flag if the results are composed of media files + + private (``bool``, *optional*): + Set this flag if results may be cached on the server side only for the user that sent the query. By default, results may be returned to any user who sends the same query + + next_offset (``str``, *optional*): + Pass the offset that a client should send in the next query with the same text to receive more results. Pass an empty string if there are no more results or if you don't support pagination. Offset length can't exceed 64 bytes. + + switch_pm (:obj:`InlineBotSwitchPM `, *optional*): + If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to a private chat with the bot and sends the bot a start message with a certain parameter. + + switch_webview (:obj:`InlineBotWebView `, *optional*): + If passed, clients will display a button on top of the remaining inline result list with the specified text, that switches the user to the specified inline mode mini app. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["query_id", "results", "cache_time", "gallery", "private", "next_offset", "switch_pm", "switch_webview"] + + ID = 0xbb12a419 + QUALNAME = "functions.messages.SetInlineBotResults" + + def __init__(self, *, query_id: int, results: List["raw.base.InputBotInlineResult"], cache_time: int, gallery: Optional[bool] = None, private: Optional[bool] = None, next_offset: Optional[str] = None, switch_pm: "raw.base.InlineBotSwitchPM" = None, switch_webview: "raw.base.InlineBotWebView" = None) -> None: + self.query_id = query_id # long + self.results = results # Vector + self.cache_time = cache_time # int + self.gallery = gallery # flags.0?true + self.private = private # flags.1?true + self.next_offset = next_offset # flags.2?string + self.switch_pm = switch_pm # flags.3?InlineBotSwitchPM + self.switch_webview = switch_webview # flags.4?InlineBotWebView + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetInlineBotResults": + + flags = Int.read(b) + + gallery = True if flags & (1 << 0) else False + private = True if flags & (1 << 1) else False + query_id = Long.read(b) + + results = TLObject.read(b) + + cache_time = Int.read(b) + + next_offset = String.read(b) if flags & (1 << 2) else None + switch_pm = TLObject.read(b) if flags & (1 << 3) else None + + switch_webview = TLObject.read(b) if flags & (1 << 4) else None + + return SetInlineBotResults(query_id=query_id, results=results, cache_time=cache_time, gallery=gallery, private=private, next_offset=next_offset, switch_pm=switch_pm, switch_webview=switch_webview) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.gallery else 0 + flags |= (1 << 1) if self.private else 0 + flags |= (1 << 2) if self.next_offset is not None else 0 + flags |= (1 << 3) if self.switch_pm is not None else 0 + flags |= (1 << 4) if self.switch_webview is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.query_id)) + + b.write(Vector(self.results)) + + b.write(Int(self.cache_time)) + + if self.next_offset is not None: + b.write(String(self.next_offset)) + + if self.switch_pm is not None: + b.write(self.switch_pm.write()) + + if self.switch_webview is not None: + b.write(self.switch_webview.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_inline_game_score.py b/pyrogram/raw/functions/messages/set_inline_game_score.py new file mode 100644 index 00000000..7dff4b9e --- /dev/null +++ b/pyrogram/raw/functions/messages/set_inline_game_score.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetInlineGameScore(TLObject): # type: ignore + """Use this method to set the score of the specified user in a game sent as an inline message (bots only). + + + Details: + - Layer: ``224`` + - ID: ``15AD9F64`` + + Parameters: + id (:obj:`InputBotInlineMessageID `): + ID of the inline message + + user_id (:obj:`InputUser `): + User identifier + + score (``int`` ``32-bit``): + New score + + edit_message (``bool``, *optional*): + Set this flag if the game message should be automatically edited to include the current scoreboard + + force (``bool``, *optional*): + Set this flag if the high score is allowed to decrease. This can be useful when fixing mistakes or banning cheaters + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "user_id", "score", "edit_message", "force"] + + ID = 0x15ad9f64 + QUALNAME = "functions.messages.SetInlineGameScore" + + def __init__(self, *, id: "raw.base.InputBotInlineMessageID", user_id: "raw.base.InputUser", score: int, edit_message: Optional[bool] = None, force: Optional[bool] = None) -> None: + self.id = id # InputBotInlineMessageID + self.user_id = user_id # InputUser + self.score = score # int + self.edit_message = edit_message # flags.0?true + self.force = force # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetInlineGameScore": + + flags = Int.read(b) + + edit_message = True if flags & (1 << 0) else False + force = True if flags & (1 << 1) else False + id = TLObject.read(b) + + user_id = TLObject.read(b) + + score = Int.read(b) + + return SetInlineGameScore(id=id, user_id=user_id, score=score, edit_message=edit_message, force=force) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.edit_message else 0 + flags |= (1 << 1) if self.force else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + b.write(self.user_id.write()) + + b.write(Int(self.score)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_typing.py b/pyrogram/raw/functions/messages/set_typing.py new file mode 100644 index 00000000..97e55420 --- /dev/null +++ b/pyrogram/raw/functions/messages/set_typing.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetTyping(TLObject): # type: ignore + """Sends a current user typing event (see SendMessageAction for all event types) to a conversation partner or group. + + + Details: + - Layer: ``224`` + - ID: ``58943EE2`` + + Parameters: + peer (:obj:`InputPeer `): + Target user or group + + action (:obj:`SendMessageAction `): + Type of action + + top_msg_id (``int`` ``32-bit``, *optional*): + Topic ID + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "action", "top_msg_id"] + + ID = 0x58943ee2 + QUALNAME = "functions.messages.SetTyping" + + def __init__(self, *, peer: "raw.base.InputPeer", action: "raw.base.SendMessageAction", top_msg_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.action = action # SendMessageAction + self.top_msg_id = top_msg_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetTyping": + + flags = Int.read(b) + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + action = TLObject.read(b) + + return SetTyping(peer=peer, action=action, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + b.write(self.action.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/set_web_view_result.py b/pyrogram/raw/functions/messages/set_web_view_result.py new file mode 100644 index 00000000..262b59de --- /dev/null +++ b/pyrogram/raw/functions/messages/set_web_view_result.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetWebViewResult(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E41CD11D`` + + Parameters: + query_id (``int`` ``64-bit``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["query_id"] + + ID = 0xe41cd11d + QUALNAME = "functions.messages.SetWebViewResult" + + def __init__(self, *, query_id: int) -> None: + self.query_id = query_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetWebViewResult": + # No flags + + query_id = Long.read(b) + + return SetWebViewResult(query_id=query_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.query_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/start_bot.py b/pyrogram/raw/functions/messages/start_bot.py new file mode 100644 index 00000000..21fc6568 --- /dev/null +++ b/pyrogram/raw/functions/messages/start_bot.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StartBot(TLObject): # type: ignore + """Start a conversation with a bot using a deep linking parameter + + + Details: + - Layer: ``224`` + - ID: ``E6DF7378`` + + Parameters: + bot (:obj:`InputUser `): + The bot + + peer (:obj:`InputPeer `): + The chat where to start the bot, can be the bot's private chat or a group + + random_id (``int`` ``64-bit``): + Random ID to avoid resending the same message + + start_param (``str``): + Deep linking parameter + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["bot", "peer", "random_id", "start_param"] + + ID = 0xe6df7378 + QUALNAME = "functions.messages.StartBot" + + def __init__(self, *, bot: "raw.base.InputUser", peer: "raw.base.InputPeer", random_id: int, start_param: str) -> None: + self.bot = bot # InputUser + self.peer = peer # InputPeer + self.random_id = random_id # long + self.start_param = start_param # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StartBot": + # No flags + + bot = TLObject.read(b) + + peer = TLObject.read(b) + + random_id = Long.read(b) + + start_param = String.read(b) + + return StartBot(bot=bot, peer=peer, random_id=random_id, start_param=start_param) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(self.peer.write()) + + b.write(Long(self.random_id)) + + b.write(String(self.start_param)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/start_history_import.py b/pyrogram/raw/functions/messages/start_history_import.py new file mode 100644 index 00000000..bf040de5 --- /dev/null +++ b/pyrogram/raw/functions/messages/start_history_import.py @@ -0,0 +1,64 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StartHistoryImport(TLObject): # type: ignore + """Complete the history import process, importing all messages into the chat. +To be called only after initializing the import with messages.initHistoryImport and uploading all files using messages.uploadImportedMedia. + + + Details: + - Layer: ``224`` + - ID: ``B43DF344`` + + Parameters: + peer (:obj:`InputPeer `): + The Telegram chat where the messages should be imported, click here for more info » + + import_id (``int`` ``64-bit``): + Identifier of a history import session, returned by messages.initHistoryImport. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "import_id"] + + ID = 0xb43df344 + QUALNAME = "functions.messages.StartHistoryImport" + + def __init__(self, *, peer: "raw.base.InputPeer", import_id: int) -> None: + self.peer = peer # InputPeer + self.import_id = import_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StartHistoryImport": + # No flags + + peer = TLObject.read(b) + + import_id = Long.read(b) + + return StartHistoryImport(peer=peer, import_id=import_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.import_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/summarize_text.py b/pyrogram/raw/functions/messages/summarize_text.py new file mode 100644 index 00000000..3e0414b3 --- /dev/null +++ b/pyrogram/raw/functions/messages/summarize_text.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SummarizeText(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``9D4104E2`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + id (``int`` ``32-bit``): + N/A + + to_lang (``str``, *optional*): + N/A + + Returns: + :obj:`TextWithEntities ` + """ + + __slots__: List[str] = ["peer", "id", "to_lang"] + + ID = 0x9d4104e2 + QUALNAME = "functions.messages.SummarizeText" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, to_lang: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.to_lang = to_lang # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SummarizeText": + + flags = Int.read(b) + + peer = TLObject.read(b) + + id = Int.read(b) + + to_lang = String.read(b) if flags & (1 << 0) else None + return SummarizeText(peer=peer, id=id, to_lang=to_lang) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.to_lang is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.to_lang is not None: + b.write(String(self.to_lang)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_bot_in_attach_menu.py b/pyrogram/raw/functions/messages/toggle_bot_in_attach_menu.py new file mode 100644 index 00000000..a643f22d --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_bot_in_attach_menu.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleBotInAttachMenu(TLObject): # type: ignore + """Enable or disable web bot attachment menu » + + + Details: + - Layer: ``224`` + - ID: ``69F59D69`` + + Parameters: + bot (:obj:`InputUser `): + Bot ID + + enabled (``bool``): + Toggle + + write_allowed (``bool``, *optional*): + Whether the user authorizes the bot to write messages to them, if requested by attachMenuBot.request_write_access + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["bot", "enabled", "write_allowed"] + + ID = 0x69f59d69 + QUALNAME = "functions.messages.ToggleBotInAttachMenu" + + def __init__(self, *, bot: "raw.base.InputUser", enabled: bool, write_allowed: Optional[bool] = None) -> None: + self.bot = bot # InputUser + self.enabled = enabled # Bool + self.write_allowed = write_allowed # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleBotInAttachMenu": + + flags = Int.read(b) + + write_allowed = True if flags & (1 << 0) else False + bot = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleBotInAttachMenu(bot=bot, enabled=enabled, write_allowed=write_allowed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.write_allowed else 0 + b.write(Int(flags)) + + b.write(self.bot.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_dialog_filter_tags.py b/pyrogram/raw/functions/messages/toggle_dialog_filter_tags.py new file mode 100644 index 00000000..d6eb0217 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_dialog_filter_tags.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleDialogFilterTags(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``FD2DDA49`` + + Parameters: + enabled (``bool``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["enabled"] + + ID = 0xfd2dda49 + QUALNAME = "functions.messages.ToggleDialogFilterTags" + + def __init__(self, *, enabled: bool) -> None: + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleDialogFilterTags": + # No flags + + enabled = Bool.read(b) + + return ToggleDialogFilterTags(enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_dialog_pin.py b/pyrogram/raw/functions/messages/toggle_dialog_pin.py new file mode 100644 index 00000000..8edf0db9 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_dialog_pin.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleDialogPin(TLObject): # type: ignore + """Pin/unpin a dialog + + + Details: + - Layer: ``224`` + - ID: ``A731E257`` + + Parameters: + peer (:obj:`InputDialogPeer `): + The dialog to pin + + pinned (``bool``, *optional*): + Whether to pin or unpin the dialog + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "pinned"] + + ID = 0xa731e257 + QUALNAME = "functions.messages.ToggleDialogPin" + + def __init__(self, *, peer: "raw.base.InputDialogPeer", pinned: Optional[bool] = None) -> None: + self.peer = peer # InputDialogPeer + self.pinned = pinned # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleDialogPin": + + flags = Int.read(b) + + pinned = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + return ToggleDialogPin(peer=peer, pinned=pinned) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.pinned else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_no_forwards.py b/pyrogram/raw/functions/messages/toggle_no_forwards.py new file mode 100644 index 00000000..307ed25c --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_no_forwards.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleNoForwards(TLObject): # type: ignore + """Enable or disable content protection on a channel or chat + + + Details: + - Layer: ``224`` + - ID: ``B11EAFA2`` + + Parameters: + peer (:obj:`InputPeer `): + The chat or channel + + enabled (``bool``): + Enable or disable content protection + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "enabled"] + + ID = 0xb11eafa2 + QUALNAME = "functions.messages.ToggleNoForwards" + + def __init__(self, *, peer: "raw.base.InputPeer", enabled: bool) -> None: + self.peer = peer # InputPeer + self.enabled = enabled # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleNoForwards": + # No flags + + peer = TLObject.read(b) + + enabled = Bool.read(b) + + return ToggleNoForwards(peer=peer, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bool(self.enabled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_paid_reaction_privacy.py b/pyrogram/raw/functions/messages/toggle_paid_reaction_privacy.py new file mode 100644 index 00000000..b0ee361a --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_paid_reaction_privacy.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TogglePaidReactionPrivacy(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``435885B5`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + msg_id (``int`` ``32-bit``): + N/A + + private (:obj:`PaidReactionPrivacy `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "msg_id", "private"] + + ID = 0x435885b5 + QUALNAME = "functions.messages.TogglePaidReactionPrivacy" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, private: "raw.base.PaidReactionPrivacy") -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.private = private # PaidReactionPrivacy + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TogglePaidReactionPrivacy": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + private = TLObject.read(b) + + return TogglePaidReactionPrivacy(peer=peer, msg_id=msg_id, private=private) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(self.private.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_peer_translations.py b/pyrogram/raw/functions/messages/toggle_peer_translations.py new file mode 100644 index 00000000..a48d9505 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_peer_translations.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TogglePeerTranslations(TLObject): # type: ignore + """Show or hide the real-time chat translation popup for a certain chat + + + Details: + - Layer: ``224`` + - ID: ``E47CB579`` + + Parameters: + peer (:obj:`InputPeer `): + The peer + + disabled (``bool``, *optional*): + Whether to disable or enable the real-time chat translation popup + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "disabled"] + + ID = 0xe47cb579 + QUALNAME = "functions.messages.TogglePeerTranslations" + + def __init__(self, *, peer: "raw.base.InputPeer", disabled: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.disabled = disabled # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TogglePeerTranslations": + + flags = Int.read(b) + + disabled = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + return TogglePeerTranslations(peer=peer, disabled=disabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.disabled else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_saved_dialog_pin.py b/pyrogram/raw/functions/messages/toggle_saved_dialog_pin.py new file mode 100644 index 00000000..5d8bd0d8 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_saved_dialog_pin.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleSavedDialogPin(TLObject): # type: ignore + """Pin or unpin a saved message dialog ». + + + Details: + - Layer: ``224`` + - ID: ``AC81BBDE`` + + Parameters: + peer (:obj:`InputDialogPeer `): + The dialog to pin + + pinned (``bool``, *optional*): + Whether to pin or unpin the dialog + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "pinned"] + + ID = 0xac81bbde + QUALNAME = "functions.messages.ToggleSavedDialogPin" + + def __init__(self, *, peer: "raw.base.InputDialogPeer", pinned: Optional[bool] = None) -> None: + self.peer = peer # InputDialogPeer + self.pinned = pinned # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleSavedDialogPin": + + flags = Int.read(b) + + pinned = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + return ToggleSavedDialogPin(peer=peer, pinned=pinned) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.pinned else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_sticker_sets.py b/pyrogram/raw/functions/messages/toggle_sticker_sets.py new file mode 100644 index 00000000..2e9ae425 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_sticker_sets.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleStickerSets(TLObject): # type: ignore + """Apply changes to multiple stickersets + + + Details: + - Layer: ``224`` + - ID: ``B5052FEA`` + + Parameters: + stickersets (List of :obj:`InputStickerSet `): + Stickersets to act upon + + uninstall (``bool``, *optional*): + Uninstall the specified stickersets + + archive (``bool``, *optional*): + Archive the specified stickersets + + unarchive (``bool``, *optional*): + Unarchive the specified stickersets + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["stickersets", "uninstall", "archive", "unarchive"] + + ID = 0xb5052fea + QUALNAME = "functions.messages.ToggleStickerSets" + + def __init__(self, *, stickersets: List["raw.base.InputStickerSet"], uninstall: Optional[bool] = None, archive: Optional[bool] = None, unarchive: Optional[bool] = None) -> None: + self.stickersets = stickersets # Vector + self.uninstall = uninstall # flags.0?true + self.archive = archive # flags.1?true + self.unarchive = unarchive # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleStickerSets": + + flags = Int.read(b) + + uninstall = True if flags & (1 << 0) else False + archive = True if flags & (1 << 1) else False + unarchive = True if flags & (1 << 2) else False + stickersets = TLObject.read(b) + + return ToggleStickerSets(stickersets=stickersets, uninstall=uninstall, archive=archive, unarchive=unarchive) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.uninstall else 0 + flags |= (1 << 1) if self.archive else 0 + flags |= (1 << 2) if self.unarchive else 0 + b.write(Int(flags)) + + b.write(Vector(self.stickersets)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_suggested_post_approval.py b/pyrogram/raw/functions/messages/toggle_suggested_post_approval.py new file mode 100644 index 00000000..827285e1 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_suggested_post_approval.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleSuggestedPostApproval(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8107455C`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + msg_id (``int`` ``32-bit``): + N/A + + reject (``bool``, *optional*): + N/A + + schedule_date (``int`` ``32-bit``, *optional*): + N/A + + reject_comment (``str``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "reject", "schedule_date", "reject_comment"] + + ID = 0x8107455c + QUALNAME = "functions.messages.ToggleSuggestedPostApproval" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, reject: Optional[bool] = None, schedule_date: Optional[int] = None, reject_comment: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.reject = reject # flags.1?true + self.schedule_date = schedule_date # flags.0?int + self.reject_comment = reject_comment # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleSuggestedPostApproval": + + flags = Int.read(b) + + reject = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + msg_id = Int.read(b) + + schedule_date = Int.read(b) if flags & (1 << 0) else None + reject_comment = String.read(b) if flags & (1 << 2) else None + return ToggleSuggestedPostApproval(peer=peer, msg_id=msg_id, reject=reject, schedule_date=schedule_date, reject_comment=reject_comment) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.reject else 0 + flags |= (1 << 0) if self.schedule_date is not None else 0 + flags |= (1 << 2) if self.reject_comment is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.reject_comment is not None: + b.write(String(self.reject_comment)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/toggle_todo_completed.py b/pyrogram/raw/functions/messages/toggle_todo_completed.py new file mode 100644 index 00000000..78980879 --- /dev/null +++ b/pyrogram/raw/functions/messages/toggle_todo_completed.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleTodoCompleted(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D3E03124`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + msg_id (``int`` ``32-bit``): + N/A + + completed (List of ``int`` ``32-bit``): + N/A + + incompleted (List of ``int`` ``32-bit``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "msg_id", "completed", "incompleted"] + + ID = 0xd3e03124 + QUALNAME = "functions.messages.ToggleTodoCompleted" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, completed: List[int], incompleted: List[int]) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.completed = completed # Vector + self.incompleted = incompleted # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleTodoCompleted": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + completed = TLObject.read(b, Int) + + incompleted = TLObject.read(b, Int) + + return ToggleTodoCompleted(peer=peer, msg_id=msg_id, completed=completed, incompleted=incompleted) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Vector(self.completed, Int)) + + b.write(Vector(self.incompleted, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/transcribe_audio.py b/pyrogram/raw/functions/messages/transcribe_audio.py new file mode 100644 index 00000000..788e2748 --- /dev/null +++ b/pyrogram/raw/functions/messages/transcribe_audio.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TranscribeAudio(TLObject): # type: ignore + """Transcribe voice message + + + Details: + - Layer: ``224`` + - ID: ``269E9A49`` + + Parameters: + peer (:obj:`InputPeer `): + Peer ID where the voice message was sent + + msg_id (``int`` ``32-bit``): + Voice message ID + + Returns: + :obj:`messages.TranscribedAudio ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x269e9a49 + QUALNAME = "functions.messages.TranscribeAudio" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TranscribeAudio": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return TranscribeAudio(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/translate_text.py b/pyrogram/raw/functions/messages/translate_text.py new file mode 100644 index 00000000..1dfa2ac0 --- /dev/null +++ b/pyrogram/raw/functions/messages/translate_text.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TranslateText(TLObject): # type: ignore + """Translate a given text. + + + Details: + - Layer: ``224`` + - ID: ``63183030`` + + Parameters: + to_lang (``str``): + Two-letter ISO 639-1 language code of the language to which the message is translated + + peer (:obj:`InputPeer `, *optional*): + If the text is a chat message, the peer ID + + id (List of ``int`` ``32-bit``, *optional*): + A list of message IDs to translate + + text (List of :obj:`TextWithEntities `, *optional*): + A list of styled messages to translate + + Returns: + :obj:`messages.TranslatedText ` + """ + + __slots__: List[str] = ["to_lang", "peer", "id", "text"] + + ID = 0x63183030 + QUALNAME = "functions.messages.TranslateText" + + def __init__(self, *, to_lang: str, peer: "raw.base.InputPeer" = None, id: Optional[List[int]] = None, text: Optional[List["raw.base.TextWithEntities"]] = None) -> None: + self.to_lang = to_lang # string + self.peer = peer # flags.0?InputPeer + self.id = id # flags.0?Vector + self.text = text # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TranslateText": + + flags = Int.read(b) + + peer = TLObject.read(b) if flags & (1 << 0) else None + + id = TLObject.read(b, Int) if flags & (1 << 0) else [] + + text = TLObject.read(b) if flags & (1 << 1) else [] + + to_lang = String.read(b) + + return TranslateText(to_lang=to_lang, peer=peer, id=id, text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.peer is not None else 0 + flags |= (1 << 0) if self.id else 0 + flags |= (1 << 1) if self.text else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + if self.id is not None: + b.write(Vector(self.id, Int)) + + if self.text is not None: + b.write(Vector(self.text)) + + b.write(String(self.to_lang)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/uninstall_sticker_set.py b/pyrogram/raw/functions/messages/uninstall_sticker_set.py new file mode 100644 index 00000000..4eaccc2a --- /dev/null +++ b/pyrogram/raw/functions/messages/uninstall_sticker_set.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UninstallStickerSet(TLObject): # type: ignore + """Uninstall a stickerset + + + Details: + - Layer: ``224`` + - ID: ``F96E55DE`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + The stickerset to uninstall + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["stickerset"] + + ID = 0xf96e55de + QUALNAME = "functions.messages.UninstallStickerSet" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet") -> None: + self.stickerset = stickerset # InputStickerSet + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UninstallStickerSet": + # No flags + + stickerset = TLObject.read(b) + + return UninstallStickerSet(stickerset=stickerset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/unpin_all_messages.py b/pyrogram/raw/functions/messages/unpin_all_messages.py new file mode 100644 index 00000000..3dae9108 --- /dev/null +++ b/pyrogram/raw/functions/messages/unpin_all_messages.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UnpinAllMessages(TLObject): # type: ignore + """Unpin all pinned messages + + + Details: + - Layer: ``224`` + - ID: ``62DD747`` + + Parameters: + peer (:obj:`InputPeer `): + Chat where to unpin + + top_msg_id (``int`` ``32-bit``, *optional*): + Forum topic where to unpin + + saved_peer_id (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`messages.AffectedHistory ` + """ + + __slots__: List[str] = ["peer", "top_msg_id", "saved_peer_id"] + + ID = 0x62dd747 + QUALNAME = "functions.messages.UnpinAllMessages" + + def __init__(self, *, peer: "raw.base.InputPeer", top_msg_id: Optional[int] = None, saved_peer_id: "raw.base.InputPeer" = None) -> None: + self.peer = peer # InputPeer + self.top_msg_id = top_msg_id # flags.0?int + self.saved_peer_id = saved_peer_id # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UnpinAllMessages": + + flags = Int.read(b) + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None + + return UnpinAllMessages(peer=peer, top_msg_id=top_msg_id, saved_peer_id=saved_peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + flags |= (1 << 1) if self.saved_peer_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/update_dialog_filter.py b/pyrogram/raw/functions/messages/update_dialog_filter.py new file mode 100644 index 00000000..21ad1336 --- /dev/null +++ b/pyrogram/raw/functions/messages/update_dialog_filter.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateDialogFilter(TLObject): # type: ignore + """Update folder + + + Details: + - Layer: ``224`` + - ID: ``1AD4A04A`` + + Parameters: + id (``int`` ``32-bit``): + Folder ID + + filter (:obj:`DialogFilter `, *optional*): + Folder info + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "filter"] + + ID = 0x1ad4a04a + QUALNAME = "functions.messages.UpdateDialogFilter" + + def __init__(self, *, id: int, filter: "raw.base.DialogFilter" = None) -> None: + self.id = id # int + self.filter = filter # flags.0?DialogFilter + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateDialogFilter": + + flags = Int.read(b) + + id = Int.read(b) + + filter = TLObject.read(b) if flags & (1 << 0) else None + + return UpdateDialogFilter(id=id, filter=filter) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.filter is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + if self.filter is not None: + b.write(self.filter.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/update_dialog_filters_order.py b/pyrogram/raw/functions/messages/update_dialog_filters_order.py new file mode 100644 index 00000000..05d2b9eb --- /dev/null +++ b/pyrogram/raw/functions/messages/update_dialog_filters_order.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateDialogFiltersOrder(TLObject): # type: ignore + """Reorder folders + + + Details: + - Layer: ``224`` + - ID: ``C563C1E4`` + + Parameters: + order (List of ``int`` ``32-bit``): + New folder order + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["order"] + + ID = 0xc563c1e4 + QUALNAME = "functions.messages.UpdateDialogFiltersOrder" + + def __init__(self, *, order: List[int]) -> None: + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateDialogFiltersOrder": + # No flags + + order = TLObject.read(b, Int) + + return UpdateDialogFiltersOrder(order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.order, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/update_pinned_forum_topic.py b/pyrogram/raw/functions/messages/update_pinned_forum_topic.py new file mode 100644 index 00000000..cd704d14 --- /dev/null +++ b/pyrogram/raw/functions/messages/update_pinned_forum_topic.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdatePinnedForumTopic(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``175DF251`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + topic_id (``int`` ``32-bit``): + N/A + + pinned (``bool``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "topic_id", "pinned"] + + ID = 0x175df251 + QUALNAME = "functions.messages.UpdatePinnedForumTopic" + + def __init__(self, *, peer: "raw.base.InputPeer", topic_id: int, pinned: bool) -> None: + self.peer = peer # InputPeer + self.topic_id = topic_id # int + self.pinned = pinned # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdatePinnedForumTopic": + # No flags + + peer = TLObject.read(b) + + topic_id = Int.read(b) + + pinned = Bool.read(b) + + return UpdatePinnedForumTopic(peer=peer, topic_id=topic_id, pinned=pinned) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.topic_id)) + + b.write(Bool(self.pinned)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/update_pinned_message.py b/pyrogram/raw/functions/messages/update_pinned_message.py new file mode 100644 index 00000000..099868e1 --- /dev/null +++ b/pyrogram/raw/functions/messages/update_pinned_message.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdatePinnedMessage(TLObject): # type: ignore + """Pin a message + + + Details: + - Layer: ``224`` + - ID: ``D2AAF7EC`` + + Parameters: + peer (:obj:`InputPeer `): + The peer where to pin the message + + id (``int`` ``32-bit``): + The message to pin or unpin + + silent (``bool``, *optional*): + Pin the message silently, without triggering a notification + + unpin (``bool``, *optional*): + Whether the message should unpinned or pinned + + pm_oneside (``bool``, *optional*): + Whether the message should only be pinned on the local side of a one-to-one chat + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id", "silent", "unpin", "pm_oneside"] + + ID = 0xd2aaf7ec + QUALNAME = "functions.messages.UpdatePinnedMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, silent: Optional[bool] = None, unpin: Optional[bool] = None, pm_oneside: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.silent = silent # flags.0?true + self.unpin = unpin # flags.1?true + self.pm_oneside = pm_oneside # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdatePinnedMessage": + + flags = Int.read(b) + + silent = True if flags & (1 << 0) else False + unpin = True if flags & (1 << 1) else False + pm_oneside = True if flags & (1 << 2) else False + peer = TLObject.read(b) + + id = Int.read(b) + + return UpdatePinnedMessage(peer=peer, id=id, silent=silent, unpin=unpin, pm_oneside=pm_oneside) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.silent else 0 + flags |= (1 << 1) if self.unpin else 0 + flags |= (1 << 2) if self.pm_oneside else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/update_saved_reaction_tag.py b/pyrogram/raw/functions/messages/update_saved_reaction_tag.py new file mode 100644 index 00000000..ac8e8d23 --- /dev/null +++ b/pyrogram/raw/functions/messages/update_saved_reaction_tag.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateSavedReactionTag(TLObject): # type: ignore + """Update the description of a saved message tag ». + + + Details: + - Layer: ``224`` + - ID: ``60297DEC`` + + Parameters: + reaction (:obj:`Reaction `): + Reaction associated to the tag + + title (``str``, *optional*): + Tag description, max 12 UTF-8 characters; to remove the description call the method without setting this flag. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["reaction", "title"] + + ID = 0x60297dec + QUALNAME = "functions.messages.UpdateSavedReactionTag" + + def __init__(self, *, reaction: "raw.base.Reaction", title: Optional[str] = None) -> None: + self.reaction = reaction # Reaction + self.title = title # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateSavedReactionTag": + + flags = Int.read(b) + + reaction = TLObject.read(b) + + title = String.read(b) if flags & (1 << 0) else None + return UpdateSavedReactionTag(reaction=reaction, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.title is not None else 0 + b.write(Int(flags)) + + b.write(self.reaction.write()) + + if self.title is not None: + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/upload_encrypted_file.py b/pyrogram/raw/functions/messages/upload_encrypted_file.py new file mode 100644 index 00000000..b8452938 --- /dev/null +++ b/pyrogram/raw/functions/messages/upload_encrypted_file.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadEncryptedFile(TLObject): # type: ignore + """Upload encrypted file and associate it to a secret chat + + + Details: + - Layer: ``224`` + - ID: ``5057C497`` + + Parameters: + peer (:obj:`InputEncryptedChat `): + The secret chat to associate the file to + + file (:obj:`InputEncryptedFile `): + The file + + Returns: + :obj:`EncryptedFile ` + """ + + __slots__: List[str] = ["peer", "file"] + + ID = 0x5057c497 + QUALNAME = "functions.messages.UploadEncryptedFile" + + def __init__(self, *, peer: "raw.base.InputEncryptedChat", file: "raw.base.InputEncryptedFile") -> None: + self.peer = peer # InputEncryptedChat + self.file = file # InputEncryptedFile + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadEncryptedFile": + # No flags + + peer = TLObject.read(b) + + file = TLObject.read(b) + + return UploadEncryptedFile(peer=peer, file=file) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.file.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/upload_imported_media.py b/pyrogram/raw/functions/messages/upload_imported_media.py new file mode 100644 index 00000000..c5756342 --- /dev/null +++ b/pyrogram/raw/functions/messages/upload_imported_media.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadImportedMedia(TLObject): # type: ignore + """Upload a media file associated with an imported chat, click here for more info ». + + + Details: + - Layer: ``224`` + - ID: ``2A862092`` + + Parameters: + peer (:obj:`InputPeer `): + The Telegram chat where the media will be imported + + import_id (``int`` ``64-bit``): + Identifier of a history import session, returned by messages.initHistoryImport + + file_name (``str``): + File name + + media (:obj:`InputMedia `): + Media metadata + + Returns: + :obj:`MessageMedia ` + """ + + __slots__: List[str] = ["peer", "import_id", "file_name", "media"] + + ID = 0x2a862092 + QUALNAME = "functions.messages.UploadImportedMedia" + + def __init__(self, *, peer: "raw.base.InputPeer", import_id: int, file_name: str, media: "raw.base.InputMedia") -> None: + self.peer = peer # InputPeer + self.import_id = import_id # long + self.file_name = file_name # string + self.media = media # InputMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadImportedMedia": + # No flags + + peer = TLObject.read(b) + + import_id = Long.read(b) + + file_name = String.read(b) + + media = TLObject.read(b) + + return UploadImportedMedia(peer=peer, import_id=import_id, file_name=file_name, media=media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.import_id)) + + b.write(String(self.file_name)) + + b.write(self.media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/upload_media.py b/pyrogram/raw/functions/messages/upload_media.py new file mode 100644 index 00000000..f766599b --- /dev/null +++ b/pyrogram/raw/functions/messages/upload_media.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadMedia(TLObject): # type: ignore + """Upload a file and associate it to a chat (without actually sending it to the chat) + + + Details: + - Layer: ``224`` + - ID: ``14967978`` + + Parameters: + peer (:obj:`InputPeer `): + The chat, can be inputPeerEmpty for bots and inputPeerSelf for users. + + media (:obj:`InputMedia `): + File uploaded in chunks as described in files » + + business_connection_id (``str``, *optional*): + + + Returns: + :obj:`MessageMedia ` + """ + + __slots__: List[str] = ["peer", "media", "business_connection_id"] + + ID = 0x14967978 + QUALNAME = "functions.messages.UploadMedia" + + def __init__(self, *, peer: "raw.base.InputPeer", media: "raw.base.InputMedia", business_connection_id: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.media = media # InputMedia + self.business_connection_id = business_connection_id # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadMedia": + + flags = Int.read(b) + + business_connection_id = String.read(b) if flags & (1 << 0) else None + peer = TLObject.read(b) + + media = TLObject.read(b) + + return UploadMedia(peer=peer, media=media, business_connection_id=business_connection_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.business_connection_id is not None else 0 + b.write(Int(flags)) + + if self.business_connection_id is not None: + b.write(String(self.business_connection_id)) + + b.write(self.peer.write()) + + b.write(self.media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/messages/view_sponsored_message.py b/pyrogram/raw/functions/messages/view_sponsored_message.py new file mode 100644 index 00000000..11063e6e --- /dev/null +++ b/pyrogram/raw/functions/messages/view_sponsored_message.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ViewSponsoredMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``269E3643`` + + Parameters: + random_id (``bytes``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["random_id"] + + ID = 0x269e3643 + QUALNAME = "functions.messages.ViewSponsoredMessage" + + def __init__(self, *, random_id: bytes) -> None: + self.random_id = random_id # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ViewSponsoredMessage": + # No flags + + random_id = Bytes.read(b) + + return ViewSponsoredMessage(random_id=random_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.random_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/__init__.py b/pyrogram/raw/functions/payments/__init__.py new file mode 100644 index 00000000..434f34df --- /dev/null +++ b/pyrogram/raw/functions/payments/__init__.py @@ -0,0 +1,161 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_payment_form import GetPaymentForm +from .get_payment_receipt import GetPaymentReceipt +from .validate_requested_info import ValidateRequestedInfo +from .send_payment_form import SendPaymentForm +from .get_saved_info import GetSavedInfo +from .clear_saved_info import ClearSavedInfo +from .get_bank_card_data import GetBankCardData +from .export_invoice import ExportInvoice +from .assign_app_store_transaction import AssignAppStoreTransaction +from .assign_play_market_transaction import AssignPlayMarketTransaction +from .get_premium_gift_code_options import GetPremiumGiftCodeOptions +from .check_gift_code import CheckGiftCode +from .apply_gift_code import ApplyGiftCode +from .get_giveaway_info import GetGiveawayInfo +from .launch_prepaid_giveaway import LaunchPrepaidGiveaway +from .get_stars_topup_options import GetStarsTopupOptions +from .get_stars_status import GetStarsStatus +from .get_stars_transactions import GetStarsTransactions +from .send_stars_form import SendStarsForm +from .refund_stars_charge import RefundStarsCharge +from .get_stars_revenue_stats import GetStarsRevenueStats +from .get_stars_revenue_withdrawal_url import GetStarsRevenueWithdrawalUrl +from .get_stars_revenue_ads_account_url import GetStarsRevenueAdsAccountUrl +from .get_stars_transactions_by_id import GetStarsTransactionsByID +from .get_stars_gift_options import GetStarsGiftOptions +from .get_stars_subscriptions import GetStarsSubscriptions +from .change_stars_subscription import ChangeStarsSubscription +from .fulfill_stars_subscription import FulfillStarsSubscription +from .get_stars_giveaway_options import GetStarsGiveawayOptions +from .get_star_gifts import GetStarGifts +from .save_star_gift import SaveStarGift +from .convert_star_gift import ConvertStarGift +from .bot_cancel_stars_subscription import BotCancelStarsSubscription +from .get_connected_star_ref_bots import GetConnectedStarRefBots +from .get_connected_star_ref_bot import GetConnectedStarRefBot +from .get_suggested_star_ref_bots import GetSuggestedStarRefBots +from .connect_star_ref_bot import ConnectStarRefBot +from .edit_connected_star_ref_bot import EditConnectedStarRefBot +from .get_star_gift_upgrade_preview import GetStarGiftUpgradePreview +from .upgrade_star_gift import UpgradeStarGift +from .transfer_star_gift import TransferStarGift +from .get_unique_star_gift import GetUniqueStarGift +from .get_saved_star_gifts import GetSavedStarGifts +from .get_saved_star_gift import GetSavedStarGift +from .get_star_gift_withdrawal_url import GetStarGiftWithdrawalUrl +from .toggle_chat_star_gift_notifications import ToggleChatStarGiftNotifications +from .toggle_star_gifts_pinned_to_top import ToggleStarGiftsPinnedToTop +from .can_purchase_store import CanPurchaseStore +from .get_resale_star_gifts import GetResaleStarGifts +from .update_star_gift_price import UpdateStarGiftPrice +from .create_star_gift_collection import CreateStarGiftCollection +from .update_star_gift_collection import UpdateStarGiftCollection +from .reorder_star_gift_collections import ReorderStarGiftCollections +from .delete_star_gift_collection import DeleteStarGiftCollection +from .get_star_gift_collections import GetStarGiftCollections +from .get_unique_star_gift_value_info import GetUniqueStarGiftValueInfo +from .check_can_send_gift import CheckCanSendGift +from .get_star_gift_auction_state import GetStarGiftAuctionState +from .get_star_gift_auction_acquired_gifts import GetStarGiftAuctionAcquiredGifts +from .get_star_gift_active_auctions import GetStarGiftActiveAuctions +from .resolve_star_gift_offer import ResolveStarGiftOffer +from .send_star_gift_offer import SendStarGiftOffer +from .get_star_gift_upgrade_attributes import GetStarGiftUpgradeAttributes +from .request_recurring_payment import RequestRecurringPayment + + +__all__ = [ + "GetPaymentForm", + "GetPaymentReceipt", + "ValidateRequestedInfo", + "SendPaymentForm", + "GetSavedInfo", + "ClearSavedInfo", + "GetBankCardData", + "ExportInvoice", + "AssignAppStoreTransaction", + "AssignPlayMarketTransaction", + "GetPremiumGiftCodeOptions", + "CheckGiftCode", + "ApplyGiftCode", + "GetGiveawayInfo", + "LaunchPrepaidGiveaway", + "GetStarsTopupOptions", + "GetStarsStatus", + "GetStarsTransactions", + "SendStarsForm", + "RefundStarsCharge", + "GetStarsRevenueStats", + "GetStarsRevenueWithdrawalUrl", + "GetStarsRevenueAdsAccountUrl", + "GetStarsTransactionsByID", + "GetStarsGiftOptions", + "GetStarsSubscriptions", + "ChangeStarsSubscription", + "FulfillStarsSubscription", + "GetStarsGiveawayOptions", + "GetStarGifts", + "SaveStarGift", + "ConvertStarGift", + "BotCancelStarsSubscription", + "GetConnectedStarRefBots", + "GetConnectedStarRefBot", + "GetSuggestedStarRefBots", + "ConnectStarRefBot", + "EditConnectedStarRefBot", + "GetStarGiftUpgradePreview", + "UpgradeStarGift", + "TransferStarGift", + "GetUniqueStarGift", + "GetSavedStarGifts", + "GetSavedStarGift", + "GetStarGiftWithdrawalUrl", + "ToggleChatStarGiftNotifications", + "ToggleStarGiftsPinnedToTop", + "CanPurchaseStore", + "GetResaleStarGifts", + "UpdateStarGiftPrice", + "CreateStarGiftCollection", + "UpdateStarGiftCollection", + "ReorderStarGiftCollections", + "DeleteStarGiftCollection", + "GetStarGiftCollections", + "GetUniqueStarGiftValueInfo", + "CheckCanSendGift", + "GetStarGiftAuctionState", + "GetStarGiftAuctionAcquiredGifts", + "GetStarGiftActiveAuctions", + "ResolveStarGiftOffer", + "SendStarGiftOffer", + "GetStarGiftUpgradeAttributes", + "RequestRecurringPayment", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/payments/apply_gift_code.py b/pyrogram/raw/functions/payments/apply_gift_code.py new file mode 100644 index 00000000..b4f15b78 --- /dev/null +++ b/pyrogram/raw/functions/payments/apply_gift_code.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ApplyGiftCode(TLObject): # type: ignore + """Apply a Telegram Premium giftcode » + + + Details: + - Layer: ``224`` + - ID: ``F6E26854`` + + Parameters: + slug (``str``): + The code to apply + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["slug"] + + ID = 0xf6e26854 + QUALNAME = "functions.payments.ApplyGiftCode" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ApplyGiftCode": + # No flags + + slug = String.read(b) + + return ApplyGiftCode(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/assign_app_store_transaction.py b/pyrogram/raw/functions/payments/assign_app_store_transaction.py new file mode 100644 index 00000000..4418ba87 --- /dev/null +++ b/pyrogram/raw/functions/payments/assign_app_store_transaction.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AssignAppStoreTransaction(TLObject): # type: ignore + """Informs server about a purchase made through the App Store: for official applications only. + + + Details: + - Layer: ``224`` + - ID: ``80ED747D`` + + Parameters: + receipt (``bytes``): + Receipt + + purpose (:obj:`InputStorePaymentPurpose `): + Payment purpose + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["receipt", "purpose"] + + ID = 0x80ed747d + QUALNAME = "functions.payments.AssignAppStoreTransaction" + + def __init__(self, *, receipt: bytes, purpose: "raw.base.InputStorePaymentPurpose") -> None: + self.receipt = receipt # bytes + self.purpose = purpose # InputStorePaymentPurpose + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AssignAppStoreTransaction": + # No flags + + receipt = Bytes.read(b) + + purpose = TLObject.read(b) + + return AssignAppStoreTransaction(receipt=receipt, purpose=purpose) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.receipt)) + + b.write(self.purpose.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/assign_play_market_transaction.py b/pyrogram/raw/functions/payments/assign_play_market_transaction.py new file mode 100644 index 00000000..1ca83b06 --- /dev/null +++ b/pyrogram/raw/functions/payments/assign_play_market_transaction.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AssignPlayMarketTransaction(TLObject): # type: ignore + """Informs server about a purchase made through the Play Store: for official applications only. + + + Details: + - Layer: ``224`` + - ID: ``DFFD50D3`` + + Parameters: + receipt (:obj:`DataJSON `): + Receipt + + purpose (:obj:`InputStorePaymentPurpose `): + Payment purpose + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["receipt", "purpose"] + + ID = 0xdffd50d3 + QUALNAME = "functions.payments.AssignPlayMarketTransaction" + + def __init__(self, *, receipt: "raw.base.DataJSON", purpose: "raw.base.InputStorePaymentPurpose") -> None: + self.receipt = receipt # DataJSON + self.purpose = purpose # InputStorePaymentPurpose + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AssignPlayMarketTransaction": + # No flags + + receipt = TLObject.read(b) + + purpose = TLObject.read(b) + + return AssignPlayMarketTransaction(receipt=receipt, purpose=purpose) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.receipt.write()) + + b.write(self.purpose.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/bot_cancel_stars_subscription.py b/pyrogram/raw/functions/payments/bot_cancel_stars_subscription.py new file mode 100644 index 00000000..a21ac09b --- /dev/null +++ b/pyrogram/raw/functions/payments/bot_cancel_stars_subscription.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCancelStarsSubscription(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``6DFA0622`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + charge_id (``str``): + N/A + + restore (``bool``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["user_id", "charge_id", "restore"] + + ID = 0x6dfa0622 + QUALNAME = "functions.payments.BotCancelStarsSubscription" + + def __init__(self, *, user_id: "raw.base.InputUser", charge_id: str, restore: Optional[bool] = None) -> None: + self.user_id = user_id # InputUser + self.charge_id = charge_id # string + self.restore = restore # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCancelStarsSubscription": + + flags = Int.read(b) + + restore = True if flags & (1 << 0) else False + user_id = TLObject.read(b) + + charge_id = String.read(b) + + return BotCancelStarsSubscription(user_id=user_id, charge_id=charge_id, restore=restore) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.restore else 0 + b.write(Int(flags)) + + b.write(self.user_id.write()) + + b.write(String(self.charge_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/can_purchase_store.py b/pyrogram/raw/functions/payments/can_purchase_store.py new file mode 100644 index 00000000..1dd5c661 --- /dev/null +++ b/pyrogram/raw/functions/payments/can_purchase_store.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CanPurchaseStore(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``4FDC5EA7`` + + Parameters: + purpose (:obj:`InputStorePaymentPurpose `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["purpose"] + + ID = 0x4fdc5ea7 + QUALNAME = "functions.payments.CanPurchaseStore" + + def __init__(self, *, purpose: "raw.base.InputStorePaymentPurpose") -> None: + self.purpose = purpose # InputStorePaymentPurpose + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CanPurchaseStore": + # No flags + + purpose = TLObject.read(b) + + return CanPurchaseStore(purpose=purpose) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.purpose.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/change_stars_subscription.py b/pyrogram/raw/functions/payments/change_stars_subscription.py new file mode 100644 index 00000000..6e88937c --- /dev/null +++ b/pyrogram/raw/functions/payments/change_stars_subscription.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChangeStarsSubscription(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C7770878`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + subscription_id (``str``): + N/A + + canceled (``bool``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "subscription_id", "canceled"] + + ID = 0xc7770878 + QUALNAME = "functions.payments.ChangeStarsSubscription" + + def __init__(self, *, peer: "raw.base.InputPeer", subscription_id: str, canceled: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.subscription_id = subscription_id # string + self.canceled = canceled # flags.0?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChangeStarsSubscription": + + flags = Int.read(b) + + peer = TLObject.read(b) + + subscription_id = String.read(b) + + canceled = Bool.read(b) if flags & (1 << 0) else None + return ChangeStarsSubscription(peer=peer, subscription_id=subscription_id, canceled=canceled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.canceled is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.subscription_id)) + + if self.canceled is not None: + b.write(Bool(self.canceled)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/check_can_send_gift.py b/pyrogram/raw/functions/payments/check_can_send_gift.py new file mode 100644 index 00000000..e0c0f7ab --- /dev/null +++ b/pyrogram/raw/functions/payments/check_can_send_gift.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckCanSendGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C0C4EDC9`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`payments.CheckCanSendGiftResult ` + """ + + __slots__: List[str] = ["gift_id"] + + ID = 0xc0c4edc9 + QUALNAME = "functions.payments.CheckCanSendGift" + + def __init__(self, *, gift_id: int) -> None: + self.gift_id = gift_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckCanSendGift": + # No flags + + gift_id = Long.read(b) + + return CheckCanSendGift(gift_id=gift_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.gift_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/check_gift_code.py b/pyrogram/raw/functions/payments/check_gift_code.py new file mode 100644 index 00000000..e3854037 --- /dev/null +++ b/pyrogram/raw/functions/payments/check_gift_code.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckGiftCode(TLObject): # type: ignore + """Obtain information about a Telegram Premium giftcode » + + + Details: + - Layer: ``224`` + - ID: ``8E51B4C1`` + + Parameters: + slug (``str``): + The giftcode to check + + Returns: + :obj:`payments.CheckedGiftCode ` + """ + + __slots__: List[str] = ["slug"] + + ID = 0x8e51b4c1 + QUALNAME = "functions.payments.CheckGiftCode" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckGiftCode": + # No flags + + slug = String.read(b) + + return CheckGiftCode(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/clear_saved_info.py b/pyrogram/raw/functions/payments/clear_saved_info.py new file mode 100644 index 00000000..6a6a9d37 --- /dev/null +++ b/pyrogram/raw/functions/payments/clear_saved_info.py @@ -0,0 +1,61 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClearSavedInfo(TLObject): # type: ignore + """Clear saved payment information + + + Details: + - Layer: ``224`` + - ID: ``D83D70C1`` + + Parameters: + credentials (``bool``, *optional*): + Remove saved payment credentials + + info (``bool``, *optional*): + Clear the last order settings saved by the user + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["credentials", "info"] + + ID = 0xd83d70c1 + QUALNAME = "functions.payments.ClearSavedInfo" + + def __init__(self, *, credentials: Optional[bool] = None, info: Optional[bool] = None) -> None: + self.credentials = credentials # flags.0?true + self.info = info # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClearSavedInfo": + + flags = Int.read(b) + + credentials = True if flags & (1 << 0) else False + info = True if flags & (1 << 1) else False + return ClearSavedInfo(credentials=credentials, info=info) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.credentials else 0 + flags |= (1 << 1) if self.info else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/connect_star_ref_bot.py b/pyrogram/raw/functions/payments/connect_star_ref_bot.py new file mode 100644 index 00000000..31e06209 --- /dev/null +++ b/pyrogram/raw/functions/payments/connect_star_ref_bot.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConnectStarRefBot(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``7ED5348A`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + bot (:obj:`InputUser `): + N/A + + Returns: + :obj:`payments.ConnectedStarRefBots ` + """ + + __slots__: List[str] = ["peer", "bot"] + + ID = 0x7ed5348a + QUALNAME = "functions.payments.ConnectStarRefBot" + + def __init__(self, *, peer: "raw.base.InputPeer", bot: "raw.base.InputUser") -> None: + self.peer = peer # InputPeer + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConnectStarRefBot": + # No flags + + peer = TLObject.read(b) + + bot = TLObject.read(b) + + return ConnectStarRefBot(peer=peer, bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/convert_star_gift.py b/pyrogram/raw/functions/payments/convert_star_gift.py new file mode 100644 index 00000000..fd4c3432 --- /dev/null +++ b/pyrogram/raw/functions/payments/convert_star_gift.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConvertStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``74BF076B`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["stargift"] + + ID = 0x74bf076b + QUALNAME = "functions.payments.ConvertStarGift" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift") -> None: + self.stargift = stargift # InputSavedStarGift + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConvertStarGift": + # No flags + + stargift = TLObject.read(b) + + return ConvertStarGift(stargift=stargift) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stargift.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/create_star_gift_collection.py b/pyrogram/raw/functions/payments/create_star_gift_collection.py new file mode 100644 index 00000000..d27681b2 --- /dev/null +++ b/pyrogram/raw/functions/payments/create_star_gift_collection.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateStarGiftCollection(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``1F4A0E87`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + title (``str``): + N/A + + stargift (List of :obj:`InputSavedStarGift `): + N/A + + Returns: + :obj:`StarGiftCollection ` + """ + + __slots__: List[str] = ["peer", "title", "stargift"] + + ID = 0x1f4a0e87 + QUALNAME = "functions.payments.CreateStarGiftCollection" + + def __init__(self, *, peer: "raw.base.InputPeer", title: str, stargift: List["raw.base.InputSavedStarGift"]) -> None: + self.peer = peer # InputPeer + self.title = title # string + self.stargift = stargift # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateStarGiftCollection": + # No flags + + peer = TLObject.read(b) + + title = String.read(b) + + stargift = TLObject.read(b) + + return CreateStarGiftCollection(peer=peer, title=title, stargift=stargift) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.title)) + + b.write(Vector(self.stargift)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/delete_star_gift_collection.py b/pyrogram/raw/functions/payments/delete_star_gift_collection.py new file mode 100644 index 00000000..d7884530 --- /dev/null +++ b/pyrogram/raw/functions/payments/delete_star_gift_collection.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteStarGiftCollection(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``AD5648E8`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + collection_id (``int`` ``32-bit``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "collection_id"] + + ID = 0xad5648e8 + QUALNAME = "functions.payments.DeleteStarGiftCollection" + + def __init__(self, *, peer: "raw.base.InputPeer", collection_id: int) -> None: + self.peer = peer # InputPeer + self.collection_id = collection_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteStarGiftCollection": + # No flags + + peer = TLObject.read(b) + + collection_id = Int.read(b) + + return DeleteStarGiftCollection(peer=peer, collection_id=collection_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.collection_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/edit_connected_star_ref_bot.py b/pyrogram/raw/functions/payments/edit_connected_star_ref_bot.py new file mode 100644 index 00000000..89beafb8 --- /dev/null +++ b/pyrogram/raw/functions/payments/edit_connected_star_ref_bot.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditConnectedStarRefBot(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E4FCA4A3`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + link (``str``): + N/A + + revoked (``bool``, *optional*): + N/A + + Returns: + :obj:`payments.ConnectedStarRefBots ` + """ + + __slots__: List[str] = ["peer", "link", "revoked"] + + ID = 0xe4fca4a3 + QUALNAME = "functions.payments.EditConnectedStarRefBot" + + def __init__(self, *, peer: "raw.base.InputPeer", link: str, revoked: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.link = link # string + self.revoked = revoked # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditConnectedStarRefBot": + + flags = Int.read(b) + + revoked = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + link = String.read(b) + + return EditConnectedStarRefBot(peer=peer, link=link, revoked=revoked) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoked else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.link)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/export_invoice.py b/pyrogram/raw/functions/payments/export_invoice.py new file mode 100644 index 00000000..ea37e6ff --- /dev/null +++ b/pyrogram/raw/functions/payments/export_invoice.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportInvoice(TLObject): # type: ignore + """Generate an invoice deep link + + + Details: + - Layer: ``224`` + - ID: ``F91B065`` + + Parameters: + invoice_media (:obj:`InputMedia `): + Invoice + + Returns: + :obj:`payments.ExportedInvoice ` + """ + + __slots__: List[str] = ["invoice_media"] + + ID = 0xf91b065 + QUALNAME = "functions.payments.ExportInvoice" + + def __init__(self, *, invoice_media: "raw.base.InputMedia") -> None: + self.invoice_media = invoice_media # InputMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportInvoice": + # No flags + + invoice_media = TLObject.read(b) + + return ExportInvoice(invoice_media=invoice_media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.invoice_media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/fulfill_stars_subscription.py b/pyrogram/raw/functions/payments/fulfill_stars_subscription.py new file mode 100644 index 00000000..bc3cea7e --- /dev/null +++ b/pyrogram/raw/functions/payments/fulfill_stars_subscription.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FulfillStarsSubscription(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``CC5BEBB3`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + subscription_id (``str``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "subscription_id"] + + ID = 0xcc5bebb3 + QUALNAME = "functions.payments.FulfillStarsSubscription" + + def __init__(self, *, peer: "raw.base.InputPeer", subscription_id: str) -> None: + self.peer = peer # InputPeer + self.subscription_id = subscription_id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FulfillStarsSubscription": + # No flags + + peer = TLObject.read(b) + + subscription_id = String.read(b) + + return FulfillStarsSubscription(peer=peer, subscription_id=subscription_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.subscription_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_bank_card_data.py b/pyrogram/raw/functions/payments/get_bank_card_data.py new file mode 100644 index 00000000..41c0e17d --- /dev/null +++ b/pyrogram/raw/functions/payments/get_bank_card_data.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBankCardData(TLObject): # type: ignore + """Get info about a credit card + + + Details: + - Layer: ``224`` + - ID: ``2E79D779`` + + Parameters: + number (``str``): + Credit card number + + Returns: + :obj:`payments.BankCardData ` + """ + + __slots__: List[str] = ["number"] + + ID = 0x2e79d779 + QUALNAME = "functions.payments.GetBankCardData" + + def __init__(self, *, number: str) -> None: + self.number = number # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBankCardData": + # No flags + + number = String.read(b) + + return GetBankCardData(number=number) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.number)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_connected_star_ref_bot.py b/pyrogram/raw/functions/payments/get_connected_star_ref_bot.py new file mode 100644 index 00000000..4e957029 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_connected_star_ref_bot.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetConnectedStarRefBot(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B7D998F0`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + bot (:obj:`InputUser `): + N/A + + Returns: + :obj:`payments.ConnectedStarRefBots ` + """ + + __slots__: List[str] = ["peer", "bot"] + + ID = 0xb7d998f0 + QUALNAME = "functions.payments.GetConnectedStarRefBot" + + def __init__(self, *, peer: "raw.base.InputPeer", bot: "raw.base.InputUser") -> None: + self.peer = peer # InputPeer + self.bot = bot # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetConnectedStarRefBot": + # No flags + + peer = TLObject.read(b) + + bot = TLObject.read(b) + + return GetConnectedStarRefBot(peer=peer, bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_connected_star_ref_bots.py b/pyrogram/raw/functions/payments/get_connected_star_ref_bots.py new file mode 100644 index 00000000..1bbd6ece --- /dev/null +++ b/pyrogram/raw/functions/payments/get_connected_star_ref_bots.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetConnectedStarRefBots(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``5869A553`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + limit (``int`` ``32-bit``): + N/A + + offset_date (``int`` ``32-bit``, *optional*): + N/A + + offset_link (``str``, *optional*): + N/A + + Returns: + :obj:`payments.ConnectedStarRefBots ` + """ + + __slots__: List[str] = ["peer", "limit", "offset_date", "offset_link"] + + ID = 0x5869a553 + QUALNAME = "functions.payments.GetConnectedStarRefBots" + + def __init__(self, *, peer: "raw.base.InputPeer", limit: int, offset_date: Optional[int] = None, offset_link: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.limit = limit # int + self.offset_date = offset_date # flags.2?int + self.offset_link = offset_link # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetConnectedStarRefBots": + + flags = Int.read(b) + + peer = TLObject.read(b) + + offset_date = Int.read(b) if flags & (1 << 2) else None + offset_link = String.read(b) if flags & (1 << 2) else None + limit = Int.read(b) + + return GetConnectedStarRefBots(peer=peer, limit=limit, offset_date=offset_date, offset_link=offset_link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.offset_date is not None else 0 + flags |= (1 << 2) if self.offset_link is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.offset_date is not None: + b.write(Int(self.offset_date)) + + if self.offset_link is not None: + b.write(String(self.offset_link)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_giveaway_info.py b/pyrogram/raw/functions/payments/get_giveaway_info.py new file mode 100644 index 00000000..f9c2417b --- /dev/null +++ b/pyrogram/raw/functions/payments/get_giveaway_info.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGiveawayInfo(TLObject): # type: ignore + """Obtain information about a Telegram Premium giveaway ». + + + Details: + - Layer: ``224`` + - ID: ``F4239425`` + + Parameters: + peer (:obj:`InputPeer `): + The peer where the giveaway was posted. + + msg_id (``int`` ``32-bit``): + Message ID of the messageActionGiveawayLaunch service message + + Returns: + :obj:`payments.GiveawayInfo ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0xf4239425 + QUALNAME = "functions.payments.GetGiveawayInfo" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGiveawayInfo": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return GetGiveawayInfo(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_payment_form.py b/pyrogram/raw/functions/payments/get_payment_form.py new file mode 100644 index 00000000..00d5152e --- /dev/null +++ b/pyrogram/raw/functions/payments/get_payment_form.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPaymentForm(TLObject): # type: ignore + """Get a payment form + + + Details: + - Layer: ``224`` + - ID: ``37148DBB`` + + Parameters: + invoice (:obj:`InputInvoice `): + Invoice + + theme_params (:obj:`DataJSON `, *optional*): + A JSON object with the following keys, containing color theme information (integers, RGB24) to pass to the payment provider, to apply in eventual verification pages: bg_color - Background color text_color - Text color hint_color - Hint text color link_color - Link color button_color - Button color button_text_color - Button text color + + Returns: + :obj:`payments.PaymentForm ` + """ + + __slots__: List[str] = ["invoice", "theme_params"] + + ID = 0x37148dbb + QUALNAME = "functions.payments.GetPaymentForm" + + def __init__(self, *, invoice: "raw.base.InputInvoice", theme_params: "raw.base.DataJSON" = None) -> None: + self.invoice = invoice # InputInvoice + self.theme_params = theme_params # flags.0?DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPaymentForm": + + flags = Int.read(b) + + invoice = TLObject.read(b) + + theme_params = TLObject.read(b) if flags & (1 << 0) else None + + return GetPaymentForm(invoice=invoice, theme_params=theme_params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.theme_params is not None else 0 + b.write(Int(flags)) + + b.write(self.invoice.write()) + + if self.theme_params is not None: + b.write(self.theme_params.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_payment_receipt.py b/pyrogram/raw/functions/payments/get_payment_receipt.py new file mode 100644 index 00000000..9636932d --- /dev/null +++ b/pyrogram/raw/functions/payments/get_payment_receipt.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPaymentReceipt(TLObject): # type: ignore + """Get payment receipt + + + Details: + - Layer: ``224`` + - ID: ``2478D1CC`` + + Parameters: + peer (:obj:`InputPeer `): + The peer where the payment receipt was sent + + msg_id (``int`` ``32-bit``): + Message ID of receipt + + Returns: + :obj:`payments.PaymentReceipt ` + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0x2478d1cc + QUALNAME = "functions.payments.GetPaymentReceipt" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPaymentReceipt": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return GetPaymentReceipt(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_premium_gift_code_options.py b/pyrogram/raw/functions/payments/get_premium_gift_code_options.py new file mode 100644 index 00000000..a0bdd67a --- /dev/null +++ b/pyrogram/raw/functions/payments/get_premium_gift_code_options.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPremiumGiftCodeOptions(TLObject): # type: ignore + """Obtain a list of Telegram Premium giveaway/gift code » options. + + + Details: + - Layer: ``224`` + - ID: ``2757BA54`` + + Parameters: + boost_peer (:obj:`InputPeer `, *optional*): + The channel that will start the giveaway + + Returns: + List of :obj:`PremiumGiftCodeOption ` + """ + + __slots__: List[str] = ["boost_peer"] + + ID = 0x2757ba54 + QUALNAME = "functions.payments.GetPremiumGiftCodeOptions" + + def __init__(self, *, boost_peer: "raw.base.InputPeer" = None) -> None: + self.boost_peer = boost_peer # flags.0?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPremiumGiftCodeOptions": + + flags = Int.read(b) + + boost_peer = TLObject.read(b) if flags & (1 << 0) else None + + return GetPremiumGiftCodeOptions(boost_peer=boost_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.boost_peer is not None else 0 + b.write(Int(flags)) + + if self.boost_peer is not None: + b.write(self.boost_peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_resale_star_gifts.py b/pyrogram/raw/functions/payments/get_resale_star_gifts.py new file mode 100644 index 00000000..f6c0c53d --- /dev/null +++ b/pyrogram/raw/functions/payments/get_resale_star_gifts.py @@ -0,0 +1,109 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetResaleStarGifts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``7A5FA236`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + sort_by_price (``bool``, *optional*): + N/A + + sort_by_num (``bool``, *optional*): + N/A + + for_craft (``bool``, *optional*): + N/A + + attributes_hash (``int`` ``64-bit``, *optional*): + N/A + + attributes (List of :obj:`StarGiftAttributeId `, *optional*): + N/A + + Returns: + :obj:`payments.ResaleStarGifts ` + """ + + __slots__: List[str] = ["gift_id", "offset", "limit", "sort_by_price", "sort_by_num", "for_craft", "attributes_hash", "attributes"] + + ID = 0x7a5fa236 + QUALNAME = "functions.payments.GetResaleStarGifts" + + def __init__(self, *, gift_id: int, offset: str, limit: int, sort_by_price: Optional[bool] = None, sort_by_num: Optional[bool] = None, for_craft: Optional[bool] = None, attributes_hash: Optional[int] = None, attributes: Optional[List["raw.base.StarGiftAttributeId"]] = None) -> None: + self.gift_id = gift_id # long + self.offset = offset # string + self.limit = limit # int + self.sort_by_price = sort_by_price # flags.1?true + self.sort_by_num = sort_by_num # flags.2?true + self.for_craft = for_craft # flags.4?true + self.attributes_hash = attributes_hash # flags.0?long + self.attributes = attributes # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetResaleStarGifts": + + flags = Int.read(b) + + sort_by_price = True if flags & (1 << 1) else False + sort_by_num = True if flags & (1 << 2) else False + for_craft = True if flags & (1 << 4) else False + attributes_hash = Long.read(b) if flags & (1 << 0) else None + gift_id = Long.read(b) + + attributes = TLObject.read(b) if flags & (1 << 3) else [] + + offset = String.read(b) + + limit = Int.read(b) + + return GetResaleStarGifts(gift_id=gift_id, offset=offset, limit=limit, sort_by_price=sort_by_price, sort_by_num=sort_by_num, for_craft=for_craft, attributes_hash=attributes_hash, attributes=attributes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.sort_by_price else 0 + flags |= (1 << 2) if self.sort_by_num else 0 + flags |= (1 << 4) if self.for_craft else 0 + flags |= (1 << 0) if self.attributes_hash is not None else 0 + flags |= (1 << 3) if self.attributes else 0 + b.write(Int(flags)) + + if self.attributes_hash is not None: + b.write(Long(self.attributes_hash)) + + b.write(Long(self.gift_id)) + + if self.attributes is not None: + b.write(Vector(self.attributes)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_saved_info.py b/pyrogram/raw/functions/payments/get_saved_info.py new file mode 100644 index 00000000..f637f480 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_saved_info.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedInfo(TLObject): # type: ignore + """Get saved payment information + + + Details: + - Layer: ``224`` + - ID: ``227D824B`` + + Parameters: + No parameters required. + + Returns: + :obj:`payments.SavedInfo ` + """ + + __slots__: List[str] = [] + + ID = 0x227d824b + QUALNAME = "functions.payments.GetSavedInfo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedInfo": + # No flags + + return GetSavedInfo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_saved_star_gift.py b/pyrogram/raw/functions/payments/get_saved_star_gift.py new file mode 100644 index 00000000..90d726cc --- /dev/null +++ b/pyrogram/raw/functions/payments/get_saved_star_gift.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B455A106`` + + Parameters: + stargift (List of :obj:`InputSavedStarGift `): + N/A + + Returns: + :obj:`payments.SavedStarGifts ` + """ + + __slots__: List[str] = ["stargift"] + + ID = 0xb455a106 + QUALNAME = "functions.payments.GetSavedStarGift" + + def __init__(self, *, stargift: List["raw.base.InputSavedStarGift"]) -> None: + self.stargift = stargift # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedStarGift": + # No flags + + stargift = TLObject.read(b) + + return GetSavedStarGift(stargift=stargift) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.stargift)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_saved_star_gifts.py b/pyrogram/raw/functions/payments/get_saved_star_gifts.py new file mode 100644 index 00000000..97e57918 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_saved_star_gifts.py @@ -0,0 +1,135 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedStarGifts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A319E569`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + exclude_unsaved (``bool``, *optional*): + N/A + + exclude_saved (``bool``, *optional*): + N/A + + exclude_unlimited (``bool``, *optional*): + N/A + + exclude_unique (``bool``, *optional*): + N/A + + sort_by_value (``bool``, *optional*): + N/A + + exclude_upgradable (``bool``, *optional*): + N/A + + exclude_unupgradable (``bool``, *optional*): + N/A + + peer_color_available (``bool``, *optional*): + N/A + + exclude_hosted (``bool``, *optional*): + N/A + + collection_id (``int`` ``32-bit``, *optional*): + N/A + + Returns: + :obj:`payments.SavedStarGifts ` + """ + + __slots__: List[str] = ["peer", "offset", "limit", "exclude_unsaved", "exclude_saved", "exclude_unlimited", "exclude_unique", "sort_by_value", "exclude_upgradable", "exclude_unupgradable", "peer_color_available", "exclude_hosted", "collection_id"] + + ID = 0xa319e569 + QUALNAME = "functions.payments.GetSavedStarGifts" + + def __init__(self, *, peer: "raw.base.InputPeer", offset: str, limit: int, exclude_unsaved: Optional[bool] = None, exclude_saved: Optional[bool] = None, exclude_unlimited: Optional[bool] = None, exclude_unique: Optional[bool] = None, sort_by_value: Optional[bool] = None, exclude_upgradable: Optional[bool] = None, exclude_unupgradable: Optional[bool] = None, peer_color_available: Optional[bool] = None, exclude_hosted: Optional[bool] = None, collection_id: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.offset = offset # string + self.limit = limit # int + self.exclude_unsaved = exclude_unsaved # flags.0?true + self.exclude_saved = exclude_saved # flags.1?true + self.exclude_unlimited = exclude_unlimited # flags.2?true + self.exclude_unique = exclude_unique # flags.4?true + self.sort_by_value = sort_by_value # flags.5?true + self.exclude_upgradable = exclude_upgradable # flags.7?true + self.exclude_unupgradable = exclude_unupgradable # flags.8?true + self.peer_color_available = peer_color_available # flags.9?true + self.exclude_hosted = exclude_hosted # flags.10?true + self.collection_id = collection_id # flags.6?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedStarGifts": + + flags = Int.read(b) + + exclude_unsaved = True if flags & (1 << 0) else False + exclude_saved = True if flags & (1 << 1) else False + exclude_unlimited = True if flags & (1 << 2) else False + exclude_unique = True if flags & (1 << 4) else False + sort_by_value = True if flags & (1 << 5) else False + exclude_upgradable = True if flags & (1 << 7) else False + exclude_unupgradable = True if flags & (1 << 8) else False + peer_color_available = True if flags & (1 << 9) else False + exclude_hosted = True if flags & (1 << 10) else False + peer = TLObject.read(b) + + collection_id = Int.read(b) if flags & (1 << 6) else None + offset = String.read(b) + + limit = Int.read(b) + + return GetSavedStarGifts(peer=peer, offset=offset, limit=limit, exclude_unsaved=exclude_unsaved, exclude_saved=exclude_saved, exclude_unlimited=exclude_unlimited, exclude_unique=exclude_unique, sort_by_value=sort_by_value, exclude_upgradable=exclude_upgradable, exclude_unupgradable=exclude_unupgradable, peer_color_available=peer_color_available, exclude_hosted=exclude_hosted, collection_id=collection_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.exclude_unsaved else 0 + flags |= (1 << 1) if self.exclude_saved else 0 + flags |= (1 << 2) if self.exclude_unlimited else 0 + flags |= (1 << 4) if self.exclude_unique else 0 + flags |= (1 << 5) if self.sort_by_value else 0 + flags |= (1 << 7) if self.exclude_upgradable else 0 + flags |= (1 << 8) if self.exclude_unupgradable else 0 + flags |= (1 << 9) if self.peer_color_available else 0 + flags |= (1 << 10) if self.exclude_hosted else 0 + flags |= (1 << 6) if self.collection_id is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.collection_id is not None: + b.write(Int(self.collection_id)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_active_auctions.py b/pyrogram/raw/functions/payments/get_star_gift_active_auctions.py new file mode 100644 index 00000000..b3fd3072 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_active_auctions.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftActiveAuctions(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A5D0514D`` + + Parameters: + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`payments.StarGiftActiveAuctions ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xa5d0514d + QUALNAME = "functions.payments.GetStarGiftActiveAuctions" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftActiveAuctions": + # No flags + + hash = Long.read(b) + + return GetStarGiftActiveAuctions(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_auction_acquired_gifts.py b/pyrogram/raw/functions/payments/get_star_gift_auction_acquired_gifts.py new file mode 100644 index 00000000..53277e5b --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_auction_acquired_gifts.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftAuctionAcquiredGifts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``6BA2CBEC`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`payments.StarGiftAuctionAcquiredGifts ` + """ + + __slots__: List[str] = ["gift_id"] + + ID = 0x6ba2cbec + QUALNAME = "functions.payments.GetStarGiftAuctionAcquiredGifts" + + def __init__(self, *, gift_id: int) -> None: + self.gift_id = gift_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftAuctionAcquiredGifts": + # No flags + + gift_id = Long.read(b) + + return GetStarGiftAuctionAcquiredGifts(gift_id=gift_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.gift_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_auction_state.py b/pyrogram/raw/functions/payments/get_star_gift_auction_state.py new file mode 100644 index 00000000..9bd630d7 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_auction_state.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftAuctionState(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``5C9FF4D6`` + + Parameters: + auction (:obj:`InputStarGiftAuction `): + N/A + + version (``int`` ``32-bit``): + N/A + + Returns: + :obj:`payments.StarGiftAuctionState ` + """ + + __slots__: List[str] = ["auction", "version"] + + ID = 0x5c9ff4d6 + QUALNAME = "functions.payments.GetStarGiftAuctionState" + + def __init__(self, *, auction: "raw.base.InputStarGiftAuction", version: int) -> None: + self.auction = auction # InputStarGiftAuction + self.version = version # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftAuctionState": + # No flags + + auction = TLObject.read(b) + + version = Int.read(b) + + return GetStarGiftAuctionState(auction=auction, version=version) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.auction.write()) + + b.write(Int(self.version)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_collections.py b/pyrogram/raw/functions/payments/get_star_gift_collections.py new file mode 100644 index 00000000..81ffc0b4 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_collections.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftCollections(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``981B91DD`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`payments.StarGiftCollections ` + """ + + __slots__: List[str] = ["peer", "hash"] + + ID = 0x981b91dd + QUALNAME = "functions.payments.GetStarGiftCollections" + + def __init__(self, *, peer: "raw.base.InputPeer", hash: int) -> None: + self.peer = peer # InputPeer + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftCollections": + # No flags + + peer = TLObject.read(b) + + hash = Long.read(b) + + return GetStarGiftCollections(peer=peer, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_upgrade_attributes.py b/pyrogram/raw/functions/payments/get_star_gift_upgrade_attributes.py new file mode 100644 index 00000000..e90d904f --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_upgrade_attributes.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftUpgradeAttributes(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``6D038B58`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`payments.StarGiftUpgradeAttributes ` + """ + + __slots__: List[str] = ["gift_id"] + + ID = 0x6d038b58 + QUALNAME = "functions.payments.GetStarGiftUpgradeAttributes" + + def __init__(self, *, gift_id: int) -> None: + self.gift_id = gift_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftUpgradeAttributes": + # No flags + + gift_id = Long.read(b) + + return GetStarGiftUpgradeAttributes(gift_id=gift_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.gift_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_upgrade_preview.py b/pyrogram/raw/functions/payments/get_star_gift_upgrade_preview.py new file mode 100644 index 00000000..1d17ceaf --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_upgrade_preview.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftUpgradePreview(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``9C9ABCB1`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`payments.StarGiftUpgradePreview ` + """ + + __slots__: List[str] = ["gift_id"] + + ID = 0x9c9abcb1 + QUALNAME = "functions.payments.GetStarGiftUpgradePreview" + + def __init__(self, *, gift_id: int) -> None: + self.gift_id = gift_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftUpgradePreview": + # No flags + + gift_id = Long.read(b) + + return GetStarGiftUpgradePreview(gift_id=gift_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.gift_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gift_withdrawal_url.py b/pyrogram/raw/functions/payments/get_star_gift_withdrawal_url.py new file mode 100644 index 00000000..d866c369 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gift_withdrawal_url.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGiftWithdrawalUrl(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D06E93A8`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + password (:obj:`InputCheckPasswordSRP `): + N/A + + Returns: + :obj:`payments.StarGiftWithdrawalUrl ` + """ + + __slots__: List[str] = ["stargift", "password"] + + ID = 0xd06e93a8 + QUALNAME = "functions.payments.GetStarGiftWithdrawalUrl" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", password: "raw.base.InputCheckPasswordSRP") -> None: + self.stargift = stargift # InputSavedStarGift + self.password = password # InputCheckPasswordSRP + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGiftWithdrawalUrl": + # No flags + + stargift = TLObject.read(b) + + password = TLObject.read(b) + + return GetStarGiftWithdrawalUrl(stargift=stargift, password=password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stargift.write()) + + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_star_gifts.py b/pyrogram/raw/functions/payments/get_star_gifts.py new file mode 100644 index 00000000..d1f2c479 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_star_gifts.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarGifts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C4563590`` + + Parameters: + hash (``int`` ``32-bit``): + N/A + + Returns: + :obj:`payments.StarGifts ` + """ + + __slots__: List[str] = ["hash"] + + ID = 0xc4563590 + QUALNAME = "functions.payments.GetStarGifts" + + def __init__(self, *, hash: int) -> None: + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarGifts": + # No flags + + hash = Int.read(b) + + return GetStarGifts(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_gift_options.py b/pyrogram/raw/functions/payments/get_stars_gift_options.py new file mode 100644 index 00000000..7946ea5c --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_gift_options.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsGiftOptions(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D3C96BC8`` + + Parameters: + user_id (:obj:`InputUser `, *optional*): + N/A + + Returns: + List of :obj:`StarsGiftOption ` + """ + + __slots__: List[str] = ["user_id"] + + ID = 0xd3c96bc8 + QUALNAME = "functions.payments.GetStarsGiftOptions" + + def __init__(self, *, user_id: "raw.base.InputUser" = None) -> None: + self.user_id = user_id # flags.0?InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsGiftOptions": + + flags = Int.read(b) + + user_id = TLObject.read(b) if flags & (1 << 0) else None + + return GetStarsGiftOptions(user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.user_id is not None else 0 + b.write(Int(flags)) + + if self.user_id is not None: + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_giveaway_options.py b/pyrogram/raw/functions/payments/get_stars_giveaway_options.py new file mode 100644 index 00000000..ee86a54a --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_giveaway_options.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsGiveawayOptions(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``BD1EFD3E`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`StarsGiveawayOption ` + """ + + __slots__: List[str] = [] + + ID = 0xbd1efd3e + QUALNAME = "functions.payments.GetStarsGiveawayOptions" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsGiveawayOptions": + # No flags + + return GetStarsGiveawayOptions() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_revenue_ads_account_url.py b/pyrogram/raw/functions/payments/get_stars_revenue_ads_account_url.py new file mode 100644 index 00000000..3f1b657c --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_revenue_ads_account_url.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsRevenueAdsAccountUrl(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D1D7EFC5`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + Returns: + :obj:`payments.StarsRevenueAdsAccountUrl ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0xd1d7efc5 + QUALNAME = "functions.payments.GetStarsRevenueAdsAccountUrl" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsRevenueAdsAccountUrl": + # No flags + + peer = TLObject.read(b) + + return GetStarsRevenueAdsAccountUrl(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_revenue_stats.py b/pyrogram/raw/functions/payments/get_stars_revenue_stats.py new file mode 100644 index 00000000..90fb19bc --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_revenue_stats.py @@ -0,0 +1,68 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsRevenueStats(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D91FFAD6`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + dark (``bool``, *optional*): + N/A + + ton (``bool``, *optional*): + N/A + + Returns: + :obj:`payments.StarsRevenueStats ` + """ + + __slots__: List[str] = ["peer", "dark", "ton"] + + ID = 0xd91ffad6 + QUALNAME = "functions.payments.GetStarsRevenueStats" + + def __init__(self, *, peer: "raw.base.InputPeer", dark: Optional[bool] = None, ton: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.dark = dark # flags.0?true + self.ton = ton # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsRevenueStats": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + ton = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + return GetStarsRevenueStats(peer=peer, dark=dark, ton=ton) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + flags |= (1 << 1) if self.ton else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_revenue_withdrawal_url.py b/pyrogram/raw/functions/payments/get_stars_revenue_withdrawal_url.py new file mode 100644 index 00000000..8527c005 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_revenue_withdrawal_url.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsRevenueWithdrawalUrl(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``2433DC92`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + password (:obj:`InputCheckPasswordSRP `): + N/A + + ton (``bool``, *optional*): + N/A + + amount (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`payments.StarsRevenueWithdrawalUrl ` + """ + + __slots__: List[str] = ["peer", "password", "ton", "amount"] + + ID = 0x2433dc92 + QUALNAME = "functions.payments.GetStarsRevenueWithdrawalUrl" + + def __init__(self, *, peer: "raw.base.InputPeer", password: "raw.base.InputCheckPasswordSRP", ton: Optional[bool] = None, amount: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.password = password # InputCheckPasswordSRP + self.ton = ton # flags.0?true + self.amount = amount # flags.1?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsRevenueWithdrawalUrl": + + flags = Int.read(b) + + ton = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + amount = Long.read(b) if flags & (1 << 1) else None + password = TLObject.read(b) + + return GetStarsRevenueWithdrawalUrl(peer=peer, password=password, ton=ton, amount=amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.ton else 0 + flags |= (1 << 1) if self.amount is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.amount is not None: + b.write(Long(self.amount)) + + b.write(self.password.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_status.py b/pyrogram/raw/functions/payments/get_stars_status.py new file mode 100644 index 00000000..adfa601a --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_status.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsStatus(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``4EA9B3BF`` + + Parameters: + peer (:obj:`InputPeer `): + + + ton (``bool``, *optional*): + N/A + + Returns: + :obj:`payments.StarsStatus ` + """ + + __slots__: List[str] = ["peer", "ton"] + + ID = 0x4ea9b3bf + QUALNAME = "functions.payments.GetStarsStatus" + + def __init__(self, *, peer: "raw.base.InputPeer", ton: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.ton = ton # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsStatus": + + flags = Int.read(b) + + ton = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + return GetStarsStatus(peer=peer, ton=ton) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.ton else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_subscriptions.py b/pyrogram/raw/functions/payments/get_stars_subscriptions.py new file mode 100644 index 00000000..096feff5 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_subscriptions.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsSubscriptions(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``32512C5`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + offset (``str``): + N/A + + missing_balance (``bool``, *optional*): + N/A + + Returns: + :obj:`payments.StarsStatus ` + """ + + __slots__: List[str] = ["peer", "offset", "missing_balance"] + + ID = 0x32512c5 + QUALNAME = "functions.payments.GetStarsSubscriptions" + + def __init__(self, *, peer: "raw.base.InputPeer", offset: str, missing_balance: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.offset = offset # string + self.missing_balance = missing_balance # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsSubscriptions": + + flags = Int.read(b) + + missing_balance = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + offset = String.read(b) + + return GetStarsSubscriptions(peer=peer, offset=offset, missing_balance=missing_balance) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.missing_balance else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.offset)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_topup_options.py b/pyrogram/raw/functions/payments/get_stars_topup_options.py new file mode 100644 index 00000000..35a6e732 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_topup_options.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsTopupOptions(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``C00EC7D3`` + + Parameters: + No parameters required. + + Returns: + List of :obj:`StarsTopupOption ` + """ + + __slots__: List[str] = [] + + ID = 0xc00ec7d3 + QUALNAME = "functions.payments.GetStarsTopupOptions" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsTopupOptions": + # No flags + + return GetStarsTopupOptions() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_transactions.py b/pyrogram/raw/functions/payments/get_stars_transactions.py new file mode 100644 index 00000000..af014622 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_transactions.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsTransactions(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``69DA4557`` + + Parameters: + peer (:obj:`InputPeer `): + + + offset (``str``): + + + limit (``int`` ``32-bit``): + N/A + + inbound (``bool``, *optional*): + + + outbound (``bool``, *optional*): + + + ascending (``bool``, *optional*): + N/A + + ton (``bool``, *optional*): + N/A + + subscription_id (``str``, *optional*): + N/A + + Returns: + :obj:`payments.StarsStatus ` + """ + + __slots__: List[str] = ["peer", "offset", "limit", "inbound", "outbound", "ascending", "ton", "subscription_id"] + + ID = 0x69da4557 + QUALNAME = "functions.payments.GetStarsTransactions" + + def __init__(self, *, peer: "raw.base.InputPeer", offset: str, limit: int, inbound: Optional[bool] = None, outbound: Optional[bool] = None, ascending: Optional[bool] = None, ton: Optional[bool] = None, subscription_id: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.offset = offset # string + self.limit = limit # int + self.inbound = inbound # flags.0?true + self.outbound = outbound # flags.1?true + self.ascending = ascending # flags.2?true + self.ton = ton # flags.4?true + self.subscription_id = subscription_id # flags.3?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsTransactions": + + flags = Int.read(b) + + inbound = True if flags & (1 << 0) else False + outbound = True if flags & (1 << 1) else False + ascending = True if flags & (1 << 2) else False + ton = True if flags & (1 << 4) else False + subscription_id = String.read(b) if flags & (1 << 3) else None + peer = TLObject.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetStarsTransactions(peer=peer, offset=offset, limit=limit, inbound=inbound, outbound=outbound, ascending=ascending, ton=ton, subscription_id=subscription_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.inbound else 0 + flags |= (1 << 1) if self.outbound else 0 + flags |= (1 << 2) if self.ascending else 0 + flags |= (1 << 4) if self.ton else 0 + flags |= (1 << 3) if self.subscription_id is not None else 0 + b.write(Int(flags)) + + if self.subscription_id is not None: + b.write(String(self.subscription_id)) + + b.write(self.peer.write()) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_stars_transactions_by_id.py b/pyrogram/raw/functions/payments/get_stars_transactions_by_id.py new file mode 100644 index 00000000..2e3f750e --- /dev/null +++ b/pyrogram/raw/functions/payments/get_stars_transactions_by_id.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStarsTransactionsByID(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``2DCA16B8`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + id (List of :obj:`InputStarsTransaction `): + N/A + + ton (``bool``, *optional*): + N/A + + Returns: + :obj:`payments.StarsStatus ` + """ + + __slots__: List[str] = ["peer", "id", "ton"] + + ID = 0x2dca16b8 + QUALNAME = "functions.payments.GetStarsTransactionsByID" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List["raw.base.InputStarsTransaction"], ton: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + self.ton = ton # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStarsTransactionsByID": + + flags = Int.read(b) + + ton = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + id = TLObject.read(b) + + return GetStarsTransactionsByID(peer=peer, id=id, ton=ton) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.ton else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_suggested_star_ref_bots.py b/pyrogram/raw/functions/payments/get_suggested_star_ref_bots.py new file mode 100644 index 00000000..e41fcbf0 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_suggested_star_ref_bots.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSuggestedStarRefBots(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D6B48F7`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + order_by_revenue (``bool``, *optional*): + N/A + + order_by_date (``bool``, *optional*): + N/A + + Returns: + :obj:`payments.SuggestedStarRefBots ` + """ + + __slots__: List[str] = ["peer", "offset", "limit", "order_by_revenue", "order_by_date"] + + ID = 0xd6b48f7 + QUALNAME = "functions.payments.GetSuggestedStarRefBots" + + def __init__(self, *, peer: "raw.base.InputPeer", offset: str, limit: int, order_by_revenue: Optional[bool] = None, order_by_date: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.offset = offset # string + self.limit = limit # int + self.order_by_revenue = order_by_revenue # flags.0?true + self.order_by_date = order_by_date # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSuggestedStarRefBots": + + flags = Int.read(b) + + order_by_revenue = True if flags & (1 << 0) else False + order_by_date = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetSuggestedStarRefBots(peer=peer, offset=offset, limit=limit, order_by_revenue=order_by_revenue, order_by_date=order_by_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.order_by_revenue else 0 + flags |= (1 << 1) if self.order_by_date else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_unique_star_gift.py b/pyrogram/raw/functions/payments/get_unique_star_gift.py new file mode 100644 index 00000000..5eae84f7 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_unique_star_gift.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUniqueStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A1974D72`` + + Parameters: + slug (``str``): + N/A + + Returns: + :obj:`payments.UniqueStarGift ` + """ + + __slots__: List[str] = ["slug"] + + ID = 0xa1974d72 + QUALNAME = "functions.payments.GetUniqueStarGift" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUniqueStarGift": + # No flags + + slug = String.read(b) + + return GetUniqueStarGift(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/get_unique_star_gift_value_info.py b/pyrogram/raw/functions/payments/get_unique_star_gift_value_info.py new file mode 100644 index 00000000..d1541691 --- /dev/null +++ b/pyrogram/raw/functions/payments/get_unique_star_gift_value_info.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUniqueStarGiftValueInfo(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``4365AF6B`` + + Parameters: + slug (``str``): + N/A + + Returns: + :obj:`payments.UniqueStarGiftValueInfo ` + """ + + __slots__: List[str] = ["slug"] + + ID = 0x4365af6b + QUALNAME = "functions.payments.GetUniqueStarGiftValueInfo" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUniqueStarGiftValueInfo": + # No flags + + slug = String.read(b) + + return GetUniqueStarGiftValueInfo(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/launch_prepaid_giveaway.py b/pyrogram/raw/functions/payments/launch_prepaid_giveaway.py new file mode 100644 index 00000000..af0d3f34 --- /dev/null +++ b/pyrogram/raw/functions/payments/launch_prepaid_giveaway.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LaunchPrepaidGiveaway(TLObject): # type: ignore + """Launch a prepaid giveaway ». + + + Details: + - Layer: ``224`` + - ID: ``5FF58F20`` + + Parameters: + peer (:obj:`InputPeer `): + The peer where to launch the giveaway. + + giveaway_id (``int`` ``64-bit``): + The prepaid giveaway ID. + + purpose (:obj:`InputStorePaymentPurpose `): + Giveway parameters + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "giveaway_id", "purpose"] + + ID = 0x5ff58f20 + QUALNAME = "functions.payments.LaunchPrepaidGiveaway" + + def __init__(self, *, peer: "raw.base.InputPeer", giveaway_id: int, purpose: "raw.base.InputStorePaymentPurpose") -> None: + self.peer = peer # InputPeer + self.giveaway_id = giveaway_id # long + self.purpose = purpose # InputStorePaymentPurpose + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LaunchPrepaidGiveaway": + # No flags + + peer = TLObject.read(b) + + giveaway_id = Long.read(b) + + purpose = TLObject.read(b) + + return LaunchPrepaidGiveaway(peer=peer, giveaway_id=giveaway_id, purpose=purpose) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.giveaway_id)) + + b.write(self.purpose.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/refund_stars_charge.py b/pyrogram/raw/functions/payments/refund_stars_charge.py new file mode 100644 index 00000000..ff7c92a8 --- /dev/null +++ b/pyrogram/raw/functions/payments/refund_stars_charge.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RefundStarsCharge(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``25AE8F4A`` + + Parameters: + user_id (:obj:`InputUser `): + + + charge_id (``str``): + + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["user_id", "charge_id"] + + ID = 0x25ae8f4a + QUALNAME = "functions.payments.RefundStarsCharge" + + def __init__(self, *, user_id: "raw.base.InputUser", charge_id: str) -> None: + self.user_id = user_id # InputUser + self.charge_id = charge_id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RefundStarsCharge": + # No flags + + user_id = TLObject.read(b) + + charge_id = String.read(b) + + return RefundStarsCharge(user_id=user_id, charge_id=charge_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(String(self.charge_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/reorder_star_gift_collections.py b/pyrogram/raw/functions/payments/reorder_star_gift_collections.py new file mode 100644 index 00000000..cb396c04 --- /dev/null +++ b/pyrogram/raw/functions/payments/reorder_star_gift_collections.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderStarGiftCollections(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C32AF4CC`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + order (List of ``int`` ``32-bit``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "order"] + + ID = 0xc32af4cc + QUALNAME = "functions.payments.ReorderStarGiftCollections" + + def __init__(self, *, peer: "raw.base.InputPeer", order: List[int]) -> None: + self.peer = peer # InputPeer + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderStarGiftCollections": + # No flags + + peer = TLObject.read(b) + + order = TLObject.read(b, Int) + + return ReorderStarGiftCollections(peer=peer, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.order, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/request_recurring_payment.py b/pyrogram/raw/functions/payments/request_recurring_payment.py new file mode 100644 index 00000000..0749fbeb --- /dev/null +++ b/pyrogram/raw/functions/payments/request_recurring_payment.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestRecurringPayment(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``146E958D`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + recurring_init_charge (``str``): + N/A + + invoice_media (:obj:`InputMedia `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["user_id", "recurring_init_charge", "invoice_media"] + + ID = 0x146e958d + QUALNAME = "functions.payments.RequestRecurringPayment" + + def __init__(self, *, user_id: "raw.base.InputUser", recurring_init_charge: str, invoice_media: "raw.base.InputMedia") -> None: + self.user_id = user_id # InputUser + self.recurring_init_charge = recurring_init_charge # string + self.invoice_media = invoice_media # InputMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestRecurringPayment": + # No flags + + user_id = TLObject.read(b) + + recurring_init_charge = String.read(b) + + invoice_media = TLObject.read(b) + + return RequestRecurringPayment(user_id=user_id, recurring_init_charge=recurring_init_charge, invoice_media=invoice_media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(String(self.recurring_init_charge)) + + b.write(self.invoice_media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/resolve_star_gift_offer.py b/pyrogram/raw/functions/payments/resolve_star_gift_offer.py new file mode 100644 index 00000000..7418d554 --- /dev/null +++ b/pyrogram/raw/functions/payments/resolve_star_gift_offer.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResolveStarGiftOffer(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E9CE781C`` + + Parameters: + offer_msg_id (``int`` ``32-bit``): + N/A + + decline (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["offer_msg_id", "decline"] + + ID = 0xe9ce781c + QUALNAME = "functions.payments.ResolveStarGiftOffer" + + def __init__(self, *, offer_msg_id: int, decline: Optional[bool] = None) -> None: + self.offer_msg_id = offer_msg_id # int + self.decline = decline # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResolveStarGiftOffer": + + flags = Int.read(b) + + decline = True if flags & (1 << 0) else False + offer_msg_id = Int.read(b) + + return ResolveStarGiftOffer(offer_msg_id=offer_msg_id, decline=decline) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.decline else 0 + b.write(Int(flags)) + + b.write(Int(self.offer_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/save_star_gift.py b/pyrogram/raw/functions/payments/save_star_gift.py new file mode 100644 index 00000000..a79dba15 --- /dev/null +++ b/pyrogram/raw/functions/payments/save_star_gift.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``2A2A697C`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + unsave (``bool``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["stargift", "unsave"] + + ID = 0x2a2a697c + QUALNAME = "functions.payments.SaveStarGift" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", unsave: Optional[bool] = None) -> None: + self.stargift = stargift # InputSavedStarGift + self.unsave = unsave # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveStarGift": + + flags = Int.read(b) + + unsave = True if flags & (1 << 0) else False + stargift = TLObject.read(b) + + return SaveStarGift(stargift=stargift, unsave=unsave) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.unsave else 0 + b.write(Int(flags)) + + b.write(self.stargift.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/send_payment_form.py b/pyrogram/raw/functions/payments/send_payment_form.py new file mode 100644 index 00000000..fbd0804c --- /dev/null +++ b/pyrogram/raw/functions/payments/send_payment_form.py @@ -0,0 +1,100 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendPaymentForm(TLObject): # type: ignore + """Send compiled payment form + + + Details: + - Layer: ``224`` + - ID: ``2D03522F`` + + Parameters: + form_id (``int`` ``64-bit``): + Form ID + + invoice (:obj:`InputInvoice `): + Invoice + + credentials (:obj:`InputPaymentCredentials `): + Payment credentials + + requested_info_id (``str``, *optional*): + ID of saved and validated order info + + shipping_option_id (``str``, *optional*): + Chosen shipping option ID + + tip_amount (``int`` ``64-bit``, *optional*): + Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + Returns: + :obj:`payments.PaymentResult ` + """ + + __slots__: List[str] = ["form_id", "invoice", "credentials", "requested_info_id", "shipping_option_id", "tip_amount"] + + ID = 0x2d03522f + QUALNAME = "functions.payments.SendPaymentForm" + + def __init__(self, *, form_id: int, invoice: "raw.base.InputInvoice", credentials: "raw.base.InputPaymentCredentials", requested_info_id: Optional[str] = None, shipping_option_id: Optional[str] = None, tip_amount: Optional[int] = None) -> None: + self.form_id = form_id # long + self.invoice = invoice # InputInvoice + self.credentials = credentials # InputPaymentCredentials + self.requested_info_id = requested_info_id # flags.0?string + self.shipping_option_id = shipping_option_id # flags.1?string + self.tip_amount = tip_amount # flags.2?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendPaymentForm": + + flags = Int.read(b) + + form_id = Long.read(b) + + invoice = TLObject.read(b) + + requested_info_id = String.read(b) if flags & (1 << 0) else None + shipping_option_id = String.read(b) if flags & (1 << 1) else None + credentials = TLObject.read(b) + + tip_amount = Long.read(b) if flags & (1 << 2) else None + return SendPaymentForm(form_id=form_id, invoice=invoice, credentials=credentials, requested_info_id=requested_info_id, shipping_option_id=shipping_option_id, tip_amount=tip_amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.requested_info_id is not None else 0 + flags |= (1 << 1) if self.shipping_option_id is not None else 0 + flags |= (1 << 2) if self.tip_amount is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.form_id)) + + b.write(self.invoice.write()) + + if self.requested_info_id is not None: + b.write(String(self.requested_info_id)) + + if self.shipping_option_id is not None: + b.write(String(self.shipping_option_id)) + + b.write(self.credentials.write()) + + if self.tip_amount is not None: + b.write(Long(self.tip_amount)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/send_star_gift_offer.py b/pyrogram/raw/functions/payments/send_star_gift_offer.py new file mode 100644 index 00000000..8daff291 --- /dev/null +++ b/pyrogram/raw/functions/payments/send_star_gift_offer.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendStarGiftOffer(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8FB86B41`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + slug (``str``): + N/A + + price (:obj:`StarsAmount `): + N/A + + duration (``int`` ``32-bit``): + N/A + + random_id (``int`` ``64-bit``): + N/A + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "slug", "price", "duration", "random_id", "allow_paid_stars"] + + ID = 0x8fb86b41 + QUALNAME = "functions.payments.SendStarGiftOffer" + + def __init__(self, *, peer: "raw.base.InputPeer", slug: str, price: "raw.base.StarsAmount", duration: int, random_id: int, allow_paid_stars: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.slug = slug # string + self.price = price # StarsAmount + self.duration = duration # int + self.random_id = random_id # long + self.allow_paid_stars = allow_paid_stars # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendStarGiftOffer": + + flags = Int.read(b) + + peer = TLObject.read(b) + + slug = String.read(b) + + price = TLObject.read(b) + + duration = Int.read(b) + + random_id = Long.read(b) + + allow_paid_stars = Long.read(b) if flags & (1 << 0) else None + return SendStarGiftOffer(peer=peer, slug=slug, price=price, duration=duration, random_id=random_id, allow_paid_stars=allow_paid_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.allow_paid_stars is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.slug)) + + b.write(self.price.write()) + + b.write(Int(self.duration)) + + b.write(Long(self.random_id)) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/send_stars_form.py b/pyrogram/raw/functions/payments/send_stars_form.py new file mode 100644 index 00000000..8f8828bb --- /dev/null +++ b/pyrogram/raw/functions/payments/send_stars_form.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendStarsForm(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``7998C914`` + + Parameters: + form_id (``int`` ``64-bit``): + + + invoice (:obj:`InputInvoice `): + + + Returns: + :obj:`payments.PaymentResult ` + """ + + __slots__: List[str] = ["form_id", "invoice"] + + ID = 0x7998c914 + QUALNAME = "functions.payments.SendStarsForm" + + def __init__(self, *, form_id: int, invoice: "raw.base.InputInvoice") -> None: + self.form_id = form_id # long + self.invoice = invoice # InputInvoice + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendStarsForm": + # No flags + + form_id = Long.read(b) + + invoice = TLObject.read(b) + + return SendStarsForm(form_id=form_id, invoice=invoice) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.form_id)) + + b.write(self.invoice.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/toggle_chat_star_gift_notifications.py b/pyrogram/raw/functions/payments/toggle_chat_star_gift_notifications.py new file mode 100644 index 00000000..4fb497b2 --- /dev/null +++ b/pyrogram/raw/functions/payments/toggle_chat_star_gift_notifications.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleChatStarGiftNotifications(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``60EAEFA1`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + enabled (``bool``, *optional*): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "enabled"] + + ID = 0x60eaefa1 + QUALNAME = "functions.payments.ToggleChatStarGiftNotifications" + + def __init__(self, *, peer: "raw.base.InputPeer", enabled: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.enabled = enabled # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleChatStarGiftNotifications": + + flags = Int.read(b) + + enabled = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + return ToggleChatStarGiftNotifications(peer=peer, enabled=enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.enabled else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/toggle_star_gifts_pinned_to_top.py b/pyrogram/raw/functions/payments/toggle_star_gifts_pinned_to_top.py new file mode 100644 index 00000000..7e2ad68d --- /dev/null +++ b/pyrogram/raw/functions/payments/toggle_star_gifts_pinned_to_top.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleStarGiftsPinnedToTop(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``1513E7B0`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + stargift (List of :obj:`InputSavedStarGift `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "stargift"] + + ID = 0x1513e7b0 + QUALNAME = "functions.payments.ToggleStarGiftsPinnedToTop" + + def __init__(self, *, peer: "raw.base.InputPeer", stargift: List["raw.base.InputSavedStarGift"]) -> None: + self.peer = peer # InputPeer + self.stargift = stargift # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleStarGiftsPinnedToTop": + # No flags + + peer = TLObject.read(b) + + stargift = TLObject.read(b) + + return ToggleStarGiftsPinnedToTop(peer=peer, stargift=stargift) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.stargift)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/transfer_star_gift.py b/pyrogram/raw/functions/payments/transfer_star_gift.py new file mode 100644 index 00000000..cd7369ce --- /dev/null +++ b/pyrogram/raw/functions/payments/transfer_star_gift.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TransferStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``7F18176A`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + to_id (:obj:`InputPeer `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["stargift", "to_id"] + + ID = 0x7f18176a + QUALNAME = "functions.payments.TransferStarGift" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", to_id: "raw.base.InputPeer") -> None: + self.stargift = stargift # InputSavedStarGift + self.to_id = to_id # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TransferStarGift": + # No flags + + stargift = TLObject.read(b) + + to_id = TLObject.read(b) + + return TransferStarGift(stargift=stargift, to_id=to_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stargift.write()) + + b.write(self.to_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/update_star_gift_collection.py b/pyrogram/raw/functions/payments/update_star_gift_collection.py new file mode 100644 index 00000000..ceef7248 --- /dev/null +++ b/pyrogram/raw/functions/payments/update_star_gift_collection.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateStarGiftCollection(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``4FDDBEE7`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + collection_id (``int`` ``32-bit``): + N/A + + title (``str``, *optional*): + N/A + + delete_stargift (List of :obj:`InputSavedStarGift `, *optional*): + N/A + + add_stargift (List of :obj:`InputSavedStarGift `, *optional*): + N/A + + order (List of :obj:`InputSavedStarGift `, *optional*): + N/A + + Returns: + :obj:`StarGiftCollection ` + """ + + __slots__: List[str] = ["peer", "collection_id", "title", "delete_stargift", "add_stargift", "order"] + + ID = 0x4fddbee7 + QUALNAME = "functions.payments.UpdateStarGiftCollection" + + def __init__(self, *, peer: "raw.base.InputPeer", collection_id: int, title: Optional[str] = None, delete_stargift: Optional[List["raw.base.InputSavedStarGift"]] = None, add_stargift: Optional[List["raw.base.InputSavedStarGift"]] = None, order: Optional[List["raw.base.InputSavedStarGift"]] = None) -> None: + self.peer = peer # InputPeer + self.collection_id = collection_id # int + self.title = title # flags.0?string + self.delete_stargift = delete_stargift # flags.1?Vector + self.add_stargift = add_stargift # flags.2?Vector + self.order = order # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateStarGiftCollection": + + flags = Int.read(b) + + peer = TLObject.read(b) + + collection_id = Int.read(b) + + title = String.read(b) if flags & (1 << 0) else None + delete_stargift = TLObject.read(b) if flags & (1 << 1) else [] + + add_stargift = TLObject.read(b) if flags & (1 << 2) else [] + + order = TLObject.read(b) if flags & (1 << 3) else [] + + return UpdateStarGiftCollection(peer=peer, collection_id=collection_id, title=title, delete_stargift=delete_stargift, add_stargift=add_stargift, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.title is not None else 0 + flags |= (1 << 1) if self.delete_stargift else 0 + flags |= (1 << 2) if self.add_stargift else 0 + flags |= (1 << 3) if self.order else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.collection_id)) + + if self.title is not None: + b.write(String(self.title)) + + if self.delete_stargift is not None: + b.write(Vector(self.delete_stargift)) + + if self.add_stargift is not None: + b.write(Vector(self.add_stargift)) + + if self.order is not None: + b.write(Vector(self.order)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/update_star_gift_price.py b/pyrogram/raw/functions/payments/update_star_gift_price.py new file mode 100644 index 00000000..bb7dfd4c --- /dev/null +++ b/pyrogram/raw/functions/payments/update_star_gift_price.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateStarGiftPrice(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``EDBE6CCB`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + resell_amount (:obj:`StarsAmount `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["stargift", "resell_amount"] + + ID = 0xedbe6ccb + QUALNAME = "functions.payments.UpdateStarGiftPrice" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", resell_amount: "raw.base.StarsAmount") -> None: + self.stargift = stargift # InputSavedStarGift + self.resell_amount = resell_amount # StarsAmount + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateStarGiftPrice": + # No flags + + stargift = TLObject.read(b) + + resell_amount = TLObject.read(b) + + return UpdateStarGiftPrice(stargift=stargift, resell_amount=resell_amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stargift.write()) + + b.write(self.resell_amount.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/upgrade_star_gift.py b/pyrogram/raw/functions/payments/upgrade_star_gift.py new file mode 100644 index 00000000..2df2a6d8 --- /dev/null +++ b/pyrogram/raw/functions/payments/upgrade_star_gift.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpgradeStarGift(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``AED6E4F5`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + keep_original_details (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["stargift", "keep_original_details"] + + ID = 0xaed6e4f5 + QUALNAME = "functions.payments.UpgradeStarGift" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", keep_original_details: Optional[bool] = None) -> None: + self.stargift = stargift # InputSavedStarGift + self.keep_original_details = keep_original_details # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpgradeStarGift": + + flags = Int.read(b) + + keep_original_details = True if flags & (1 << 0) else False + stargift = TLObject.read(b) + + return UpgradeStarGift(stargift=stargift, keep_original_details=keep_original_details) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.keep_original_details else 0 + b.write(Int(flags)) + + b.write(self.stargift.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/payments/validate_requested_info.py b/pyrogram/raw/functions/payments/validate_requested_info.py new file mode 100644 index 00000000..b4bdc73e --- /dev/null +++ b/pyrogram/raw/functions/payments/validate_requested_info.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ValidateRequestedInfo(TLObject): # type: ignore + """Submit requested order information for validation + + + Details: + - Layer: ``224`` + - ID: ``B6C8F12B`` + + Parameters: + invoice (:obj:`InputInvoice `): + Invoice + + info (:obj:`PaymentRequestedInfo `): + Requested order information + + save (``bool``, *optional*): + Save order information to re-use it for future orders + + Returns: + :obj:`payments.ValidatedRequestedInfo ` + """ + + __slots__: List[str] = ["invoice", "info", "save"] + + ID = 0xb6c8f12b + QUALNAME = "functions.payments.ValidateRequestedInfo" + + def __init__(self, *, invoice: "raw.base.InputInvoice", info: "raw.base.PaymentRequestedInfo", save: Optional[bool] = None) -> None: + self.invoice = invoice # InputInvoice + self.info = info # PaymentRequestedInfo + self.save = save # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ValidateRequestedInfo": + + flags = Int.read(b) + + save = True if flags & (1 << 0) else False + invoice = TLObject.read(b) + + info = TLObject.read(b) + + return ValidateRequestedInfo(invoice=invoice, info=info, save=save) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.save else 0 + b.write(Int(flags)) + + b.write(self.invoice.write()) + + b.write(self.info.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/__init__.py b/pyrogram/raw/functions/phone/__init__.py new file mode 100644 index 00000000..eec53d80 --- /dev/null +++ b/pyrogram/raw/functions/phone/__init__.py @@ -0,0 +1,119 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_call_config import GetCallConfig +from .request_call import RequestCall +from .accept_call import AcceptCall +from .confirm_call import ConfirmCall +from .received_call import ReceivedCall +from .discard_call import DiscardCall +from .set_call_rating import SetCallRating +from .save_call_debug import SaveCallDebug +from .send_signaling_data import SendSignalingData +from .create_group_call import CreateGroupCall +from .join_group_call import JoinGroupCall +from .leave_group_call import LeaveGroupCall +from .invite_to_group_call import InviteToGroupCall +from .discard_group_call import DiscardGroupCall +from .toggle_group_call_settings import ToggleGroupCallSettings +from .get_group_call import GetGroupCall +from .get_group_participants import GetGroupParticipants +from .check_group_call import CheckGroupCall +from .toggle_group_call_record import ToggleGroupCallRecord +from .edit_group_call_participant import EditGroupCallParticipant +from .edit_group_call_title import EditGroupCallTitle +from .get_group_call_join_as import GetGroupCallJoinAs +from .export_group_call_invite import ExportGroupCallInvite +from .toggle_group_call_start_subscription import ToggleGroupCallStartSubscription +from .start_scheduled_group_call import StartScheduledGroupCall +from .save_default_group_call_join_as import SaveDefaultGroupCallJoinAs +from .join_group_call_presentation import JoinGroupCallPresentation +from .leave_group_call_presentation import LeaveGroupCallPresentation +from .get_group_call_stream_channels import GetGroupCallStreamChannels +from .get_group_call_stream_rtmp_url import GetGroupCallStreamRtmpUrl +from .save_call_log import SaveCallLog +from .create_conference_call import CreateConferenceCall +from .delete_conference_call_participants import DeleteConferenceCallParticipants +from .send_conference_call_broadcast import SendConferenceCallBroadcast +from .invite_conference_call_participant import InviteConferenceCallParticipant +from .decline_conference_call_invite import DeclineConferenceCallInvite +from .get_group_call_chain_blocks import GetGroupCallChainBlocks +from .send_group_call_message import SendGroupCallMessage +from .send_group_call_encrypted_message import SendGroupCallEncryptedMessage +from .delete_group_call_messages import DeleteGroupCallMessages +from .delete_group_call_participant_messages import DeleteGroupCallParticipantMessages +from .get_group_call_stars import GetGroupCallStars +from .save_default_send_as import SaveDefaultSendAs + + +__all__ = [ + "GetCallConfig", + "RequestCall", + "AcceptCall", + "ConfirmCall", + "ReceivedCall", + "DiscardCall", + "SetCallRating", + "SaveCallDebug", + "SendSignalingData", + "CreateGroupCall", + "JoinGroupCall", + "LeaveGroupCall", + "InviteToGroupCall", + "DiscardGroupCall", + "ToggleGroupCallSettings", + "GetGroupCall", + "GetGroupParticipants", + "CheckGroupCall", + "ToggleGroupCallRecord", + "EditGroupCallParticipant", + "EditGroupCallTitle", + "GetGroupCallJoinAs", + "ExportGroupCallInvite", + "ToggleGroupCallStartSubscription", + "StartScheduledGroupCall", + "SaveDefaultGroupCallJoinAs", + "JoinGroupCallPresentation", + "LeaveGroupCallPresentation", + "GetGroupCallStreamChannels", + "GetGroupCallStreamRtmpUrl", + "SaveCallLog", + "CreateConferenceCall", + "DeleteConferenceCallParticipants", + "SendConferenceCallBroadcast", + "InviteConferenceCallParticipant", + "DeclineConferenceCallInvite", + "GetGroupCallChainBlocks", + "SendGroupCallMessage", + "SendGroupCallEncryptedMessage", + "DeleteGroupCallMessages", + "DeleteGroupCallParticipantMessages", + "GetGroupCallStars", + "SaveDefaultSendAs", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/phone/accept_call.py b/pyrogram/raw/functions/phone/accept_call.py new file mode 100644 index 00000000..278d4d17 --- /dev/null +++ b/pyrogram/raw/functions/phone/accept_call.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AcceptCall(TLObject): # type: ignore + """Accept incoming call + + + Details: + - Layer: ``224`` + - ID: ``3BD2B4A0`` + + Parameters: + peer (:obj:`InputPhoneCall `): + The call to accept + + g_b (``bytes``): + Parameter for E2E encryption key exchange » + + protocol (:obj:`PhoneCallProtocol `): + Phone call settings + + Returns: + :obj:`phone.PhoneCall ` + """ + + __slots__: List[str] = ["peer", "g_b", "protocol"] + + ID = 0x3bd2b4a0 + QUALNAME = "functions.phone.AcceptCall" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", g_b: bytes, protocol: "raw.base.PhoneCallProtocol") -> None: + self.peer = peer # InputPhoneCall + self.g_b = g_b # bytes + self.protocol = protocol # PhoneCallProtocol + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AcceptCall": + # No flags + + peer = TLObject.read(b) + + g_b = Bytes.read(b) + + protocol = TLObject.read(b) + + return AcceptCall(peer=peer, g_b=g_b, protocol=protocol) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bytes(self.g_b)) + + b.write(self.protocol.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/check_group_call.py b/pyrogram/raw/functions/phone/check_group_call.py new file mode 100644 index 00000000..d2d1c178 --- /dev/null +++ b/pyrogram/raw/functions/phone/check_group_call.py @@ -0,0 +1,64 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckGroupCall(TLObject): # type: ignore + """Check whether the group call Server Forwarding Unit is currently receiving the streams with the specified WebRTC source IDs. +Returns an intersection of the source IDs specified in sources, and the source IDs currently being forwarded by the SFU. + + + Details: + - Layer: ``224`` + - ID: ``B59CF977`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call + + sources (List of ``int`` ``32-bit``): + Source IDs + + Returns: + List of ``int`` ``32-bit`` + """ + + __slots__: List[str] = ["call", "sources"] + + ID = 0xb59cf977 + QUALNAME = "functions.phone.CheckGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", sources: List[int]) -> None: + self.call = call # InputGroupCall + self.sources = sources # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckGroupCall": + # No flags + + call = TLObject.read(b) + + sources = TLObject.read(b, Int) + + return CheckGroupCall(call=call, sources=sources) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Vector(self.sources, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/confirm_call.py b/pyrogram/raw/functions/phone/confirm_call.py new file mode 100644 index 00000000..d620d2eb --- /dev/null +++ b/pyrogram/raw/functions/phone/confirm_call.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConfirmCall(TLObject): # type: ignore + """Complete phone call E2E encryption key exchange » + + + Details: + - Layer: ``224`` + - ID: ``2EFE1722`` + + Parameters: + peer (:obj:`InputPhoneCall `): + The phone call + + g_a (``bytes``): + Parameter for E2E encryption key exchange » + + key_fingerprint (``int`` ``64-bit``): + Key fingerprint + + protocol (:obj:`PhoneCallProtocol `): + Phone call settings + + Returns: + :obj:`phone.PhoneCall ` + """ + + __slots__: List[str] = ["peer", "g_a", "key_fingerprint", "protocol"] + + ID = 0x2efe1722 + QUALNAME = "functions.phone.ConfirmCall" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", g_a: bytes, key_fingerprint: int, protocol: "raw.base.PhoneCallProtocol") -> None: + self.peer = peer # InputPhoneCall + self.g_a = g_a # bytes + self.key_fingerprint = key_fingerprint # long + self.protocol = protocol # PhoneCallProtocol + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConfirmCall": + # No flags + + peer = TLObject.read(b) + + g_a = Bytes.read(b) + + key_fingerprint = Long.read(b) + + protocol = TLObject.read(b) + + return ConfirmCall(peer=peer, g_a=g_a, key_fingerprint=key_fingerprint, protocol=protocol) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bytes(self.g_a)) + + b.write(Long(self.key_fingerprint)) + + b.write(self.protocol.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/create_conference_call.py b/pyrogram/raw/functions/phone/create_conference_call.py new file mode 100644 index 00000000..f3d94864 --- /dev/null +++ b/pyrogram/raw/functions/phone/create_conference_call.py @@ -0,0 +1,102 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateConferenceCall(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``7D0444BB`` + + Parameters: + random_id (``int`` ``32-bit``): + N/A + + muted (``bool``, *optional*): + N/A + + video_stopped (``bool``, *optional*): + N/A + + join (``bool``, *optional*): + N/A + + public_key (``int`` ``256-bit``, *optional*): + N/A + + block (``bytes``, *optional*): + N/A + + params (:obj:`DataJSON `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["random_id", "muted", "video_stopped", "join", "public_key", "block", "params"] + + ID = 0x7d0444bb + QUALNAME = "functions.phone.CreateConferenceCall" + + def __init__(self, *, random_id: int, muted: Optional[bool] = None, video_stopped: Optional[bool] = None, join: Optional[bool] = None, public_key: Optional[int] = None, block: Optional[bytes] = None, params: "raw.base.DataJSON" = None) -> None: + self.random_id = random_id # int + self.muted = muted # flags.0?true + self.video_stopped = video_stopped # flags.2?true + self.join = join # flags.3?true + self.public_key = public_key # flags.3?int256 + self.block = block # flags.3?bytes + self.params = params # flags.3?DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateConferenceCall": + + flags = Int.read(b) + + muted = True if flags & (1 << 0) else False + video_stopped = True if flags & (1 << 2) else False + join = True if flags & (1 << 3) else False + random_id = Int.read(b) + + public_key = Int256.read(b) if flags & (1 << 3) else None + block = Bytes.read(b) if flags & (1 << 3) else None + params = TLObject.read(b) if flags & (1 << 3) else None + + return CreateConferenceCall(random_id=random_id, muted=muted, video_stopped=video_stopped, join=join, public_key=public_key, block=block, params=params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.muted else 0 + flags |= (1 << 2) if self.video_stopped else 0 + flags |= (1 << 3) if self.join else 0 + flags |= (1 << 3) if self.public_key is not None else 0 + flags |= (1 << 3) if self.block is not None else 0 + flags |= (1 << 3) if self.params is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.random_id)) + + if self.public_key is not None: + b.write(Int256(self.public_key)) + + if self.block is not None: + b.write(Bytes(self.block)) + + if self.params is not None: + b.write(self.params.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/create_group_call.py b/pyrogram/raw/functions/phone/create_group_call.py new file mode 100644 index 00000000..69e0f014 --- /dev/null +++ b/pyrogram/raw/functions/phone/create_group_call.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateGroupCall(TLObject): # type: ignore + """Create a group call or livestream + + + Details: + - Layer: ``224`` + - ID: ``48CDC6D8`` + + Parameters: + peer (:obj:`InputPeer `): + Associate the group call or livestream to the provided group/supergroup/channel + + random_id (``int`` ``32-bit``): + Unique client message ID required to prevent creation of duplicate group calls + + rtmp_stream (``bool``, *optional*): + Whether RTMP stream support should be enabled: only the group/supergroup/channel owner can use this flag. + + title (``str``, *optional*): + Call title + + schedule_date (``int`` ``32-bit``, *optional*): + For scheduled group call or livestreams, the absolute date when the group call will start + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "random_id", "rtmp_stream", "title", "schedule_date"] + + ID = 0x48cdc6d8 + QUALNAME = "functions.phone.CreateGroupCall" + + def __init__(self, *, peer: "raw.base.InputPeer", random_id: int, rtmp_stream: Optional[bool] = None, title: Optional[str] = None, schedule_date: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.random_id = random_id # int + self.rtmp_stream = rtmp_stream # flags.2?true + self.title = title # flags.0?string + self.schedule_date = schedule_date # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateGroupCall": + + flags = Int.read(b) + + rtmp_stream = True if flags & (1 << 2) else False + peer = TLObject.read(b) + + random_id = Int.read(b) + + title = String.read(b) if flags & (1 << 0) else None + schedule_date = Int.read(b) if flags & (1 << 1) else None + return CreateGroupCall(peer=peer, random_id=random_id, rtmp_stream=rtmp_stream, title=title, schedule_date=schedule_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.rtmp_stream else 0 + flags |= (1 << 0) if self.title is not None else 0 + flags |= (1 << 1) if self.schedule_date is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.random_id)) + + if self.title is not None: + b.write(String(self.title)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/decline_conference_call_invite.py b/pyrogram/raw/functions/phone/decline_conference_call_invite.py new file mode 100644 index 00000000..cd5f9cb3 --- /dev/null +++ b/pyrogram/raw/functions/phone/decline_conference_call_invite.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeclineConferenceCallInvite(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``3C479971`` + + Parameters: + msg_id (``int`` ``32-bit``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["msg_id"] + + ID = 0x3c479971 + QUALNAME = "functions.phone.DeclineConferenceCallInvite" + + def __init__(self, *, msg_id: int) -> None: + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeclineConferenceCallInvite": + # No flags + + msg_id = Int.read(b) + + return DeclineConferenceCallInvite(msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/delete_conference_call_participants.py b/pyrogram/raw/functions/phone/delete_conference_call_participants.py new file mode 100644 index 00000000..e01cb543 --- /dev/null +++ b/pyrogram/raw/functions/phone/delete_conference_call_participants.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteConferenceCallParticipants(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8CA60525`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + ids (List of ``int`` ``64-bit``): + N/A + + block (``bytes``): + N/A + + only_left (``bool``, *optional*): + N/A + + kick (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "ids", "block", "only_left", "kick"] + + ID = 0x8ca60525 + QUALNAME = "functions.phone.DeleteConferenceCallParticipants" + + def __init__(self, *, call: "raw.base.InputGroupCall", ids: List[int], block: bytes, only_left: Optional[bool] = None, kick: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.ids = ids # Vector + self.block = block # bytes + self.only_left = only_left # flags.0?true + self.kick = kick # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteConferenceCallParticipants": + + flags = Int.read(b) + + only_left = True if flags & (1 << 0) else False + kick = True if flags & (1 << 1) else False + call = TLObject.read(b) + + ids = TLObject.read(b, Long) + + block = Bytes.read(b) + + return DeleteConferenceCallParticipants(call=call, ids=ids, block=block, only_left=only_left, kick=kick) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.only_left else 0 + flags |= (1 << 1) if self.kick else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(Vector(self.ids, Long)) + + b.write(Bytes(self.block)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/delete_group_call_messages.py b/pyrogram/raw/functions/phone/delete_group_call_messages.py new file mode 100644 index 00000000..4aca220c --- /dev/null +++ b/pyrogram/raw/functions/phone/delete_group_call_messages.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteGroupCallMessages(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``F64F54F7`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + messages (List of ``int`` ``32-bit``): + N/A + + report_spam (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "messages", "report_spam"] + + ID = 0xf64f54f7 + QUALNAME = "functions.phone.DeleteGroupCallMessages" + + def __init__(self, *, call: "raw.base.InputGroupCall", messages: List[int], report_spam: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.messages = messages # Vector + self.report_spam = report_spam # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteGroupCallMessages": + + flags = Int.read(b) + + report_spam = True if flags & (1 << 0) else False + call = TLObject.read(b) + + messages = TLObject.read(b, Int) + + return DeleteGroupCallMessages(call=call, messages=messages, report_spam=report_spam) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.report_spam else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(Vector(self.messages, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/delete_group_call_participant_messages.py b/pyrogram/raw/functions/phone/delete_group_call_participant_messages.py new file mode 100644 index 00000000..52bd4566 --- /dev/null +++ b/pyrogram/raw/functions/phone/delete_group_call_participant_messages.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteGroupCallParticipantMessages(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``1DBFECA0`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + participant (:obj:`InputPeer `): + N/A + + report_spam (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "participant", "report_spam"] + + ID = 0x1dbfeca0 + QUALNAME = "functions.phone.DeleteGroupCallParticipantMessages" + + def __init__(self, *, call: "raw.base.InputGroupCall", participant: "raw.base.InputPeer", report_spam: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.participant = participant # InputPeer + self.report_spam = report_spam # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteGroupCallParticipantMessages": + + flags = Int.read(b) + + report_spam = True if flags & (1 << 0) else False + call = TLObject.read(b) + + participant = TLObject.read(b) + + return DeleteGroupCallParticipantMessages(call=call, participant=participant, report_spam=report_spam) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.report_spam else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/discard_call.py b/pyrogram/raw/functions/phone/discard_call.py new file mode 100644 index 00000000..c60c9254 --- /dev/null +++ b/pyrogram/raw/functions/phone/discard_call.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DiscardCall(TLObject): # type: ignore + """Refuse or end running call + + + Details: + - Layer: ``224`` + - ID: ``B2CBC1C0`` + + Parameters: + peer (:obj:`InputPhoneCall `): + The phone call + + duration (``int`` ``32-bit``): + Call duration + + reason (:obj:`PhoneCallDiscardReason `): + Why was the call discarded + + connection_id (``int`` ``64-bit``): + Preferred libtgvoip relay ID + + video (``bool``, *optional*): + Whether this is a video call + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "duration", "reason", "connection_id", "video"] + + ID = 0xb2cbc1c0 + QUALNAME = "functions.phone.DiscardCall" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", duration: int, reason: "raw.base.PhoneCallDiscardReason", connection_id: int, video: Optional[bool] = None) -> None: + self.peer = peer # InputPhoneCall + self.duration = duration # int + self.reason = reason # PhoneCallDiscardReason + self.connection_id = connection_id # long + self.video = video # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DiscardCall": + + flags = Int.read(b) + + video = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + duration = Int.read(b) + + reason = TLObject.read(b) + + connection_id = Long.read(b) + + return DiscardCall(peer=peer, duration=duration, reason=reason, connection_id=connection_id, video=video) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.video else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.duration)) + + b.write(self.reason.write()) + + b.write(Long(self.connection_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/discard_group_call.py b/pyrogram/raw/functions/phone/discard_group_call.py new file mode 100644 index 00000000..2a5452c5 --- /dev/null +++ b/pyrogram/raw/functions/phone/discard_group_call.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DiscardGroupCall(TLObject): # type: ignore + """Terminate a group call + + + Details: + - Layer: ``224`` + - ID: ``7A777135`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call to terminate + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call"] + + ID = 0x7a777135 + QUALNAME = "functions.phone.DiscardGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DiscardGroupCall": + # No flags + + call = TLObject.read(b) + + return DiscardGroupCall(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/edit_group_call_participant.py b/pyrogram/raw/functions/phone/edit_group_call_participant.py new file mode 100644 index 00000000..3624e818 --- /dev/null +++ b/pyrogram/raw/functions/phone/edit_group_call_participant.py @@ -0,0 +1,119 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditGroupCallParticipant(TLObject): # type: ignore + """Edit information about a given group call participant + + + Details: + - Layer: ``224`` + - ID: ``A5273ABF`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + participant (:obj:`InputPeer `): + The group call participant (can also be the user itself) + + muted (``bool``, *optional*): + Whether to mute or unmute the specified participant + + volume (``int`` ``32-bit``, *optional*): + New volume + + raise_hand (``bool``, *optional*): + Raise or lower hand + + video_stopped (``bool``, *optional*): + Start or stop the video stream + + video_paused (``bool``, *optional*): + Pause or resume the video stream + + presentation_paused (``bool``, *optional*): + Pause or resume the screen sharing stream + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "participant", "muted", "volume", "raise_hand", "video_stopped", "video_paused", "presentation_paused"] + + ID = 0xa5273abf + QUALNAME = "functions.phone.EditGroupCallParticipant" + + def __init__(self, *, call: "raw.base.InputGroupCall", participant: "raw.base.InputPeer", muted: Optional[bool] = None, volume: Optional[int] = None, raise_hand: Optional[bool] = None, video_stopped: Optional[bool] = None, video_paused: Optional[bool] = None, presentation_paused: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.participant = participant # InputPeer + self.muted = muted # flags.0?Bool + self.volume = volume # flags.1?int + self.raise_hand = raise_hand # flags.2?Bool + self.video_stopped = video_stopped # flags.3?Bool + self.video_paused = video_paused # flags.4?Bool + self.presentation_paused = presentation_paused # flags.5?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditGroupCallParticipant": + + flags = Int.read(b) + + call = TLObject.read(b) + + participant = TLObject.read(b) + + muted = Bool.read(b) if flags & (1 << 0) else None + volume = Int.read(b) if flags & (1 << 1) else None + raise_hand = Bool.read(b) if flags & (1 << 2) else None + video_stopped = Bool.read(b) if flags & (1 << 3) else None + video_paused = Bool.read(b) if flags & (1 << 4) else None + presentation_paused = Bool.read(b) if flags & (1 << 5) else None + return EditGroupCallParticipant(call=call, participant=participant, muted=muted, volume=volume, raise_hand=raise_hand, video_stopped=video_stopped, video_paused=video_paused, presentation_paused=presentation_paused) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.muted is not None else 0 + flags |= (1 << 1) if self.volume is not None else 0 + flags |= (1 << 2) if self.raise_hand is not None else 0 + flags |= (1 << 3) if self.video_stopped is not None else 0 + flags |= (1 << 4) if self.video_paused is not None else 0 + flags |= (1 << 5) if self.presentation_paused is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(self.participant.write()) + + if self.muted is not None: + b.write(Bool(self.muted)) + + if self.volume is not None: + b.write(Int(self.volume)) + + if self.raise_hand is not None: + b.write(Bool(self.raise_hand)) + + if self.video_stopped is not None: + b.write(Bool(self.video_stopped)) + + if self.video_paused is not None: + b.write(Bool(self.video_paused)) + + if self.presentation_paused is not None: + b.write(Bool(self.presentation_paused)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/edit_group_call_title.py b/pyrogram/raw/functions/phone/edit_group_call_title.py new file mode 100644 index 00000000..83a35fcd --- /dev/null +++ b/pyrogram/raw/functions/phone/edit_group_call_title.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditGroupCallTitle(TLObject): # type: ignore + """Edit the title of a group call or livestream + + + Details: + - Layer: ``224`` + - ID: ``1CA6AC0A`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call + + title (``str``): + New title + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "title"] + + ID = 0x1ca6ac0a + QUALNAME = "functions.phone.EditGroupCallTitle" + + def __init__(self, *, call: "raw.base.InputGroupCall", title: str) -> None: + self.call = call # InputGroupCall + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditGroupCallTitle": + # No flags + + call = TLObject.read(b) + + title = String.read(b) + + return EditGroupCallTitle(call=call, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/export_group_call_invite.py b/pyrogram/raw/functions/phone/export_group_call_invite.py new file mode 100644 index 00000000..bcdc6bf1 --- /dev/null +++ b/pyrogram/raw/functions/phone/export_group_call_invite.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportGroupCallInvite(TLObject): # type: ignore + """Get an invite link for a group call or livestream + + + Details: + - Layer: ``224`` + - ID: ``E6AA647F`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + can_self_unmute (``bool``, *optional*): + For livestreams or muted group chats, if set, users that join using this link will be able to speak without explicitly requesting permission by (for example by raising their hand). + + Returns: + :obj:`phone.ExportedGroupCallInvite ` + """ + + __slots__: List[str] = ["call", "can_self_unmute"] + + ID = 0xe6aa647f + QUALNAME = "functions.phone.ExportGroupCallInvite" + + def __init__(self, *, call: "raw.base.InputGroupCall", can_self_unmute: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.can_self_unmute = can_self_unmute # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportGroupCallInvite": + + flags = Int.read(b) + + can_self_unmute = True if flags & (1 << 0) else False + call = TLObject.read(b) + + return ExportGroupCallInvite(call=call, can_self_unmute=can_self_unmute) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.can_self_unmute else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_call_config.py b/pyrogram/raw/functions/phone/get_call_config.py new file mode 100644 index 00000000..8fc5ac6d --- /dev/null +++ b/pyrogram/raw/functions/phone/get_call_config.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCallConfig(TLObject): # type: ignore + """Get phone call configuration to be passed to libtgvoip's shared config + + + Details: + - Layer: ``224`` + - ID: ``55451FA9`` + + Parameters: + No parameters required. + + Returns: + :obj:`DataJSON ` + """ + + __slots__: List[str] = [] + + ID = 0x55451fa9 + QUALNAME = "functions.phone.GetCallConfig" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCallConfig": + # No flags + + return GetCallConfig() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_call.py b/pyrogram/raw/functions/phone/get_group_call.py new file mode 100644 index 00000000..c14c5bd2 --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_call.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupCall(TLObject): # type: ignore + """Get info about a group call + + + Details: + - Layer: ``224`` + - ID: ``41845DB`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`phone.GroupCall ` + """ + + __slots__: List[str] = ["call", "limit"] + + ID = 0x41845db + QUALNAME = "functions.phone.GetGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", limit: int) -> None: + self.call = call # InputGroupCall + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupCall": + # No flags + + call = TLObject.read(b) + + limit = Int.read(b) + + return GetGroupCall(call=call, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_call_chain_blocks.py b/pyrogram/raw/functions/phone/get_group_call_chain_blocks.py new file mode 100644 index 00000000..fc37d7fe --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_call_chain_blocks.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupCallChainBlocks(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``EE9F88A6`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + sub_chain_id (``int`` ``32-bit``): + N/A + + offset (``int`` ``32-bit``): + N/A + + limit (``int`` ``32-bit``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "sub_chain_id", "offset", "limit"] + + ID = 0xee9f88a6 + QUALNAME = "functions.phone.GetGroupCallChainBlocks" + + def __init__(self, *, call: "raw.base.InputGroupCall", sub_chain_id: int, offset: int, limit: int) -> None: + self.call = call # InputGroupCall + self.sub_chain_id = sub_chain_id # int + self.offset = offset # int + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupCallChainBlocks": + # No flags + + call = TLObject.read(b) + + sub_chain_id = Int.read(b) + + offset = Int.read(b) + + limit = Int.read(b) + + return GetGroupCallChainBlocks(call=call, sub_chain_id=sub_chain_id, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Int(self.sub_chain_id)) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_call_join_as.py b/pyrogram/raw/functions/phone/get_group_call_join_as.py new file mode 100644 index 00000000..279ff922 --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_call_join_as.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupCallJoinAs(TLObject): # type: ignore + """Get a list of peers that can be used to join a group call, presenting yourself as a specific user/channel. + + + Details: + - Layer: ``224`` + - ID: ``EF7C213A`` + + Parameters: + peer (:obj:`InputPeer `): + The dialog whose group call or livestream we're trying to join + + Returns: + :obj:`phone.JoinAsPeers ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0xef7c213a + QUALNAME = "functions.phone.GetGroupCallJoinAs" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupCallJoinAs": + # No flags + + peer = TLObject.read(b) + + return GetGroupCallJoinAs(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_call_stars.py b/pyrogram/raw/functions/phone/get_group_call_stars.py new file mode 100644 index 00000000..01852782 --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_call_stars.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupCallStars(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``6F636302`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + Returns: + :obj:`phone.GroupCallStars ` + """ + + __slots__: List[str] = ["call"] + + ID = 0x6f636302 + QUALNAME = "functions.phone.GetGroupCallStars" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupCallStars": + # No flags + + call = TLObject.read(b) + + return GetGroupCallStars(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_call_stream_channels.py b/pyrogram/raw/functions/phone/get_group_call_stream_channels.py new file mode 100644 index 00000000..cbdaa484 --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_call_stream_channels.py @@ -0,0 +1,57 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupCallStreamChannels(TLObject): # type: ignore + """Get info about RTMP streams in a group call or livestream. +This method should be invoked to the same group/channel-related DC used for downloading livestream chunks. +As usual, the media DC is preferred, if available. + + + Details: + - Layer: ``224`` + - ID: ``1AB21940`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call or livestream + + Returns: + :obj:`phone.GroupCallStreamChannels ` + """ + + __slots__: List[str] = ["call"] + + ID = 0x1ab21940 + QUALNAME = "functions.phone.GetGroupCallStreamChannels" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupCallStreamChannels": + # No flags + + call = TLObject.read(b) + + return GetGroupCallStreamChannels(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_call_stream_rtmp_url.py b/pyrogram/raw/functions/phone/get_group_call_stream_rtmp_url.py new file mode 100644 index 00000000..8081693b --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_call_stream_rtmp_url.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupCallStreamRtmpUrl(TLObject): # type: ignore + """Get RTMP URL and stream key for RTMP livestreams. Can be used even before creating the actual RTMP livestream with phone.createGroupCall (the rtmp_stream flag must be set). + + + Details: + - Layer: ``224`` + - ID: ``5AF4C73A`` + + Parameters: + peer (:obj:`InputPeer `): + Peer to livestream into + + revoke (``bool``): + Whether to revoke the previous stream key or simply return the existing one + + live_story (``bool``, *optional*): + N/A + + Returns: + :obj:`phone.GroupCallStreamRtmpUrl ` + """ + + __slots__: List[str] = ["peer", "revoke", "live_story"] + + ID = 0x5af4c73a + QUALNAME = "functions.phone.GetGroupCallStreamRtmpUrl" + + def __init__(self, *, peer: "raw.base.InputPeer", revoke: bool, live_story: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.revoke = revoke # Bool + self.live_story = live_story # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupCallStreamRtmpUrl": + + flags = Int.read(b) + + live_story = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + revoke = Bool.read(b) + + return GetGroupCallStreamRtmpUrl(peer=peer, revoke=revoke, live_story=live_story) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.live_story else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Bool(self.revoke)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/get_group_participants.py b/pyrogram/raw/functions/phone/get_group_participants.py new file mode 100644 index 00000000..2673ae3a --- /dev/null +++ b/pyrogram/raw/functions/phone/get_group_participants.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetGroupParticipants(TLObject): # type: ignore + """Get group call participants + + + Details: + - Layer: ``224`` + - ID: ``C558D8AB`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call + + ids (List of :obj:`InputPeer `): + If specified, will fetch group participant info about the specified peers + + sources (List of ``int`` ``32-bit``): + If specified, will fetch group participant info about the specified WebRTC source IDs + + offset (``str``): + Offset for results, taken from the next_offset field of phone.groupParticipants, initially an empty string. Note: if no more results are available, the method call will return an empty next_offset; thus, avoid providing the next_offset returned in phone.groupParticipants if it is empty, to avoid an infinite loop. + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`phone.GroupParticipants ` + """ + + __slots__: List[str] = ["call", "ids", "sources", "offset", "limit"] + + ID = 0xc558d8ab + QUALNAME = "functions.phone.GetGroupParticipants" + + def __init__(self, *, call: "raw.base.InputGroupCall", ids: List["raw.base.InputPeer"], sources: List[int], offset: str, limit: int) -> None: + self.call = call # InputGroupCall + self.ids = ids # Vector + self.sources = sources # Vector + self.offset = offset # string + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetGroupParticipants": + # No flags + + call = TLObject.read(b) + + ids = TLObject.read(b) + + sources = TLObject.read(b, Int) + + offset = String.read(b) + + limit = Int.read(b) + + return GetGroupParticipants(call=call, ids=ids, sources=sources, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Vector(self.ids)) + + b.write(Vector(self.sources, Int)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/invite_conference_call_participant.py b/pyrogram/raw/functions/phone/invite_conference_call_participant.py new file mode 100644 index 00000000..2cd8b129 --- /dev/null +++ b/pyrogram/raw/functions/phone/invite_conference_call_participant.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InviteConferenceCallParticipant(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``BCF22685`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + user_id (:obj:`InputUser `): + N/A + + video (``bool``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "user_id", "video"] + + ID = 0xbcf22685 + QUALNAME = "functions.phone.InviteConferenceCallParticipant" + + def __init__(self, *, call: "raw.base.InputGroupCall", user_id: "raw.base.InputUser", video: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.user_id = user_id # InputUser + self.video = video # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InviteConferenceCallParticipant": + + flags = Int.read(b) + + video = True if flags & (1 << 0) else False + call = TLObject.read(b) + + user_id = TLObject.read(b) + + return InviteConferenceCallParticipant(call=call, user_id=user_id, video=video) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.video else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/invite_to_group_call.py b/pyrogram/raw/functions/phone/invite_to_group_call.py new file mode 100644 index 00000000..bbf50737 --- /dev/null +++ b/pyrogram/raw/functions/phone/invite_to_group_call.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InviteToGroupCall(TLObject): # type: ignore + """Invite a set of users to a group call. + + + Details: + - Layer: ``224`` + - ID: ``7B393160`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + users (List of :obj:`InputUser `): + The users to invite. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "users"] + + ID = 0x7b393160 + QUALNAME = "functions.phone.InviteToGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", users: List["raw.base.InputUser"]) -> None: + self.call = call # InputGroupCall + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InviteToGroupCall": + # No flags + + call = TLObject.read(b) + + users = TLObject.read(b) + + return InviteToGroupCall(call=call, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/join_group_call.py b/pyrogram/raw/functions/phone/join_group_call.py new file mode 100644 index 00000000..389ecde7 --- /dev/null +++ b/pyrogram/raw/functions/phone/join_group_call.py @@ -0,0 +1,112 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JoinGroupCall(TLObject): # type: ignore + """Join a group call + + + Details: + - Layer: ``224`` + - ID: ``8FB53057`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + join_as (:obj:`InputPeer `): + Join the group call, presenting yourself as the specified user/channel + + params (:obj:`DataJSON `): + WebRTC parameters + + muted (``bool``, *optional*): + If set, the user will be muted by default upon joining. + + video_stopped (``bool``, *optional*): + If set, the user's video will be disabled by default upon joining. + + invite_hash (``str``, *optional*): + The invitation hash from the invite link », if provided allows speaking in a livestream or muted group chat. + + public_key (``int`` ``256-bit``, *optional*): + N/A + + block (``bytes``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "join_as", "params", "muted", "video_stopped", "invite_hash", "public_key", "block"] + + ID = 0x8fb53057 + QUALNAME = "functions.phone.JoinGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", join_as: "raw.base.InputPeer", params: "raw.base.DataJSON", muted: Optional[bool] = None, video_stopped: Optional[bool] = None, invite_hash: Optional[str] = None, public_key: Optional[int] = None, block: Optional[bytes] = None) -> None: + self.call = call # InputGroupCall + self.join_as = join_as # InputPeer + self.params = params # DataJSON + self.muted = muted # flags.0?true + self.video_stopped = video_stopped # flags.2?true + self.invite_hash = invite_hash # flags.1?string + self.public_key = public_key # flags.3?int256 + self.block = block # flags.3?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JoinGroupCall": + + flags = Int.read(b) + + muted = True if flags & (1 << 0) else False + video_stopped = True if flags & (1 << 2) else False + call = TLObject.read(b) + + join_as = TLObject.read(b) + + invite_hash = String.read(b) if flags & (1 << 1) else None + public_key = Int256.read(b) if flags & (1 << 3) else None + block = Bytes.read(b) if flags & (1 << 3) else None + params = TLObject.read(b) + + return JoinGroupCall(call=call, join_as=join_as, params=params, muted=muted, video_stopped=video_stopped, invite_hash=invite_hash, public_key=public_key, block=block) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.muted else 0 + flags |= (1 << 2) if self.video_stopped else 0 + flags |= (1 << 1) if self.invite_hash is not None else 0 + flags |= (1 << 3) if self.public_key is not None else 0 + flags |= (1 << 3) if self.block is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(self.join_as.write()) + + if self.invite_hash is not None: + b.write(String(self.invite_hash)) + + if self.public_key is not None: + b.write(Int256(self.public_key)) + + if self.block is not None: + b.write(Bytes(self.block)) + + b.write(self.params.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/join_group_call_presentation.py b/pyrogram/raw/functions/phone/join_group_call_presentation.py new file mode 100644 index 00000000..0033ccac --- /dev/null +++ b/pyrogram/raw/functions/phone/join_group_call_presentation.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JoinGroupCallPresentation(TLObject): # type: ignore + """Start screen sharing in a call + + + Details: + - Layer: ``224`` + - ID: ``CBEA6BC4`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + params (:obj:`DataJSON `): + WebRTC parameters + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "params"] + + ID = 0xcbea6bc4 + QUALNAME = "functions.phone.JoinGroupCallPresentation" + + def __init__(self, *, call: "raw.base.InputGroupCall", params: "raw.base.DataJSON") -> None: + self.call = call # InputGroupCall + self.params = params # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JoinGroupCallPresentation": + # No flags + + call = TLObject.read(b) + + params = TLObject.read(b) + + return JoinGroupCallPresentation(call=call, params=params) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(self.params.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/leave_group_call.py b/pyrogram/raw/functions/phone/leave_group_call.py new file mode 100644 index 00000000..046e5ce3 --- /dev/null +++ b/pyrogram/raw/functions/phone/leave_group_call.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LeaveGroupCall(TLObject): # type: ignore + """Leave a group call + + + Details: + - Layer: ``224`` + - ID: ``500377F9`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + source (``int`` ``32-bit``): + Your source ID + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "source"] + + ID = 0x500377f9 + QUALNAME = "functions.phone.LeaveGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", source: int) -> None: + self.call = call # InputGroupCall + self.source = source # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LeaveGroupCall": + # No flags + + call = TLObject.read(b) + + source = Int.read(b) + + return LeaveGroupCall(call=call, source=source) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Int(self.source)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/leave_group_call_presentation.py b/pyrogram/raw/functions/phone/leave_group_call_presentation.py new file mode 100644 index 00000000..4ca55b14 --- /dev/null +++ b/pyrogram/raw/functions/phone/leave_group_call_presentation.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LeaveGroupCallPresentation(TLObject): # type: ignore + """Stop screen sharing in a group call + + + Details: + - Layer: ``224`` + - ID: ``1C50D144`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call"] + + ID = 0x1c50d144 + QUALNAME = "functions.phone.LeaveGroupCallPresentation" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LeaveGroupCallPresentation": + # No flags + + call = TLObject.read(b) + + return LeaveGroupCallPresentation(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/received_call.py b/pyrogram/raw/functions/phone/received_call.py new file mode 100644 index 00000000..5aabc286 --- /dev/null +++ b/pyrogram/raw/functions/phone/received_call.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReceivedCall(TLObject): # type: ignore + """Optional: notify the server that the user is currently busy in a call: this will automatically refuse all incoming phone calls until the current phone call is ended. + + + Details: + - Layer: ``224`` + - ID: ``17D54F61`` + + Parameters: + peer (:obj:`InputPhoneCall `): + The phone call we're currently in + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x17d54f61 + QUALNAME = "functions.phone.ReceivedCall" + + def __init__(self, *, peer: "raw.base.InputPhoneCall") -> None: + self.peer = peer # InputPhoneCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReceivedCall": + # No flags + + peer = TLObject.read(b) + + return ReceivedCall(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/request_call.py b/pyrogram/raw/functions/phone/request_call.py new file mode 100644 index 00000000..807a44cc --- /dev/null +++ b/pyrogram/raw/functions/phone/request_call.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RequestCall(TLObject): # type: ignore + """Start a telegram phone call + + + Details: + - Layer: ``224`` + - ID: ``42FF96ED`` + + Parameters: + user_id (:obj:`InputUser `): + Destination of the phone call + + random_id (``int`` ``32-bit``): + Random ID to avoid resending the same object + + g_a_hash (``bytes``): + Parameter for E2E encryption key exchange » + + protocol (:obj:`PhoneCallProtocol `): + Phone call settings + + video (``bool``, *optional*): + Whether to start a video call + + Returns: + :obj:`phone.PhoneCall ` + """ + + __slots__: List[str] = ["user_id", "random_id", "g_a_hash", "protocol", "video"] + + ID = 0x42ff96ed + QUALNAME = "functions.phone.RequestCall" + + def __init__(self, *, user_id: "raw.base.InputUser", random_id: int, g_a_hash: bytes, protocol: "raw.base.PhoneCallProtocol", video: Optional[bool] = None) -> None: + self.user_id = user_id # InputUser + self.random_id = random_id # int + self.g_a_hash = g_a_hash # bytes + self.protocol = protocol # PhoneCallProtocol + self.video = video # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RequestCall": + + flags = Int.read(b) + + video = True if flags & (1 << 0) else False + user_id = TLObject.read(b) + + random_id = Int.read(b) + + g_a_hash = Bytes.read(b) + + protocol = TLObject.read(b) + + return RequestCall(user_id=user_id, random_id=random_id, g_a_hash=g_a_hash, protocol=protocol, video=video) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.video else 0 + b.write(Int(flags)) + + b.write(self.user_id.write()) + + b.write(Int(self.random_id)) + + b.write(Bytes(self.g_a_hash)) + + b.write(self.protocol.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/save_call_debug.py b/pyrogram/raw/functions/phone/save_call_debug.py new file mode 100644 index 00000000..2bb5ca0f --- /dev/null +++ b/pyrogram/raw/functions/phone/save_call_debug.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveCallDebug(TLObject): # type: ignore + """Send phone call debug data to server + + + Details: + - Layer: ``224`` + - ID: ``277ADD7E`` + + Parameters: + peer (:obj:`InputPhoneCall `): + Phone call + + debug (:obj:`DataJSON `): + Debug statistics obtained from libtgvoip + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "debug"] + + ID = 0x277add7e + QUALNAME = "functions.phone.SaveCallDebug" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", debug: "raw.base.DataJSON") -> None: + self.peer = peer # InputPhoneCall + self.debug = debug # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveCallDebug": + # No flags + + peer = TLObject.read(b) + + debug = TLObject.read(b) + + return SaveCallDebug(peer=peer, debug=debug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.debug.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/save_call_log.py b/pyrogram/raw/functions/phone/save_call_log.py new file mode 100644 index 00000000..6da28c9b --- /dev/null +++ b/pyrogram/raw/functions/phone/save_call_log.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveCallLog(TLObject): # type: ignore + """Save phone call debug information + + + Details: + - Layer: ``224`` + - ID: ``41248786`` + + Parameters: + peer (:obj:`InputPhoneCall `): + Phone call + + file (:obj:`InputFile `): + Logs + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "file"] + + ID = 0x41248786 + QUALNAME = "functions.phone.SaveCallLog" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", file: "raw.base.InputFile") -> None: + self.peer = peer # InputPhoneCall + self.file = file # InputFile + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveCallLog": + # No flags + + peer = TLObject.read(b) + + file = TLObject.read(b) + + return SaveCallLog(peer=peer, file=file) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.file.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/save_default_group_call_join_as.py b/pyrogram/raw/functions/phone/save_default_group_call_join_as.py new file mode 100644 index 00000000..7353cf77 --- /dev/null +++ b/pyrogram/raw/functions/phone/save_default_group_call_join_as.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveDefaultGroupCallJoinAs(TLObject): # type: ignore + """Set the default peer that will be used to join a group call in a specific dialog. + + + Details: + - Layer: ``224`` + - ID: ``575E1F8C`` + + Parameters: + peer (:obj:`InputPeer `): + The dialog + + join_as (:obj:`InputPeer `): + The default peer that will be used to join group calls in this dialog, presenting yourself as a specific user/channel. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "join_as"] + + ID = 0x575e1f8c + QUALNAME = "functions.phone.SaveDefaultGroupCallJoinAs" + + def __init__(self, *, peer: "raw.base.InputPeer", join_as: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + self.join_as = join_as # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveDefaultGroupCallJoinAs": + # No flags + + peer = TLObject.read(b) + + join_as = TLObject.read(b) + + return SaveDefaultGroupCallJoinAs(peer=peer, join_as=join_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.join_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/save_default_send_as.py b/pyrogram/raw/functions/phone/save_default_send_as.py new file mode 100644 index 00000000..222f8c6f --- /dev/null +++ b/pyrogram/raw/functions/phone/save_default_send_as.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveDefaultSendAs(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``4167ADD1`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + send_as (:obj:`InputPeer `): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["call", "send_as"] + + ID = 0x4167add1 + QUALNAME = "functions.phone.SaveDefaultSendAs" + + def __init__(self, *, call: "raw.base.InputGroupCall", send_as: "raw.base.InputPeer") -> None: + self.call = call # InputGroupCall + self.send_as = send_as # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveDefaultSendAs": + # No flags + + call = TLObject.read(b) + + send_as = TLObject.read(b) + + return SaveDefaultSendAs(call=call, send_as=send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(self.send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/send_conference_call_broadcast.py b/pyrogram/raw/functions/phone/send_conference_call_broadcast.py new file mode 100644 index 00000000..a191f6a0 --- /dev/null +++ b/pyrogram/raw/functions/phone/send_conference_call_broadcast.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendConferenceCallBroadcast(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``C6701900`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + block (``bytes``): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "block"] + + ID = 0xc6701900 + QUALNAME = "functions.phone.SendConferenceCallBroadcast" + + def __init__(self, *, call: "raw.base.InputGroupCall", block: bytes) -> None: + self.call = call # InputGroupCall + self.block = block # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendConferenceCallBroadcast": + # No flags + + call = TLObject.read(b) + + block = Bytes.read(b) + + return SendConferenceCallBroadcast(call=call, block=block) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Bytes(self.block)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/send_group_call_encrypted_message.py b/pyrogram/raw/functions/phone/send_group_call_encrypted_message.py new file mode 100644 index 00000000..1f07954e --- /dev/null +++ b/pyrogram/raw/functions/phone/send_group_call_encrypted_message.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendGroupCallEncryptedMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``E5AFA56D`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + encrypted_message (``bytes``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["call", "encrypted_message"] + + ID = 0xe5afa56d + QUALNAME = "functions.phone.SendGroupCallEncryptedMessage" + + def __init__(self, *, call: "raw.base.InputGroupCall", encrypted_message: bytes) -> None: + self.call = call # InputGroupCall + self.encrypted_message = encrypted_message # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendGroupCallEncryptedMessage": + # No flags + + call = TLObject.read(b) + + encrypted_message = Bytes.read(b) + + return SendGroupCallEncryptedMessage(call=call, encrypted_message=encrypted_message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Bytes(self.encrypted_message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/send_group_call_message.py b/pyrogram/raw/functions/phone/send_group_call_message.py new file mode 100644 index 00000000..74405206 --- /dev/null +++ b/pyrogram/raw/functions/phone/send_group_call_message.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendGroupCallMessage(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``B1D11410`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + random_id (``int`` ``64-bit``): + N/A + + message (:obj:`TextWithEntities `): + N/A + + allow_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + send_as (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "random_id", "message", "allow_paid_stars", "send_as"] + + ID = 0xb1d11410 + QUALNAME = "functions.phone.SendGroupCallMessage" + + def __init__(self, *, call: "raw.base.InputGroupCall", random_id: int, message: "raw.base.TextWithEntities", allow_paid_stars: Optional[int] = None, send_as: "raw.base.InputPeer" = None) -> None: + self.call = call # InputGroupCall + self.random_id = random_id # long + self.message = message # TextWithEntities + self.allow_paid_stars = allow_paid_stars # flags.0?long + self.send_as = send_as # flags.1?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendGroupCallMessage": + + flags = Int.read(b) + + call = TLObject.read(b) + + random_id = Long.read(b) + + message = TLObject.read(b) + + allow_paid_stars = Long.read(b) if flags & (1 << 0) else None + send_as = TLObject.read(b) if flags & (1 << 1) else None + + return SendGroupCallMessage(call=call, random_id=random_id, message=message, allow_paid_stars=allow_paid_stars, send_as=send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.allow_paid_stars is not None else 0 + flags |= (1 << 1) if self.send_as is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(Long(self.random_id)) + + b.write(self.message.write()) + + if self.allow_paid_stars is not None: + b.write(Long(self.allow_paid_stars)) + + if self.send_as is not None: + b.write(self.send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/send_signaling_data.py b/pyrogram/raw/functions/phone/send_signaling_data.py new file mode 100644 index 00000000..7ce1a048 --- /dev/null +++ b/pyrogram/raw/functions/phone/send_signaling_data.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendSignalingData(TLObject): # type: ignore + """Send VoIP signaling data + + + Details: + - Layer: ``224`` + - ID: ``FF7A9383`` + + Parameters: + peer (:obj:`InputPhoneCall `): + Phone call + + data (``bytes``): + Signaling payload + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "data"] + + ID = 0xff7a9383 + QUALNAME = "functions.phone.SendSignalingData" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", data: bytes) -> None: + self.peer = peer # InputPhoneCall + self.data = data # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendSignalingData": + # No flags + + peer = TLObject.read(b) + + data = Bytes.read(b) + + return SendSignalingData(peer=peer, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bytes(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/set_call_rating.py b/pyrogram/raw/functions/phone/set_call_rating.py new file mode 100644 index 00000000..8921f755 --- /dev/null +++ b/pyrogram/raw/functions/phone/set_call_rating.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetCallRating(TLObject): # type: ignore + """Rate a call, returns info about the rating message sent to the official VoIP bot. + + + Details: + - Layer: ``224`` + - ID: ``59EAD627`` + + Parameters: + peer (:obj:`InputPhoneCall `): + The call to rate + + rating (``int`` ``32-bit``): + Rating in 1-5 stars + + comment (``str``): + An additional comment + + user_initiative (``bool``, *optional*): + Whether the user decided on their own initiative to rate the call + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "rating", "comment", "user_initiative"] + + ID = 0x59ead627 + QUALNAME = "functions.phone.SetCallRating" + + def __init__(self, *, peer: "raw.base.InputPhoneCall", rating: int, comment: str, user_initiative: Optional[bool] = None) -> None: + self.peer = peer # InputPhoneCall + self.rating = rating # int + self.comment = comment # string + self.user_initiative = user_initiative # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetCallRating": + + flags = Int.read(b) + + user_initiative = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + rating = Int.read(b) + + comment = String.read(b) + + return SetCallRating(peer=peer, rating=rating, comment=comment, user_initiative=user_initiative) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.user_initiative else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.rating)) + + b.write(String(self.comment)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/start_scheduled_group_call.py b/pyrogram/raw/functions/phone/start_scheduled_group_call.py new file mode 100644 index 00000000..f2afdc36 --- /dev/null +++ b/pyrogram/raw/functions/phone/start_scheduled_group_call.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StartScheduledGroupCall(TLObject): # type: ignore + """Start a scheduled group call. + + + Details: + - Layer: ``224`` + - ID: ``5680E342`` + + Parameters: + call (:obj:`InputGroupCall `): + The scheduled group call + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call"] + + ID = 0x5680e342 + QUALNAME = "functions.phone.StartScheduledGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StartScheduledGroupCall": + # No flags + + call = TLObject.read(b) + + return StartScheduledGroupCall(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/toggle_group_call_record.py b/pyrogram/raw/functions/phone/toggle_group_call_record.py new file mode 100644 index 00000000..cc18e3e5 --- /dev/null +++ b/pyrogram/raw/functions/phone/toggle_group_call_record.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleGroupCallRecord(TLObject): # type: ignore + """Start or stop recording a group call: the recorded audio and video streams will be automatically sent to Saved messages (the chat with ourselves). + + + Details: + - Layer: ``224`` + - ID: ``F128C708`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call or livestream + + start (``bool``, *optional*): + Whether to start or stop recording + + video (``bool``, *optional*): + Whether to also record video streams + + title (``str``, *optional*): + Recording title + + video_portrait (``bool``, *optional*): + If video stream recording is enabled, whether to record in portrait or landscape mode + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "start", "video", "title", "video_portrait"] + + ID = 0xf128c708 + QUALNAME = "functions.phone.ToggleGroupCallRecord" + + def __init__(self, *, call: "raw.base.InputGroupCall", start: Optional[bool] = None, video: Optional[bool] = None, title: Optional[str] = None, video_portrait: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.start = start # flags.0?true + self.video = video # flags.2?true + self.title = title # flags.1?string + self.video_portrait = video_portrait # flags.2?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleGroupCallRecord": + + flags = Int.read(b) + + start = True if flags & (1 << 0) else False + video = True if flags & (1 << 2) else False + call = TLObject.read(b) + + title = String.read(b) if flags & (1 << 1) else None + video_portrait = Bool.read(b) if flags & (1 << 2) else None + return ToggleGroupCallRecord(call=call, start=start, video=video, title=title, video_portrait=video_portrait) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.start else 0 + flags |= (1 << 2) if self.video else 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 2) if self.video_portrait is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + if self.title is not None: + b.write(String(self.title)) + + if self.video_portrait is not None: + b.write(Bool(self.video_portrait)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/toggle_group_call_settings.py b/pyrogram/raw/functions/phone/toggle_group_call_settings.py new file mode 100644 index 00000000..0b904ad2 --- /dev/null +++ b/pyrogram/raw/functions/phone/toggle_group_call_settings.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleGroupCallSettings(TLObject): # type: ignore + """Change group call settings + + + Details: + - Layer: ``224`` + - ID: ``974392F2`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call + + reset_invite_hash (``bool``, *optional*): + Invalidate existing invite links + + join_muted (``bool``, *optional*): + Whether all users will that join this group call are muted by default upon joining the group call + + messages_enabled (``bool``, *optional*): + N/A + + send_paid_messages_stars (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "reset_invite_hash", "join_muted", "messages_enabled", "send_paid_messages_stars"] + + ID = 0x974392f2 + QUALNAME = "functions.phone.ToggleGroupCallSettings" + + def __init__(self, *, call: "raw.base.InputGroupCall", reset_invite_hash: Optional[bool] = None, join_muted: Optional[bool] = None, messages_enabled: Optional[bool] = None, send_paid_messages_stars: Optional[int] = None) -> None: + self.call = call # InputGroupCall + self.reset_invite_hash = reset_invite_hash # flags.1?true + self.join_muted = join_muted # flags.0?Bool + self.messages_enabled = messages_enabled # flags.2?Bool + self.send_paid_messages_stars = send_paid_messages_stars # flags.3?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleGroupCallSettings": + + flags = Int.read(b) + + reset_invite_hash = True if flags & (1 << 1) else False + call = TLObject.read(b) + + join_muted = Bool.read(b) if flags & (1 << 0) else None + messages_enabled = Bool.read(b) if flags & (1 << 2) else None + send_paid_messages_stars = Long.read(b) if flags & (1 << 3) else None + return ToggleGroupCallSettings(call=call, reset_invite_hash=reset_invite_hash, join_muted=join_muted, messages_enabled=messages_enabled, send_paid_messages_stars=send_paid_messages_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.reset_invite_hash else 0 + flags |= (1 << 0) if self.join_muted is not None else 0 + flags |= (1 << 2) if self.messages_enabled is not None else 0 + flags |= (1 << 3) if self.send_paid_messages_stars is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + if self.join_muted is not None: + b.write(Bool(self.join_muted)) + + if self.messages_enabled is not None: + b.write(Bool(self.messages_enabled)) + + if self.send_paid_messages_stars is not None: + b.write(Long(self.send_paid_messages_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/phone/toggle_group_call_start_subscription.py b/pyrogram/raw/functions/phone/toggle_group_call_start_subscription.py new file mode 100644 index 00000000..f4f765d8 --- /dev/null +++ b/pyrogram/raw/functions/phone/toggle_group_call_start_subscription.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleGroupCallStartSubscription(TLObject): # type: ignore + """Subscribe or unsubscribe to a scheduled group call + + + Details: + - Layer: ``224`` + - ID: ``219C34E6`` + + Parameters: + call (:obj:`InputGroupCall `): + Scheduled group call + + subscribed (``bool``): + Enable or disable subscription + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["call", "subscribed"] + + ID = 0x219c34e6 + QUALNAME = "functions.phone.ToggleGroupCallStartSubscription" + + def __init__(self, *, call: "raw.base.InputGroupCall", subscribed: bool) -> None: + self.call = call # InputGroupCall + self.subscribed = subscribed # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleGroupCallStartSubscription": + # No flags + + call = TLObject.read(b) + + subscribed = Bool.read(b) + + return ToggleGroupCallStartSubscription(call=call, subscribed=subscribed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Bool(self.subscribed)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/photos/__init__.py b/pyrogram/raw/functions/photos/__init__.py new file mode 100644 index 00000000..1c8f2831 --- /dev/null +++ b/pyrogram/raw/functions/photos/__init__.py @@ -0,0 +1,43 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .update_profile_photo import UpdateProfilePhoto +from .upload_profile_photo import UploadProfilePhoto +from .delete_photos import DeletePhotos +from .get_user_photos import GetUserPhotos +from .upload_contact_profile_photo import UploadContactProfilePhoto + + +__all__ = [ + "UpdateProfilePhoto", + "UploadProfilePhoto", + "DeletePhotos", + "GetUserPhotos", + "UploadContactProfilePhoto", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/photos/delete_photos.py b/pyrogram/raw/functions/photos/delete_photos.py new file mode 100644 index 00000000..88bc3ea2 --- /dev/null +++ b/pyrogram/raw/functions/photos/delete_photos.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeletePhotos(TLObject): # type: ignore + """Deletes profile photos. The method returns a list of successfully deleted photo IDs. + + + Details: + - Layer: ``224`` + - ID: ``87CF7F2F`` + + Parameters: + id (List of :obj:`InputPhoto `): + Input photos to delete + + Returns: + List of ``int`` ``64-bit`` + """ + + __slots__: List[str] = ["id"] + + ID = 0x87cf7f2f + QUALNAME = "functions.photos.DeletePhotos" + + def __init__(self, *, id: List["raw.base.InputPhoto"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeletePhotos": + # No flags + + id = TLObject.read(b) + + return DeletePhotos(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/photos/get_user_photos.py b/pyrogram/raw/functions/photos/get_user_photos.py new file mode 100644 index 00000000..6153980f --- /dev/null +++ b/pyrogram/raw/functions/photos/get_user_photos.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUserPhotos(TLObject): # type: ignore + """Returns the list of user photos. + + + Details: + - Layer: ``224`` + - ID: ``91CD32A8`` + + Parameters: + user_id (:obj:`InputUser `): + User ID + + offset (``int`` ``32-bit``): + Number of list elements to be skipped + + max_id (``int`` ``64-bit``): + If a positive value was transferred, the method will return only photos with IDs less than the set one. This parameter is often useful when refetching file references », as in conjuction with limit=1 and offset=-1 the photo object with the id specified in max_id can be fetched. + + limit (``int`` ``32-bit``): + Number of list elements to be returned + + Returns: + :obj:`photos.Photos ` + """ + + __slots__: List[str] = ["user_id", "offset", "max_id", "limit"] + + ID = 0x91cd32a8 + QUALNAME = "functions.photos.GetUserPhotos" + + def __init__(self, *, user_id: "raw.base.InputUser", offset: int, max_id: int, limit: int) -> None: + self.user_id = user_id # InputUser + self.offset = offset # int + self.max_id = max_id # long + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUserPhotos": + # No flags + + user_id = TLObject.read(b) + + offset = Int.read(b) + + max_id = Long.read(b) + + limit = Int.read(b) + + return GetUserPhotos(user_id=user_id, offset=offset, max_id=max_id, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(Int(self.offset)) + + b.write(Long(self.max_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/photos/update_profile_photo.py b/pyrogram/raw/functions/photos/update_profile_photo.py new file mode 100644 index 00000000..dc7bf087 --- /dev/null +++ b/pyrogram/raw/functions/photos/update_profile_photo.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateProfilePhoto(TLObject): # type: ignore + """Installs a previously uploaded photo as a profile photo. + + + Details: + - Layer: ``224`` + - ID: ``9E82039`` + + Parameters: + id (:obj:`InputPhoto `): + Input photo + + fallback (``bool``, *optional*): + If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings. + + bot (:obj:`InputUser `, *optional*): + Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. + + Returns: + :obj:`photos.Photo ` + """ + + __slots__: List[str] = ["id", "fallback", "bot"] + + ID = 0x9e82039 + QUALNAME = "functions.photos.UpdateProfilePhoto" + + def __init__(self, *, id: "raw.base.InputPhoto", fallback: Optional[bool] = None, bot: "raw.base.InputUser" = None) -> None: + self.id = id # InputPhoto + self.fallback = fallback # flags.0?true + self.bot = bot # flags.1?InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateProfilePhoto": + + flags = Int.read(b) + + fallback = True if flags & (1 << 0) else False + bot = TLObject.read(b) if flags & (1 << 1) else None + + id = TLObject.read(b) + + return UpdateProfilePhoto(id=id, fallback=fallback, bot=bot) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.fallback else 0 + flags |= (1 << 1) if self.bot is not None else 0 + b.write(Int(flags)) + + if self.bot is not None: + b.write(self.bot.write()) + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/photos/upload_contact_profile_photo.py b/pyrogram/raw/functions/photos/upload_contact_profile_photo.py new file mode 100644 index 00000000..354a3832 --- /dev/null +++ b/pyrogram/raw/functions/photos/upload_contact_profile_photo.py @@ -0,0 +1,108 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadContactProfilePhoto(TLObject): # type: ignore + """Upload a custom profile picture for a contact, or suggest a new profile picture to a contact. + + + Details: + - Layer: ``224`` + - ID: ``E14C4A71`` + + Parameters: + user_id (:obj:`InputUser `): + The contact + + suggest (``bool``, *optional*): + If set, will send a messageActionSuggestProfilePhoto service message to user_id, suggesting them to use the specified profile picture; otherwise, will set a personal profile picture for the user (only visible to the current user). + + save (``bool``, *optional*): + If set, removes a previously set personal profile picture (does not affect suggested profile pictures, to remove them simply deleted the messageActionSuggestProfilePhoto service message with messages.deleteMessages). + + file (:obj:`InputFile `, *optional*): + Profile photo + + video (:obj:`InputFile `, *optional*): + Animated profile picture video + + video_start_ts (``float`` ``64-bit``, *optional*): + Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set. + + video_emoji_markup (:obj:`VideoSize `, *optional*): + Animated sticker profile picture, must contain either a videoSizeEmojiMarkup or a videoSizeStickerMarkup constructor. + + Returns: + :obj:`photos.Photo ` + """ + + __slots__: List[str] = ["user_id", "suggest", "save", "file", "video", "video_start_ts", "video_emoji_markup"] + + ID = 0xe14c4a71 + QUALNAME = "functions.photos.UploadContactProfilePhoto" + + def __init__(self, *, user_id: "raw.base.InputUser", suggest: Optional[bool] = None, save: Optional[bool] = None, file: "raw.base.InputFile" = None, video: "raw.base.InputFile" = None, video_start_ts: Optional[float] = None, video_emoji_markup: "raw.base.VideoSize" = None) -> None: + self.user_id = user_id # InputUser + self.suggest = suggest # flags.3?true + self.save = save # flags.4?true + self.file = file # flags.0?InputFile + self.video = video # flags.1?InputFile + self.video_start_ts = video_start_ts # flags.2?double + self.video_emoji_markup = video_emoji_markup # flags.5?VideoSize + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadContactProfilePhoto": + + flags = Int.read(b) + + suggest = True if flags & (1 << 3) else False + save = True if flags & (1 << 4) else False + user_id = TLObject.read(b) + + file = TLObject.read(b) if flags & (1 << 0) else None + + video = TLObject.read(b) if flags & (1 << 1) else None + + video_start_ts = Double.read(b) if flags & (1 << 2) else None + video_emoji_markup = TLObject.read(b) if flags & (1 << 5) else None + + return UploadContactProfilePhoto(user_id=user_id, suggest=suggest, save=save, file=file, video=video, video_start_ts=video_start_ts, video_emoji_markup=video_emoji_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.suggest else 0 + flags |= (1 << 4) if self.save else 0 + flags |= (1 << 0) if self.file is not None else 0 + flags |= (1 << 1) if self.video is not None else 0 + flags |= (1 << 2) if self.video_start_ts is not None else 0 + flags |= (1 << 5) if self.video_emoji_markup is not None else 0 + b.write(Int(flags)) + + b.write(self.user_id.write()) + + if self.file is not None: + b.write(self.file.write()) + + if self.video is not None: + b.write(self.video.write()) + + if self.video_start_ts is not None: + b.write(Double(self.video_start_ts)) + + if self.video_emoji_markup is not None: + b.write(self.video_emoji_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/photos/upload_profile_photo.py b/pyrogram/raw/functions/photos/upload_profile_photo.py new file mode 100644 index 00000000..65704f27 --- /dev/null +++ b/pyrogram/raw/functions/photos/upload_profile_photo.py @@ -0,0 +1,104 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UploadProfilePhoto(TLObject): # type: ignore + """Updates current user profile photo. + + + Details: + - Layer: ``224`` + - ID: ``388A3B5`` + + Parameters: + fallback (``bool``, *optional*): + If set, the chosen profile photo will be shown to users that can't display your main profile photo due to your privacy settings. + + bot (:obj:`InputUser `, *optional*): + Can contain info of a bot we own, to change the profile photo of that bot, instead of the current user. + + file (:obj:`InputFile `, *optional*): + Profile photo + + video (:obj:`InputFile `, *optional*): + Animated profile picture video + + video_start_ts (``float`` ``64-bit``, *optional*): + Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set. + + video_emoji_markup (:obj:`VideoSize `, *optional*): + Animated sticker profile picture, must contain either a videoSizeEmojiMarkup or a videoSizeStickerMarkup constructor. + + Returns: + :obj:`photos.Photo ` + """ + + __slots__: List[str] = ["fallback", "bot", "file", "video", "video_start_ts", "video_emoji_markup"] + + ID = 0x388a3b5 + QUALNAME = "functions.photos.UploadProfilePhoto" + + def __init__(self, *, fallback: Optional[bool] = None, bot: "raw.base.InputUser" = None, file: "raw.base.InputFile" = None, video: "raw.base.InputFile" = None, video_start_ts: Optional[float] = None, video_emoji_markup: "raw.base.VideoSize" = None) -> None: + self.fallback = fallback # flags.3?true + self.bot = bot # flags.5?InputUser + self.file = file # flags.0?InputFile + self.video = video # flags.1?InputFile + self.video_start_ts = video_start_ts # flags.2?double + self.video_emoji_markup = video_emoji_markup # flags.4?VideoSize + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UploadProfilePhoto": + + flags = Int.read(b) + + fallback = True if flags & (1 << 3) else False + bot = TLObject.read(b) if flags & (1 << 5) else None + + file = TLObject.read(b) if flags & (1 << 0) else None + + video = TLObject.read(b) if flags & (1 << 1) else None + + video_start_ts = Double.read(b) if flags & (1 << 2) else None + video_emoji_markup = TLObject.read(b) if flags & (1 << 4) else None + + return UploadProfilePhoto(fallback=fallback, bot=bot, file=file, video=video, video_start_ts=video_start_ts, video_emoji_markup=video_emoji_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.fallback else 0 + flags |= (1 << 5) if self.bot is not None else 0 + flags |= (1 << 0) if self.file is not None else 0 + flags |= (1 << 1) if self.video is not None else 0 + flags |= (1 << 2) if self.video_start_ts is not None else 0 + flags |= (1 << 4) if self.video_emoji_markup is not None else 0 + b.write(Int(flags)) + + if self.bot is not None: + b.write(self.bot.write()) + + if self.file is not None: + b.write(self.file.write()) + + if self.video is not None: + b.write(self.video.write()) + + if self.video_start_ts is not None: + b.write(Double(self.video_start_ts)) + + if self.video_emoji_markup is not None: + b.write(self.video_emoji_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/ping.py b/pyrogram/raw/functions/ping.py new file mode 100644 index 00000000..0015cb7d --- /dev/null +++ b/pyrogram/raw/functions/ping.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Ping(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``7ABE77EC`` + + Parameters: + ping_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`Pong ` + """ + + __slots__: List[str] = ["ping_id"] + + ID = 0x7abe77ec + QUALNAME = "functions.Ping" + + def __init__(self, *, ping_id: int) -> None: + self.ping_id = ping_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Ping": + # No flags + + ping_id = Long.read(b) + + return Ping(ping_id=ping_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.ping_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/ping_delay_disconnect.py b/pyrogram/raw/functions/ping_delay_disconnect.py new file mode 100644 index 00000000..39fa6d9c --- /dev/null +++ b/pyrogram/raw/functions/ping_delay_disconnect.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PingDelayDisconnect(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``F3427B8C`` + + Parameters: + ping_id (``int`` ``64-bit``): + N/A + + disconnect_delay (``int`` ``32-bit``): + N/A + + Returns: + :obj:`Pong ` + """ + + __slots__: List[str] = ["ping_id", "disconnect_delay"] + + ID = 0xf3427b8c + QUALNAME = "functions.PingDelayDisconnect" + + def __init__(self, *, ping_id: int, disconnect_delay: int) -> None: + self.ping_id = ping_id # long + self.disconnect_delay = disconnect_delay # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PingDelayDisconnect": + # No flags + + ping_id = Long.read(b) + + disconnect_delay = Int.read(b) + + return PingDelayDisconnect(ping_id=ping_id, disconnect_delay=disconnect_delay) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.ping_id)) + + b.write(Int(self.disconnect_delay)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/premium/__init__.py b/pyrogram/raw/functions/premium/__init__.py new file mode 100644 index 00000000..51ec1813 --- /dev/null +++ b/pyrogram/raw/functions/premium/__init__.py @@ -0,0 +1,43 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_boosts_list import GetBoostsList +from .get_my_boosts import GetMyBoosts +from .apply_boost import ApplyBoost +from .get_boosts_status import GetBoostsStatus +from .get_user_boosts import GetUserBoosts + + +__all__ = [ + "GetBoostsList", + "GetMyBoosts", + "ApplyBoost", + "GetBoostsStatus", + "GetUserBoosts", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/premium/apply_boost.py b/pyrogram/raw/functions/premium/apply_boost.py new file mode 100644 index 00000000..dbbbf3cb --- /dev/null +++ b/pyrogram/raw/functions/premium/apply_boost.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ApplyBoost(TLObject): # type: ignore + """Apply one or more boosts » to a peer. + + + Details: + - Layer: ``224`` + - ID: ``6B7DA746`` + + Parameters: + peer (:obj:`InputPeer `): + The peer to boost. + + slots (List of ``int`` ``32-bit``, *optional*): + Which boost slots to assign to this peer. + + Returns: + :obj:`premium.MyBoosts ` + """ + + __slots__: List[str] = ["peer", "slots"] + + ID = 0x6b7da746 + QUALNAME = "functions.premium.ApplyBoost" + + def __init__(self, *, peer: "raw.base.InputPeer", slots: Optional[List[int]] = None) -> None: + self.peer = peer # InputPeer + self.slots = slots # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ApplyBoost": + + flags = Int.read(b) + + slots = TLObject.read(b, Int) if flags & (1 << 0) else [] + + peer = TLObject.read(b) + + return ApplyBoost(peer=peer, slots=slots) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.slots else 0 + b.write(Int(flags)) + + if self.slots is not None: + b.write(Vector(self.slots, Int)) + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/premium/get_boosts_list.py b/pyrogram/raw/functions/premium/get_boosts_list.py new file mode 100644 index 00000000..65a6150a --- /dev/null +++ b/pyrogram/raw/functions/premium/get_boosts_list.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBoostsList(TLObject): # type: ignore + """Obtains info about the boosts that were applied to a certain channel (admins only) + + + Details: + - Layer: ``224`` + - ID: ``60F67660`` + + Parameters: + peer (:obj:`InputPeer `): + The channel + + offset (``str``): + Offset for pagination, obtained from premium.boostsList.next_offset + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + gifts (``bool``, *optional*): + Whether to return only info about boosts received from gift codes and giveaways created by the channel » + + Returns: + :obj:`premium.BoostsList ` + """ + + __slots__: List[str] = ["peer", "offset", "limit", "gifts"] + + ID = 0x60f67660 + QUALNAME = "functions.premium.GetBoostsList" + + def __init__(self, *, peer: "raw.base.InputPeer", offset: str, limit: int, gifts: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.offset = offset # string + self.limit = limit # int + self.gifts = gifts # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBoostsList": + + flags = Int.read(b) + + gifts = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetBoostsList(peer=peer, offset=offset, limit=limit, gifts=gifts) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.gifts else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/premium/get_boosts_status.py b/pyrogram/raw/functions/premium/get_boosts_status.py new file mode 100644 index 00000000..2fe54696 --- /dev/null +++ b/pyrogram/raw/functions/premium/get_boosts_status.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBoostsStatus(TLObject): # type: ignore + """Gets the current number of boosts of a channel. + + + Details: + - Layer: ``224`` + - ID: ``42F1F61`` + + Parameters: + peer (:obj:`InputPeer `): + The peer. + + Returns: + :obj:`premium.BoostsStatus ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x42f1f61 + QUALNAME = "functions.premium.GetBoostsStatus" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBoostsStatus": + # No flags + + peer = TLObject.read(b) + + return GetBoostsStatus(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/premium/get_my_boosts.py b/pyrogram/raw/functions/premium/get_my_boosts.py new file mode 100644 index 00000000..8b9bf1b4 --- /dev/null +++ b/pyrogram/raw/functions/premium/get_my_boosts.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMyBoosts(TLObject): # type: ignore + """Obtain which peers are we currently boosting, and how many boost slots we have left. + + + Details: + - Layer: ``224`` + - ID: ``BE77B4A`` + + Parameters: + No parameters required. + + Returns: + :obj:`premium.MyBoosts ` + """ + + __slots__: List[str] = [] + + ID = 0xbe77b4a + QUALNAME = "functions.premium.GetMyBoosts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMyBoosts": + # No flags + + return GetMyBoosts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/premium/get_user_boosts.py b/pyrogram/raw/functions/premium/get_user_boosts.py new file mode 100644 index 00000000..4e3ac54f --- /dev/null +++ b/pyrogram/raw/functions/premium/get_user_boosts.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUserBoosts(TLObject): # type: ignore + """Returns the lists of boost that were applied to a channel by a specific user (admins only) + + + Details: + - Layer: ``224`` + - ID: ``39854D1F`` + + Parameters: + peer (:obj:`InputPeer `): + The channel + + user_id (:obj:`InputUser `): + The user + + Returns: + :obj:`premium.BoostsList ` + """ + + __slots__: List[str] = ["peer", "user_id"] + + ID = 0x39854d1f + QUALNAME = "functions.premium.GetUserBoosts" + + def __init__(self, *, peer: "raw.base.InputPeer", user_id: "raw.base.InputUser") -> None: + self.peer = peer # InputPeer + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUserBoosts": + # No flags + + peer = TLObject.read(b) + + user_id = TLObject.read(b) + + return GetUserBoosts(peer=peer, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/req_dh_params.py b/pyrogram/raw/functions/req_dh_params.py new file mode 100644 index 00000000..73a82fd1 --- /dev/null +++ b/pyrogram/raw/functions/req_dh_params.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReqDHParams(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D712E4BE`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + server_nonce (``int`` ``128-bit``): + N/A + + p (``bytes``): + N/A + + q (``bytes``): + N/A + + public_key_fingerprint (``int`` ``64-bit``): + N/A + + encrypted_data (``bytes``): + N/A + + Returns: + :obj:`ServerDHParams ` + """ + + __slots__: List[str] = ["nonce", "server_nonce", "p", "q", "public_key_fingerprint", "encrypted_data"] + + ID = 0xd712e4be + QUALNAME = "functions.ReqDHParams" + + def __init__(self, *, nonce: int, server_nonce: int, p: bytes, q: bytes, public_key_fingerprint: int, encrypted_data: bytes) -> None: + self.nonce = nonce # int128 + self.server_nonce = server_nonce # int128 + self.p = p # bytes + self.q = q # bytes + self.public_key_fingerprint = public_key_fingerprint # long + self.encrypted_data = encrypted_data # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReqDHParams": + # No flags + + nonce = Int128.read(b) + + server_nonce = Int128.read(b) + + p = Bytes.read(b) + + q = Bytes.read(b) + + public_key_fingerprint = Long.read(b) + + encrypted_data = Bytes.read(b) + + return ReqDHParams(nonce=nonce, server_nonce=server_nonce, p=p, q=q, public_key_fingerprint=public_key_fingerprint, encrypted_data=encrypted_data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + b.write(Int128(self.server_nonce)) + + b.write(Bytes(self.p)) + + b.write(Bytes(self.q)) + + b.write(Long(self.public_key_fingerprint)) + + b.write(Bytes(self.encrypted_data)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/req_pq.py b/pyrogram/raw/functions/req_pq.py new file mode 100644 index 00000000..dc017604 --- /dev/null +++ b/pyrogram/raw/functions/req_pq.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReqPq(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``60469778`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + Returns: + :obj:`ResPQ ` + """ + + __slots__: List[str] = ["nonce"] + + ID = 0x60469778 + QUALNAME = "functions.ReqPq" + + def __init__(self, *, nonce: int) -> None: + self.nonce = nonce # int128 + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReqPq": + # No flags + + nonce = Int128.read(b) + + return ReqPq(nonce=nonce) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/req_pq_multi.py b/pyrogram/raw/functions/req_pq_multi.py new file mode 100644 index 00000000..4e42cc35 --- /dev/null +++ b/pyrogram/raw/functions/req_pq_multi.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReqPqMulti(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``BE7E8EF1`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + Returns: + :obj:`ResPQ ` + """ + + __slots__: List[str] = ["nonce"] + + ID = 0xbe7e8ef1 + QUALNAME = "functions.ReqPqMulti" + + def __init__(self, *, nonce: int) -> None: + self.nonce = nonce # int128 + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReqPqMulti": + # No flags + + nonce = Int128.read(b) + + return ReqPqMulti(nonce=nonce) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/rpc_drop_answer.py b/pyrogram/raw/functions/rpc_drop_answer.py new file mode 100644 index 00000000..32fa6c39 --- /dev/null +++ b/pyrogram/raw/functions/rpc_drop_answer.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RpcDropAnswer(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``58E4A740`` + + Parameters: + req_msg_id (``int`` ``64-bit``): + N/A + + Returns: + :obj:`RpcDropAnswer ` + """ + + __slots__: List[str] = ["req_msg_id"] + + ID = 0x58e4a740 + QUALNAME = "functions.RpcDropAnswer" + + def __init__(self, *, req_msg_id: int) -> None: + self.req_msg_id = req_msg_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RpcDropAnswer": + # No flags + + req_msg_id = Long.read(b) + + return RpcDropAnswer(req_msg_id=req_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.req_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/set_client_dh_params.py b/pyrogram/raw/functions/set_client_dh_params.py new file mode 100644 index 00000000..cae29b34 --- /dev/null +++ b/pyrogram/raw/functions/set_client_dh_params.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetClientDHParams(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``F5045F1F`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + server_nonce (``int`` ``128-bit``): + N/A + + encrypted_data (``bytes``): + N/A + + Returns: + :obj:`SetClientDHParamsAnswer ` + """ + + __slots__: List[str] = ["nonce", "server_nonce", "encrypted_data"] + + ID = 0xf5045f1f + QUALNAME = "functions.SetClientDHParams" + + def __init__(self, *, nonce: int, server_nonce: int, encrypted_data: bytes) -> None: + self.nonce = nonce # int128 + self.server_nonce = server_nonce # int128 + self.encrypted_data = encrypted_data # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetClientDHParams": + # No flags + + nonce = Int128.read(b) + + server_nonce = Int128.read(b) + + encrypted_data = Bytes.read(b) + + return SetClientDHParams(nonce=nonce, server_nonce=server_nonce, encrypted_data=encrypted_data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + b.write(Int128(self.server_nonce)) + + b.write(Bytes(self.encrypted_data)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/__init__.py b/pyrogram/raw/functions/smsjobs/__init__.py new file mode 100644 index 00000000..f1ee70cd --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/__init__.py @@ -0,0 +1,47 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .is_eligible_to_join import IsEligibleToJoin +from .join import Join +from .leave import Leave +from .update_settings import UpdateSettings +from .get_status import GetStatus +from .get_sms_job import GetSmsJob +from .finish_job import FinishJob + + +__all__ = [ + "IsEligibleToJoin", + "Join", + "Leave", + "UpdateSettings", + "GetStatus", + "GetSmsJob", + "FinishJob", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/smsjobs/finish_job.py b/pyrogram/raw/functions/smsjobs/finish_job.py new file mode 100644 index 00000000..e0fc709e --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/finish_job.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FinishJob(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``4F1EBF24`` + + Parameters: + job_id (``str``): + + + error (``str``, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["job_id", "error"] + + ID = 0x4f1ebf24 + QUALNAME = "functions.smsjobs.FinishJob" + + def __init__(self, *, job_id: str, error: Optional[str] = None) -> None: + self.job_id = job_id # string + self.error = error # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FinishJob": + + flags = Int.read(b) + + job_id = String.read(b) + + error = String.read(b) if flags & (1 << 0) else None + return FinishJob(job_id=job_id, error=error) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.error is not None else 0 + b.write(Int(flags)) + + b.write(String(self.job_id)) + + if self.error is not None: + b.write(String(self.error)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/get_sms_job.py b/pyrogram/raw/functions/smsjobs/get_sms_job.py new file mode 100644 index 00000000..edce6adb --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/get_sms_job.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSmsJob(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``778D902F`` + + Parameters: + job_id (``str``): + + + Returns: + :obj:`SmsJob ` + """ + + __slots__: List[str] = ["job_id"] + + ID = 0x778d902f + QUALNAME = "functions.smsjobs.GetSmsJob" + + def __init__(self, *, job_id: str) -> None: + self.job_id = job_id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSmsJob": + # No flags + + job_id = String.read(b) + + return GetSmsJob(job_id=job_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.job_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/get_status.py b/pyrogram/raw/functions/smsjobs/get_status.py new file mode 100644 index 00000000..003516a9 --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/get_status.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStatus(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``10A698E8`` + + Parameters: + No parameters required. + + Returns: + :obj:`smsjobs.Status ` + """ + + __slots__: List[str] = [] + + ID = 0x10a698e8 + QUALNAME = "functions.smsjobs.GetStatus" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStatus": + # No flags + + return GetStatus() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/is_eligible_to_join.py b/pyrogram/raw/functions/smsjobs/is_eligible_to_join.py new file mode 100644 index 00000000..77f915a4 --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/is_eligible_to_join.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class IsEligibleToJoin(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``EDC39D0`` + + Parameters: + No parameters required. + + Returns: + :obj:`smsjobs.EligibilityToJoin ` + """ + + __slots__: List[str] = [] + + ID = 0xedc39d0 + QUALNAME = "functions.smsjobs.IsEligibleToJoin" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "IsEligibleToJoin": + # No flags + + return IsEligibleToJoin() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/join.py b/pyrogram/raw/functions/smsjobs/join.py new file mode 100644 index 00000000..079c7f67 --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/join.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Join(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``A74ECE2D`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0xa74ece2d + QUALNAME = "functions.smsjobs.Join" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Join": + # No flags + + return Join() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/leave.py b/pyrogram/raw/functions/smsjobs/leave.py new file mode 100644 index 00000000..7cb3d09e --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/leave.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Leave(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``9898AD73`` + + Parameters: + No parameters required. + + Returns: + ``bool`` + """ + + __slots__: List[str] = [] + + ID = 0x9898ad73 + QUALNAME = "functions.smsjobs.Leave" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Leave": + # No flags + + return Leave() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/smsjobs/update_settings.py b/pyrogram/raw/functions/smsjobs/update_settings.py new file mode 100644 index 00000000..dda4af53 --- /dev/null +++ b/pyrogram/raw/functions/smsjobs/update_settings.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateSettings(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``93FA0BF`` + + Parameters: + allow_international (``bool``, *optional*): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["allow_international"] + + ID = 0x93fa0bf + QUALNAME = "functions.smsjobs.UpdateSettings" + + def __init__(self, *, allow_international: Optional[bool] = None) -> None: + self.allow_international = allow_international # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateSettings": + + flags = Int.read(b) + + allow_international = True if flags & (1 << 0) else False + return UpdateSettings(allow_international=allow_international) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.allow_international else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/__init__.py b/pyrogram/raw/functions/stats/__init__.py new file mode 100644 index 00000000..5682fd6e --- /dev/null +++ b/pyrogram/raw/functions/stats/__init__.py @@ -0,0 +1,47 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_broadcast_stats import GetBroadcastStats +from .load_async_graph import LoadAsyncGraph +from .get_megagroup_stats import GetMegagroupStats +from .get_message_public_forwards import GetMessagePublicForwards +from .get_message_stats import GetMessageStats +from .get_story_stats import GetStoryStats +from .get_story_public_forwards import GetStoryPublicForwards + + +__all__ = [ + "GetBroadcastStats", + "LoadAsyncGraph", + "GetMegagroupStats", + "GetMessagePublicForwards", + "GetMessageStats", + "GetStoryStats", + "GetStoryPublicForwards", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/stats/get_broadcast_stats.py b/pyrogram/raw/functions/stats/get_broadcast_stats.py new file mode 100644 index 00000000..0ee8c521 --- /dev/null +++ b/pyrogram/raw/functions/stats/get_broadcast_stats.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetBroadcastStats(TLObject): # type: ignore + """Get channel statistics + + + Details: + - Layer: ``224`` + - ID: ``AB42441A`` + + Parameters: + channel (:obj:`InputChannel `): + The channel + + dark (``bool``, *optional*): + Whether to enable dark theme for graph colors + + Returns: + :obj:`stats.BroadcastStats ` + """ + + __slots__: List[str] = ["channel", "dark"] + + ID = 0xab42441a + QUALNAME = "functions.stats.GetBroadcastStats" + + def __init__(self, *, channel: "raw.base.InputChannel", dark: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.dark = dark # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetBroadcastStats": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + channel = TLObject.read(b) + + return GetBroadcastStats(channel=channel, dark=dark) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/get_megagroup_stats.py b/pyrogram/raw/functions/stats/get_megagroup_stats.py new file mode 100644 index 00000000..dbfe1f30 --- /dev/null +++ b/pyrogram/raw/functions/stats/get_megagroup_stats.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMegagroupStats(TLObject): # type: ignore + """Get supergroup statistics + + + Details: + - Layer: ``224`` + - ID: ``DCDF8607`` + + Parameters: + channel (:obj:`InputChannel `): + Supergroup ID + + dark (``bool``, *optional*): + Whether to enable dark theme for graph colors + + Returns: + :obj:`stats.MegagroupStats ` + """ + + __slots__: List[str] = ["channel", "dark"] + + ID = 0xdcdf8607 + QUALNAME = "functions.stats.GetMegagroupStats" + + def __init__(self, *, channel: "raw.base.InputChannel", dark: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.dark = dark # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMegagroupStats": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + channel = TLObject.read(b) + + return GetMegagroupStats(channel=channel, dark=dark) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/get_message_public_forwards.py b/pyrogram/raw/functions/stats/get_message_public_forwards.py new file mode 100644 index 00000000..544da669 --- /dev/null +++ b/pyrogram/raw/functions/stats/get_message_public_forwards.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessagePublicForwards(TLObject): # type: ignore + """Obtains a list of messages, indicating to which other public channels was a channel message forwarded. +Will return a list of messages with peer_id equal to the public channel to which this message was forwarded. + + + Details: + - Layer: ``224`` + - ID: ``5F150144`` + + Parameters: + channel (:obj:`InputChannel `): + Source channel + + msg_id (``int`` ``32-bit``): + Source message ID + + offset (``str``): + Offset for pagination, empty string on first call, then use the next_offset field of the returned constructor (if present, otherwise no more results are available). + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`stats.PublicForwards ` + """ + + __slots__: List[str] = ["channel", "msg_id", "offset", "limit"] + + ID = 0x5f150144 + QUALNAME = "functions.stats.GetMessagePublicForwards" + + def __init__(self, *, channel: "raw.base.InputChannel", msg_id: int, offset: str, limit: int) -> None: + self.channel = channel # InputChannel + self.msg_id = msg_id # int + self.offset = offset # string + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessagePublicForwards": + # No flags + + channel = TLObject.read(b) + + msg_id = Int.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetMessagePublicForwards(channel=channel, msg_id=msg_id, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + b.write(Int(self.msg_id)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/get_message_stats.py b/pyrogram/raw/functions/stats/get_message_stats.py new file mode 100644 index 00000000..1f264053 --- /dev/null +++ b/pyrogram/raw/functions/stats/get_message_stats.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetMessageStats(TLObject): # type: ignore + """Get message statistics + + + Details: + - Layer: ``224`` + - ID: ``B6E0A3F5`` + + Parameters: + channel (:obj:`InputChannel `): + Channel ID + + msg_id (``int`` ``32-bit``): + Message ID + + dark (``bool``, *optional*): + Whether to enable dark theme for graph colors + + Returns: + :obj:`stats.MessageStats ` + """ + + __slots__: List[str] = ["channel", "msg_id", "dark"] + + ID = 0xb6e0a3f5 + QUALNAME = "functions.stats.GetMessageStats" + + def __init__(self, *, channel: "raw.base.InputChannel", msg_id: int, dark: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.msg_id = msg_id # int + self.dark = dark # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetMessageStats": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + channel = TLObject.read(b) + + msg_id = Int.read(b) + + return GetMessageStats(channel=channel, msg_id=msg_id, dark=dark) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/get_story_public_forwards.py b/pyrogram/raw/functions/stats/get_story_public_forwards.py new file mode 100644 index 00000000..d236010a --- /dev/null +++ b/pyrogram/raw/functions/stats/get_story_public_forwards.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoryPublicForwards(TLObject): # type: ignore + """Obtain forwards of a story as a message to public chats and reposts by public channels. + + + Details: + - Layer: ``224`` + - ID: ``A6437EF6`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the story was originally posted + + id (``int`` ``32-bit``): + Story ID + + offset (``str``): + Offset for pagination, from stats.PublicForwards.next_offset. + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`stats.PublicForwards ` + """ + + __slots__: List[str] = ["peer", "id", "offset", "limit"] + + ID = 0xa6437ef6 + QUALNAME = "functions.stats.GetStoryPublicForwards" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, offset: str, limit: int) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.offset = offset # string + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoryPublicForwards": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetStoryPublicForwards(peer=peer, id=id, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/get_story_stats.py b/pyrogram/raw/functions/stats/get_story_stats.py new file mode 100644 index 00000000..ecb5df47 --- /dev/null +++ b/pyrogram/raw/functions/stats/get_story_stats.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoryStats(TLObject): # type: ignore + """Get statistics for a certain story. + + + Details: + - Layer: ``224`` + - ID: ``374FEF40`` + + Parameters: + peer (:obj:`InputPeer `): + The peer that posted the story + + id (``int`` ``32-bit``): + Story ID + + dark (``bool``, *optional*): + Whether to enable the dark theme for graph colors + + Returns: + :obj:`stats.StoryStats ` + """ + + __slots__: List[str] = ["peer", "id", "dark"] + + ID = 0x374fef40 + QUALNAME = "functions.stats.GetStoryStats" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, dark: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.dark = dark # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoryStats": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + id = Int.read(b) + + return GetStoryStats(peer=peer, id=id, dark=dark) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stats/load_async_graph.py b/pyrogram/raw/functions/stats/load_async_graph.py new file mode 100644 index 00000000..70c26b32 --- /dev/null +++ b/pyrogram/raw/functions/stats/load_async_graph.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LoadAsyncGraph(TLObject): # type: ignore + """Load channel statistics graph asynchronously + + + Details: + - Layer: ``224`` + - ID: ``621D5FA0`` + + Parameters: + token (``str``): + Graph token from statsGraphAsync constructor + + x (``int`` ``64-bit``, *optional*): + Zoom value, if required + + Returns: + :obj:`StatsGraph ` + """ + + __slots__: List[str] = ["token", "x"] + + ID = 0x621d5fa0 + QUALNAME = "functions.stats.LoadAsyncGraph" + + def __init__(self, *, token: str, x: Optional[int] = None) -> None: + self.token = token # string + self.x = x # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LoadAsyncGraph": + + flags = Int.read(b) + + token = String.read(b) + + x = Long.read(b) if flags & (1 << 0) else None + return LoadAsyncGraph(token=token, x=x) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.x is not None else 0 + b.write(Int(flags)) + + b.write(String(self.token)) + + if self.x is not None: + b.write(Long(self.x)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/__init__.py b/pyrogram/raw/functions/stickers/__init__.py new file mode 100644 index 00000000..88cb6923 --- /dev/null +++ b/pyrogram/raw/functions/stickers/__init__.py @@ -0,0 +1,55 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .create_sticker_set import CreateStickerSet +from .remove_sticker_from_set import RemoveStickerFromSet +from .change_sticker_position import ChangeStickerPosition +from .add_sticker_to_set import AddStickerToSet +from .set_sticker_set_thumb import SetStickerSetThumb +from .check_short_name import CheckShortName +from .suggest_short_name import SuggestShortName +from .change_sticker import ChangeSticker +from .rename_sticker_set import RenameStickerSet +from .delete_sticker_set import DeleteStickerSet +from .replace_sticker import ReplaceSticker + + +__all__ = [ + "CreateStickerSet", + "RemoveStickerFromSet", + "ChangeStickerPosition", + "AddStickerToSet", + "SetStickerSetThumb", + "CheckShortName", + "SuggestShortName", + "ChangeSticker", + "RenameStickerSet", + "DeleteStickerSet", + "ReplaceSticker", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/stickers/add_sticker_to_set.py b/pyrogram/raw/functions/stickers/add_sticker_to_set.py new file mode 100644 index 00000000..a96dc90b --- /dev/null +++ b/pyrogram/raw/functions/stickers/add_sticker_to_set.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AddStickerToSet(TLObject): # type: ignore + """Add a sticker to a stickerset, bots only. The sticker set must have been created by the bot. + + + Details: + - Layer: ``224`` + - ID: ``8653FEBE`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + The stickerset + + sticker (:obj:`InputStickerSetItem `): + The sticker + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["stickerset", "sticker"] + + ID = 0x8653febe + QUALNAME = "functions.stickers.AddStickerToSet" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet", sticker: "raw.base.InputStickerSetItem") -> None: + self.stickerset = stickerset # InputStickerSet + self.sticker = sticker # InputStickerSetItem + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AddStickerToSet": + # No flags + + stickerset = TLObject.read(b) + + sticker = TLObject.read(b) + + return AddStickerToSet(stickerset=stickerset, sticker=sticker) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + b.write(self.sticker.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/change_sticker.py b/pyrogram/raw/functions/stickers/change_sticker.py new file mode 100644 index 00000000..4c92d79b --- /dev/null +++ b/pyrogram/raw/functions/stickers/change_sticker.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChangeSticker(TLObject): # type: ignore + """Update the keywords, emojis or mask coordinates of a sticker, bots only. + + + Details: + - Layer: ``224`` + - ID: ``F5537EBC`` + + Parameters: + sticker (:obj:`InputDocument `): + The sticker + + emoji (``str``, *optional*): + If set, updates the emoji list associated to the sticker + + mask_coords (:obj:`MaskCoords `, *optional*): + If set, updates the mask coordinates + + keywords (``str``, *optional*): + If set, updates the sticker keywords (separated by commas). Can't be provided for mask stickers. + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["sticker", "emoji", "mask_coords", "keywords"] + + ID = 0xf5537ebc + QUALNAME = "functions.stickers.ChangeSticker" + + def __init__(self, *, sticker: "raw.base.InputDocument", emoji: Optional[str] = None, mask_coords: "raw.base.MaskCoords" = None, keywords: Optional[str] = None) -> None: + self.sticker = sticker # InputDocument + self.emoji = emoji # flags.0?string + self.mask_coords = mask_coords # flags.1?MaskCoords + self.keywords = keywords # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChangeSticker": + + flags = Int.read(b) + + sticker = TLObject.read(b) + + emoji = String.read(b) if flags & (1 << 0) else None + mask_coords = TLObject.read(b) if flags & (1 << 1) else None + + keywords = String.read(b) if flags & (1 << 2) else None + return ChangeSticker(sticker=sticker, emoji=emoji, mask_coords=mask_coords, keywords=keywords) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.emoji is not None else 0 + flags |= (1 << 1) if self.mask_coords is not None else 0 + flags |= (1 << 2) if self.keywords is not None else 0 + b.write(Int(flags)) + + b.write(self.sticker.write()) + + if self.emoji is not None: + b.write(String(self.emoji)) + + if self.mask_coords is not None: + b.write(self.mask_coords.write()) + + if self.keywords is not None: + b.write(String(self.keywords)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/change_sticker_position.py b/pyrogram/raw/functions/stickers/change_sticker_position.py new file mode 100644 index 00000000..1c3fa78f --- /dev/null +++ b/pyrogram/raw/functions/stickers/change_sticker_position.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChangeStickerPosition(TLObject): # type: ignore + """Changes the absolute position of a sticker in the set to which it belongs; for bots only. The sticker set must have been created by the bot + + + Details: + - Layer: ``224`` + - ID: ``FFB6D4CA`` + + Parameters: + sticker (:obj:`InputDocument `): + The sticker + + position (``int`` ``32-bit``): + The new position of the sticker, zero-based + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["sticker", "position"] + + ID = 0xffb6d4ca + QUALNAME = "functions.stickers.ChangeStickerPosition" + + def __init__(self, *, sticker: "raw.base.InputDocument", position: int) -> None: + self.sticker = sticker # InputDocument + self.position = position # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChangeStickerPosition": + # No flags + + sticker = TLObject.read(b) + + position = Int.read(b) + + return ChangeStickerPosition(sticker=sticker, position=position) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.sticker.write()) + + b.write(Int(self.position)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/check_short_name.py b/pyrogram/raw/functions/stickers/check_short_name.py new file mode 100644 index 00000000..e0a2efba --- /dev/null +++ b/pyrogram/raw/functions/stickers/check_short_name.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckShortName(TLObject): # type: ignore + """Check whether the given short name is available + + + Details: + - Layer: ``224`` + - ID: ``284B3639`` + + Parameters: + short_name (``str``): + Short name + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["short_name"] + + ID = 0x284b3639 + QUALNAME = "functions.stickers.CheckShortName" + + def __init__(self, *, short_name: str) -> None: + self.short_name = short_name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckShortName": + # No flags + + short_name = String.read(b) + + return CheckShortName(short_name=short_name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.short_name)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/create_sticker_set.py b/pyrogram/raw/functions/stickers/create_sticker_set.py new file mode 100644 index 00000000..cb217635 --- /dev/null +++ b/pyrogram/raw/functions/stickers/create_sticker_set.py @@ -0,0 +1,118 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateStickerSet(TLObject): # type: ignore + """Create a stickerset, bots only. + + + Details: + - Layer: ``224`` + - ID: ``9021AB67`` + + Parameters: + user_id (:obj:`InputUser `): + Stickerset owner + + title (``str``): + Stickerset name, 1-64 chars + + short_name (``str``): + Short name of sticker set, to be used in sticker deep links ». Can contain only english letters, digits and underscores. Must begin with a letter, can't contain consecutive underscores and, if called by a bot, must end in "_by_". is case insensitive. 1-64 characters. + + stickers (List of :obj:`InputStickerSetItem `): + Stickers + + masks (``bool``, *optional*): + Whether this is a mask stickerset + + emojis (``bool``, *optional*): + Whether this is a custom emoji stickerset. + + text_color (``bool``, *optional*): + Whether the color of TGS custom emojis contained in this set should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. For custom emoji stickersets only. + + thumb (:obj:`InputDocument `, *optional*): + Thumbnail + + software (``str``, *optional*): + Used when importing stickers using the sticker import SDKs, specifies the name of the software that created the stickers + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["user_id", "title", "short_name", "stickers", "masks", "emojis", "text_color", "thumb", "software"] + + ID = 0x9021ab67 + QUALNAME = "functions.stickers.CreateStickerSet" + + def __init__(self, *, user_id: "raw.base.InputUser", title: str, short_name: str, stickers: List["raw.base.InputStickerSetItem"], masks: Optional[bool] = None, emojis: Optional[bool] = None, text_color: Optional[bool] = None, thumb: "raw.base.InputDocument" = None, software: Optional[str] = None) -> None: + self.user_id = user_id # InputUser + self.title = title # string + self.short_name = short_name # string + self.stickers = stickers # Vector + self.masks = masks # flags.0?true + self.emojis = emojis # flags.5?true + self.text_color = text_color # flags.6?true + self.thumb = thumb # flags.2?InputDocument + self.software = software # flags.3?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateStickerSet": + + flags = Int.read(b) + + masks = True if flags & (1 << 0) else False + emojis = True if flags & (1 << 5) else False + text_color = True if flags & (1 << 6) else False + user_id = TLObject.read(b) + + title = String.read(b) + + short_name = String.read(b) + + thumb = TLObject.read(b) if flags & (1 << 2) else None + + stickers = TLObject.read(b) + + software = String.read(b) if flags & (1 << 3) else None + return CreateStickerSet(user_id=user_id, title=title, short_name=short_name, stickers=stickers, masks=masks, emojis=emojis, text_color=text_color, thumb=thumb, software=software) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.masks else 0 + flags |= (1 << 5) if self.emojis else 0 + flags |= (1 << 6) if self.text_color else 0 + flags |= (1 << 2) if self.thumb is not None else 0 + flags |= (1 << 3) if self.software is not None else 0 + b.write(Int(flags)) + + b.write(self.user_id.write()) + + b.write(String(self.title)) + + b.write(String(self.short_name)) + + if self.thumb is not None: + b.write(self.thumb.write()) + + b.write(Vector(self.stickers)) + + if self.software is not None: + b.write(String(self.software)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/delete_sticker_set.py b/pyrogram/raw/functions/stickers/delete_sticker_set.py new file mode 100644 index 00000000..4c9c5a9e --- /dev/null +++ b/pyrogram/raw/functions/stickers/delete_sticker_set.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteStickerSet(TLObject): # type: ignore + """Deletes a stickerset we created, bots only. + + + Details: + - Layer: ``224`` + - ID: ``87704394`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + Stickerset to delete + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["stickerset"] + + ID = 0x87704394 + QUALNAME = "functions.stickers.DeleteStickerSet" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet") -> None: + self.stickerset = stickerset # InputStickerSet + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteStickerSet": + # No flags + + stickerset = TLObject.read(b) + + return DeleteStickerSet(stickerset=stickerset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/remove_sticker_from_set.py b/pyrogram/raw/functions/stickers/remove_sticker_from_set.py new file mode 100644 index 00000000..a482effe --- /dev/null +++ b/pyrogram/raw/functions/stickers/remove_sticker_from_set.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RemoveStickerFromSet(TLObject): # type: ignore + """Remove a sticker from the set where it belongs, bots only. The sticker set must have been created by the bot. + + + Details: + - Layer: ``224`` + - ID: ``F7760F51`` + + Parameters: + sticker (:obj:`InputDocument `): + The sticker to remove + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["sticker"] + + ID = 0xf7760f51 + QUALNAME = "functions.stickers.RemoveStickerFromSet" + + def __init__(self, *, sticker: "raw.base.InputDocument") -> None: + self.sticker = sticker # InputDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RemoveStickerFromSet": + # No flags + + sticker = TLObject.read(b) + + return RemoveStickerFromSet(sticker=sticker) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.sticker.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/rename_sticker_set.py b/pyrogram/raw/functions/stickers/rename_sticker_set.py new file mode 100644 index 00000000..c798424d --- /dev/null +++ b/pyrogram/raw/functions/stickers/rename_sticker_set.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RenameStickerSet(TLObject): # type: ignore + """Renames a stickerset, bots only. + + + Details: + - Layer: ``224`` + - ID: ``124B1C00`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + Stickerset to rename + + title (``str``): + New stickerset title + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["stickerset", "title"] + + ID = 0x124b1c00 + QUALNAME = "functions.stickers.RenameStickerSet" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet", title: str) -> None: + self.stickerset = stickerset # InputStickerSet + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RenameStickerSet": + # No flags + + stickerset = TLObject.read(b) + + title = String.read(b) + + return RenameStickerSet(stickerset=stickerset, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/replace_sticker.py b/pyrogram/raw/functions/stickers/replace_sticker.py new file mode 100644 index 00000000..b208c1c9 --- /dev/null +++ b/pyrogram/raw/functions/stickers/replace_sticker.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReplaceSticker(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``4696459A`` + + Parameters: + sticker (:obj:`InputDocument `): + + + new_sticker (:obj:`InputStickerSetItem `): + + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["sticker", "new_sticker"] + + ID = 0x4696459a + QUALNAME = "functions.stickers.ReplaceSticker" + + def __init__(self, *, sticker: "raw.base.InputDocument", new_sticker: "raw.base.InputStickerSetItem") -> None: + self.sticker = sticker # InputDocument + self.new_sticker = new_sticker # InputStickerSetItem + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReplaceSticker": + # No flags + + sticker = TLObject.read(b) + + new_sticker = TLObject.read(b) + + return ReplaceSticker(sticker=sticker, new_sticker=new_sticker) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.sticker.write()) + + b.write(self.new_sticker.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/set_sticker_set_thumb.py b/pyrogram/raw/functions/stickers/set_sticker_set_thumb.py new file mode 100644 index 00000000..4b1d3f10 --- /dev/null +++ b/pyrogram/raw/functions/stickers/set_sticker_set_thumb.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetStickerSetThumb(TLObject): # type: ignore + """Set stickerset thumbnail + + + Details: + - Layer: ``224`` + - ID: ``A76A5392`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + Stickerset + + thumb (:obj:`InputDocument `, *optional*): + Thumbnail (only for normal stickersets, not custom emoji stickersets). + + thumb_document_id (``int`` ``64-bit``, *optional*): + Only for custom emoji stickersets, ID of a custom emoji present in the set to use as thumbnail; pass 0 to fallback to the first custom emoji of the set. + + Returns: + :obj:`messages.StickerSet ` + """ + + __slots__: List[str] = ["stickerset", "thumb", "thumb_document_id"] + + ID = 0xa76a5392 + QUALNAME = "functions.stickers.SetStickerSetThumb" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet", thumb: "raw.base.InputDocument" = None, thumb_document_id: Optional[int] = None) -> None: + self.stickerset = stickerset # InputStickerSet + self.thumb = thumb # flags.0?InputDocument + self.thumb_document_id = thumb_document_id # flags.1?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetStickerSetThumb": + + flags = Int.read(b) + + stickerset = TLObject.read(b) + + thumb = TLObject.read(b) if flags & (1 << 0) else None + + thumb_document_id = Long.read(b) if flags & (1 << 1) else None + return SetStickerSetThumb(stickerset=stickerset, thumb=thumb, thumb_document_id=thumb_document_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.thumb is not None else 0 + flags |= (1 << 1) if self.thumb_document_id is not None else 0 + b.write(Int(flags)) + + b.write(self.stickerset.write()) + + if self.thumb is not None: + b.write(self.thumb.write()) + + if self.thumb_document_id is not None: + b.write(Long(self.thumb_document_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stickers/suggest_short_name.py b/pyrogram/raw/functions/stickers/suggest_short_name.py new file mode 100644 index 00000000..acc29888 --- /dev/null +++ b/pyrogram/raw/functions/stickers/suggest_short_name.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SuggestShortName(TLObject): # type: ignore + """Suggests a short name for a given stickerpack name + + + Details: + - Layer: ``224`` + - ID: ``4DAFC503`` + + Parameters: + title (``str``): + Sticker pack name + + Returns: + :obj:`stickers.SuggestedShortName ` + """ + + __slots__: List[str] = ["title"] + + ID = 0x4dafc503 + QUALNAME = "functions.stickers.SuggestShortName" + + def __init__(self, *, title: str) -> None: + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SuggestShortName": + # No flags + + title = String.read(b) + + return SuggestShortName(title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/__init__.py b/pyrogram/raw/functions/stories/__init__.py new file mode 100644 index 00000000..a31c9b6e --- /dev/null +++ b/pyrogram/raw/functions/stories/__init__.py @@ -0,0 +1,99 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .can_send_story import CanSendStory +from .send_story import SendStory +from .edit_story import EditStory +from .delete_stories import DeleteStories +from .toggle_pinned import TogglePinned +from .get_all_stories import GetAllStories +from .get_pinned_stories import GetPinnedStories +from .get_stories_archive import GetStoriesArchive +from .get_stories_by_id import GetStoriesByID +from .toggle_all_stories_hidden import ToggleAllStoriesHidden +from .read_stories import ReadStories +from .increment_story_views import IncrementStoryViews +from .get_story_views_list import GetStoryViewsList +from .get_stories_views import GetStoriesViews +from .export_story_link import ExportStoryLink +from .report import Report +from .activate_stealth_mode import ActivateStealthMode +from .send_reaction import SendReaction +from .get_peer_stories import GetPeerStories +from .get_all_read_peer_stories import GetAllReadPeerStories +from .get_peer_max_i_ds import GetPeerMaxIDs +from .get_chats_to_send import GetChatsToSend +from .toggle_peer_stories_hidden import TogglePeerStoriesHidden +from .get_story_reactions_list import GetStoryReactionsList +from .toggle_pinned_to_top import TogglePinnedToTop +from .search_posts import SearchPosts +from .create_album import CreateAlbum +from .update_album import UpdateAlbum +from .reorder_albums import ReorderAlbums +from .delete_album import DeleteAlbum +from .get_albums import GetAlbums +from .get_album_stories import GetAlbumStories +from .start_live import StartLive + + +__all__ = [ + "CanSendStory", + "SendStory", + "EditStory", + "DeleteStories", + "TogglePinned", + "GetAllStories", + "GetPinnedStories", + "GetStoriesArchive", + "GetStoriesByID", + "ToggleAllStoriesHidden", + "ReadStories", + "IncrementStoryViews", + "GetStoryViewsList", + "GetStoriesViews", + "ExportStoryLink", + "Report", + "ActivateStealthMode", + "SendReaction", + "GetPeerStories", + "GetAllReadPeerStories", + "GetPeerMaxIDs", + "GetChatsToSend", + "TogglePeerStoriesHidden", + "GetStoryReactionsList", + "TogglePinnedToTop", + "SearchPosts", + "CreateAlbum", + "UpdateAlbum", + "ReorderAlbums", + "DeleteAlbum", + "GetAlbums", + "GetAlbumStories", + "StartLive", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/stories/activate_stealth_mode.py b/pyrogram/raw/functions/stories/activate_stealth_mode.py new file mode 100644 index 00000000..d78f79fe --- /dev/null +++ b/pyrogram/raw/functions/stories/activate_stealth_mode.py @@ -0,0 +1,61 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ActivateStealthMode(TLObject): # type: ignore + """Activates stories stealth mode, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``57BBD166`` + + Parameters: + past (``bool``, *optional*): + Whether to erase views from any stories opened in the past stories_stealth_past_period seconds », as specified by the client configuration. + + future (``bool``, *optional*): + Whether to hide future story views for the next stories_stealth_future_period seconds », as specified by the client configuration. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["past", "future"] + + ID = 0x57bbd166 + QUALNAME = "functions.stories.ActivateStealthMode" + + def __init__(self, *, past: Optional[bool] = None, future: Optional[bool] = None) -> None: + self.past = past # flags.0?true + self.future = future # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ActivateStealthMode": + + flags = Int.read(b) + + past = True if flags & (1 << 0) else False + future = True if flags & (1 << 1) else False + return ActivateStealthMode(past=past, future=future) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.past else 0 + flags |= (1 << 1) if self.future else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/can_send_story.py b/pyrogram/raw/functions/stories/can_send_story.py new file mode 100644 index 00000000..79767d5b --- /dev/null +++ b/pyrogram/raw/functions/stories/can_send_story.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CanSendStory(TLObject): # type: ignore + """Check whether we can post stories as the specified peer. + + + Details: + - Layer: ``224`` + - ID: ``30EB63F0`` + + Parameters: + peer (:obj:`InputPeer `): + The peer from which we wish to post stories. + + Returns: + :obj:`stories.CanSendStoryCount ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x30eb63f0 + QUALNAME = "functions.stories.CanSendStory" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CanSendStory": + # No flags + + peer = TLObject.read(b) + + return CanSendStory(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/create_album.py b/pyrogram/raw/functions/stories/create_album.py new file mode 100644 index 00000000..85a7eabd --- /dev/null +++ b/pyrogram/raw/functions/stories/create_album.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CreateAlbum(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``A36396E5`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + title (``str``): + N/A + + stories (List of ``int`` ``32-bit``): + N/A + + Returns: + :obj:`StoryAlbum ` + """ + + __slots__: List[str] = ["peer", "title", "stories"] + + ID = 0xa36396e5 + QUALNAME = "functions.stories.CreateAlbum" + + def __init__(self, *, peer: "raw.base.InputPeer", title: str, stories: List[int]) -> None: + self.peer = peer # InputPeer + self.title = title # string + self.stories = stories # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CreateAlbum": + # No flags + + peer = TLObject.read(b) + + title = String.read(b) + + stories = TLObject.read(b, Int) + + return CreateAlbum(peer=peer, title=title, stories=stories) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.title)) + + b.write(Vector(self.stories, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/delete_album.py b/pyrogram/raw/functions/stories/delete_album.py new file mode 100644 index 00000000..866b7526 --- /dev/null +++ b/pyrogram/raw/functions/stories/delete_album.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteAlbum(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8D3456D0`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + album_id (``int`` ``32-bit``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "album_id"] + + ID = 0x8d3456d0 + QUALNAME = "functions.stories.DeleteAlbum" + + def __init__(self, *, peer: "raw.base.InputPeer", album_id: int) -> None: + self.peer = peer # InputPeer + self.album_id = album_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteAlbum": + # No flags + + peer = TLObject.read(b) + + album_id = Int.read(b) + + return DeleteAlbum(peer=peer, album_id=album_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.album_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/delete_stories.py b/pyrogram/raw/functions/stories/delete_stories.py new file mode 100644 index 00000000..36ee56d8 --- /dev/null +++ b/pyrogram/raw/functions/stories/delete_stories.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeleteStories(TLObject): # type: ignore + """Deletes some posted stories. + + + Details: + - Layer: ``224`` + - ID: ``AE59DB5F`` + + Parameters: + peer (:obj:`InputPeer `): + Channel/user from where to delete stories. + + id (List of ``int`` ``32-bit``): + IDs of stories to delete. + + Returns: + List of ``int`` ``32-bit`` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0xae59db5f + QUALNAME = "functions.stories.DeleteStories" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeleteStories": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return DeleteStories(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/edit_story.py b/pyrogram/raw/functions/stories/edit_story.py new file mode 100644 index 00000000..dffa5d04 --- /dev/null +++ b/pyrogram/raw/functions/stories/edit_story.py @@ -0,0 +1,114 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EditStory(TLObject): # type: ignore + """Edit an uploaded story + + + Details: + - Layer: ``224`` + - ID: ``B583BA46`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the story was posted. + + id (``int`` ``32-bit``): + ID of story to edit. + + media (:obj:`InputMedia `, *optional*): + If specified, replaces the story media. + + media_areas (List of :obj:`MediaArea `, *optional*): + Media areas associated to the story, see here » for more info. + + caption (``str``, *optional*): + If specified, replaces the story caption. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text in the caption, if allowed by the stories_entities client configuration parameter ». + + privacy_rules (List of :obj:`InputPrivacyRule `, *optional*): + If specified, alters the privacy settings » of the story, changing who can or can't view the story. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "id", "media", "media_areas", "caption", "entities", "privacy_rules"] + + ID = 0xb583ba46 + QUALNAME = "functions.stories.EditStory" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, media: "raw.base.InputMedia" = None, media_areas: Optional[List["raw.base.MediaArea"]] = None, caption: Optional[str] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, privacy_rules: Optional[List["raw.base.InputPrivacyRule"]] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.media = media # flags.0?InputMedia + self.media_areas = media_areas # flags.3?Vector + self.caption = caption # flags.1?string + self.entities = entities # flags.1?Vector + self.privacy_rules = privacy_rules # flags.2?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EditStory": + + flags = Int.read(b) + + peer = TLObject.read(b) + + id = Int.read(b) + + media = TLObject.read(b) if flags & (1 << 0) else None + + media_areas = TLObject.read(b) if flags & (1 << 3) else [] + + caption = String.read(b) if flags & (1 << 1) else None + entities = TLObject.read(b) if flags & (1 << 1) else [] + + privacy_rules = TLObject.read(b) if flags & (1 << 2) else [] + + return EditStory(peer=peer, id=id, media=media, media_areas=media_areas, caption=caption, entities=entities, privacy_rules=privacy_rules) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.media is not None else 0 + flags |= (1 << 3) if self.media_areas else 0 + flags |= (1 << 1) if self.caption is not None else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.privacy_rules else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.media is not None: + b.write(self.media.write()) + + if self.media_areas is not None: + b.write(Vector(self.media_areas)) + + if self.caption is not None: + b.write(String(self.caption)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.privacy_rules is not None: + b.write(Vector(self.privacy_rules)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/export_story_link.py b/pyrogram/raw/functions/stories/export_story_link.py new file mode 100644 index 00000000..f1b14f8d --- /dev/null +++ b/pyrogram/raw/functions/stories/export_story_link.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportStoryLink(TLObject): # type: ignore + """Generate a story deep link for a specific story + + + Details: + - Layer: ``224`` + - ID: ``7B8DEF20`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the story was posted + + id (``int`` ``32-bit``): + Story ID + + Returns: + :obj:`ExportedStoryLink ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x7b8def20 + QUALNAME = "functions.stories.ExportStoryLink" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int) -> None: + self.peer = peer # InputPeer + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportStoryLink": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + return ExportStoryLink(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_album_stories.py b/pyrogram/raw/functions/stories/get_album_stories.py new file mode 100644 index 00000000..7e1155fb --- /dev/null +++ b/pyrogram/raw/functions/stories/get_album_stories.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAlbumStories(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``AC806D61`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + album_id (``int`` ``32-bit``): + N/A + + offset (``int`` ``32-bit``): + N/A + + limit (``int`` ``32-bit``): + N/A + + Returns: + :obj:`stories.Stories ` + """ + + __slots__: List[str] = ["peer", "album_id", "offset", "limit"] + + ID = 0xac806d61 + QUALNAME = "functions.stories.GetAlbumStories" + + def __init__(self, *, peer: "raw.base.InputPeer", album_id: int, offset: int, limit: int) -> None: + self.peer = peer # InputPeer + self.album_id = album_id # int + self.offset = offset # int + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAlbumStories": + # No flags + + peer = TLObject.read(b) + + album_id = Int.read(b) + + offset = Int.read(b) + + limit = Int.read(b) + + return GetAlbumStories(peer=peer, album_id=album_id, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.album_id)) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_albums.py b/pyrogram/raw/functions/stories/get_albums.py new file mode 100644 index 00000000..8dd4e9d0 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_albums.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAlbums(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``25B3EAC7`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`stories.Albums ` + """ + + __slots__: List[str] = ["peer", "hash"] + + ID = 0x25b3eac7 + QUALNAME = "functions.stories.GetAlbums" + + def __init__(self, *, peer: "raw.base.InputPeer", hash: int) -> None: + self.peer = peer # InputPeer + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAlbums": + # No flags + + peer = TLObject.read(b) + + hash = Long.read(b) + + return GetAlbums(peer=peer, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_all_read_peer_stories.py b/pyrogram/raw/functions/stories/get_all_read_peer_stories.py new file mode 100644 index 00000000..e20f025b --- /dev/null +++ b/pyrogram/raw/functions/stories/get_all_read_peer_stories.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAllReadPeerStories(TLObject): # type: ignore + """Obtain the latest read story ID for all peers when first logging in, returned as a list of updateReadStories updates, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``9B5AE7F9`` + + Parameters: + No parameters required. + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = [] + + ID = 0x9b5ae7f9 + QUALNAME = "functions.stories.GetAllReadPeerStories" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAllReadPeerStories": + # No flags + + return GetAllReadPeerStories() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_all_stories.py b/pyrogram/raw/functions/stories/get_all_stories.py new file mode 100644 index 00000000..146f8ba6 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_all_stories.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetAllStories(TLObject): # type: ignore + """Fetch the List of active (or active and hidden) stories, see here » for more info on watching stories. + + + Details: + - Layer: ``224`` + - ID: ``EEB0D625`` + + Parameters: + next (``bool``, *optional*): + If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow. + + hidden (``bool``, *optional*): + If set, fetches the hidden active story list, otherwise fetches the active story list, see here » for more info on the full flow. + + state (``str``, *optional*): + If next and state are both set, uses the passed state to paginate to the next results; if neither state nor next are set, fetches the initial page; if state is set and next is not set, check for changes in the active/hidden peerset, see here » for more info on the full flow. + + Returns: + :obj:`stories.AllStories ` + """ + + __slots__: List[str] = ["next", "hidden", "state"] + + ID = 0xeeb0d625 + QUALNAME = "functions.stories.GetAllStories" + + def __init__(self, *, next: Optional[bool] = None, hidden: Optional[bool] = None, state: Optional[str] = None) -> None: + self.next = next # flags.1?true + self.hidden = hidden # flags.2?true + self.state = state # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetAllStories": + + flags = Int.read(b) + + next = True if flags & (1 << 1) else False + hidden = True if flags & (1 << 2) else False + state = String.read(b) if flags & (1 << 0) else None + return GetAllStories(next=next, hidden=hidden, state=state) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.next else 0 + flags |= (1 << 2) if self.hidden else 0 + flags |= (1 << 0) if self.state is not None else 0 + b.write(Int(flags)) + + if self.state is not None: + b.write(String(self.state)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_chats_to_send.py b/pyrogram/raw/functions/stories/get_chats_to_send.py new file mode 100644 index 00000000..6f338940 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_chats_to_send.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChatsToSend(TLObject): # type: ignore + """Obtain a list of channels where the user can post stories + + + Details: + - Layer: ``224`` + - ID: ``A56A8B60`` + + Parameters: + No parameters required. + + Returns: + :obj:`messages.Chats ` + """ + + __slots__: List[str] = [] + + ID = 0xa56a8b60 + QUALNAME = "functions.stories.GetChatsToSend" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChatsToSend": + # No flags + + return GetChatsToSend() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_peer_max_i_ds.py b/pyrogram/raw/functions/stories/get_peer_max_i_ds.py new file mode 100644 index 00000000..88411bed --- /dev/null +++ b/pyrogram/raw/functions/stories/get_peer_max_i_ds.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPeerMaxIDs(TLObject): # type: ignore + """Get the IDs of the maximum read stories for a set of peers. + + + Details: + - Layer: ``224`` + - ID: ``78499170`` + + Parameters: + id (List of :obj:`InputPeer `): + Peers + + Returns: + List of :obj:`RecentStory ` + """ + + __slots__: List[str] = ["id"] + + ID = 0x78499170 + QUALNAME = "functions.stories.GetPeerMaxIDs" + + def __init__(self, *, id: List["raw.base.InputPeer"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPeerMaxIDs": + # No flags + + id = TLObject.read(b) + + return GetPeerMaxIDs(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_peer_stories.py b/pyrogram/raw/functions/stories/get_peer_stories.py new file mode 100644 index 00000000..fe9eeb8c --- /dev/null +++ b/pyrogram/raw/functions/stories/get_peer_stories.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPeerStories(TLObject): # type: ignore + """Fetch the full active story list of a specific peer. + + + Details: + - Layer: ``224`` + - ID: ``2C4ADA50`` + + Parameters: + peer (:obj:`InputPeer `): + Peer whose stories should be fetched + + Returns: + :obj:`stories.PeerStories ` + """ + + __slots__: List[str] = ["peer"] + + ID = 0x2c4ada50 + QUALNAME = "functions.stories.GetPeerStories" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPeerStories": + # No flags + + peer = TLObject.read(b) + + return GetPeerStories(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_pinned_stories.py b/pyrogram/raw/functions/stories/get_pinned_stories.py new file mode 100644 index 00000000..0a56f8e8 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_pinned_stories.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetPinnedStories(TLObject): # type: ignore + """Fetch the stories pinned on a peer's profile. + + + Details: + - Layer: ``224`` + - ID: ``5821A5DC`` + + Parameters: + peer (:obj:`InputPeer `): + Peer whose pinned stories should be fetched + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`stories.Stories ` + """ + + __slots__: List[str] = ["peer", "offset_id", "limit"] + + ID = 0x5821a5dc + QUALNAME = "functions.stories.GetPinnedStories" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_id: int, limit: int) -> None: + self.peer = peer # InputPeer + self.offset_id = offset_id # int + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetPinnedStories": + # No flags + + peer = TLObject.read(b) + + offset_id = Int.read(b) + + limit = Int.read(b) + + return GetPinnedStories(peer=peer, offset_id=offset_id, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_stories_archive.py b/pyrogram/raw/functions/stories/get_stories_archive.py new file mode 100644 index 00000000..6976218f --- /dev/null +++ b/pyrogram/raw/functions/stories/get_stories_archive.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoriesArchive(TLObject): # type: ignore + """Fetch the story archive » of a peer we control. + + + Details: + - Layer: ``224`` + - ID: ``B4352016`` + + Parameters: + peer (:obj:`InputPeer `): + Peer whose archived stories should be fetched + + offset_id (``int`` ``32-bit``): + Offsets for pagination, for more info click here + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + Returns: + :obj:`stories.Stories ` + """ + + __slots__: List[str] = ["peer", "offset_id", "limit"] + + ID = 0xb4352016 + QUALNAME = "functions.stories.GetStoriesArchive" + + def __init__(self, *, peer: "raw.base.InputPeer", offset_id: int, limit: int) -> None: + self.peer = peer # InputPeer + self.offset_id = offset_id # int + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoriesArchive": + # No flags + + peer = TLObject.read(b) + + offset_id = Int.read(b) + + limit = Int.read(b) + + return GetStoriesArchive(peer=peer, offset_id=offset_id, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.offset_id)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_stories_by_id.py b/pyrogram/raw/functions/stories/get_stories_by_id.py new file mode 100644 index 00000000..e9b6cc97 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_stories_by_id.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoriesByID(TLObject): # type: ignore + """Obtain full info about a set of stories by their IDs. + + + Details: + - Layer: ``224`` + - ID: ``5774CA74`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the stories were posted + + id (List of ``int`` ``32-bit``): + Story IDs + + Returns: + :obj:`stories.Stories ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x5774ca74 + QUALNAME = "functions.stories.GetStoriesByID" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoriesByID": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return GetStoriesByID(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_stories_views.py b/pyrogram/raw/functions/stories/get_stories_views.py new file mode 100644 index 00000000..69586517 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_stories_views.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoriesViews(TLObject): # type: ignore + """Obtain info about the view count, forward count, reactions and recent viewers of one or more stories. + + + Details: + - Layer: ``224`` + - ID: ``28E16CC8`` + + Parameters: + peer (:obj:`InputPeer `): + Peer whose stories should be fetched + + id (List of ``int`` ``32-bit``): + Story IDs + + Returns: + :obj:`stories.StoryViews ` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x28e16cc8 + QUALNAME = "functions.stories.GetStoriesViews" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoriesViews": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return GetStoriesViews(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_story_reactions_list.py b/pyrogram/raw/functions/stories/get_story_reactions_list.py new file mode 100644 index 00000000..89ef3b79 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_story_reactions_list.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoryReactionsList(TLObject): # type: ignore + """Get the reaction and interaction list of a story posted to a channel, along with the sender of each reaction. + + + Details: + - Layer: ``224`` + - ID: ``B9B2881F`` + + Parameters: + peer (:obj:`InputPeer `): + Channel + + id (``int`` ``32-bit``): + Story ID + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + forwards_first (``bool``, *optional*): + If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. + + reaction (:obj:`Reaction `, *optional*): + Get only reactions of this type + + offset (``str``, *optional*): + Offset for pagination (taken from the next_offset field of the returned stories.StoryReactionsList); empty in the first request. + + Returns: + :obj:`stories.StoryReactionsList ` + """ + + __slots__: List[str] = ["peer", "id", "limit", "forwards_first", "reaction", "offset"] + + ID = 0xb9b2881f + QUALNAME = "functions.stories.GetStoryReactionsList" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, limit: int, forwards_first: Optional[bool] = None, reaction: "raw.base.Reaction" = None, offset: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.limit = limit # int + self.forwards_first = forwards_first # flags.2?true + self.reaction = reaction # flags.0?Reaction + self.offset = offset # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoryReactionsList": + + flags = Int.read(b) + + forwards_first = True if flags & (1 << 2) else False + peer = TLObject.read(b) + + id = Int.read(b) + + reaction = TLObject.read(b) if flags & (1 << 0) else None + + offset = String.read(b) if flags & (1 << 1) else None + limit = Int.read(b) + + return GetStoryReactionsList(peer=peer, id=id, limit=limit, forwards_first=forwards_first, reaction=reaction, offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.forwards_first else 0 + flags |= (1 << 0) if self.reaction is not None else 0 + flags |= (1 << 1) if self.offset is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.reaction is not None: + b.write(self.reaction.write()) + + if self.offset is not None: + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/get_story_views_list.py b/pyrogram/raw/functions/stories/get_story_views_list.py new file mode 100644 index 00000000..d10c7647 --- /dev/null +++ b/pyrogram/raw/functions/stories/get_story_views_list.py @@ -0,0 +1,108 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetStoryViewsList(TLObject): # type: ignore + """Obtain the list of users that have viewed a specific story we posted + + + Details: + - Layer: ``224`` + - ID: ``7ED23C57`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the story was posted + + id (``int`` ``32-bit``): + Story ID + + offset (``str``): + Offset for pagination, obtained from stories.storyViewsList.next_offset + + limit (``int`` ``32-bit``): + Maximum number of results to return, see pagination + + just_contacts (``bool``, *optional*): + Whether to only fetch view reaction/views made by our contacts + + reactions_first (``bool``, *optional*): + Whether to return storyView info about users that reacted to the story (i.e. if set, the server will first sort results by view date as usual, and then also additionally sort the list by putting storyViews with an associated reaction first in the list). Ignored if forwards_first is set. + + forwards_first (``bool``, *optional*): + If set, returns forwards and reposts first, then reactions, then other views; otherwise returns interactions sorted just by interaction date. + + q (``str``, *optional*): + Search for specific peers + + Returns: + :obj:`stories.StoryViewsList ` + """ + + __slots__: List[str] = ["peer", "id", "offset", "limit", "just_contacts", "reactions_first", "forwards_first", "q"] + + ID = 0x7ed23c57 + QUALNAME = "functions.stories.GetStoryViewsList" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int, offset: str, limit: int, just_contacts: Optional[bool] = None, reactions_first: Optional[bool] = None, forwards_first: Optional[bool] = None, q: Optional[str] = None) -> None: + self.peer = peer # InputPeer + self.id = id # int + self.offset = offset # string + self.limit = limit # int + self.just_contacts = just_contacts # flags.0?true + self.reactions_first = reactions_first # flags.2?true + self.forwards_first = forwards_first # flags.3?true + self.q = q # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetStoryViewsList": + + flags = Int.read(b) + + just_contacts = True if flags & (1 << 0) else False + reactions_first = True if flags & (1 << 2) else False + forwards_first = True if flags & (1 << 3) else False + peer = TLObject.read(b) + + q = String.read(b) if flags & (1 << 1) else None + id = Int.read(b) + + offset = String.read(b) + + limit = Int.read(b) + + return GetStoryViewsList(peer=peer, id=id, offset=offset, limit=limit, just_contacts=just_contacts, reactions_first=reactions_first, forwards_first=forwards_first, q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.just_contacts else 0 + flags |= (1 << 2) if self.reactions_first else 0 + flags |= (1 << 3) if self.forwards_first else 0 + flags |= (1 << 1) if self.q is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.q is not None: + b.write(String(self.q)) + + b.write(Int(self.id)) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/increment_story_views.py b/pyrogram/raw/functions/stories/increment_story_views.py new file mode 100644 index 00000000..5cd6d4d6 --- /dev/null +++ b/pyrogram/raw/functions/stories/increment_story_views.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class IncrementStoryViews(TLObject): # type: ignore + """Increment the view counter of one or more stories. + + + Details: + - Layer: ``224`` + - ID: ``B2028AFB`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the stories were posted. + + id (List of ``int`` ``32-bit``): + IDs of the stories (maximum 200 at a time). + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0xb2028afb + QUALNAME = "functions.stories.IncrementStoryViews" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "IncrementStoryViews": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return IncrementStoryViews(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/read_stories.py b/pyrogram/raw/functions/stories/read_stories.py new file mode 100644 index 00000000..6e8fb22c --- /dev/null +++ b/pyrogram/raw/functions/stories/read_stories.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReadStories(TLObject): # type: ignore + """Mark all stories up to a certain ID as read, for a given peer; will emit an updateReadStories update to all logged-in sessions. + + + Details: + - Layer: ``224`` + - ID: ``A556DAC8`` + + Parameters: + peer (:obj:`InputPeer `): + The peer whose stories should be marked as read. + + max_id (``int`` ``32-bit``): + Mark all stories up to and including this ID as read + + Returns: + List of ``int`` ``32-bit`` + """ + + __slots__: List[str] = ["peer", "max_id"] + + ID = 0xa556dac8 + QUALNAME = "functions.stories.ReadStories" + + def __init__(self, *, peer: "raw.base.InputPeer", max_id: int) -> None: + self.peer = peer # InputPeer + self.max_id = max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReadStories": + # No flags + + peer = TLObject.read(b) + + max_id = Int.read(b) + + return ReadStories(peer=peer, max_id=max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/reorder_albums.py b/pyrogram/raw/functions/stories/reorder_albums.py new file mode 100644 index 00000000..278ae5c6 --- /dev/null +++ b/pyrogram/raw/functions/stories/reorder_albums.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReorderAlbums(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``8535FBD9`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + order (List of ``int`` ``32-bit``): + N/A + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "order"] + + ID = 0x8535fbd9 + QUALNAME = "functions.stories.ReorderAlbums" + + def __init__(self, *, peer: "raw.base.InputPeer", order: List[int]) -> None: + self.peer = peer # InputPeer + self.order = order # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReorderAlbums": + # No flags + + peer = TLObject.read(b) + + order = TLObject.read(b, Int) + + return ReorderAlbums(peer=peer, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.order, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/report.py b/pyrogram/raw/functions/stories/report.py new file mode 100644 index 00000000..c224d6c4 --- /dev/null +++ b/pyrogram/raw/functions/stories/report.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Report(TLObject): # type: ignore + """Report a story. + + + Details: + - Layer: ``224`` + - ID: ``19D8EB45`` + + Parameters: + peer (:obj:`InputPeer `): + The peer that uploaded the story. + + id (List of ``int`` ``32-bit``): + IDs of the stories to report. + + option (``bytes``): + N/A + + message (``str``): + Comment for report moderation + + Returns: + :obj:`ReportResult ` + """ + + __slots__: List[str] = ["peer", "id", "option", "message"] + + ID = 0x19d8eb45 + QUALNAME = "functions.stories.Report" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int], option: bytes, message: str) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + self.option = option # bytes + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Report": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + option = Bytes.read(b) + + message = String.read(b) + + return Report(peer=peer, id=id, option=option, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + b.write(Bytes(self.option)) + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/search_posts.py b/pyrogram/raw/functions/stories/search_posts.py new file mode 100644 index 00000000..b5101ee5 --- /dev/null +++ b/pyrogram/raw/functions/stories/search_posts.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchPosts(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D1810907`` + + Parameters: + offset (``str``): + N/A + + limit (``int`` ``32-bit``): + N/A + + hashtag (``str``, *optional*): + N/A + + area (:obj:`MediaArea `, *optional*): + N/A + + peer (:obj:`InputPeer `, *optional*): + N/A + + Returns: + :obj:`stories.FoundStories ` + """ + + __slots__: List[str] = ["offset", "limit", "hashtag", "area", "peer"] + + ID = 0xd1810907 + QUALNAME = "functions.stories.SearchPosts" + + def __init__(self, *, offset: str, limit: int, hashtag: Optional[str] = None, area: "raw.base.MediaArea" = None, peer: "raw.base.InputPeer" = None) -> None: + self.offset = offset # string + self.limit = limit # int + self.hashtag = hashtag # flags.0?string + self.area = area # flags.1?MediaArea + self.peer = peer # flags.2?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchPosts": + + flags = Int.read(b) + + hashtag = String.read(b) if flags & (1 << 0) else None + area = TLObject.read(b) if flags & (1 << 1) else None + + peer = TLObject.read(b) if flags & (1 << 2) else None + + offset = String.read(b) + + limit = Int.read(b) + + return SearchPosts(offset=offset, limit=limit, hashtag=hashtag, area=area, peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.hashtag is not None else 0 + flags |= (1 << 1) if self.area is not None else 0 + flags |= (1 << 2) if self.peer is not None else 0 + b.write(Int(flags)) + + if self.hashtag is not None: + b.write(String(self.hashtag)) + + if self.area is not None: + b.write(self.area.write()) + + if self.peer is not None: + b.write(self.peer.write()) + + b.write(String(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/send_reaction.py b/pyrogram/raw/functions/stories/send_reaction.py new file mode 100644 index 00000000..1e0ffc41 --- /dev/null +++ b/pyrogram/raw/functions/stories/send_reaction.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendReaction(TLObject): # type: ignore + """React to a story. + + + Details: + - Layer: ``224`` + - ID: ``7FD736B2`` + + Parameters: + peer (:obj:`InputPeer `): + The peer that sent the story + + story_id (``int`` ``32-bit``): + ID of the story to react to + + reaction (:obj:`Reaction `): + Reaction + + add_to_recent (``bool``, *optional*): + Whether to add this reaction to the recent reactions list ». + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "story_id", "reaction", "add_to_recent"] + + ID = 0x7fd736b2 + QUALNAME = "functions.stories.SendReaction" + + def __init__(self, *, peer: "raw.base.InputPeer", story_id: int, reaction: "raw.base.Reaction", add_to_recent: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.story_id = story_id # int + self.reaction = reaction # Reaction + self.add_to_recent = add_to_recent # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendReaction": + + flags = Int.read(b) + + add_to_recent = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + story_id = Int.read(b) + + reaction = TLObject.read(b) + + return SendReaction(peer=peer, story_id=story_id, reaction=reaction, add_to_recent=add_to_recent) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.add_to_recent else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.story_id)) + + b.write(self.reaction.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/send_story.py b/pyrogram/raw/functions/stories/send_story.py new file mode 100644 index 00000000..f9458473 --- /dev/null +++ b/pyrogram/raw/functions/stories/send_story.py @@ -0,0 +1,166 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendStory(TLObject): # type: ignore + """Uploads a Telegram Story. + + + Details: + - Layer: ``224`` + - ID: ``737FC2EC`` + + Parameters: + peer (:obj:`InputPeer `): + The peer to send the story as. + + media (:obj:`InputMedia `): + The story media. + + privacy_rules (List of :obj:`InputPrivacyRule `): + Privacy rules for the story, indicating who can or can't view the story. + + random_id (``int`` ``64-bit``): + Unique client message ID required to prevent message resending. + + pinned (``bool``, *optional*): + Whether to add the story to the profile automatically upon expiration. If not set, the story will only be added to the archive, see here » for more info. + + noforwards (``bool``, *optional*): + If set, disables forwards, screenshots, and downloads. + + fwd_modified (``bool``, *optional*): + Set this flag when reposting stories with fwd_from_id+fwd_from_id, if the media was modified before reposting. + + media_areas (List of :obj:`MediaArea `, *optional*): + Media areas associated to the story, see here » for more info. + + caption (``str``, *optional*): + Story caption. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text, if allowed by the stories_entities client configuration parameter ». + + period (``int`` ``32-bit``, *optional*): + Period after which the story is moved to archive (and to the profile if pinned is set), in seconds; must be one of 6 * 3600, 12 * 3600, 86400, or 2 * 86400 for Telegram Premium users, and 86400 otherwise. + + fwd_from_id (:obj:`InputPeer `, *optional*): + If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id. + + fwd_from_story (``int`` ``32-bit``, *optional*): + If set, indicates that this story is a repost of story with ID fwd_from_story posted by the peer in fwd_from_id. + + albums (List of ``int`` ``32-bit``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "media", "privacy_rules", "random_id", "pinned", "noforwards", "fwd_modified", "media_areas", "caption", "entities", "period", "fwd_from_id", "fwd_from_story", "albums"] + + ID = 0x737fc2ec + QUALNAME = "functions.stories.SendStory" + + def __init__(self, *, peer: "raw.base.InputPeer", media: "raw.base.InputMedia", privacy_rules: List["raw.base.InputPrivacyRule"], random_id: int, pinned: Optional[bool] = None, noforwards: Optional[bool] = None, fwd_modified: Optional[bool] = None, media_areas: Optional[List["raw.base.MediaArea"]] = None, caption: Optional[str] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, period: Optional[int] = None, fwd_from_id: "raw.base.InputPeer" = None, fwd_from_story: Optional[int] = None, albums: Optional[List[int]] = None) -> None: + self.peer = peer # InputPeer + self.media = media # InputMedia + self.privacy_rules = privacy_rules # Vector + self.random_id = random_id # long + self.pinned = pinned # flags.2?true + self.noforwards = noforwards # flags.4?true + self.fwd_modified = fwd_modified # flags.7?true + self.media_areas = media_areas # flags.5?Vector + self.caption = caption # flags.0?string + self.entities = entities # flags.1?Vector + self.period = period # flags.3?int + self.fwd_from_id = fwd_from_id # flags.6?InputPeer + self.fwd_from_story = fwd_from_story # flags.6?int + self.albums = albums # flags.8?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendStory": + + flags = Int.read(b) + + pinned = True if flags & (1 << 2) else False + noforwards = True if flags & (1 << 4) else False + fwd_modified = True if flags & (1 << 7) else False + peer = TLObject.read(b) + + media = TLObject.read(b) + + media_areas = TLObject.read(b) if flags & (1 << 5) else [] + + caption = String.read(b) if flags & (1 << 0) else None + entities = TLObject.read(b) if flags & (1 << 1) else [] + + privacy_rules = TLObject.read(b) + + random_id = Long.read(b) + + period = Int.read(b) if flags & (1 << 3) else None + fwd_from_id = TLObject.read(b) if flags & (1 << 6) else None + + fwd_from_story = Int.read(b) if flags & (1 << 6) else None + albums = TLObject.read(b, Int) if flags & (1 << 8) else [] + + return SendStory(peer=peer, media=media, privacy_rules=privacy_rules, random_id=random_id, pinned=pinned, noforwards=noforwards, fwd_modified=fwd_modified, media_areas=media_areas, caption=caption, entities=entities, period=period, fwd_from_id=fwd_from_id, fwd_from_story=fwd_from_story, albums=albums) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.pinned else 0 + flags |= (1 << 4) if self.noforwards else 0 + flags |= (1 << 7) if self.fwd_modified else 0 + flags |= (1 << 5) if self.media_areas else 0 + flags |= (1 << 0) if self.caption is not None else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 3) if self.period is not None else 0 + flags |= (1 << 6) if self.fwd_from_id is not None else 0 + flags |= (1 << 6) if self.fwd_from_story is not None else 0 + flags |= (1 << 8) if self.albums else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(self.media.write()) + + if self.media_areas is not None: + b.write(Vector(self.media_areas)) + + if self.caption is not None: + b.write(String(self.caption)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + b.write(Vector(self.privacy_rules)) + + b.write(Long(self.random_id)) + + if self.period is not None: + b.write(Int(self.period)) + + if self.fwd_from_id is not None: + b.write(self.fwd_from_id.write()) + + if self.fwd_from_story is not None: + b.write(Int(self.fwd_from_story)) + + if self.albums is not None: + b.write(Vector(self.albums, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/start_live.py b/pyrogram/raw/functions/stories/start_live.py new file mode 100644 index 00000000..c3e01ae3 --- /dev/null +++ b/pyrogram/raw/functions/stories/start_live.py @@ -0,0 +1,127 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StartLive(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D069CCDE`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + privacy_rules (List of :obj:`InputPrivacyRule `): + N/A + + random_id (``int`` ``64-bit``): + N/A + + pinned (``bool``, *optional*): + N/A + + noforwards (``bool``, *optional*): + N/A + + rtmp_stream (``bool``, *optional*): + N/A + + caption (``str``, *optional*): + N/A + + entities (List of :obj:`MessageEntity `, *optional*): + N/A + + messages_enabled (``bool``, *optional*): + N/A + + send_paid_messages_stars (``int`` ``64-bit``, *optional*): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["peer", "privacy_rules", "random_id", "pinned", "noforwards", "rtmp_stream", "caption", "entities", "messages_enabled", "send_paid_messages_stars"] + + ID = 0xd069ccde + QUALNAME = "functions.stories.StartLive" + + def __init__(self, *, peer: "raw.base.InputPeer", privacy_rules: List["raw.base.InputPrivacyRule"], random_id: int, pinned: Optional[bool] = None, noforwards: Optional[bool] = None, rtmp_stream: Optional[bool] = None, caption: Optional[str] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, messages_enabled: Optional[bool] = None, send_paid_messages_stars: Optional[int] = None) -> None: + self.peer = peer # InputPeer + self.privacy_rules = privacy_rules # Vector + self.random_id = random_id # long + self.pinned = pinned # flags.2?true + self.noforwards = noforwards # flags.4?true + self.rtmp_stream = rtmp_stream # flags.5?true + self.caption = caption # flags.0?string + self.entities = entities # flags.1?Vector + self.messages_enabled = messages_enabled # flags.6?Bool + self.send_paid_messages_stars = send_paid_messages_stars # flags.7?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StartLive": + + flags = Int.read(b) + + pinned = True if flags & (1 << 2) else False + noforwards = True if flags & (1 << 4) else False + rtmp_stream = True if flags & (1 << 5) else False + peer = TLObject.read(b) + + caption = String.read(b) if flags & (1 << 0) else None + entities = TLObject.read(b) if flags & (1 << 1) else [] + + privacy_rules = TLObject.read(b) + + random_id = Long.read(b) + + messages_enabled = Bool.read(b) if flags & (1 << 6) else None + send_paid_messages_stars = Long.read(b) if flags & (1 << 7) else None + return StartLive(peer=peer, privacy_rules=privacy_rules, random_id=random_id, pinned=pinned, noforwards=noforwards, rtmp_stream=rtmp_stream, caption=caption, entities=entities, messages_enabled=messages_enabled, send_paid_messages_stars=send_paid_messages_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.pinned else 0 + flags |= (1 << 4) if self.noforwards else 0 + flags |= (1 << 5) if self.rtmp_stream else 0 + flags |= (1 << 0) if self.caption is not None else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 6) if self.messages_enabled is not None else 0 + flags |= (1 << 7) if self.send_paid_messages_stars is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + if self.caption is not None: + b.write(String(self.caption)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + b.write(Vector(self.privacy_rules)) + + b.write(Long(self.random_id)) + + if self.messages_enabled is not None: + b.write(Bool(self.messages_enabled)) + + if self.send_paid_messages_stars is not None: + b.write(Long(self.send_paid_messages_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/toggle_all_stories_hidden.py b/pyrogram/raw/functions/stories/toggle_all_stories_hidden.py new file mode 100644 index 00000000..57f04845 --- /dev/null +++ b/pyrogram/raw/functions/stories/toggle_all_stories_hidden.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ToggleAllStoriesHidden(TLObject): # type: ignore + """Hide the active stories of a specific peer, preventing them from being displayed on the action bar on the homescreen. + + + Details: + - Layer: ``224`` + - ID: ``7C2557C4`` + + Parameters: + hidden (``bool``): + Whether to hide or unhide all active stories of the peer + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["hidden"] + + ID = 0x7c2557c4 + QUALNAME = "functions.stories.ToggleAllStoriesHidden" + + def __init__(self, *, hidden: bool) -> None: + self.hidden = hidden # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ToggleAllStoriesHidden": + # No flags + + hidden = Bool.read(b) + + return ToggleAllStoriesHidden(hidden=hidden) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.hidden)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/toggle_peer_stories_hidden.py b/pyrogram/raw/functions/stories/toggle_peer_stories_hidden.py new file mode 100644 index 00000000..96caf36d --- /dev/null +++ b/pyrogram/raw/functions/stories/toggle_peer_stories_hidden.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TogglePeerStoriesHidden(TLObject): # type: ignore + """Hide the active stories of a user, preventing them from being displayed on the action bar on the homescreen, see here » for more info. + + + Details: + - Layer: ``224`` + - ID: ``BD0415C4`` + + Parameters: + peer (:obj:`InputPeer `): + Peer whose stories should be (un)hidden. + + hidden (``bool``): + Whether to hide or unhide stories. + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "hidden"] + + ID = 0xbd0415c4 + QUALNAME = "functions.stories.TogglePeerStoriesHidden" + + def __init__(self, *, peer: "raw.base.InputPeer", hidden: bool) -> None: + self.peer = peer # InputPeer + self.hidden = hidden # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TogglePeerStoriesHidden": + # No flags + + peer = TLObject.read(b) + + hidden = Bool.read(b) + + return TogglePeerStoriesHidden(peer=peer, hidden=hidden) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bool(self.hidden)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/toggle_pinned.py b/pyrogram/raw/functions/stories/toggle_pinned.py new file mode 100644 index 00000000..8f76c9c9 --- /dev/null +++ b/pyrogram/raw/functions/stories/toggle_pinned.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TogglePinned(TLObject): # type: ignore + """Pin or unpin one or more stories + + + Details: + - Layer: ``224`` + - ID: ``9A75A1EF`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where to pin or unpin stories + + id (List of ``int`` ``32-bit``): + IDs of stories to pin or unpin + + pinned (``bool``): + Whether to pin or unpin the stories + + Returns: + List of ``int`` ``32-bit`` + """ + + __slots__: List[str] = ["peer", "id", "pinned"] + + ID = 0x9a75a1ef + QUALNAME = "functions.stories.TogglePinned" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int], pinned: bool) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + self.pinned = pinned # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TogglePinned": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + pinned = Bool.read(b) + + return TogglePinned(peer=peer, id=id, pinned=pinned) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + b.write(Bool(self.pinned)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/toggle_pinned_to_top.py b/pyrogram/raw/functions/stories/toggle_pinned_to_top.py new file mode 100644 index 00000000..e3730181 --- /dev/null +++ b/pyrogram/raw/functions/stories/toggle_pinned_to_top.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TogglePinnedToTop(TLObject): # type: ignore + """{schema} + + + Details: + - Layer: ``224`` + - ID: ``B297E9B`` + + Parameters: + peer (:obj:`InputPeer `): + + + id (List of ``int`` ``32-bit``): + + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0xb297e9b + QUALNAME = "functions.stories.TogglePinnedToTop" + + def __init__(self, *, peer: "raw.base.InputPeer", id: List[int]) -> None: + self.peer = peer # InputPeer + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TogglePinnedToTop": + # No flags + + peer = TLObject.read(b) + + id = TLObject.read(b, Int) + + return TogglePinnedToTop(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.id, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/stories/update_album.py b/pyrogram/raw/functions/stories/update_album.py new file mode 100644 index 00000000..fd584a26 --- /dev/null +++ b/pyrogram/raw/functions/stories/update_album.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UpdateAlbum(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``5E5259B6`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + album_id (``int`` ``32-bit``): + N/A + + title (``str``, *optional*): + N/A + + delete_stories (List of ``int`` ``32-bit``, *optional*): + N/A + + add_stories (List of ``int`` ``32-bit``, *optional*): + N/A + + order (List of ``int`` ``32-bit``, *optional*): + N/A + + Returns: + :obj:`StoryAlbum ` + """ + + __slots__: List[str] = ["peer", "album_id", "title", "delete_stories", "add_stories", "order"] + + ID = 0x5e5259b6 + QUALNAME = "functions.stories.UpdateAlbum" + + def __init__(self, *, peer: "raw.base.InputPeer", album_id: int, title: Optional[str] = None, delete_stories: Optional[List[int]] = None, add_stories: Optional[List[int]] = None, order: Optional[List[int]] = None) -> None: + self.peer = peer # InputPeer + self.album_id = album_id # int + self.title = title # flags.0?string + self.delete_stories = delete_stories # flags.1?Vector + self.add_stories = add_stories # flags.2?Vector + self.order = order # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UpdateAlbum": + + flags = Int.read(b) + + peer = TLObject.read(b) + + album_id = Int.read(b) + + title = String.read(b) if flags & (1 << 0) else None + delete_stories = TLObject.read(b, Int) if flags & (1 << 1) else [] + + add_stories = TLObject.read(b, Int) if flags & (1 << 2) else [] + + order = TLObject.read(b, Int) if flags & (1 << 3) else [] + + return UpdateAlbum(peer=peer, album_id=album_id, title=title, delete_stories=delete_stories, add_stories=add_stories, order=order) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.title is not None else 0 + flags |= (1 << 1) if self.delete_stories else 0 + flags |= (1 << 2) if self.add_stories else 0 + flags |= (1 << 3) if self.order else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.album_id)) + + if self.title is not None: + b.write(String(self.title)) + + if self.delete_stories is not None: + b.write(Vector(self.delete_stories, Int)) + + if self.add_stories is not None: + b.write(Vector(self.add_stories, Int)) + + if self.order is not None: + b.write(Vector(self.order, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/updates/__init__.py b/pyrogram/raw/functions/updates/__init__.py new file mode 100644 index 00000000..59123106 --- /dev/null +++ b/pyrogram/raw/functions/updates/__init__.py @@ -0,0 +1,39 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_state import GetState +from .get_difference import GetDifference +from .get_channel_difference import GetChannelDifference + + +__all__ = [ + "GetState", + "GetDifference", + "GetChannelDifference", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/updates/get_channel_difference.py b/pyrogram/raw/functions/updates/get_channel_difference.py new file mode 100644 index 00000000..426cfb33 --- /dev/null +++ b/pyrogram/raw/functions/updates/get_channel_difference.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetChannelDifference(TLObject): # type: ignore + """Returns the difference between the current state of updates of a certain channel and transmitted. + + + Details: + - Layer: ``224`` + - ID: ``3173D78`` + + Parameters: + channel (:obj:`InputChannel `): + The channel + + filter (:obj:`ChannelMessagesFilter `): + Messsage filter + + pts (``int`` ``32-bit``): + Persistent timestamp (see updates) + + limit (``int`` ``32-bit``): + How many updates to fetch, max 100000Ordinary (non-bot) users are supposed to pass 10-100 + + force (``bool``, *optional*): + Set to true to skip some possibly unneeded updates and reduce server-side load + + Returns: + :obj:`updates.ChannelDifference ` + """ + + __slots__: List[str] = ["channel", "filter", "pts", "limit", "force"] + + ID = 0x3173d78 + QUALNAME = "functions.updates.GetChannelDifference" + + def __init__(self, *, channel: "raw.base.InputChannel", filter: "raw.base.ChannelMessagesFilter", pts: int, limit: int, force: Optional[bool] = None) -> None: + self.channel = channel # InputChannel + self.filter = filter # ChannelMessagesFilter + self.pts = pts # int + self.limit = limit # int + self.force = force # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetChannelDifference": + + flags = Int.read(b) + + force = True if flags & (1 << 0) else False + channel = TLObject.read(b) + + filter = TLObject.read(b) + + pts = Int.read(b) + + limit = Int.read(b) + + return GetChannelDifference(channel=channel, filter=filter, pts=pts, limit=limit, force=force) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.force else 0 + b.write(Int(flags)) + + b.write(self.channel.write()) + + b.write(self.filter.write()) + + b.write(Int(self.pts)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/updates/get_difference.py b/pyrogram/raw/functions/updates/get_difference.py new file mode 100644 index 00000000..d6d8cde4 --- /dev/null +++ b/pyrogram/raw/functions/updates/get_difference.py @@ -0,0 +1,100 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetDifference(TLObject): # type: ignore + """Get new updates. + + + Details: + - Layer: ``224`` + - ID: ``19C2F763`` + + Parameters: + pts (``int`` ``32-bit``): + PTS, see updates. + + date (``int`` ``32-bit``): + date, see updates. + + qts (``int`` ``32-bit``): + QTS, see updates. + + pts_limit (``int`` ``32-bit``, *optional*): + PTS limit + + pts_total_limit (``int`` ``32-bit``, *optional*): + For fast updating: if provided and pts + pts_total_limit < remote pts, updates.differenceTooLong will be returned.Simply tells the server to not return the difference if it is bigger than pts_total_limitIf the remote pts is too big (> ~4000000), this field will default to 1000000 + + qts_limit (``int`` ``32-bit``, *optional*): + QTS limit + + Returns: + :obj:`updates.Difference ` + """ + + __slots__: List[str] = ["pts", "date", "qts", "pts_limit", "pts_total_limit", "qts_limit"] + + ID = 0x19c2f763 + QUALNAME = "functions.updates.GetDifference" + + def __init__(self, *, pts: int, date: int, qts: int, pts_limit: Optional[int] = None, pts_total_limit: Optional[int] = None, qts_limit: Optional[int] = None) -> None: + self.pts = pts # int + self.date = date # int + self.qts = qts # int + self.pts_limit = pts_limit # flags.1?int + self.pts_total_limit = pts_total_limit # flags.0?int + self.qts_limit = qts_limit # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetDifference": + + flags = Int.read(b) + + pts = Int.read(b) + + pts_limit = Int.read(b) if flags & (1 << 1) else None + pts_total_limit = Int.read(b) if flags & (1 << 0) else None + date = Int.read(b) + + qts = Int.read(b) + + qts_limit = Int.read(b) if flags & (1 << 2) else None + return GetDifference(pts=pts, date=date, qts=qts, pts_limit=pts_limit, pts_total_limit=pts_total_limit, qts_limit=qts_limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.pts_limit is not None else 0 + flags |= (1 << 0) if self.pts_total_limit is not None else 0 + flags |= (1 << 2) if self.qts_limit is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.pts)) + + if self.pts_limit is not None: + b.write(Int(self.pts_limit)) + + if self.pts_total_limit is not None: + b.write(Int(self.pts_total_limit)) + + b.write(Int(self.date)) + + b.write(Int(self.qts)) + + if self.qts_limit is not None: + b.write(Int(self.qts_limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/updates/get_state.py b/pyrogram/raw/functions/updates/get_state.py new file mode 100644 index 00000000..e702c0cb --- /dev/null +++ b/pyrogram/raw/functions/updates/get_state.py @@ -0,0 +1,50 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetState(TLObject): # type: ignore + """Returns a current state of updates. + + + Details: + - Layer: ``224`` + - ID: ``EDD4882A`` + + Parameters: + No parameters required. + + Returns: + :obj:`updates.State ` + """ + + __slots__: List[str] = [] + + ID = 0xedd4882a + QUALNAME = "functions.updates.GetState" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetState": + # No flags + + return GetState() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/__init__.py b/pyrogram/raw/functions/upload/__init__.py new file mode 100644 index 00000000..7c37c74f --- /dev/null +++ b/pyrogram/raw/functions/upload/__init__.py @@ -0,0 +1,49 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .save_file_part import SaveFilePart +from .get_file import GetFile +from .save_big_file_part import SaveBigFilePart +from .get_web_file import GetWebFile +from .get_cdn_file import GetCdnFile +from .reupload_cdn_file import ReuploadCdnFile +from .get_cdn_file_hashes import GetCdnFileHashes +from .get_file_hashes import GetFileHashes + + +__all__ = [ + "SaveFilePart", + "GetFile", + "SaveBigFilePart", + "GetWebFile", + "GetCdnFile", + "ReuploadCdnFile", + "GetCdnFileHashes", + "GetFileHashes", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/upload/get_cdn_file.py b/pyrogram/raw/functions/upload/get_cdn_file.py new file mode 100644 index 00000000..12a1b2ac --- /dev/null +++ b/pyrogram/raw/functions/upload/get_cdn_file.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCdnFile(TLObject): # type: ignore + """Download a CDN file. + + + Details: + - Layer: ``224`` + - ID: ``395F69DA`` + + Parameters: + file_token (``bytes``): + File token + + offset (``int`` ``64-bit``): + Offset of chunk to download + + limit (``int`` ``32-bit``): + Length of chunk to download + + Returns: + :obj:`upload.CdnFile ` + """ + + __slots__: List[str] = ["file_token", "offset", "limit"] + + ID = 0x395f69da + QUALNAME = "functions.upload.GetCdnFile" + + def __init__(self, *, file_token: bytes, offset: int, limit: int) -> None: + self.file_token = file_token # bytes + self.offset = offset # long + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCdnFile": + # No flags + + file_token = Bytes.read(b) + + offset = Long.read(b) + + limit = Int.read(b) + + return GetCdnFile(file_token=file_token, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.file_token)) + + b.write(Long(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/get_cdn_file_hashes.py b/pyrogram/raw/functions/upload/get_cdn_file_hashes.py new file mode 100644 index 00000000..8d222b95 --- /dev/null +++ b/pyrogram/raw/functions/upload/get_cdn_file_hashes.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetCdnFileHashes(TLObject): # type: ignore + """Get SHA256 hashes for verifying downloaded CDN files + + + Details: + - Layer: ``224`` + - ID: ``91DC3F31`` + + Parameters: + file_token (``bytes``): + File + + offset (``int`` ``64-bit``): + Offset from which to start getting hashes + + Returns: + List of :obj:`FileHash ` + """ + + __slots__: List[str] = ["file_token", "offset"] + + ID = 0x91dc3f31 + QUALNAME = "functions.upload.GetCdnFileHashes" + + def __init__(self, *, file_token: bytes, offset: int) -> None: + self.file_token = file_token # bytes + self.offset = offset # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetCdnFileHashes": + # No flags + + file_token = Bytes.read(b) + + offset = Long.read(b) + + return GetCdnFileHashes(file_token=file_token, offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.file_token)) + + b.write(Long(self.offset)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/get_file.py b/pyrogram/raw/functions/upload/get_file.py new file mode 100644 index 00000000..f42e8f90 --- /dev/null +++ b/pyrogram/raw/functions/upload/get_file.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFile(TLObject): # type: ignore + """Returns content of a whole file or its part. + + + Details: + - Layer: ``224`` + - ID: ``BE5335BE`` + + Parameters: + location (:obj:`InputFileLocation `): + File location + + offset (``int`` ``64-bit``): + Number of bytes to be skipped + + limit (``int`` ``32-bit``): + Number of bytes to be returned + + precise (``bool``, *optional*): + Disable some checks on limit and offset values, useful for example to stream videos by keyframes + + cdn_supported (``bool``, *optional*): + Whether the current client supports CDN downloads + + Returns: + :obj:`upload.File ` + """ + + __slots__: List[str] = ["location", "offset", "limit", "precise", "cdn_supported"] + + ID = 0xbe5335be + QUALNAME = "functions.upload.GetFile" + + def __init__(self, *, location: "raw.base.InputFileLocation", offset: int, limit: int, precise: Optional[bool] = None, cdn_supported: Optional[bool] = None) -> None: + self.location = location # InputFileLocation + self.offset = offset # long + self.limit = limit # int + self.precise = precise # flags.0?true + self.cdn_supported = cdn_supported # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFile": + + flags = Int.read(b) + + precise = True if flags & (1 << 0) else False + cdn_supported = True if flags & (1 << 1) else False + location = TLObject.read(b) + + offset = Long.read(b) + + limit = Int.read(b) + + return GetFile(location=location, offset=offset, limit=limit, precise=precise, cdn_supported=cdn_supported) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.precise else 0 + flags |= (1 << 1) if self.cdn_supported else 0 + b.write(Int(flags)) + + b.write(self.location.write()) + + b.write(Long(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/get_file_hashes.py b/pyrogram/raw/functions/upload/get_file_hashes.py new file mode 100644 index 00000000..23015d02 --- /dev/null +++ b/pyrogram/raw/functions/upload/get_file_hashes.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFileHashes(TLObject): # type: ignore + """Get SHA256 hashes for verifying downloaded files + + + Details: + - Layer: ``224`` + - ID: ``9156982A`` + + Parameters: + location (:obj:`InputFileLocation `): + File + + offset (``int`` ``64-bit``): + Offset from which to get file hashes + + Returns: + List of :obj:`FileHash ` + """ + + __slots__: List[str] = ["location", "offset"] + + ID = 0x9156982a + QUALNAME = "functions.upload.GetFileHashes" + + def __init__(self, *, location: "raw.base.InputFileLocation", offset: int) -> None: + self.location = location # InputFileLocation + self.offset = offset # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFileHashes": + # No flags + + location = TLObject.read(b) + + offset = Long.read(b) + + return GetFileHashes(location=location, offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.location.write()) + + b.write(Long(self.offset)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/get_web_file.py b/pyrogram/raw/functions/upload/get_web_file.py new file mode 100644 index 00000000..f5aac045 --- /dev/null +++ b/pyrogram/raw/functions/upload/get_web_file.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetWebFile(TLObject): # type: ignore + """Returns content of a web file, by proxying the request through telegram, see the webfile docs for more info. + + + Details: + - Layer: ``224`` + - ID: ``24E6818D`` + + Parameters: + location (:obj:`InputWebFileLocation `): + The file to download + + offset (``int`` ``32-bit``): + Number of bytes to be skipped + + limit (``int`` ``32-bit``): + Number of bytes to be returned + + Returns: + :obj:`upload.WebFile ` + """ + + __slots__: List[str] = ["location", "offset", "limit"] + + ID = 0x24e6818d + QUALNAME = "functions.upload.GetWebFile" + + def __init__(self, *, location: "raw.base.InputWebFileLocation", offset: int, limit: int) -> None: + self.location = location # InputWebFileLocation + self.offset = offset # int + self.limit = limit # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetWebFile": + # No flags + + location = TLObject.read(b) + + offset = Int.read(b) + + limit = Int.read(b) + + return GetWebFile(location=location, offset=offset, limit=limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.location.write()) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/reupload_cdn_file.py b/pyrogram/raw/functions/upload/reupload_cdn_file.py new file mode 100644 index 00000000..2417a134 --- /dev/null +++ b/pyrogram/raw/functions/upload/reupload_cdn_file.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReuploadCdnFile(TLObject): # type: ignore + """Request a reupload of a certain file to a CDN DC. + + + Details: + - Layer: ``224`` + - ID: ``9B2754A8`` + + Parameters: + file_token (``bytes``): + File token + + request_token (``bytes``): + Request token + + Returns: + List of :obj:`FileHash ` + """ + + __slots__: List[str] = ["file_token", "request_token"] + + ID = 0x9b2754a8 + QUALNAME = "functions.upload.ReuploadCdnFile" + + def __init__(self, *, file_token: bytes, request_token: bytes) -> None: + self.file_token = file_token # bytes + self.request_token = request_token # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReuploadCdnFile": + # No flags + + file_token = Bytes.read(b) + + request_token = Bytes.read(b) + + return ReuploadCdnFile(file_token=file_token, request_token=request_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.file_token)) + + b.write(Bytes(self.request_token)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/save_big_file_part.py b/pyrogram/raw/functions/upload/save_big_file_part.py new file mode 100644 index 00000000..7f52f802 --- /dev/null +++ b/pyrogram/raw/functions/upload/save_big_file_part.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveBigFilePart(TLObject): # type: ignore + """Saves a part of a large file (over 10 MB in size) to be later passed to one of the methods. + + + Details: + - Layer: ``224`` + - ID: ``DE7B673D`` + + Parameters: + file_id (``int`` ``64-bit``): + Random file id, created by the client + + file_part (``int`` ``32-bit``): + Part sequence number + + file_total_parts (``int`` ``32-bit``): + Total number of parts + + bytes (``bytes``): + Binary data, part contents + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["file_id", "file_part", "file_total_parts", "bytes"] + + ID = 0xde7b673d + QUALNAME = "functions.upload.SaveBigFilePart" + + def __init__(self, *, file_id: int, file_part: int, file_total_parts: int, bytes: bytes) -> None: + self.file_id = file_id # long + self.file_part = file_part # int + self.file_total_parts = file_total_parts # int + self.bytes = bytes # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveBigFilePart": + # No flags + + file_id = Long.read(b) + + file_part = Int.read(b) + + file_total_parts = Int.read(b) + + bytes = Bytes.read(b) + + return SaveBigFilePart(file_id=file_id, file_part=file_part, file_total_parts=file_total_parts, bytes=bytes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.file_id)) + + b.write(Int(self.file_part)) + + b.write(Int(self.file_total_parts)) + + b.write(Bytes(self.bytes)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/upload/save_file_part.py b/pyrogram/raw/functions/upload/save_file_part.py new file mode 100644 index 00000000..1fe4f7b1 --- /dev/null +++ b/pyrogram/raw/functions/upload/save_file_part.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SaveFilePart(TLObject): # type: ignore + """Saves a part of file for further sending to one of the methods. + + + Details: + - Layer: ``224`` + - ID: ``B304A621`` + + Parameters: + file_id (``int`` ``64-bit``): + Random file identifier created by the client + + file_part (``int`` ``32-bit``): + Numerical order of a part + + bytes (``bytes``): + Binary data, content of a part + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["file_id", "file_part", "bytes"] + + ID = 0xb304a621 + QUALNAME = "functions.upload.SaveFilePart" + + def __init__(self, *, file_id: int, file_part: int, bytes: bytes) -> None: + self.file_id = file_id # long + self.file_part = file_part # int + self.bytes = bytes # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SaveFilePart": + # No flags + + file_id = Long.read(b) + + file_part = Int.read(b) + + bytes = Bytes.read(b) + + return SaveFilePart(file_id=file_id, file_part=file_part, bytes=bytes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.file_id)) + + b.write(Int(self.file_part)) + + b.write(Bytes(self.bytes)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/__init__.py b/pyrogram/raw/functions/users/__init__.py new file mode 100644 index 00000000..d4f95005 --- /dev/null +++ b/pyrogram/raw/functions/users/__init__.py @@ -0,0 +1,47 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .get_users import GetUsers +from .get_full_user import GetFullUser +from .set_secure_value_errors import SetSecureValueErrors +from .get_requirements_to_contact import GetRequirementsToContact +from .get_saved_music import GetSavedMusic +from .get_saved_music_by_id import GetSavedMusicByID +from .suggest_birthday import SuggestBirthday + + +__all__ = [ + "GetUsers", + "GetFullUser", + "SetSecureValueErrors", + "GetRequirementsToContact", + "GetSavedMusic", + "GetSavedMusicByID", + "SuggestBirthday", + "contest", + "auth", + "account", + "users", + "contacts", + "messages", + "updates", + "photos", + "upload", + "help", + "channels", + "bots", + "payments", + "stickers", + "phone", + "langpack", + "folders", + "stats", + "chatlists", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/functions/users/get_full_user.py b/pyrogram/raw/functions/users/get_full_user.py new file mode 100644 index 00000000..f0d39941 --- /dev/null +++ b/pyrogram/raw/functions/users/get_full_user.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetFullUser(TLObject): # type: ignore + """Returns extended user info by ID. + + + Details: + - Layer: ``224`` + - ID: ``B60F5918`` + + Parameters: + id (:obj:`InputUser `): + User ID + + Returns: + :obj:`users.UserFull ` + """ + + __slots__: List[str] = ["id"] + + ID = 0xb60f5918 + QUALNAME = "functions.users.GetFullUser" + + def __init__(self, *, id: "raw.base.InputUser") -> None: + self.id = id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetFullUser": + # No flags + + id = TLObject.read(b) + + return GetFullUser(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/get_requirements_to_contact.py b/pyrogram/raw/functions/users/get_requirements_to_contact.py new file mode 100644 index 00000000..6d51dd5e --- /dev/null +++ b/pyrogram/raw/functions/users/get_requirements_to_contact.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetRequirementsToContact(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``D89A83A3`` + + Parameters: + id (List of :obj:`InputUser `): + N/A + + Returns: + List of :obj:`RequirementToContact ` + """ + + __slots__: List[str] = ["id"] + + ID = 0xd89a83a3 + QUALNAME = "functions.users.GetRequirementsToContact" + + def __init__(self, *, id: List["raw.base.InputUser"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetRequirementsToContact": + # No flags + + id = TLObject.read(b) + + return GetRequirementsToContact(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/get_saved_music.py b/pyrogram/raw/functions/users/get_saved_music.py new file mode 100644 index 00000000..b6f28a17 --- /dev/null +++ b/pyrogram/raw/functions/users/get_saved_music.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedMusic(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``788D7FE3`` + + Parameters: + id (:obj:`InputUser `): + N/A + + offset (``int`` ``32-bit``): + N/A + + limit (``int`` ``32-bit``): + N/A + + hash (``int`` ``64-bit``): + N/A + + Returns: + :obj:`users.SavedMusic ` + """ + + __slots__: List[str] = ["id", "offset", "limit", "hash"] + + ID = 0x788d7fe3 + QUALNAME = "functions.users.GetSavedMusic" + + def __init__(self, *, id: "raw.base.InputUser", offset: int, limit: int, hash: int) -> None: + self.id = id # InputUser + self.offset = offset # int + self.limit = limit # int + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedMusic": + # No flags + + id = TLObject.read(b) + + offset = Int.read(b) + + limit = Int.read(b) + + hash = Long.read(b) + + return GetSavedMusic(id=id, offset=offset, limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(Int(self.offset)) + + b.write(Int(self.limit)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/get_saved_music_by_id.py b/pyrogram/raw/functions/users/get_saved_music_by_id.py new file mode 100644 index 00000000..c5c0dd6a --- /dev/null +++ b/pyrogram/raw/functions/users/get_saved_music_by_id.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetSavedMusicByID(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``7573A4E9`` + + Parameters: + id (:obj:`InputUser `): + N/A + + documents (List of :obj:`InputDocument `): + N/A + + Returns: + :obj:`users.SavedMusic ` + """ + + __slots__: List[str] = ["id", "documents"] + + ID = 0x7573a4e9 + QUALNAME = "functions.users.GetSavedMusicByID" + + def __init__(self, *, id: "raw.base.InputUser", documents: List["raw.base.InputDocument"]) -> None: + self.id = id # InputUser + self.documents = documents # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetSavedMusicByID": + # No flags + + id = TLObject.read(b) + + documents = TLObject.read(b) + + return GetSavedMusicByID(id=id, documents=documents) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(Vector(self.documents)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/get_users.py b/pyrogram/raw/functions/users/get_users.py new file mode 100644 index 00000000..4f3e732e --- /dev/null +++ b/pyrogram/raw/functions/users/get_users.py @@ -0,0 +1,55 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GetUsers(TLObject): # type: ignore + """Returns basic user info according to their identifiers. + + + Details: + - Layer: ``224`` + - ID: ``D91A548`` + + Parameters: + id (List of :obj:`InputUser `): + List of user identifiers + + Returns: + List of :obj:`User ` + """ + + __slots__: List[str] = ["id"] + + ID = 0xd91a548 + QUALNAME = "functions.users.GetUsers" + + def __init__(self, *, id: List["raw.base.InputUser"]) -> None: + self.id = id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GetUsers": + # No flags + + id = TLObject.read(b) + + return GetUsers(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/set_secure_value_errors.py b/pyrogram/raw/functions/users/set_secure_value_errors.py new file mode 100644 index 00000000..9b415679 --- /dev/null +++ b/pyrogram/raw/functions/users/set_secure_value_errors.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SetSecureValueErrors(TLObject): # type: ignore + """Notify the user that the sent passport data contains some errors The user will not be able to re-submit their Passport data to you until the errors are fixed (the contents of the field for which you returned the error must change). + + + Details: + - Layer: ``224`` + - ID: ``90C894B5`` + + Parameters: + id (:obj:`InputUser `): + The user + + errors (List of :obj:`SecureValueError `): + Errors + + Returns: + ``bool`` + """ + + __slots__: List[str] = ["id", "errors"] + + ID = 0x90c894b5 + QUALNAME = "functions.users.SetSecureValueErrors" + + def __init__(self, *, id: "raw.base.InputUser", errors: List["raw.base.SecureValueError"]) -> None: + self.id = id # InputUser + self.errors = errors # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SetSecureValueErrors": + # No flags + + id = TLObject.read(b) + + errors = TLObject.read(b) + + return SetSecureValueErrors(id=id, errors=errors) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(Vector(self.errors)) + + return b.getvalue() diff --git a/pyrogram/raw/functions/users/suggest_birthday.py b/pyrogram/raw/functions/users/suggest_birthday.py new file mode 100644 index 00000000..951f3872 --- /dev/null +++ b/pyrogram/raw/functions/users/suggest_birthday.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SuggestBirthday(TLObject): # type: ignore + """Telegram API function. + + Details: + - Layer: ``224`` + - ID: ``FC533372`` + + Parameters: + id (:obj:`InputUser `): + N/A + + birthday (:obj:`Birthday `): + N/A + + Returns: + :obj:`Updates ` + """ + + __slots__: List[str] = ["id", "birthday"] + + ID = 0xfc533372 + QUALNAME = "functions.users.SuggestBirthday" + + def __init__(self, *, id: "raw.base.InputUser", birthday: "raw.base.Birthday") -> None: + self.id = id # InputUser + self.birthday = birthday # Birthday + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SuggestBirthday": + # No flags + + id = TLObject.read(b) + + birthday = TLObject.read(b) + + return SuggestBirthday(id=id, birthday=birthday) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + b.write(self.birthday.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/__init__.py b/pyrogram/raw/types/__init__.py new file mode 100644 index 00000000..ad2d0249 --- /dev/null +++ b/pyrogram/raw/types/__init__.py @@ -0,0 +1,2574 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .res_pq import ResPQ +from .pq_inner_data import PQInnerData +from .pq_inner_data_dc import PQInnerDataDc +from .pq_inner_data_temp import PQInnerDataTemp +from .pq_inner_data_temp_dc import PQInnerDataTempDc +from .bind_auth_key_inner import BindAuthKeyInner +from .server_dh_params_fail import ServerDHParamsFail +from .server_dh_params_ok import ServerDHParamsOk +from .server_dh_inner_data import ServerDHInnerData +from .client_dh_inner_data import ClientDHInnerData +from .dh_gen_ok import DhGenOk +from .dh_gen_retry import DhGenRetry +from .dh_gen_fail import DhGenFail +from .destroy_auth_key_ok import DestroyAuthKeyOk +from .destroy_auth_key_none import DestroyAuthKeyNone +from .destroy_auth_key_fail import DestroyAuthKeyFail +from .msgs_ack import MsgsAck +from .bad_msg_notification import BadMsgNotification +from .bad_server_salt import BadServerSalt +from .msgs_state_req import MsgsStateReq +from .msgs_state_info import MsgsStateInfo +from .msgs_all_info import MsgsAllInfo +from .msg_detailed_info import MsgDetailedInfo +from .msg_new_detailed_info import MsgNewDetailedInfo +from .msg_resend_req import MsgResendReq +from .msg_resend_ans_req import MsgResendAnsReq +from .rpc_result import RpcResult +from .rpc_error import RpcError +from .rpc_answer_unknown import RpcAnswerUnknown +from .rpc_answer_dropped_running import RpcAnswerDroppedRunning +from .rpc_answer_dropped import RpcAnswerDropped +from .pong import Pong +from .destroy_session_ok import DestroySessionOk +from .destroy_session_none import DestroySessionNone +from .new_session_created import NewSessionCreated +from .http_wait import HttpWait +from .ip_port import IpPort +from .ip_port_secret import IpPortSecret +from .access_point_rule import AccessPointRule +from .input_peer_empty import InputPeerEmpty +from .input_peer_self import InputPeerSelf +from .input_peer_chat import InputPeerChat +from .input_peer_user import InputPeerUser +from .input_peer_channel import InputPeerChannel +from .input_peer_user_from_message import InputPeerUserFromMessage +from .input_peer_channel_from_message import InputPeerChannelFromMessage +from .input_user_empty import InputUserEmpty +from .input_user_self import InputUserSelf +from .input_user import InputUser +from .input_user_from_message import InputUserFromMessage +from .input_phone_contact import InputPhoneContact +from .input_file import InputFile +from .input_file_big import InputFileBig +from .input_file_story_document import InputFileStoryDocument +from .input_media_empty import InputMediaEmpty +from .input_media_uploaded_photo import InputMediaUploadedPhoto +from .input_media_photo import InputMediaPhoto +from .input_media_geo_point import InputMediaGeoPoint +from .input_media_contact import InputMediaContact +from .input_media_uploaded_document import InputMediaUploadedDocument +from .input_media_document import InputMediaDocument +from .input_media_venue import InputMediaVenue +from .input_media_photo_external import InputMediaPhotoExternal +from .input_media_document_external import InputMediaDocumentExternal +from .input_media_game import InputMediaGame +from .input_media_invoice import InputMediaInvoice +from .input_media_geo_live import InputMediaGeoLive +from .input_media_poll import InputMediaPoll +from .input_media_dice import InputMediaDice +from .input_media_story import InputMediaStory +from .input_media_web_page import InputMediaWebPage +from .input_media_paid_media import InputMediaPaidMedia +from .input_media_todo import InputMediaTodo +from .input_media_stake_dice import InputMediaStakeDice +from .input_chat_photo_empty import InputChatPhotoEmpty +from .input_chat_uploaded_photo import InputChatUploadedPhoto +from .input_chat_photo import InputChatPhoto +from .input_geo_point_empty import InputGeoPointEmpty +from .input_geo_point import InputGeoPoint +from .input_photo_empty import InputPhotoEmpty +from .input_photo import InputPhoto +from .input_file_location import InputFileLocation +from .input_encrypted_file_location import InputEncryptedFileLocation +from .input_document_file_location import InputDocumentFileLocation +from .input_secure_file_location import InputSecureFileLocation +from .input_takeout_file_location import InputTakeoutFileLocation +from .input_photo_file_location import InputPhotoFileLocation +from .input_photo_legacy_file_location import InputPhotoLegacyFileLocation +from .input_peer_photo_file_location import InputPeerPhotoFileLocation +from .input_sticker_set_thumb import InputStickerSetThumb +from .input_group_call_stream import InputGroupCallStream +from .peer_user import PeerUser +from .peer_chat import PeerChat +from .peer_channel import PeerChannel +from .user_empty import UserEmpty +from .user import User +from .user_profile_photo_empty import UserProfilePhotoEmpty +from .user_profile_photo import UserProfilePhoto +from .user_status_empty import UserStatusEmpty +from .user_status_online import UserStatusOnline +from .user_status_offline import UserStatusOffline +from .user_status_recently import UserStatusRecently +from .user_status_last_week import UserStatusLastWeek +from .user_status_last_month import UserStatusLastMonth +from .user_status_hidden import UserStatusHidden +from .chat_empty import ChatEmpty +from .chat import Chat +from .chat_forbidden import ChatForbidden +from .channel import Channel +from .channel_forbidden import ChannelForbidden +from .chat_full import ChatFull +from .channel_full import ChannelFull +from .chat_participant import ChatParticipant +from .chat_participant_creator import ChatParticipantCreator +from .chat_participant_admin import ChatParticipantAdmin +from .chat_participants_forbidden import ChatParticipantsForbidden +from .chat_participants import ChatParticipants +from .chat_photo_empty import ChatPhotoEmpty +from .chat_photo import ChatPhoto +from .message_empty import MessageEmpty +from .message import Message +from .message_service import MessageService +from .message_media_empty import MessageMediaEmpty +from .message_media_photo import MessageMediaPhoto +from .message_media_geo import MessageMediaGeo +from .message_media_contact import MessageMediaContact +from .message_media_unsupported import MessageMediaUnsupported +from .message_media_document import MessageMediaDocument +from .message_media_web_page import MessageMediaWebPage +from .message_media_venue import MessageMediaVenue +from .message_media_game import MessageMediaGame +from .message_media_invoice import MessageMediaInvoice +from .message_media_geo_live import MessageMediaGeoLive +from .message_media_poll import MessageMediaPoll +from .message_media_dice import MessageMediaDice +from .message_media_story import MessageMediaStory +from .message_media_giveaway import MessageMediaGiveaway +from .message_media_giveaway_results import MessageMediaGiveawayResults +from .message_media_paid_media import MessageMediaPaidMedia +from .message_media_to_do import MessageMediaToDo +from .message_media_video_stream import MessageMediaVideoStream +from .message_action_empty import MessageActionEmpty +from .message_action_chat_create import MessageActionChatCreate +from .message_action_chat_edit_title import MessageActionChatEditTitle +from .message_action_chat_edit_photo import MessageActionChatEditPhoto +from .message_action_chat_delete_photo import MessageActionChatDeletePhoto +from .message_action_chat_add_user import MessageActionChatAddUser +from .message_action_chat_delete_user import MessageActionChatDeleteUser +from .message_action_chat_joined_by_link import MessageActionChatJoinedByLink +from .message_action_channel_create import MessageActionChannelCreate +from .message_action_chat_migrate_to import MessageActionChatMigrateTo +from .message_action_channel_migrate_from import MessageActionChannelMigrateFrom +from .message_action_pin_message import MessageActionPinMessage +from .message_action_history_clear import MessageActionHistoryClear +from .message_action_game_score import MessageActionGameScore +from .message_action_payment_sent_me import MessageActionPaymentSentMe +from .message_action_payment_sent import MessageActionPaymentSent +from .message_action_phone_call import MessageActionPhoneCall +from .message_action_screenshot_taken import MessageActionScreenshotTaken +from .message_action_custom_action import MessageActionCustomAction +from .message_action_bot_allowed import MessageActionBotAllowed +from .message_action_secure_values_sent_me import MessageActionSecureValuesSentMe +from .message_action_secure_values_sent import MessageActionSecureValuesSent +from .message_action_contact_sign_up import MessageActionContactSignUp +from .message_action_geo_proximity_reached import MessageActionGeoProximityReached +from .message_action_group_call import MessageActionGroupCall +from .message_action_invite_to_group_call import MessageActionInviteToGroupCall +from .message_action_set_messages_ttl import MessageActionSetMessagesTTL +from .message_action_group_call_scheduled import MessageActionGroupCallScheduled +from .message_action_set_chat_theme import MessageActionSetChatTheme +from .message_action_chat_joined_by_request import MessageActionChatJoinedByRequest +from .message_action_web_view_data_sent_me import MessageActionWebViewDataSentMe +from .message_action_web_view_data_sent import MessageActionWebViewDataSent +from .message_action_gift_premium import MessageActionGiftPremium +from .message_action_topic_create import MessageActionTopicCreate +from .message_action_topic_edit import MessageActionTopicEdit +from .message_action_suggest_profile_photo import MessageActionSuggestProfilePhoto +from .message_action_requested_peer import MessageActionRequestedPeer +from .message_action_set_chat_wall_paper import MessageActionSetChatWallPaper +from .message_action_gift_code import MessageActionGiftCode +from .message_action_giveaway_launch import MessageActionGiveawayLaunch +from .message_action_giveaway_results import MessageActionGiveawayResults +from .message_action_boost_apply import MessageActionBoostApply +from .message_action_requested_peer_sent_me import MessageActionRequestedPeerSentMe +from .message_action_payment_refunded import MessageActionPaymentRefunded +from .message_action_gift_stars import MessageActionGiftStars +from .message_action_prize_stars import MessageActionPrizeStars +from .message_action_star_gift import MessageActionStarGift +from .message_action_star_gift_unique import MessageActionStarGiftUnique +from .message_action_paid_messages_refunded import MessageActionPaidMessagesRefunded +from .message_action_paid_messages_price import MessageActionPaidMessagesPrice +from .message_action_conference_call import MessageActionConferenceCall +from .message_action_todo_completions import MessageActionTodoCompletions +from .message_action_todo_append_tasks import MessageActionTodoAppendTasks +from .message_action_suggested_post_approval import MessageActionSuggestedPostApproval +from .message_action_suggested_post_success import MessageActionSuggestedPostSuccess +from .message_action_suggested_post_refund import MessageActionSuggestedPostRefund +from .message_action_gift_ton import MessageActionGiftTon +from .message_action_suggest_birthday import MessageActionSuggestBirthday +from .message_action_star_gift_purchase_offer import MessageActionStarGiftPurchaseOffer +from .message_action_star_gift_purchase_offer_declined import MessageActionStarGiftPurchaseOfferDeclined +from .message_action_phone_number_request import MessageActionPhoneNumberRequest +from .message_action_user_joined import MessageActionUserJoined +from .message_action_user_updated_photo import MessageActionUserUpdatedPhoto +from .message_action_ttl_change import MessageActionTTLChange +from .message_action_created_broadcast_list import MessageActionCreatedBroadcastList +from .message_action_login_unknown_location import MessageActionLoginUnknownLocation +from .message_action_new_creator_pending import MessageActionNewCreatorPending +from .message_action_change_creator import MessageActionChangeCreator +from .dialog import Dialog +from .dialog_folder import DialogFolder +from .photo_empty import PhotoEmpty +from .photo import Photo +from .photo_size_empty import PhotoSizeEmpty +from .photo_size import PhotoSize +from .photo_cached_size import PhotoCachedSize +from .photo_stripped_size import PhotoStrippedSize +from .photo_size_progressive import PhotoSizeProgressive +from .photo_path_size import PhotoPathSize +from .geo_point_empty import GeoPointEmpty +from .geo_point import GeoPoint +from .input_notify_peer import InputNotifyPeer +from .input_notify_users import InputNotifyUsers +from .input_notify_chats import InputNotifyChats +from .input_notify_broadcasts import InputNotifyBroadcasts +from .input_notify_forum_topic import InputNotifyForumTopic +from .input_peer_notify_settings import InputPeerNotifySettings +from .peer_notify_settings import PeerNotifySettings +from .peer_settings import PeerSettings +from .wall_paper import WallPaper +from .wall_paper_no_file import WallPaperNoFile +from .input_report_reason_spam import InputReportReasonSpam +from .input_report_reason_violence import InputReportReasonViolence +from .input_report_reason_pornography import InputReportReasonPornography +from .input_report_reason_child_abuse import InputReportReasonChildAbuse +from .input_report_reason_other import InputReportReasonOther +from .input_report_reason_copyright import InputReportReasonCopyright +from .input_report_reason_geo_irrelevant import InputReportReasonGeoIrrelevant +from .input_report_reason_fake import InputReportReasonFake +from .input_report_reason_illegal_drugs import InputReportReasonIllegalDrugs +from .input_report_reason_personal_details import InputReportReasonPersonalDetails +from .user_full import UserFull +from .contact import Contact +from .imported_contact import ImportedContact +from .contact_status import ContactStatus +from .input_messages_filter_empty import InputMessagesFilterEmpty +from .input_messages_filter_photos import InputMessagesFilterPhotos +from .input_messages_filter_video import InputMessagesFilterVideo +from .input_messages_filter_photo_video import InputMessagesFilterPhotoVideo +from .input_messages_filter_document import InputMessagesFilterDocument +from .input_messages_filter_url import InputMessagesFilterUrl +from .input_messages_filter_gif import InputMessagesFilterGif +from .input_messages_filter_voice import InputMessagesFilterVoice +from .input_messages_filter_music import InputMessagesFilterMusic +from .input_messages_filter_chat_photos import InputMessagesFilterChatPhotos +from .input_messages_filter_phone_calls import InputMessagesFilterPhoneCalls +from .input_messages_filter_round_voice import InputMessagesFilterRoundVoice +from .input_messages_filter_round_video import InputMessagesFilterRoundVideo +from .input_messages_filter_my_mentions import InputMessagesFilterMyMentions +from .input_messages_filter_geo import InputMessagesFilterGeo +from .input_messages_filter_contacts import InputMessagesFilterContacts +from .input_messages_filter_pinned import InputMessagesFilterPinned +from .input_messages_filter_photo_video_documents import InputMessagesFilterPhotoVideoDocuments +from .update_new_message import UpdateNewMessage +from .update_message_id import UpdateMessageID +from .update_delete_messages import UpdateDeleteMessages +from .update_user_typing import UpdateUserTyping +from .update_chat_user_typing import UpdateChatUserTyping +from .update_chat_participants import UpdateChatParticipants +from .update_user_status import UpdateUserStatus +from .update_user_name import UpdateUserName +from .update_new_authorization import UpdateNewAuthorization +from .update_new_encrypted_message import UpdateNewEncryptedMessage +from .update_encrypted_chat_typing import UpdateEncryptedChatTyping +from .update_encryption import UpdateEncryption +from .update_encrypted_messages_read import UpdateEncryptedMessagesRead +from .update_chat_participant_add import UpdateChatParticipantAdd +from .update_chat_participant_delete import UpdateChatParticipantDelete +from .update_dc_options import UpdateDcOptions +from .update_notify_settings import UpdateNotifySettings +from .update_service_notification import UpdateServiceNotification +from .update_privacy import UpdatePrivacy +from .update_user_phone import UpdateUserPhone +from .update_read_history_inbox import UpdateReadHistoryInbox +from .update_read_history_outbox import UpdateReadHistoryOutbox +from .update_web_page import UpdateWebPage +from .update_read_messages_contents import UpdateReadMessagesContents +from .update_channel_too_long import UpdateChannelTooLong +from .update_channel import UpdateChannel +from .update_new_channel_message import UpdateNewChannelMessage +from .update_read_channel_inbox import UpdateReadChannelInbox +from .update_delete_channel_messages import UpdateDeleteChannelMessages +from .update_channel_message_views import UpdateChannelMessageViews +from .update_chat_participant_admin import UpdateChatParticipantAdmin +from .update_new_sticker_set import UpdateNewStickerSet +from .update_sticker_sets_order import UpdateStickerSetsOrder +from .update_sticker_sets import UpdateStickerSets +from .update_saved_gifs import UpdateSavedGifs +from .update_bot_inline_query import UpdateBotInlineQuery +from .update_bot_inline_send import UpdateBotInlineSend +from .update_edit_channel_message import UpdateEditChannelMessage +from .update_bot_callback_query import UpdateBotCallbackQuery +from .update_edit_message import UpdateEditMessage +from .update_inline_bot_callback_query import UpdateInlineBotCallbackQuery +from .update_read_channel_outbox import UpdateReadChannelOutbox +from .update_draft_message import UpdateDraftMessage +from .update_read_featured_stickers import UpdateReadFeaturedStickers +from .update_recent_stickers import UpdateRecentStickers +from .update_config import UpdateConfig +from .update_pts_changed import UpdatePtsChanged +from .update_channel_web_page import UpdateChannelWebPage +from .update_dialog_pinned import UpdateDialogPinned +from .update_pinned_dialogs import UpdatePinnedDialogs +from .update_bot_webhook_json import UpdateBotWebhookJSON +from .update_bot_webhook_json_query import UpdateBotWebhookJSONQuery +from .update_bot_shipping_query import UpdateBotShippingQuery +from .update_bot_precheckout_query import UpdateBotPrecheckoutQuery +from .update_phone_call import UpdatePhoneCall +from .update_lang_pack_too_long import UpdateLangPackTooLong +from .update_lang_pack import UpdateLangPack +from .update_faved_stickers import UpdateFavedStickers +from .update_channel_read_messages_contents import UpdateChannelReadMessagesContents +from .update_contacts_reset import UpdateContactsReset +from .update_channel_available_messages import UpdateChannelAvailableMessages +from .update_dialog_unread_mark import UpdateDialogUnreadMark +from .update_message_poll import UpdateMessagePoll +from .update_chat_default_banned_rights import UpdateChatDefaultBannedRights +from .update_folder_peers import UpdateFolderPeers +from .update_peer_settings import UpdatePeerSettings +from .update_peer_located import UpdatePeerLocated +from .update_new_scheduled_message import UpdateNewScheduledMessage +from .update_delete_scheduled_messages import UpdateDeleteScheduledMessages +from .update_theme import UpdateTheme +from .update_geo_live_viewed import UpdateGeoLiveViewed +from .update_login_token import UpdateLoginToken +from .update_message_poll_vote import UpdateMessagePollVote +from .update_dialog_filter import UpdateDialogFilter +from .update_dialog_filter_order import UpdateDialogFilterOrder +from .update_dialog_filters import UpdateDialogFilters +from .update_phone_call_signaling_data import UpdatePhoneCallSignalingData +from .update_channel_message_forwards import UpdateChannelMessageForwards +from .update_read_channel_discussion_inbox import UpdateReadChannelDiscussionInbox +from .update_read_channel_discussion_outbox import UpdateReadChannelDiscussionOutbox +from .update_peer_blocked import UpdatePeerBlocked +from .update_channel_user_typing import UpdateChannelUserTyping +from .update_pinned_messages import UpdatePinnedMessages +from .update_pinned_channel_messages import UpdatePinnedChannelMessages +from .update_chat import UpdateChat +from .update_group_call_participants import UpdateGroupCallParticipants +from .update_group_call import UpdateGroupCall +from .update_peer_history_ttl import UpdatePeerHistoryTTL +from .update_chat_participant import UpdateChatParticipant +from .update_channel_participant import UpdateChannelParticipant +from .update_bot_stopped import UpdateBotStopped +from .update_group_call_connection import UpdateGroupCallConnection +from .update_bot_commands import UpdateBotCommands +from .update_pending_join_requests import UpdatePendingJoinRequests +from .update_bot_chat_invite_requester import UpdateBotChatInviteRequester +from .update_message_reactions import UpdateMessageReactions +from .update_attach_menu_bots import UpdateAttachMenuBots +from .update_web_view_result_sent import UpdateWebViewResultSent +from .update_bot_menu_button import UpdateBotMenuButton +from .update_saved_ringtones import UpdateSavedRingtones +from .update_transcribed_audio import UpdateTranscribedAudio +from .update_read_featured_emoji_stickers import UpdateReadFeaturedEmojiStickers +from .update_user_emoji_status import UpdateUserEmojiStatus +from .update_recent_emoji_statuses import UpdateRecentEmojiStatuses +from .update_recent_reactions import UpdateRecentReactions +from .update_move_sticker_set_to_top import UpdateMoveStickerSetToTop +from .update_message_extended_media import UpdateMessageExtendedMedia +from .update_user import UpdateUser +from .update_auto_save_settings import UpdateAutoSaveSettings +from .update_story import UpdateStory +from .update_read_stories import UpdateReadStories +from .update_story_id import UpdateStoryID +from .update_stories_stealth_mode import UpdateStoriesStealthMode +from .update_sent_story_reaction import UpdateSentStoryReaction +from .update_bot_chat_boost import UpdateBotChatBoost +from .update_channel_view_forum_as_messages import UpdateChannelViewForumAsMessages +from .update_peer_wallpaper import UpdatePeerWallpaper +from .update_bot_message_reaction import UpdateBotMessageReaction +from .update_bot_message_reactions import UpdateBotMessageReactions +from .update_saved_dialog_pinned import UpdateSavedDialogPinned +from .update_pinned_saved_dialogs import UpdatePinnedSavedDialogs +from .update_saved_reaction_tags import UpdateSavedReactionTags +from .update_sms_job import UpdateSmsJob +from .update_quick_replies import UpdateQuickReplies +from .update_new_quick_reply import UpdateNewQuickReply +from .update_delete_quick_reply import UpdateDeleteQuickReply +from .update_quick_reply_message import UpdateQuickReplyMessage +from .update_delete_quick_reply_messages import UpdateDeleteQuickReplyMessages +from .update_bot_business_connect import UpdateBotBusinessConnect +from .update_bot_new_business_message import UpdateBotNewBusinessMessage +from .update_bot_edit_business_message import UpdateBotEditBusinessMessage +from .update_bot_delete_business_message import UpdateBotDeleteBusinessMessage +from .update_new_story_reaction import UpdateNewStoryReaction +from .update_stars_balance import UpdateStarsBalance +from .update_business_bot_callback_query import UpdateBusinessBotCallbackQuery +from .update_stars_revenue_status import UpdateStarsRevenueStatus +from .update_bot_purchased_paid_media import UpdateBotPurchasedPaidMedia +from .update_paid_reaction_privacy import UpdatePaidReactionPrivacy +from .update_sent_phone_code import UpdateSentPhoneCode +from .update_group_call_chain_blocks import UpdateGroupCallChainBlocks +from .update_read_mono_forum_inbox import UpdateReadMonoForumInbox +from .update_read_mono_forum_outbox import UpdateReadMonoForumOutbox +from .update_mono_forum_no_paid_exception import UpdateMonoForumNoPaidException +from .update_group_call_message import UpdateGroupCallMessage +from .update_group_call_encrypted_message import UpdateGroupCallEncryptedMessage +from .update_pinned_forum_topic import UpdatePinnedForumTopic +from .update_pinned_forum_topics import UpdatePinnedForumTopics +from .update_delete_group_call_messages import UpdateDeleteGroupCallMessages +from .update_star_gift_auction_state import UpdateStarGiftAuctionState +from .update_star_gift_auction_user_state import UpdateStarGiftAuctionUserState +from .update_emoji_game_info import UpdateEmojiGameInfo +from .update_transcribe_audio import UpdateTranscribeAudio +from .update_bot_subscription_expire import UpdateBotSubscriptionExpire +from .update_star_gift_craft_fail import UpdateStarGiftCraftFail +from .updates_too_long import UpdatesTooLong +from .update_short_message import UpdateShortMessage +from .update_short_chat_message import UpdateShortChatMessage +from .update_short import UpdateShort +from .updates_combined import UpdatesCombined +from .updates_t import Updates +from .update_short_sent_message import UpdateShortSentMessage +from .dc_option import DcOption +from .config import Config +from .nearest_dc import NearestDc +from .encrypted_chat_empty import EncryptedChatEmpty +from .encrypted_chat_waiting import EncryptedChatWaiting +from .encrypted_chat_requested import EncryptedChatRequested +from .encrypted_chat import EncryptedChat +from .encrypted_chat_discarded import EncryptedChatDiscarded +from .input_encrypted_chat import InputEncryptedChat +from .encrypted_file_empty import EncryptedFileEmpty +from .encrypted_file import EncryptedFile +from .input_encrypted_file_empty import InputEncryptedFileEmpty +from .input_encrypted_file_uploaded import InputEncryptedFileUploaded +from .input_encrypted_file import InputEncryptedFile +from .input_encrypted_file_big_uploaded import InputEncryptedFileBigUploaded +from .encrypted_message import EncryptedMessage +from .encrypted_message_service import EncryptedMessageService +from .input_document_empty import InputDocumentEmpty +from .input_document import InputDocument +from .document_empty import DocumentEmpty +from .document import Document +from .notify_peer import NotifyPeer +from .notify_users import NotifyUsers +from .notify_chats import NotifyChats +from .notify_broadcasts import NotifyBroadcasts +from .notify_forum_topic import NotifyForumTopic +from .send_message_typing_action import SendMessageTypingAction +from .send_message_cancel_action import SendMessageCancelAction +from .send_message_record_video_action import SendMessageRecordVideoAction +from .send_message_upload_video_action import SendMessageUploadVideoAction +from .send_message_record_audio_action import SendMessageRecordAudioAction +from .send_message_upload_audio_action import SendMessageUploadAudioAction +from .send_message_upload_photo_action import SendMessageUploadPhotoAction +from .send_message_upload_document_action import SendMessageUploadDocumentAction +from .send_message_geo_location_action import SendMessageGeoLocationAction +from .send_message_choose_contact_action import SendMessageChooseContactAction +from .send_message_game_play_action import SendMessageGamePlayAction +from .send_message_record_round_action import SendMessageRecordRoundAction +from .send_message_upload_round_action import SendMessageUploadRoundAction +from .speaking_in_group_call_action import SpeakingInGroupCallAction +from .send_message_history_import_action import SendMessageHistoryImportAction +from .send_message_choose_sticker_action import SendMessageChooseStickerAction +from .send_message_emoji_interaction import SendMessageEmojiInteraction +from .send_message_emoji_interaction_seen import SendMessageEmojiInteractionSeen +from .send_message_text_draft_action import SendMessageTextDraftAction +from .input_privacy_key_status_timestamp import InputPrivacyKeyStatusTimestamp +from .input_privacy_key_chat_invite import InputPrivacyKeyChatInvite +from .input_privacy_key_phone_call import InputPrivacyKeyPhoneCall +from .input_privacy_key_phone_p2_p import InputPrivacyKeyPhoneP2P +from .input_privacy_key_forwards import InputPrivacyKeyForwards +from .input_privacy_key_profile_photo import InputPrivacyKeyProfilePhoto +from .input_privacy_key_phone_number import InputPrivacyKeyPhoneNumber +from .input_privacy_key_added_by_phone import InputPrivacyKeyAddedByPhone +from .input_privacy_key_voice_messages import InputPrivacyKeyVoiceMessages +from .input_privacy_key_about import InputPrivacyKeyAbout +from .input_privacy_key_birthday import InputPrivacyKeyBirthday +from .input_privacy_key_star_gifts_auto_save import InputPrivacyKeyStarGiftsAutoSave +from .input_privacy_key_no_paid_messages import InputPrivacyKeyNoPaidMessages +from .input_privacy_key_saved_music import InputPrivacyKeySavedMusic +from .privacy_key_status_timestamp import PrivacyKeyStatusTimestamp +from .privacy_key_chat_invite import PrivacyKeyChatInvite +from .privacy_key_phone_call import PrivacyKeyPhoneCall +from .privacy_key_phone_p2_p import PrivacyKeyPhoneP2P +from .privacy_key_forwards import PrivacyKeyForwards +from .privacy_key_profile_photo import PrivacyKeyProfilePhoto +from .privacy_key_phone_number import PrivacyKeyPhoneNumber +from .privacy_key_added_by_phone import PrivacyKeyAddedByPhone +from .privacy_key_voice_messages import PrivacyKeyVoiceMessages +from .privacy_key_about import PrivacyKeyAbout +from .privacy_key_birthday import PrivacyKeyBirthday +from .privacy_key_star_gifts_auto_save import PrivacyKeyStarGiftsAutoSave +from .privacy_key_no_paid_messages import PrivacyKeyNoPaidMessages +from .privacy_key_saved_music import PrivacyKeySavedMusic +from .input_privacy_value_allow_contacts import InputPrivacyValueAllowContacts +from .input_privacy_value_allow_all import InputPrivacyValueAllowAll +from .input_privacy_value_allow_users import InputPrivacyValueAllowUsers +from .input_privacy_value_disallow_contacts import InputPrivacyValueDisallowContacts +from .input_privacy_value_disallow_all import InputPrivacyValueDisallowAll +from .input_privacy_value_disallow_users import InputPrivacyValueDisallowUsers +from .input_privacy_value_allow_chat_participants import InputPrivacyValueAllowChatParticipants +from .input_privacy_value_disallow_chat_participants import InputPrivacyValueDisallowChatParticipants +from .input_privacy_value_allow_close_friends import InputPrivacyValueAllowCloseFriends +from .input_privacy_value_allow_premium import InputPrivacyValueAllowPremium +from .input_privacy_value_allow_bots import InputPrivacyValueAllowBots +from .input_privacy_value_disallow_bots import InputPrivacyValueDisallowBots +from .privacy_value_allow_contacts import PrivacyValueAllowContacts +from .privacy_value_allow_all import PrivacyValueAllowAll +from .privacy_value_allow_users import PrivacyValueAllowUsers +from .privacy_value_disallow_contacts import PrivacyValueDisallowContacts +from .privacy_value_disallow_all import PrivacyValueDisallowAll +from .privacy_value_disallow_users import PrivacyValueDisallowUsers +from .privacy_value_allow_chat_participants import PrivacyValueAllowChatParticipants +from .privacy_value_disallow_chat_participants import PrivacyValueDisallowChatParticipants +from .privacy_value_allow_close_friends import PrivacyValueAllowCloseFriends +from .privacy_value_allow_premium import PrivacyValueAllowPremium +from .privacy_value_allow_bots import PrivacyValueAllowBots +from .privacy_value_disallow_bots import PrivacyValueDisallowBots +from .account_days_ttl import AccountDaysTTL +from .document_attribute_image_size import DocumentAttributeImageSize +from .document_attribute_animated import DocumentAttributeAnimated +from .document_attribute_sticker import DocumentAttributeSticker +from .document_attribute_video import DocumentAttributeVideo +from .document_attribute_audio import DocumentAttributeAudio +from .document_attribute_filename import DocumentAttributeFilename +from .document_attribute_has_stickers import DocumentAttributeHasStickers +from .document_attribute_custom_emoji import DocumentAttributeCustomEmoji +from .sticker_pack import StickerPack +from .web_page_empty import WebPageEmpty +from .web_page_pending import WebPagePending +from .web_page import WebPage +from .web_page_not_modified import WebPageNotModified +from .web_page_url_pending import WebPageUrlPending +from .authorization import Authorization +from .received_notify_message import ReceivedNotifyMessage +from .chat_invite_exported import ChatInviteExported +from .chat_invite_public_join_requests import ChatInvitePublicJoinRequests +from .chat_invite_already import ChatInviteAlready +from .chat_invite import ChatInvite +from .chat_invite_peek import ChatInvitePeek +from .input_sticker_set_empty import InputStickerSetEmpty +from .input_sticker_set_id import InputStickerSetID +from .input_sticker_set_short_name import InputStickerSetShortName +from .input_sticker_set_animated_emoji import InputStickerSetAnimatedEmoji +from .input_sticker_set_dice import InputStickerSetDice +from .input_sticker_set_animated_emoji_animations import InputStickerSetAnimatedEmojiAnimations +from .input_sticker_set_premium_gifts import InputStickerSetPremiumGifts +from .input_sticker_set_emoji_generic_animations import InputStickerSetEmojiGenericAnimations +from .input_sticker_set_emoji_default_statuses import InputStickerSetEmojiDefaultStatuses +from .input_sticker_set_emoji_default_topic_icons import InputStickerSetEmojiDefaultTopicIcons +from .input_sticker_set_emoji_channel_default_statuses import InputStickerSetEmojiChannelDefaultStatuses +from .input_sticker_set_ton_gifts import InputStickerSetTonGifts +from .sticker_set import StickerSet +from .bot_command import BotCommand +from .bot_info import BotInfo +from .keyboard_button import KeyboardButton +from .keyboard_button_url import KeyboardButtonUrl +from .keyboard_button_callback import KeyboardButtonCallback +from .keyboard_button_request_phone import KeyboardButtonRequestPhone +from .keyboard_button_request_geo_location import KeyboardButtonRequestGeoLocation +from .keyboard_button_switch_inline import KeyboardButtonSwitchInline +from .keyboard_button_game import KeyboardButtonGame +from .keyboard_button_buy import KeyboardButtonBuy +from .keyboard_button_url_auth import KeyboardButtonUrlAuth +from .input_keyboard_button_url_auth import InputKeyboardButtonUrlAuth +from .keyboard_button_request_poll import KeyboardButtonRequestPoll +from .input_keyboard_button_user_profile import InputKeyboardButtonUserProfile +from .keyboard_button_user_profile import KeyboardButtonUserProfile +from .keyboard_button_web_view import KeyboardButtonWebView +from .keyboard_button_simple_web_view import KeyboardButtonSimpleWebView +from .keyboard_button_request_peer import KeyboardButtonRequestPeer +from .input_keyboard_button_request_peer import InputKeyboardButtonRequestPeer +from .keyboard_button_copy import KeyboardButtonCopy +from .keyboard_button_row import KeyboardButtonRow +from .reply_keyboard_hide import ReplyKeyboardHide +from .reply_keyboard_force_reply import ReplyKeyboardForceReply +from .reply_keyboard_markup import ReplyKeyboardMarkup +from .reply_inline_markup import ReplyInlineMarkup +from .message_entity_unknown import MessageEntityUnknown +from .message_entity_mention import MessageEntityMention +from .message_entity_hashtag import MessageEntityHashtag +from .message_entity_bot_command import MessageEntityBotCommand +from .message_entity_url import MessageEntityUrl +from .message_entity_email import MessageEntityEmail +from .message_entity_bold import MessageEntityBold +from .message_entity_italic import MessageEntityItalic +from .message_entity_code import MessageEntityCode +from .message_entity_pre import MessageEntityPre +from .message_entity_text_url import MessageEntityTextUrl +from .message_entity_mention_name import MessageEntityMentionName +from .input_message_entity_mention_name import InputMessageEntityMentionName +from .message_entity_phone import MessageEntityPhone +from .message_entity_cashtag import MessageEntityCashtag +from .message_entity_underline import MessageEntityUnderline +from .message_entity_strike import MessageEntityStrike +from .message_entity_bank_card import MessageEntityBankCard +from .message_entity_spoiler import MessageEntitySpoiler +from .message_entity_custom_emoji import MessageEntityCustomEmoji +from .message_entity_blockquote import MessageEntityBlockquote +from .input_channel_empty import InputChannelEmpty +from .input_channel import InputChannel +from .input_channel_from_message import InputChannelFromMessage +from .message_range import MessageRange +from .channel_messages_filter_empty import ChannelMessagesFilterEmpty +from .channel_messages_filter import ChannelMessagesFilter +from .channel_participant import ChannelParticipant +from .channel_participant_self import ChannelParticipantSelf +from .channel_participant_creator import ChannelParticipantCreator +from .channel_participant_admin import ChannelParticipantAdmin +from .channel_participant_banned import ChannelParticipantBanned +from .channel_participant_left import ChannelParticipantLeft +from .channel_participants_recent import ChannelParticipantsRecent +from .channel_participants_admins import ChannelParticipantsAdmins +from .channel_participants_kicked import ChannelParticipantsKicked +from .channel_participants_bots import ChannelParticipantsBots +from .channel_participants_banned import ChannelParticipantsBanned +from .channel_participants_search import ChannelParticipantsSearch +from .channel_participants_contacts import ChannelParticipantsContacts +from .channel_participants_mentions import ChannelParticipantsMentions +from .input_bot_inline_message_media_auto import InputBotInlineMessageMediaAuto +from .input_bot_inline_message_text import InputBotInlineMessageText +from .input_bot_inline_message_media_geo import InputBotInlineMessageMediaGeo +from .input_bot_inline_message_media_venue import InputBotInlineMessageMediaVenue +from .input_bot_inline_message_media_contact import InputBotInlineMessageMediaContact +from .input_bot_inline_message_game import InputBotInlineMessageGame +from .input_bot_inline_message_media_invoice import InputBotInlineMessageMediaInvoice +from .input_bot_inline_message_media_web_page import InputBotInlineMessageMediaWebPage +from .input_bot_inline_result import InputBotInlineResult +from .input_bot_inline_result_photo import InputBotInlineResultPhoto +from .input_bot_inline_result_document import InputBotInlineResultDocument +from .input_bot_inline_result_game import InputBotInlineResultGame +from .bot_inline_message_media_auto import BotInlineMessageMediaAuto +from .bot_inline_message_text import BotInlineMessageText +from .bot_inline_message_media_geo import BotInlineMessageMediaGeo +from .bot_inline_message_media_venue import BotInlineMessageMediaVenue +from .bot_inline_message_media_contact import BotInlineMessageMediaContact +from .bot_inline_message_media_invoice import BotInlineMessageMediaInvoice +from .bot_inline_message_media_web_page import BotInlineMessageMediaWebPage +from .bot_inline_result import BotInlineResult +from .bot_inline_media_result import BotInlineMediaResult +from .exported_message_link import ExportedMessageLink +from .message_fwd_header import MessageFwdHeader +from .input_bot_inline_message_id import InputBotInlineMessageID +from .input_bot_inline_message_id64 import InputBotInlineMessageID64 +from .inline_bot_switch_pm import InlineBotSwitchPM +from .top_peer import TopPeer +from .top_peer_category_bots_pm import TopPeerCategoryBotsPM +from .top_peer_category_bots_inline import TopPeerCategoryBotsInline +from .top_peer_category_correspondents import TopPeerCategoryCorrespondents +from .top_peer_category_groups import TopPeerCategoryGroups +from .top_peer_category_channels import TopPeerCategoryChannels +from .top_peer_category_phone_calls import TopPeerCategoryPhoneCalls +from .top_peer_category_forward_users import TopPeerCategoryForwardUsers +from .top_peer_category_forward_chats import TopPeerCategoryForwardChats +from .top_peer_category_bots_app import TopPeerCategoryBotsApp +from .top_peer_category_peers import TopPeerCategoryPeers +from .draft_message_empty import DraftMessageEmpty +from .draft_message import DraftMessage +from .sticker_set_covered import StickerSetCovered +from .sticker_set_multi_covered import StickerSetMultiCovered +from .sticker_set_full_covered import StickerSetFullCovered +from .sticker_set_no_covered import StickerSetNoCovered +from .mask_coords import MaskCoords +from .input_stickered_media_photo import InputStickeredMediaPhoto +from .input_stickered_media_document import InputStickeredMediaDocument +from .game import Game +from .input_game_id import InputGameID +from .input_game_short_name import InputGameShortName +from .high_score import HighScore +from .text_empty import TextEmpty +from .text_plain import TextPlain +from .text_bold import TextBold +from .text_italic import TextItalic +from .text_underline import TextUnderline +from .text_strike import TextStrike +from .text_fixed import TextFixed +from .text_url import TextUrl +from .text_email import TextEmail +from .text_concat import TextConcat +from .text_subscript import TextSubscript +from .text_superscript import TextSuperscript +from .text_marked import TextMarked +from .text_phone import TextPhone +from .text_image import TextImage +from .text_anchor import TextAnchor +from .page_block_unsupported import PageBlockUnsupported +from .page_block_title import PageBlockTitle +from .page_block_subtitle import PageBlockSubtitle +from .page_block_author_date import PageBlockAuthorDate +from .page_block_header import PageBlockHeader +from .page_block_subheader import PageBlockSubheader +from .page_block_paragraph import PageBlockParagraph +from .page_block_preformatted import PageBlockPreformatted +from .page_block_footer import PageBlockFooter +from .page_block_divider import PageBlockDivider +from .page_block_anchor import PageBlockAnchor +from .page_block_list import PageBlockList +from .page_block_blockquote import PageBlockBlockquote +from .page_block_pullquote import PageBlockPullquote +from .page_block_photo import PageBlockPhoto +from .page_block_video import PageBlockVideo +from .page_block_cover import PageBlockCover +from .page_block_embed import PageBlockEmbed +from .page_block_embed_post import PageBlockEmbedPost +from .page_block_collage import PageBlockCollage +from .page_block_slideshow import PageBlockSlideshow +from .page_block_channel import PageBlockChannel +from .page_block_audio import PageBlockAudio +from .page_block_kicker import PageBlockKicker +from .page_block_table import PageBlockTable +from .page_block_ordered_list import PageBlockOrderedList +from .page_block_details import PageBlockDetails +from .page_block_related_articles import PageBlockRelatedArticles +from .page_block_map import PageBlockMap +from .phone_call_discard_reason_missed import PhoneCallDiscardReasonMissed +from .phone_call_discard_reason_disconnect import PhoneCallDiscardReasonDisconnect +from .phone_call_discard_reason_hangup import PhoneCallDiscardReasonHangup +from .phone_call_discard_reason_busy import PhoneCallDiscardReasonBusy +from .phone_call_discard_reason_migrate_conference_call import PhoneCallDiscardReasonMigrateConferenceCall +from .data_json import DataJSON +from .labeled_price import LabeledPrice +from .invoice import Invoice +from .payment_charge import PaymentCharge +from .post_address import PostAddress +from .payment_requested_info import PaymentRequestedInfo +from .payment_saved_credentials_card import PaymentSavedCredentialsCard +from .web_document import WebDocument +from .web_document_no_proxy import WebDocumentNoProxy +from .input_web_document import InputWebDocument +from .input_web_file_location import InputWebFileLocation +from .input_web_file_geo_point_location import InputWebFileGeoPointLocation +from .input_web_file_audio_album_thumb_location import InputWebFileAudioAlbumThumbLocation +from .input_payment_credentials_saved import InputPaymentCredentialsSaved +from .input_payment_credentials import InputPaymentCredentials +from .input_payment_credentials_apple_pay import InputPaymentCredentialsApplePay +from .input_payment_credentials_google_pay import InputPaymentCredentialsGooglePay +from .shipping_option import ShippingOption +from .input_sticker_set_item import InputStickerSetItem +from .input_phone_call import InputPhoneCall +from .phone_call_empty import PhoneCallEmpty +from .phone_call_waiting import PhoneCallWaiting +from .phone_call_requested import PhoneCallRequested +from .phone_call_accepted import PhoneCallAccepted +from .phone_call import PhoneCall +from .phone_call_discarded import PhoneCallDiscarded +from .phone_connection import PhoneConnection +from .phone_connection_webrtc import PhoneConnectionWebrtc +from .phone_call_protocol import PhoneCallProtocol +from .cdn_public_key import CdnPublicKey +from .cdn_config import CdnConfig +from .lang_pack_string import LangPackString +from .lang_pack_string_pluralized import LangPackStringPluralized +from .lang_pack_string_deleted import LangPackStringDeleted +from .lang_pack_difference import LangPackDifference +from .lang_pack_language import LangPackLanguage +from .channel_admin_log_event_action_change_title import ChannelAdminLogEventActionChangeTitle +from .channel_admin_log_event_action_change_about import ChannelAdminLogEventActionChangeAbout +from .channel_admin_log_event_action_change_username import ChannelAdminLogEventActionChangeUsername +from .channel_admin_log_event_action_change_photo import ChannelAdminLogEventActionChangePhoto +from .channel_admin_log_event_action_toggle_invites import ChannelAdminLogEventActionToggleInvites +from .channel_admin_log_event_action_toggle_signatures import ChannelAdminLogEventActionToggleSignatures +from .channel_admin_log_event_action_update_pinned import ChannelAdminLogEventActionUpdatePinned +from .channel_admin_log_event_action_edit_message import ChannelAdminLogEventActionEditMessage +from .channel_admin_log_event_action_delete_message import ChannelAdminLogEventActionDeleteMessage +from .channel_admin_log_event_action_participant_join import ChannelAdminLogEventActionParticipantJoin +from .channel_admin_log_event_action_participant_leave import ChannelAdminLogEventActionParticipantLeave +from .channel_admin_log_event_action_participant_invite import ChannelAdminLogEventActionParticipantInvite +from .channel_admin_log_event_action_participant_toggle_ban import ChannelAdminLogEventActionParticipantToggleBan +from .channel_admin_log_event_action_participant_toggle_admin import ChannelAdminLogEventActionParticipantToggleAdmin +from .channel_admin_log_event_action_change_sticker_set import ChannelAdminLogEventActionChangeStickerSet +from .channel_admin_log_event_action_toggle_pre_history_hidden import ChannelAdminLogEventActionTogglePreHistoryHidden +from .channel_admin_log_event_action_default_banned_rights import ChannelAdminLogEventActionDefaultBannedRights +from .channel_admin_log_event_action_stop_poll import ChannelAdminLogEventActionStopPoll +from .channel_admin_log_event_action_change_linked_chat import ChannelAdminLogEventActionChangeLinkedChat +from .channel_admin_log_event_action_change_location import ChannelAdminLogEventActionChangeLocation +from .channel_admin_log_event_action_toggle_slow_mode import ChannelAdminLogEventActionToggleSlowMode +from .channel_admin_log_event_action_start_group_call import ChannelAdminLogEventActionStartGroupCall +from .channel_admin_log_event_action_discard_group_call import ChannelAdminLogEventActionDiscardGroupCall +from .channel_admin_log_event_action_participant_mute import ChannelAdminLogEventActionParticipantMute +from .channel_admin_log_event_action_participant_unmute import ChannelAdminLogEventActionParticipantUnmute +from .channel_admin_log_event_action_toggle_group_call_setting import ChannelAdminLogEventActionToggleGroupCallSetting +from .channel_admin_log_event_action_participant_join_by_invite import ChannelAdminLogEventActionParticipantJoinByInvite +from .channel_admin_log_event_action_exported_invite_delete import ChannelAdminLogEventActionExportedInviteDelete +from .channel_admin_log_event_action_exported_invite_revoke import ChannelAdminLogEventActionExportedInviteRevoke +from .channel_admin_log_event_action_exported_invite_edit import ChannelAdminLogEventActionExportedInviteEdit +from .channel_admin_log_event_action_participant_volume import ChannelAdminLogEventActionParticipantVolume +from .channel_admin_log_event_action_change_history_ttl import ChannelAdminLogEventActionChangeHistoryTTL +from .channel_admin_log_event_action_participant_join_by_request import ChannelAdminLogEventActionParticipantJoinByRequest +from .channel_admin_log_event_action_toggle_no_forwards import ChannelAdminLogEventActionToggleNoForwards +from .channel_admin_log_event_action_send_message import ChannelAdminLogEventActionSendMessage +from .channel_admin_log_event_action_change_available_reactions import ChannelAdminLogEventActionChangeAvailableReactions +from .channel_admin_log_event_action_change_usernames import ChannelAdminLogEventActionChangeUsernames +from .channel_admin_log_event_action_toggle_forum import ChannelAdminLogEventActionToggleForum +from .channel_admin_log_event_action_create_topic import ChannelAdminLogEventActionCreateTopic +from .channel_admin_log_event_action_edit_topic import ChannelAdminLogEventActionEditTopic +from .channel_admin_log_event_action_delete_topic import ChannelAdminLogEventActionDeleteTopic +from .channel_admin_log_event_action_pin_topic import ChannelAdminLogEventActionPinTopic +from .channel_admin_log_event_action_toggle_anti_spam import ChannelAdminLogEventActionToggleAntiSpam +from .channel_admin_log_event_action_change_peer_color import ChannelAdminLogEventActionChangePeerColor +from .channel_admin_log_event_action_change_profile_peer_color import ChannelAdminLogEventActionChangeProfilePeerColor +from .channel_admin_log_event_action_change_wallpaper import ChannelAdminLogEventActionChangeWallpaper +from .channel_admin_log_event_action_change_emoji_status import ChannelAdminLogEventActionChangeEmojiStatus +from .channel_admin_log_event_action_change_emoji_sticker_set import ChannelAdminLogEventActionChangeEmojiStickerSet +from .channel_admin_log_event_action_toggle_signature_profiles import ChannelAdminLogEventActionToggleSignatureProfiles +from .channel_admin_log_event_action_participant_sub_extend import ChannelAdminLogEventActionParticipantSubExtend +from .channel_admin_log_event_action_toggle_autotranslation import ChannelAdminLogEventActionToggleAutotranslation +from .channel_admin_log_event_action_change_theme import ChannelAdminLogEventActionChangeTheme +from .channel_admin_log_event import ChannelAdminLogEvent +from .channel_admin_log_events_filter import ChannelAdminLogEventsFilter +from .popular_contact import PopularContact +from .recent_me_url_unknown import RecentMeUrlUnknown +from .recent_me_url_user import RecentMeUrlUser +from .recent_me_url_chat import RecentMeUrlChat +from .recent_me_url_chat_invite import RecentMeUrlChatInvite +from .recent_me_url_sticker_set import RecentMeUrlStickerSet +from .input_single_media import InputSingleMedia +from .web_authorization import WebAuthorization +from .input_message_id import InputMessageID +from .input_message_reply_to import InputMessageReplyTo +from .input_message_pinned import InputMessagePinned +from .input_message_callback_query import InputMessageCallbackQuery +from .input_dialog_peer import InputDialogPeer +from .input_dialog_peer_folder import InputDialogPeerFolder +from .dialog_peer import DialogPeer +from .dialog_peer_folder import DialogPeerFolder +from .file_hash import FileHash +from .input_client_proxy import InputClientProxy +from .input_secure_file_uploaded import InputSecureFileUploaded +from .input_secure_file import InputSecureFile +from .secure_file_empty import SecureFileEmpty +from .secure_file import SecureFile +from .secure_data import SecureData +from .secure_plain_phone import SecurePlainPhone +from .secure_plain_email import SecurePlainEmail +from .secure_value_type_personal_details import SecureValueTypePersonalDetails +from .secure_value_type_passport import SecureValueTypePassport +from .secure_value_type_driver_license import SecureValueTypeDriverLicense +from .secure_value_type_identity_card import SecureValueTypeIdentityCard +from .secure_value_type_internal_passport import SecureValueTypeInternalPassport +from .secure_value_type_address import SecureValueTypeAddress +from .secure_value_type_utility_bill import SecureValueTypeUtilityBill +from .secure_value_type_bank_statement import SecureValueTypeBankStatement +from .secure_value_type_rental_agreement import SecureValueTypeRentalAgreement +from .secure_value_type_passport_registration import SecureValueTypePassportRegistration +from .secure_value_type_temporary_registration import SecureValueTypeTemporaryRegistration +from .secure_value_type_phone import SecureValueTypePhone +from .secure_value_type_email import SecureValueTypeEmail +from .secure_value import SecureValue +from .input_secure_value import InputSecureValue +from .secure_value_hash import SecureValueHash +from .secure_value_error_data import SecureValueErrorData +from .secure_value_error_front_side import SecureValueErrorFrontSide +from .secure_value_error_reverse_side import SecureValueErrorReverseSide +from .secure_value_error_selfie import SecureValueErrorSelfie +from .secure_value_error_file import SecureValueErrorFile +from .secure_value_error_files import SecureValueErrorFiles +from .secure_value_error import SecureValueError +from .secure_value_error_translation_file import SecureValueErrorTranslationFile +from .secure_value_error_translation_files import SecureValueErrorTranslationFiles +from .secure_credentials_encrypted import SecureCredentialsEncrypted +from .saved_phone_contact import SavedPhoneContact +from .password_kdf_algo_unknown import PasswordKdfAlgoUnknown +from .password_kdf_algo_sha256_sha256_pbkdf2_hmacsha512iter100000_sha256_mod_pow import PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow +from .secure_password_kdf_algo_unknown import SecurePasswordKdfAlgoUnknown +from .secure_password_kdf_algo_pbkdf2_hmacsha512iter100000 import SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000 +from .secure_password_kdf_algo_sha512 import SecurePasswordKdfAlgoSHA512 +from .secure_secret_settings import SecureSecretSettings +from .input_check_password_empty import InputCheckPasswordEmpty +from .input_check_password_srp import InputCheckPasswordSRP +from .secure_required_type import SecureRequiredType +from .secure_required_type_one_of import SecureRequiredTypeOneOf +from .input_app_event import InputAppEvent +from .json_object_value import JsonObjectValue +from .json_null import JsonNull +from .json_bool import JsonBool +from .json_number import JsonNumber +from .json_string import JsonString +from .json_array import JsonArray +from .json_object import JsonObject +from .page_table_cell import PageTableCell +from .page_table_row import PageTableRow +from .page_caption import PageCaption +from .page_list_item_text import PageListItemText +from .page_list_item_blocks import PageListItemBlocks +from .page_list_ordered_item_text import PageListOrderedItemText +from .page_list_ordered_item_blocks import PageListOrderedItemBlocks +from .page_related_article import PageRelatedArticle +from .page import Page +from .poll_answer import PollAnswer +from .poll import Poll +from .poll_answer_voters import PollAnswerVoters +from .poll_results import PollResults +from .chat_onlines import ChatOnlines +from .stats_url import StatsURL +from .chat_admin_rights import ChatAdminRights +from .chat_banned_rights import ChatBannedRights +from .input_wall_paper import InputWallPaper +from .input_wall_paper_slug import InputWallPaperSlug +from .input_wall_paper_no_file import InputWallPaperNoFile +from .code_settings import CodeSettings +from .wall_paper_settings import WallPaperSettings +from .auto_download_settings import AutoDownloadSettings +from .emoji_keyword import EmojiKeyword +from .emoji_keyword_deleted import EmojiKeywordDeleted +from .emoji_keywords_difference import EmojiKeywordsDifference +from .emoji_url import EmojiURL +from .emoji_language import EmojiLanguage +from .folder import Folder +from .input_folder_peer import InputFolderPeer +from .folder_peer import FolderPeer +from .url_auth_result_request import UrlAuthResultRequest +from .url_auth_result_accepted import UrlAuthResultAccepted +from .url_auth_result_default import UrlAuthResultDefault +from .channel_location_empty import ChannelLocationEmpty +from .channel_location import ChannelLocation +from .peer_located import PeerLocated +from .peer_self_located import PeerSelfLocated +from .restriction_reason import RestrictionReason +from .input_theme import InputTheme +from .input_theme_slug import InputThemeSlug +from .theme import Theme +from .base_theme_classic import BaseThemeClassic +from .base_theme_day import BaseThemeDay +from .base_theme_night import BaseThemeNight +from .base_theme_tinted import BaseThemeTinted +from .base_theme_arctic import BaseThemeArctic +from .input_theme_settings import InputThemeSettings +from .theme_settings import ThemeSettings +from .web_page_attribute_theme import WebPageAttributeTheme +from .web_page_attribute_story import WebPageAttributeStory +from .web_page_attribute_sticker_set import WebPageAttributeStickerSet +from .web_page_attribute_unique_star_gift import WebPageAttributeUniqueStarGift +from .web_page_attribute_star_gift_collection import WebPageAttributeStarGiftCollection +from .web_page_attribute_star_gift_auction import WebPageAttributeStarGiftAuction +from .bank_card_open_url import BankCardOpenUrl +from .dialog_filter import DialogFilter +from .dialog_filter_default import DialogFilterDefault +from .dialog_filter_chatlist import DialogFilterChatlist +from .dialog_filter_suggested import DialogFilterSuggested +from .stats_date_range_days import StatsDateRangeDays +from .stats_abs_value_and_prev import StatsAbsValueAndPrev +from .stats_percent_value import StatsPercentValue +from .stats_graph_async import StatsGraphAsync +from .stats_graph_error import StatsGraphError +from .stats_graph import StatsGraph +from .video_size import VideoSize +from .video_size_emoji_markup import VideoSizeEmojiMarkup +from .video_size_sticker_markup import VideoSizeStickerMarkup +from .stats_group_top_poster import StatsGroupTopPoster +from .stats_group_top_admin import StatsGroupTopAdmin +from .stats_group_top_inviter import StatsGroupTopInviter +from .global_privacy_settings import GlobalPrivacySettings +from .message_views import MessageViews +from .message_reply_header import MessageReplyHeader +from .message_reply_story_header import MessageReplyStoryHeader +from .message_replies import MessageReplies +from .peer_blocked import PeerBlocked +from .group_call_discarded import GroupCallDiscarded +from .group_call import GroupCall +from .input_group_call import InputGroupCall +from .input_group_call_slug import InputGroupCallSlug +from .input_group_call_invite_message import InputGroupCallInviteMessage +from .group_call_participant import GroupCallParticipant +from .inline_query_peer_type_same_bot_pm import InlineQueryPeerTypeSameBotPM +from .inline_query_peer_type_pm import InlineQueryPeerTypePM +from .inline_query_peer_type_chat import InlineQueryPeerTypeChat +from .inline_query_peer_type_megagroup import InlineQueryPeerTypeMegagroup +from .inline_query_peer_type_broadcast import InlineQueryPeerTypeBroadcast +from .inline_query_peer_type_bot_pm import InlineQueryPeerTypeBotPM +from .chat_invite_importer import ChatInviteImporter +from .chat_admin_with_invites import ChatAdminWithInvites +from .group_call_participant_video_source_group import GroupCallParticipantVideoSourceGroup +from .group_call_participant_video import GroupCallParticipantVideo +from .bot_command_scope_default import BotCommandScopeDefault +from .bot_command_scope_users import BotCommandScopeUsers +from .bot_command_scope_chats import BotCommandScopeChats +from .bot_command_scope_chat_admins import BotCommandScopeChatAdmins +from .bot_command_scope_peer import BotCommandScopePeer +from .bot_command_scope_peer_admins import BotCommandScopePeerAdmins +from .bot_command_scope_peer_user import BotCommandScopePeerUser +from .chat_theme import ChatTheme +from .chat_theme_unique_gift import ChatThemeUniqueGift +from .sponsored_message import SponsoredMessage +from .search_results_calendar_period import SearchResultsCalendarPeriod +from .search_result_position import SearchResultPosition +from .reaction_count import ReactionCount +from .message_reactions import MessageReactions +from .available_reaction import AvailableReaction +from .message_peer_reaction import MessagePeerReaction +from .group_call_stream_channel import GroupCallStreamChannel +from .attach_menu_bot_icon_color import AttachMenuBotIconColor +from .attach_menu_bot_icon import AttachMenuBotIcon +from .attach_menu_bot import AttachMenuBot +from .attach_menu_bots_not_modified import AttachMenuBotsNotModified +from .attach_menu_bots import AttachMenuBots +from .attach_menu_bots_bot import AttachMenuBotsBot +from .web_view_result_url import WebViewResultUrl +from .web_view_message_sent import WebViewMessageSent +from .bot_menu_button_default import BotMenuButtonDefault +from .bot_menu_button_commands import BotMenuButtonCommands +from .bot_menu_button import BotMenuButton +from .notification_sound_default import NotificationSoundDefault +from .notification_sound_none import NotificationSoundNone +from .notification_sound_local import NotificationSoundLocal +from .notification_sound_ringtone import NotificationSoundRingtone +from .attach_menu_peer_type_same_bot_pm import AttachMenuPeerTypeSameBotPM +from .attach_menu_peer_type_bot_pm import AttachMenuPeerTypeBotPM +from .attach_menu_peer_type_pm import AttachMenuPeerTypePM +from .attach_menu_peer_type_chat import AttachMenuPeerTypeChat +from .attach_menu_peer_type_broadcast import AttachMenuPeerTypeBroadcast +from .input_invoice_message import InputInvoiceMessage +from .input_invoice_slug import InputInvoiceSlug +from .input_invoice_premium_gift_code import InputInvoicePremiumGiftCode +from .input_invoice_stars import InputInvoiceStars +from .input_invoice_chat_invite_subscription import InputInvoiceChatInviteSubscription +from .input_invoice_star_gift import InputInvoiceStarGift +from .input_invoice_star_gift_upgrade import InputInvoiceStarGiftUpgrade +from .input_invoice_star_gift_transfer import InputInvoiceStarGiftTransfer +from .input_invoice_premium_gift_stars import InputInvoicePremiumGiftStars +from .input_invoice_business_bot_transfer_stars import InputInvoiceBusinessBotTransferStars +from .input_invoice_star_gift_resale import InputInvoiceStarGiftResale +from .input_invoice_star_gift_prepaid_upgrade import InputInvoiceStarGiftPrepaidUpgrade +from .input_invoice_premium_auth_code import InputInvoicePremiumAuthCode +from .input_invoice_star_gift_drop_original_details import InputInvoiceStarGiftDropOriginalDetails +from .input_invoice_star_gift_auction_bid import InputInvoiceStarGiftAuctionBid +from .input_store_payment_premium_subscription import InputStorePaymentPremiumSubscription +from .input_store_payment_gift_premium import InputStorePaymentGiftPremium +from .input_store_payment_premium_gift_code import InputStorePaymentPremiumGiftCode +from .input_store_payment_premium_giveaway import InputStorePaymentPremiumGiveaway +from .input_store_payment_stars_topup import InputStorePaymentStarsTopup +from .input_store_payment_stars_gift import InputStorePaymentStarsGift +from .input_store_payment_stars_giveaway import InputStorePaymentStarsGiveaway +from .input_store_payment_auth_code import InputStorePaymentAuthCode +from .payment_form_method import PaymentFormMethod +from .emoji_status_empty import EmojiStatusEmpty +from .emoji_status import EmojiStatus +from .emoji_status_collectible import EmojiStatusCollectible +from .input_emoji_status_collectible import InputEmojiStatusCollectible +from .reaction_empty import ReactionEmpty +from .reaction_emoji import ReactionEmoji +from .reaction_custom_emoji import ReactionCustomEmoji +from .reaction_paid import ReactionPaid +from .chat_reactions_none import ChatReactionsNone +from .chat_reactions_all import ChatReactionsAll +from .chat_reactions_some import ChatReactionsSome +from .email_verify_purpose_login_setup import EmailVerifyPurposeLoginSetup +from .email_verify_purpose_login_change import EmailVerifyPurposeLoginChange +from .email_verify_purpose_passport import EmailVerifyPurposePassport +from .email_verification_code import EmailVerificationCode +from .email_verification_google import EmailVerificationGoogle +from .email_verification_apple import EmailVerificationApple +from .premium_subscription_option import PremiumSubscriptionOption +from .send_as_peer import SendAsPeer +from .message_extended_media_preview import MessageExtendedMediaPreview +from .message_extended_media import MessageExtendedMedia +from .sticker_keyword import StickerKeyword +from .username import Username +from .forum_topic_deleted import ForumTopicDeleted +from .forum_topic import ForumTopic +from .default_history_ttl import DefaultHistoryTTL +from .exported_contact_token import ExportedContactToken +from .request_peer_type_user import RequestPeerTypeUser +from .request_peer_type_chat import RequestPeerTypeChat +from .request_peer_type_broadcast import RequestPeerTypeBroadcast +from .emoji_list_not_modified import EmojiListNotModified +from .emoji_list import EmojiList +from .emoji_group import EmojiGroup +from .emoji_group_greeting import EmojiGroupGreeting +from .emoji_group_premium import EmojiGroupPremium +from .text_with_entities import TextWithEntities +from .auto_save_settings import AutoSaveSettings +from .auto_save_exception import AutoSaveException +from .input_bot_app_id import InputBotAppID +from .input_bot_app_short_name import InputBotAppShortName +from .bot_app_not_modified import BotAppNotModified +from .bot_app import BotApp +from .inline_bot_web_view import InlineBotWebView +from .read_participant_date import ReadParticipantDate +from .input_chatlist_dialog_filter import InputChatlistDialogFilter +from .exported_chatlist_invite import ExportedChatlistInvite +from .message_peer_vote import MessagePeerVote +from .message_peer_vote_input_option import MessagePeerVoteInputOption +from .message_peer_vote_multiple import MessagePeerVoteMultiple +from .story_views import StoryViews +from .story_item_deleted import StoryItemDeleted +from .story_item_skipped import StoryItemSkipped +from .story_item import StoryItem +from .story_view import StoryView +from .story_view_public_forward import StoryViewPublicForward +from .story_view_public_repost import StoryViewPublicRepost +from .input_reply_to_message import InputReplyToMessage +from .input_reply_to_story import InputReplyToStory +from .input_reply_to_mono_forum import InputReplyToMonoForum +from .exported_story_link import ExportedStoryLink +from .stories_stealth_mode import StoriesStealthMode +from .media_area_coordinates import MediaAreaCoordinates +from .media_area_venue import MediaAreaVenue +from .input_media_area_venue import InputMediaAreaVenue +from .media_area_geo_point import MediaAreaGeoPoint +from .media_area_suggested_reaction import MediaAreaSuggestedReaction +from .media_area_channel_post import MediaAreaChannelPost +from .input_media_area_channel_post import InputMediaAreaChannelPost +from .media_area_url import MediaAreaUrl +from .media_area_weather import MediaAreaWeather +from .media_area_star_gift import MediaAreaStarGift +from .peer_stories import PeerStories +from .premium_gift_code_option import PremiumGiftCodeOption +from .prepaid_giveaway import PrepaidGiveaway +from .prepaid_stars_giveaway import PrepaidStarsGiveaway +from .boost import Boost +from .my_boost import MyBoost +from .story_fwd_header import StoryFwdHeader +from .post_interaction_counters_message import PostInteractionCountersMessage +from .post_interaction_counters_story import PostInteractionCountersStory +from .public_forward_message import PublicForwardMessage +from .public_forward_story import PublicForwardStory +from .peer_color import PeerColor +from .peer_color_collectible import PeerColorCollectible +from .input_peer_color_collectible import InputPeerColorCollectible +from .story_reaction import StoryReaction +from .story_reaction_public_forward import StoryReactionPublicForward +from .story_reaction_public_repost import StoryReactionPublicRepost +from .saved_dialog import SavedDialog +from .mono_forum_dialog import MonoForumDialog +from .saved_reaction_tag import SavedReactionTag +from .outbox_read_date import OutboxReadDate +from .sms_job import SmsJob +from .business_weekly_open import BusinessWeeklyOpen +from .business_work_hours import BusinessWorkHours +from .business_location import BusinessLocation +from .input_business_recipients import InputBusinessRecipients +from .business_recipients import BusinessRecipients +from .business_away_message_schedule_always import BusinessAwayMessageScheduleAlways +from .business_away_message_schedule_outside_work_hours import BusinessAwayMessageScheduleOutsideWorkHours +from .business_away_message_schedule_custom import BusinessAwayMessageScheduleCustom +from .input_business_greeting_message import InputBusinessGreetingMessage +from .business_greeting_message import BusinessGreetingMessage +from .input_business_away_message import InputBusinessAwayMessage +from .business_away_message import BusinessAwayMessage +from .timezone import Timezone +from .quick_reply import QuickReply +from .input_quick_reply_shortcut import InputQuickReplyShortcut +from .input_quick_reply_shortcut_id import InputQuickReplyShortcutId +from .connected_bot import ConnectedBot +from .birthday import Birthday +from .bot_business_connection import BotBusinessConnection +from .input_business_intro import InputBusinessIntro +from .business_intro import BusinessIntro +from .input_collectible_username import InputCollectibleUsername +from .input_collectible_phone import InputCollectiblePhone +from .input_business_bot_recipients import InputBusinessBotRecipients +from .business_bot_recipients import BusinessBotRecipients +from .contact_birthday import ContactBirthday +from .missing_invitee import MissingInvitee +from .input_business_chat_link import InputBusinessChatLink +from .business_chat_link import BusinessChatLink +from .requested_peer_user import RequestedPeerUser +from .requested_peer_chat import RequestedPeerChat +from .requested_peer_channel import RequestedPeerChannel +from .sponsored_message_report_option import SponsoredMessageReportOption +from .reaction_notifications_from_contacts import ReactionNotificationsFromContacts +from .reaction_notifications_from_all import ReactionNotificationsFromAll +from .reactions_notify_settings import ReactionsNotifySettings +from .available_effect import AvailableEffect +from .fact_check import FactCheck +from .stars_transaction_peer_unsupported import StarsTransactionPeerUnsupported +from .stars_transaction_peer_app_store import StarsTransactionPeerAppStore +from .stars_transaction_peer_play_market import StarsTransactionPeerPlayMarket +from .stars_transaction_peer_premium_bot import StarsTransactionPeerPremiumBot +from .stars_transaction_peer_fragment import StarsTransactionPeerFragment +from .stars_transaction_peer import StarsTransactionPeer +from .stars_transaction_peer_ads import StarsTransactionPeerAds +from .stars_transaction_peer_api import StarsTransactionPeerAPI +from .stars_topup_option import StarsTopupOption +from .stars_transaction import StarsTransaction +from .found_story import FoundStory +from .geo_point_address import GeoPointAddress +from .stars_revenue_status import StarsRevenueStatus +from .input_stars_transaction import InputStarsTransaction +from .stars_gift_option import StarsGiftOption +from .bot_preview_media import BotPreviewMedia +from .stars_subscription_pricing import StarsSubscriptionPricing +from .stars_subscription import StarsSubscription +from .message_reactor import MessageReactor +from .stars_giveaway_option import StarsGiveawayOption +from .stars_giveaway_winners_option import StarsGiveawayWinnersOption +from .star_gift import StarGift +from .star_gift_unique import StarGiftUnique +from .message_report_option import MessageReportOption +from .report_result_choose_option import ReportResultChooseOption +from .report_result_add_comment import ReportResultAddComment +from .report_result_reported import ReportResultReported +from .bot_app_settings import BotAppSettings +from .star_ref_program import StarRefProgram +from .connected_bot_star_ref import ConnectedBotStarRef +from .stars_amount import StarsAmount +from .stars_ton_amount import StarsTonAmount +from .bot_verifier_settings import BotVerifierSettings +from .bot_verification import BotVerification +from .star_gift_attribute_model import StarGiftAttributeModel +from .star_gift_attribute_pattern import StarGiftAttributePattern +from .star_gift_attribute_backdrop import StarGiftAttributeBackdrop +from .star_gift_attribute_original_details import StarGiftAttributeOriginalDetails +from .saved_star_gift import SavedStarGift +from .input_saved_star_gift_user import InputSavedStarGiftUser +from .input_saved_star_gift_chat import InputSavedStarGiftChat +from .input_saved_star_gift_slug import InputSavedStarGiftSlug +from .paid_reaction_privacy_default import PaidReactionPrivacyDefault +from .paid_reaction_privacy_anonymous import PaidReactionPrivacyAnonymous +from .paid_reaction_privacy_peer import PaidReactionPrivacyPeer +from .requirement_to_contact_empty import RequirementToContactEmpty +from .requirement_to_contact_premium import RequirementToContactPremium +from .requirement_to_contact_paid_messages import RequirementToContactPaidMessages +from .business_bot_rights import BusinessBotRights +from .disallowed_gifts_settings import DisallowedGiftsSettings +from .sponsored_peer import SponsoredPeer +from .star_gift_attribute_id_model import StarGiftAttributeIdModel +from .star_gift_attribute_id_pattern import StarGiftAttributeIdPattern +from .star_gift_attribute_id_backdrop import StarGiftAttributeIdBackdrop +from .star_gift_attribute_counter import StarGiftAttributeCounter +from .pending_suggestion import PendingSuggestion +from .todo_item import TodoItem +from .todo_list import TodoList +from .todo_completion import TodoCompletion +from .suggested_post import SuggestedPost +from .stars_rating import StarsRating +from .star_gift_collection import StarGiftCollection +from .story_album import StoryAlbum +from .search_posts_flood import SearchPostsFlood +from .profile_tab_posts import ProfileTabPosts +from .profile_tab_gifts import ProfileTabGifts +from .profile_tab_media import ProfileTabMedia +from .profile_tab_files import ProfileTabFiles +from .profile_tab_music import ProfileTabMusic +from .profile_tab_voice import ProfileTabVoice +from .profile_tab_links import ProfileTabLinks +from .profile_tab_gifs import ProfileTabGifs +from .input_chat_theme_empty import InputChatThemeEmpty +from .input_chat_theme import InputChatTheme +from .input_chat_theme_unique_gift import InputChatThemeUniqueGift +from .star_gift_upgrade_price import StarGiftUpgradePrice +from .group_call_message import GroupCallMessage +from .group_call_donor import GroupCallDonor +from .recent_story import RecentStory +from .auction_bid_level import AuctionBidLevel +from .star_gift_auction_state_not_modified import StarGiftAuctionStateNotModified +from .star_gift_auction_state import StarGiftAuctionState +from .star_gift_auction_state_finished import StarGiftAuctionStateFinished +from .star_gift_auction_user_state import StarGiftAuctionUserState +from .star_gift_auction_acquired_gift import StarGiftAuctionAcquiredGift +from .star_gift_active_auction_state import StarGiftActiveAuctionState +from .input_star_gift_auction import InputStarGiftAuction +from .input_star_gift_auction_slug import InputStarGiftAuctionSlug +from .passkey import Passkey +from .input_passkey_response_register import InputPasskeyResponseRegister +from .input_passkey_response_login import InputPasskeyResponseLogin +from .input_passkey_credential_public_key import InputPasskeyCredentialPublicKey +from .input_passkey_credential_firebase_pnv import InputPasskeyCredentialFirebasePNV +from .star_gift_background import StarGiftBackground +from .star_gift_auction_round import StarGiftAuctionRound +from .star_gift_auction_round_extendable import StarGiftAuctionRoundExtendable +from .star_gift_attribute_rarity import StarGiftAttributeRarity +from .star_gift_attribute_rarity_epic import StarGiftAttributeRarityEpic +from .star_gift_attribute_rarity_legendary import StarGiftAttributeRarityLegendary +from .star_gift_attribute_rarity_uncommon import StarGiftAttributeRarityUncommon +from .star_gift_attribute_rarity_rare import StarGiftAttributeRarityRare +from .keyboard_button_style import KeyboardButtonStyle +from .premium_gift_option import PremiumGiftOption +from . import help, storage, auth, contacts, messages, updates, photos, upload, account, channels, payments, phone, stats, stickers, users, chatlists, bots, stories, premium, smsjobs, fragment + + +__all__ = [ + "ResPQ", + "PQInnerData", + "PQInnerDataDc", + "PQInnerDataTemp", + "PQInnerDataTempDc", + "BindAuthKeyInner", + "ServerDHParamsFail", + "ServerDHParamsOk", + "ServerDHInnerData", + "ClientDHInnerData", + "DhGenOk", + "DhGenRetry", + "DhGenFail", + "DestroyAuthKeyOk", + "DestroyAuthKeyNone", + "DestroyAuthKeyFail", + "MsgsAck", + "BadMsgNotification", + "BadServerSalt", + "MsgsStateReq", + "MsgsStateInfo", + "MsgsAllInfo", + "MsgDetailedInfo", + "MsgNewDetailedInfo", + "MsgResendReq", + "MsgResendAnsReq", + "RpcResult", + "RpcError", + "RpcAnswerUnknown", + "RpcAnswerDroppedRunning", + "RpcAnswerDropped", + "Pong", + "DestroySessionOk", + "DestroySessionNone", + "NewSessionCreated", + "HttpWait", + "IpPort", + "IpPortSecret", + "AccessPointRule", + "InputPeerEmpty", + "InputPeerSelf", + "InputPeerChat", + "InputPeerUser", + "InputPeerChannel", + "InputPeerUserFromMessage", + "InputPeerChannelFromMessage", + "InputUserEmpty", + "InputUserSelf", + "InputUser", + "InputUserFromMessage", + "InputPhoneContact", + "InputFile", + "InputFileBig", + "InputFileStoryDocument", + "InputMediaEmpty", + "InputMediaUploadedPhoto", + "InputMediaPhoto", + "InputMediaGeoPoint", + "InputMediaContact", + "InputMediaUploadedDocument", + "InputMediaDocument", + "InputMediaVenue", + "InputMediaPhotoExternal", + "InputMediaDocumentExternal", + "InputMediaGame", + "InputMediaInvoice", + "InputMediaGeoLive", + "InputMediaPoll", + "InputMediaDice", + "InputMediaStory", + "InputMediaWebPage", + "InputMediaPaidMedia", + "InputMediaTodo", + "InputMediaStakeDice", + "InputChatPhotoEmpty", + "InputChatUploadedPhoto", + "InputChatPhoto", + "InputGeoPointEmpty", + "InputGeoPoint", + "InputPhotoEmpty", + "InputPhoto", + "InputFileLocation", + "InputEncryptedFileLocation", + "InputDocumentFileLocation", + "InputSecureFileLocation", + "InputTakeoutFileLocation", + "InputPhotoFileLocation", + "InputPhotoLegacyFileLocation", + "InputPeerPhotoFileLocation", + "InputStickerSetThumb", + "InputGroupCallStream", + "PeerUser", + "PeerChat", + "PeerChannel", + "UserEmpty", + "User", + "UserProfilePhotoEmpty", + "UserProfilePhoto", + "UserStatusEmpty", + "UserStatusOnline", + "UserStatusOffline", + "UserStatusRecently", + "UserStatusLastWeek", + "UserStatusLastMonth", + "UserStatusHidden", + "ChatEmpty", + "Chat", + "ChatForbidden", + "Channel", + "ChannelForbidden", + "ChatFull", + "ChannelFull", + "ChatParticipant", + "ChatParticipantCreator", + "ChatParticipantAdmin", + "ChatParticipantsForbidden", + "ChatParticipants", + "ChatPhotoEmpty", + "ChatPhoto", + "MessageEmpty", + "Message", + "MessageService", + "MessageMediaEmpty", + "MessageMediaPhoto", + "MessageMediaGeo", + "MessageMediaContact", + "MessageMediaUnsupported", + "MessageMediaDocument", + "MessageMediaWebPage", + "MessageMediaVenue", + "MessageMediaGame", + "MessageMediaInvoice", + "MessageMediaGeoLive", + "MessageMediaPoll", + "MessageMediaDice", + "MessageMediaStory", + "MessageMediaGiveaway", + "MessageMediaGiveawayResults", + "MessageMediaPaidMedia", + "MessageMediaToDo", + "MessageMediaVideoStream", + "MessageActionEmpty", + "MessageActionChatCreate", + "MessageActionChatEditTitle", + "MessageActionChatEditPhoto", + "MessageActionChatDeletePhoto", + "MessageActionChatAddUser", + "MessageActionChatDeleteUser", + "MessageActionChatJoinedByLink", + "MessageActionChannelCreate", + "MessageActionChatMigrateTo", + "MessageActionChannelMigrateFrom", + "MessageActionPinMessage", + "MessageActionHistoryClear", + "MessageActionGameScore", + "MessageActionPaymentSentMe", + "MessageActionPaymentSent", + "MessageActionPhoneCall", + "MessageActionScreenshotTaken", + "MessageActionCustomAction", + "MessageActionBotAllowed", + "MessageActionSecureValuesSentMe", + "MessageActionSecureValuesSent", + "MessageActionContactSignUp", + "MessageActionGeoProximityReached", + "MessageActionGroupCall", + "MessageActionInviteToGroupCall", + "MessageActionSetMessagesTTL", + "MessageActionGroupCallScheduled", + "MessageActionSetChatTheme", + "MessageActionChatJoinedByRequest", + "MessageActionWebViewDataSentMe", + "MessageActionWebViewDataSent", + "MessageActionGiftPremium", + "MessageActionTopicCreate", + "MessageActionTopicEdit", + "MessageActionSuggestProfilePhoto", + "MessageActionRequestedPeer", + "MessageActionSetChatWallPaper", + "MessageActionGiftCode", + "MessageActionGiveawayLaunch", + "MessageActionGiveawayResults", + "MessageActionBoostApply", + "MessageActionRequestedPeerSentMe", + "MessageActionPaymentRefunded", + "MessageActionGiftStars", + "MessageActionPrizeStars", + "MessageActionStarGift", + "MessageActionStarGiftUnique", + "MessageActionPaidMessagesRefunded", + "MessageActionPaidMessagesPrice", + "MessageActionConferenceCall", + "MessageActionTodoCompletions", + "MessageActionTodoAppendTasks", + "MessageActionSuggestedPostApproval", + "MessageActionSuggestedPostSuccess", + "MessageActionSuggestedPostRefund", + "MessageActionGiftTon", + "MessageActionSuggestBirthday", + "MessageActionStarGiftPurchaseOffer", + "MessageActionStarGiftPurchaseOfferDeclined", + "MessageActionPhoneNumberRequest", + "MessageActionUserJoined", + "MessageActionUserUpdatedPhoto", + "MessageActionTTLChange", + "MessageActionCreatedBroadcastList", + "MessageActionLoginUnknownLocation", + "MessageActionNewCreatorPending", + "MessageActionChangeCreator", + "Dialog", + "DialogFolder", + "PhotoEmpty", + "Photo", + "PhotoSizeEmpty", + "PhotoSize", + "PhotoCachedSize", + "PhotoStrippedSize", + "PhotoSizeProgressive", + "PhotoPathSize", + "GeoPointEmpty", + "GeoPoint", + "InputNotifyPeer", + "InputNotifyUsers", + "InputNotifyChats", + "InputNotifyBroadcasts", + "InputNotifyForumTopic", + "InputPeerNotifySettings", + "PeerNotifySettings", + "PeerSettings", + "WallPaper", + "WallPaperNoFile", + "InputReportReasonSpam", + "InputReportReasonViolence", + "InputReportReasonPornography", + "InputReportReasonChildAbuse", + "InputReportReasonOther", + "InputReportReasonCopyright", + "InputReportReasonGeoIrrelevant", + "InputReportReasonFake", + "InputReportReasonIllegalDrugs", + "InputReportReasonPersonalDetails", + "UserFull", + "Contact", + "ImportedContact", + "ContactStatus", + "InputMessagesFilterEmpty", + "InputMessagesFilterPhotos", + "InputMessagesFilterVideo", + "InputMessagesFilterPhotoVideo", + "InputMessagesFilterDocument", + "InputMessagesFilterUrl", + "InputMessagesFilterGif", + "InputMessagesFilterVoice", + "InputMessagesFilterMusic", + "InputMessagesFilterChatPhotos", + "InputMessagesFilterPhoneCalls", + "InputMessagesFilterRoundVoice", + "InputMessagesFilterRoundVideo", + "InputMessagesFilterMyMentions", + "InputMessagesFilterGeo", + "InputMessagesFilterContacts", + "InputMessagesFilterPinned", + "InputMessagesFilterPhotoVideoDocuments", + "UpdateNewMessage", + "UpdateMessageID", + "UpdateDeleteMessages", + "UpdateUserTyping", + "UpdateChatUserTyping", + "UpdateChatParticipants", + "UpdateUserStatus", + "UpdateUserName", + "UpdateNewAuthorization", + "UpdateNewEncryptedMessage", + "UpdateEncryptedChatTyping", + "UpdateEncryption", + "UpdateEncryptedMessagesRead", + "UpdateChatParticipantAdd", + "UpdateChatParticipantDelete", + "UpdateDcOptions", + "UpdateNotifySettings", + "UpdateServiceNotification", + "UpdatePrivacy", + "UpdateUserPhone", + "UpdateReadHistoryInbox", + "UpdateReadHistoryOutbox", + "UpdateWebPage", + "UpdateReadMessagesContents", + "UpdateChannelTooLong", + "UpdateChannel", + "UpdateNewChannelMessage", + "UpdateReadChannelInbox", + "UpdateDeleteChannelMessages", + "UpdateChannelMessageViews", + "UpdateChatParticipantAdmin", + "UpdateNewStickerSet", + "UpdateStickerSetsOrder", + "UpdateStickerSets", + "UpdateSavedGifs", + "UpdateBotInlineQuery", + "UpdateBotInlineSend", + "UpdateEditChannelMessage", + "UpdateBotCallbackQuery", + "UpdateEditMessage", + "UpdateInlineBotCallbackQuery", + "UpdateReadChannelOutbox", + "UpdateDraftMessage", + "UpdateReadFeaturedStickers", + "UpdateRecentStickers", + "UpdateConfig", + "UpdatePtsChanged", + "UpdateChannelWebPage", + "UpdateDialogPinned", + "UpdatePinnedDialogs", + "UpdateBotWebhookJSON", + "UpdateBotWebhookJSONQuery", + "UpdateBotShippingQuery", + "UpdateBotPrecheckoutQuery", + "UpdatePhoneCall", + "UpdateLangPackTooLong", + "UpdateLangPack", + "UpdateFavedStickers", + "UpdateChannelReadMessagesContents", + "UpdateContactsReset", + "UpdateChannelAvailableMessages", + "UpdateDialogUnreadMark", + "UpdateMessagePoll", + "UpdateChatDefaultBannedRights", + "UpdateFolderPeers", + "UpdatePeerSettings", + "UpdatePeerLocated", + "UpdateNewScheduledMessage", + "UpdateDeleteScheduledMessages", + "UpdateTheme", + "UpdateGeoLiveViewed", + "UpdateLoginToken", + "UpdateMessagePollVote", + "UpdateDialogFilter", + "UpdateDialogFilterOrder", + "UpdateDialogFilters", + "UpdatePhoneCallSignalingData", + "UpdateChannelMessageForwards", + "UpdateReadChannelDiscussionInbox", + "UpdateReadChannelDiscussionOutbox", + "UpdatePeerBlocked", + "UpdateChannelUserTyping", + "UpdatePinnedMessages", + "UpdatePinnedChannelMessages", + "UpdateChat", + "UpdateGroupCallParticipants", + "UpdateGroupCall", + "UpdatePeerHistoryTTL", + "UpdateChatParticipant", + "UpdateChannelParticipant", + "UpdateBotStopped", + "UpdateGroupCallConnection", + "UpdateBotCommands", + "UpdatePendingJoinRequests", + "UpdateBotChatInviteRequester", + "UpdateMessageReactions", + "UpdateAttachMenuBots", + "UpdateWebViewResultSent", + "UpdateBotMenuButton", + "UpdateSavedRingtones", + "UpdateTranscribedAudio", + "UpdateReadFeaturedEmojiStickers", + "UpdateUserEmojiStatus", + "UpdateRecentEmojiStatuses", + "UpdateRecentReactions", + "UpdateMoveStickerSetToTop", + "UpdateMessageExtendedMedia", + "UpdateUser", + "UpdateAutoSaveSettings", + "UpdateStory", + "UpdateReadStories", + "UpdateStoryID", + "UpdateStoriesStealthMode", + "UpdateSentStoryReaction", + "UpdateBotChatBoost", + "UpdateChannelViewForumAsMessages", + "UpdatePeerWallpaper", + "UpdateBotMessageReaction", + "UpdateBotMessageReactions", + "UpdateSavedDialogPinned", + "UpdatePinnedSavedDialogs", + "UpdateSavedReactionTags", + "UpdateSmsJob", + "UpdateQuickReplies", + "UpdateNewQuickReply", + "UpdateDeleteQuickReply", + "UpdateQuickReplyMessage", + "UpdateDeleteQuickReplyMessages", + "UpdateBotBusinessConnect", + "UpdateBotNewBusinessMessage", + "UpdateBotEditBusinessMessage", + "UpdateBotDeleteBusinessMessage", + "UpdateNewStoryReaction", + "UpdateStarsBalance", + "UpdateBusinessBotCallbackQuery", + "UpdateStarsRevenueStatus", + "UpdateBotPurchasedPaidMedia", + "UpdatePaidReactionPrivacy", + "UpdateSentPhoneCode", + "UpdateGroupCallChainBlocks", + "UpdateReadMonoForumInbox", + "UpdateReadMonoForumOutbox", + "UpdateMonoForumNoPaidException", + "UpdateGroupCallMessage", + "UpdateGroupCallEncryptedMessage", + "UpdatePinnedForumTopic", + "UpdatePinnedForumTopics", + "UpdateDeleteGroupCallMessages", + "UpdateStarGiftAuctionState", + "UpdateStarGiftAuctionUserState", + "UpdateEmojiGameInfo", + "UpdateTranscribeAudio", + "UpdateBotSubscriptionExpire", + "UpdateStarGiftCraftFail", + "UpdatesTooLong", + "UpdateShortMessage", + "UpdateShortChatMessage", + "UpdateShort", + "UpdatesCombined", + "Updates", + "UpdateShortSentMessage", + "DcOption", + "Config", + "NearestDc", + "EncryptedChatEmpty", + "EncryptedChatWaiting", + "EncryptedChatRequested", + "EncryptedChat", + "EncryptedChatDiscarded", + "InputEncryptedChat", + "EncryptedFileEmpty", + "EncryptedFile", + "InputEncryptedFileEmpty", + "InputEncryptedFileUploaded", + "InputEncryptedFile", + "InputEncryptedFileBigUploaded", + "EncryptedMessage", + "EncryptedMessageService", + "InputDocumentEmpty", + "InputDocument", + "DocumentEmpty", + "Document", + "NotifyPeer", + "NotifyUsers", + "NotifyChats", + "NotifyBroadcasts", + "NotifyForumTopic", + "SendMessageTypingAction", + "SendMessageCancelAction", + "SendMessageRecordVideoAction", + "SendMessageUploadVideoAction", + "SendMessageRecordAudioAction", + "SendMessageUploadAudioAction", + "SendMessageUploadPhotoAction", + "SendMessageUploadDocumentAction", + "SendMessageGeoLocationAction", + "SendMessageChooseContactAction", + "SendMessageGamePlayAction", + "SendMessageRecordRoundAction", + "SendMessageUploadRoundAction", + "SpeakingInGroupCallAction", + "SendMessageHistoryImportAction", + "SendMessageChooseStickerAction", + "SendMessageEmojiInteraction", + "SendMessageEmojiInteractionSeen", + "SendMessageTextDraftAction", + "InputPrivacyKeyStatusTimestamp", + "InputPrivacyKeyChatInvite", + "InputPrivacyKeyPhoneCall", + "InputPrivacyKeyPhoneP2P", + "InputPrivacyKeyForwards", + "InputPrivacyKeyProfilePhoto", + "InputPrivacyKeyPhoneNumber", + "InputPrivacyKeyAddedByPhone", + "InputPrivacyKeyVoiceMessages", + "InputPrivacyKeyAbout", + "InputPrivacyKeyBirthday", + "InputPrivacyKeyStarGiftsAutoSave", + "InputPrivacyKeyNoPaidMessages", + "InputPrivacyKeySavedMusic", + "PrivacyKeyStatusTimestamp", + "PrivacyKeyChatInvite", + "PrivacyKeyPhoneCall", + "PrivacyKeyPhoneP2P", + "PrivacyKeyForwards", + "PrivacyKeyProfilePhoto", + "PrivacyKeyPhoneNumber", + "PrivacyKeyAddedByPhone", + "PrivacyKeyVoiceMessages", + "PrivacyKeyAbout", + "PrivacyKeyBirthday", + "PrivacyKeyStarGiftsAutoSave", + "PrivacyKeyNoPaidMessages", + "PrivacyKeySavedMusic", + "InputPrivacyValueAllowContacts", + "InputPrivacyValueAllowAll", + "InputPrivacyValueAllowUsers", + "InputPrivacyValueDisallowContacts", + "InputPrivacyValueDisallowAll", + "InputPrivacyValueDisallowUsers", + "InputPrivacyValueAllowChatParticipants", + "InputPrivacyValueDisallowChatParticipants", + "InputPrivacyValueAllowCloseFriends", + "InputPrivacyValueAllowPremium", + "InputPrivacyValueAllowBots", + "InputPrivacyValueDisallowBots", + "PrivacyValueAllowContacts", + "PrivacyValueAllowAll", + "PrivacyValueAllowUsers", + "PrivacyValueDisallowContacts", + "PrivacyValueDisallowAll", + "PrivacyValueDisallowUsers", + "PrivacyValueAllowChatParticipants", + "PrivacyValueDisallowChatParticipants", + "PrivacyValueAllowCloseFriends", + "PrivacyValueAllowPremium", + "PrivacyValueAllowBots", + "PrivacyValueDisallowBots", + "AccountDaysTTL", + "DocumentAttributeImageSize", + "DocumentAttributeAnimated", + "DocumentAttributeSticker", + "DocumentAttributeVideo", + "DocumentAttributeAudio", + "DocumentAttributeFilename", + "DocumentAttributeHasStickers", + "DocumentAttributeCustomEmoji", + "StickerPack", + "WebPageEmpty", + "WebPagePending", + "WebPage", + "WebPageNotModified", + "WebPageUrlPending", + "Authorization", + "ReceivedNotifyMessage", + "ChatInviteExported", + "ChatInvitePublicJoinRequests", + "ChatInviteAlready", + "ChatInvite", + "ChatInvitePeek", + "InputStickerSetEmpty", + "InputStickerSetID", + "InputStickerSetShortName", + "InputStickerSetAnimatedEmoji", + "InputStickerSetDice", + "InputStickerSetAnimatedEmojiAnimations", + "InputStickerSetPremiumGifts", + "InputStickerSetEmojiGenericAnimations", + "InputStickerSetEmojiDefaultStatuses", + "InputStickerSetEmojiDefaultTopicIcons", + "InputStickerSetEmojiChannelDefaultStatuses", + "InputStickerSetTonGifts", + "StickerSet", + "BotCommand", + "BotInfo", + "KeyboardButton", + "KeyboardButtonUrl", + "KeyboardButtonCallback", + "KeyboardButtonRequestPhone", + "KeyboardButtonRequestGeoLocation", + "KeyboardButtonSwitchInline", + "KeyboardButtonGame", + "KeyboardButtonBuy", + "KeyboardButtonUrlAuth", + "InputKeyboardButtonUrlAuth", + "KeyboardButtonRequestPoll", + "InputKeyboardButtonUserProfile", + "KeyboardButtonUserProfile", + "KeyboardButtonWebView", + "KeyboardButtonSimpleWebView", + "KeyboardButtonRequestPeer", + "InputKeyboardButtonRequestPeer", + "KeyboardButtonCopy", + "KeyboardButtonRow", + "ReplyKeyboardHide", + "ReplyKeyboardForceReply", + "ReplyKeyboardMarkup", + "ReplyInlineMarkup", + "MessageEntityUnknown", + "MessageEntityMention", + "MessageEntityHashtag", + "MessageEntityBotCommand", + "MessageEntityUrl", + "MessageEntityEmail", + "MessageEntityBold", + "MessageEntityItalic", + "MessageEntityCode", + "MessageEntityPre", + "MessageEntityTextUrl", + "MessageEntityMentionName", + "InputMessageEntityMentionName", + "MessageEntityPhone", + "MessageEntityCashtag", + "MessageEntityUnderline", + "MessageEntityStrike", + "MessageEntityBankCard", + "MessageEntitySpoiler", + "MessageEntityCustomEmoji", + "MessageEntityBlockquote", + "InputChannelEmpty", + "InputChannel", + "InputChannelFromMessage", + "MessageRange", + "ChannelMessagesFilterEmpty", + "ChannelMessagesFilter", + "ChannelParticipant", + "ChannelParticipantSelf", + "ChannelParticipantCreator", + "ChannelParticipantAdmin", + "ChannelParticipantBanned", + "ChannelParticipantLeft", + "ChannelParticipantsRecent", + "ChannelParticipantsAdmins", + "ChannelParticipantsKicked", + "ChannelParticipantsBots", + "ChannelParticipantsBanned", + "ChannelParticipantsSearch", + "ChannelParticipantsContacts", + "ChannelParticipantsMentions", + "InputBotInlineMessageMediaAuto", + "InputBotInlineMessageText", + "InputBotInlineMessageMediaGeo", + "InputBotInlineMessageMediaVenue", + "InputBotInlineMessageMediaContact", + "InputBotInlineMessageGame", + "InputBotInlineMessageMediaInvoice", + "InputBotInlineMessageMediaWebPage", + "InputBotInlineResult", + "InputBotInlineResultPhoto", + "InputBotInlineResultDocument", + "InputBotInlineResultGame", + "BotInlineMessageMediaAuto", + "BotInlineMessageText", + "BotInlineMessageMediaGeo", + "BotInlineMessageMediaVenue", + "BotInlineMessageMediaContact", + "BotInlineMessageMediaInvoice", + "BotInlineMessageMediaWebPage", + "BotInlineResult", + "BotInlineMediaResult", + "ExportedMessageLink", + "MessageFwdHeader", + "InputBotInlineMessageID", + "InputBotInlineMessageID64", + "InlineBotSwitchPM", + "TopPeer", + "TopPeerCategoryBotsPM", + "TopPeerCategoryBotsInline", + "TopPeerCategoryCorrespondents", + "TopPeerCategoryGroups", + "TopPeerCategoryChannels", + "TopPeerCategoryPhoneCalls", + "TopPeerCategoryForwardUsers", + "TopPeerCategoryForwardChats", + "TopPeerCategoryBotsApp", + "TopPeerCategoryPeers", + "DraftMessageEmpty", + "DraftMessage", + "StickerSetCovered", + "StickerSetMultiCovered", + "StickerSetFullCovered", + "StickerSetNoCovered", + "MaskCoords", + "InputStickeredMediaPhoto", + "InputStickeredMediaDocument", + "Game", + "InputGameID", + "InputGameShortName", + "HighScore", + "TextEmpty", + "TextPlain", + "TextBold", + "TextItalic", + "TextUnderline", + "TextStrike", + "TextFixed", + "TextUrl", + "TextEmail", + "TextConcat", + "TextSubscript", + "TextSuperscript", + "TextMarked", + "TextPhone", + "TextImage", + "TextAnchor", + "PageBlockUnsupported", + "PageBlockTitle", + "PageBlockSubtitle", + "PageBlockAuthorDate", + "PageBlockHeader", + "PageBlockSubheader", + "PageBlockParagraph", + "PageBlockPreformatted", + "PageBlockFooter", + "PageBlockDivider", + "PageBlockAnchor", + "PageBlockList", + "PageBlockBlockquote", + "PageBlockPullquote", + "PageBlockPhoto", + "PageBlockVideo", + "PageBlockCover", + "PageBlockEmbed", + "PageBlockEmbedPost", + "PageBlockCollage", + "PageBlockSlideshow", + "PageBlockChannel", + "PageBlockAudio", + "PageBlockKicker", + "PageBlockTable", + "PageBlockOrderedList", + "PageBlockDetails", + "PageBlockRelatedArticles", + "PageBlockMap", + "PhoneCallDiscardReasonMissed", + "PhoneCallDiscardReasonDisconnect", + "PhoneCallDiscardReasonHangup", + "PhoneCallDiscardReasonBusy", + "PhoneCallDiscardReasonMigrateConferenceCall", + "DataJSON", + "LabeledPrice", + "Invoice", + "PaymentCharge", + "PostAddress", + "PaymentRequestedInfo", + "PaymentSavedCredentialsCard", + "WebDocument", + "WebDocumentNoProxy", + "InputWebDocument", + "InputWebFileLocation", + "InputWebFileGeoPointLocation", + "InputWebFileAudioAlbumThumbLocation", + "InputPaymentCredentialsSaved", + "InputPaymentCredentials", + "InputPaymentCredentialsApplePay", + "InputPaymentCredentialsGooglePay", + "ShippingOption", + "InputStickerSetItem", + "InputPhoneCall", + "PhoneCallEmpty", + "PhoneCallWaiting", + "PhoneCallRequested", + "PhoneCallAccepted", + "PhoneCall", + "PhoneCallDiscarded", + "PhoneConnection", + "PhoneConnectionWebrtc", + "PhoneCallProtocol", + "CdnPublicKey", + "CdnConfig", + "LangPackString", + "LangPackStringPluralized", + "LangPackStringDeleted", + "LangPackDifference", + "LangPackLanguage", + "ChannelAdminLogEventActionChangeTitle", + "ChannelAdminLogEventActionChangeAbout", + "ChannelAdminLogEventActionChangeUsername", + "ChannelAdminLogEventActionChangePhoto", + "ChannelAdminLogEventActionToggleInvites", + "ChannelAdminLogEventActionToggleSignatures", + "ChannelAdminLogEventActionUpdatePinned", + "ChannelAdminLogEventActionEditMessage", + "ChannelAdminLogEventActionDeleteMessage", + "ChannelAdminLogEventActionParticipantJoin", + "ChannelAdminLogEventActionParticipantLeave", + "ChannelAdminLogEventActionParticipantInvite", + "ChannelAdminLogEventActionParticipantToggleBan", + "ChannelAdminLogEventActionParticipantToggleAdmin", + "ChannelAdminLogEventActionChangeStickerSet", + "ChannelAdminLogEventActionTogglePreHistoryHidden", + "ChannelAdminLogEventActionDefaultBannedRights", + "ChannelAdminLogEventActionStopPoll", + "ChannelAdminLogEventActionChangeLinkedChat", + "ChannelAdminLogEventActionChangeLocation", + "ChannelAdminLogEventActionToggleSlowMode", + "ChannelAdminLogEventActionStartGroupCall", + "ChannelAdminLogEventActionDiscardGroupCall", + "ChannelAdminLogEventActionParticipantMute", + "ChannelAdminLogEventActionParticipantUnmute", + "ChannelAdminLogEventActionToggleGroupCallSetting", + "ChannelAdminLogEventActionParticipantJoinByInvite", + "ChannelAdminLogEventActionExportedInviteDelete", + "ChannelAdminLogEventActionExportedInviteRevoke", + "ChannelAdminLogEventActionExportedInviteEdit", + "ChannelAdminLogEventActionParticipantVolume", + "ChannelAdminLogEventActionChangeHistoryTTL", + "ChannelAdminLogEventActionParticipantJoinByRequest", + "ChannelAdminLogEventActionToggleNoForwards", + "ChannelAdminLogEventActionSendMessage", + "ChannelAdminLogEventActionChangeAvailableReactions", + "ChannelAdminLogEventActionChangeUsernames", + "ChannelAdminLogEventActionToggleForum", + "ChannelAdminLogEventActionCreateTopic", + "ChannelAdminLogEventActionEditTopic", + "ChannelAdminLogEventActionDeleteTopic", + "ChannelAdminLogEventActionPinTopic", + "ChannelAdminLogEventActionToggleAntiSpam", + "ChannelAdminLogEventActionChangePeerColor", + "ChannelAdminLogEventActionChangeProfilePeerColor", + "ChannelAdminLogEventActionChangeWallpaper", + "ChannelAdminLogEventActionChangeEmojiStatus", + "ChannelAdminLogEventActionChangeEmojiStickerSet", + "ChannelAdminLogEventActionToggleSignatureProfiles", + "ChannelAdminLogEventActionParticipantSubExtend", + "ChannelAdminLogEventActionToggleAutotranslation", + "ChannelAdminLogEventActionChangeTheme", + "ChannelAdminLogEvent", + "ChannelAdminLogEventsFilter", + "PopularContact", + "RecentMeUrlUnknown", + "RecentMeUrlUser", + "RecentMeUrlChat", + "RecentMeUrlChatInvite", + "RecentMeUrlStickerSet", + "InputSingleMedia", + "WebAuthorization", + "InputMessageID", + "InputMessageReplyTo", + "InputMessagePinned", + "InputMessageCallbackQuery", + "InputDialogPeer", + "InputDialogPeerFolder", + "DialogPeer", + "DialogPeerFolder", + "FileHash", + "InputClientProxy", + "InputSecureFileUploaded", + "InputSecureFile", + "SecureFileEmpty", + "SecureFile", + "SecureData", + "SecurePlainPhone", + "SecurePlainEmail", + "SecureValueTypePersonalDetails", + "SecureValueTypePassport", + "SecureValueTypeDriverLicense", + "SecureValueTypeIdentityCard", + "SecureValueTypeInternalPassport", + "SecureValueTypeAddress", + "SecureValueTypeUtilityBill", + "SecureValueTypeBankStatement", + "SecureValueTypeRentalAgreement", + "SecureValueTypePassportRegistration", + "SecureValueTypeTemporaryRegistration", + "SecureValueTypePhone", + "SecureValueTypeEmail", + "SecureValue", + "InputSecureValue", + "SecureValueHash", + "SecureValueErrorData", + "SecureValueErrorFrontSide", + "SecureValueErrorReverseSide", + "SecureValueErrorSelfie", + "SecureValueErrorFile", + "SecureValueErrorFiles", + "SecureValueError", + "SecureValueErrorTranslationFile", + "SecureValueErrorTranslationFiles", + "SecureCredentialsEncrypted", + "SavedPhoneContact", + "PasswordKdfAlgoUnknown", + "PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow", + "SecurePasswordKdfAlgoUnknown", + "SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000", + "SecurePasswordKdfAlgoSHA512", + "SecureSecretSettings", + "InputCheckPasswordEmpty", + "InputCheckPasswordSRP", + "SecureRequiredType", + "SecureRequiredTypeOneOf", + "InputAppEvent", + "JsonObjectValue", + "JsonNull", + "JsonBool", + "JsonNumber", + "JsonString", + "JsonArray", + "JsonObject", + "PageTableCell", + "PageTableRow", + "PageCaption", + "PageListItemText", + "PageListItemBlocks", + "PageListOrderedItemText", + "PageListOrderedItemBlocks", + "PageRelatedArticle", + "Page", + "PollAnswer", + "Poll", + "PollAnswerVoters", + "PollResults", + "ChatOnlines", + "StatsURL", + "ChatAdminRights", + "ChatBannedRights", + "InputWallPaper", + "InputWallPaperSlug", + "InputWallPaperNoFile", + "CodeSettings", + "WallPaperSettings", + "AutoDownloadSettings", + "EmojiKeyword", + "EmojiKeywordDeleted", + "EmojiKeywordsDifference", + "EmojiURL", + "EmojiLanguage", + "Folder", + "InputFolderPeer", + "FolderPeer", + "UrlAuthResultRequest", + "UrlAuthResultAccepted", + "UrlAuthResultDefault", + "ChannelLocationEmpty", + "ChannelLocation", + "PeerLocated", + "PeerSelfLocated", + "RestrictionReason", + "InputTheme", + "InputThemeSlug", + "Theme", + "BaseThemeClassic", + "BaseThemeDay", + "BaseThemeNight", + "BaseThemeTinted", + "BaseThemeArctic", + "InputThemeSettings", + "ThemeSettings", + "WebPageAttributeTheme", + "WebPageAttributeStory", + "WebPageAttributeStickerSet", + "WebPageAttributeUniqueStarGift", + "WebPageAttributeStarGiftCollection", + "WebPageAttributeStarGiftAuction", + "BankCardOpenUrl", + "DialogFilter", + "DialogFilterDefault", + "DialogFilterChatlist", + "DialogFilterSuggested", + "StatsDateRangeDays", + "StatsAbsValueAndPrev", + "StatsPercentValue", + "StatsGraphAsync", + "StatsGraphError", + "StatsGraph", + "VideoSize", + "VideoSizeEmojiMarkup", + "VideoSizeStickerMarkup", + "StatsGroupTopPoster", + "StatsGroupTopAdmin", + "StatsGroupTopInviter", + "GlobalPrivacySettings", + "MessageViews", + "MessageReplyHeader", + "MessageReplyStoryHeader", + "MessageReplies", + "PeerBlocked", + "GroupCallDiscarded", + "GroupCall", + "InputGroupCall", + "InputGroupCallSlug", + "InputGroupCallInviteMessage", + "GroupCallParticipant", + "InlineQueryPeerTypeSameBotPM", + "InlineQueryPeerTypePM", + "InlineQueryPeerTypeChat", + "InlineQueryPeerTypeMegagroup", + "InlineQueryPeerTypeBroadcast", + "InlineQueryPeerTypeBotPM", + "ChatInviteImporter", + "ChatAdminWithInvites", + "GroupCallParticipantVideoSourceGroup", + "GroupCallParticipantVideo", + "BotCommandScopeDefault", + "BotCommandScopeUsers", + "BotCommandScopeChats", + "BotCommandScopeChatAdmins", + "BotCommandScopePeer", + "BotCommandScopePeerAdmins", + "BotCommandScopePeerUser", + "ChatTheme", + "ChatThemeUniqueGift", + "SponsoredMessage", + "SearchResultsCalendarPeriod", + "SearchResultPosition", + "ReactionCount", + "MessageReactions", + "AvailableReaction", + "MessagePeerReaction", + "GroupCallStreamChannel", + "AttachMenuBotIconColor", + "AttachMenuBotIcon", + "AttachMenuBot", + "AttachMenuBotsNotModified", + "AttachMenuBots", + "AttachMenuBotsBot", + "WebViewResultUrl", + "WebViewMessageSent", + "BotMenuButtonDefault", + "BotMenuButtonCommands", + "BotMenuButton", + "NotificationSoundDefault", + "NotificationSoundNone", + "NotificationSoundLocal", + "NotificationSoundRingtone", + "AttachMenuPeerTypeSameBotPM", + "AttachMenuPeerTypeBotPM", + "AttachMenuPeerTypePM", + "AttachMenuPeerTypeChat", + "AttachMenuPeerTypeBroadcast", + "InputInvoiceMessage", + "InputInvoiceSlug", + "InputInvoicePremiumGiftCode", + "InputInvoiceStars", + "InputInvoiceChatInviteSubscription", + "InputInvoiceStarGift", + "InputInvoiceStarGiftUpgrade", + "InputInvoiceStarGiftTransfer", + "InputInvoicePremiumGiftStars", + "InputInvoiceBusinessBotTransferStars", + "InputInvoiceStarGiftResale", + "InputInvoiceStarGiftPrepaidUpgrade", + "InputInvoicePremiumAuthCode", + "InputInvoiceStarGiftDropOriginalDetails", + "InputInvoiceStarGiftAuctionBid", + "InputStorePaymentPremiumSubscription", + "InputStorePaymentGiftPremium", + "InputStorePaymentPremiumGiftCode", + "InputStorePaymentPremiumGiveaway", + "InputStorePaymentStarsTopup", + "InputStorePaymentStarsGift", + "InputStorePaymentStarsGiveaway", + "InputStorePaymentAuthCode", + "PaymentFormMethod", + "EmojiStatusEmpty", + "EmojiStatus", + "EmojiStatusCollectible", + "InputEmojiStatusCollectible", + "ReactionEmpty", + "ReactionEmoji", + "ReactionCustomEmoji", + "ReactionPaid", + "ChatReactionsNone", + "ChatReactionsAll", + "ChatReactionsSome", + "EmailVerifyPurposeLoginSetup", + "EmailVerifyPurposeLoginChange", + "EmailVerifyPurposePassport", + "EmailVerificationCode", + "EmailVerificationGoogle", + "EmailVerificationApple", + "PremiumSubscriptionOption", + "SendAsPeer", + "MessageExtendedMediaPreview", + "MessageExtendedMedia", + "StickerKeyword", + "Username", + "ForumTopicDeleted", + "ForumTopic", + "DefaultHistoryTTL", + "ExportedContactToken", + "RequestPeerTypeUser", + "RequestPeerTypeChat", + "RequestPeerTypeBroadcast", + "EmojiListNotModified", + "EmojiList", + "EmojiGroup", + "EmojiGroupGreeting", + "EmojiGroupPremium", + "TextWithEntities", + "AutoSaveSettings", + "AutoSaveException", + "InputBotAppID", + "InputBotAppShortName", + "BotAppNotModified", + "BotApp", + "InlineBotWebView", + "ReadParticipantDate", + "InputChatlistDialogFilter", + "ExportedChatlistInvite", + "MessagePeerVote", + "MessagePeerVoteInputOption", + "MessagePeerVoteMultiple", + "StoryViews", + "StoryItemDeleted", + "StoryItemSkipped", + "StoryItem", + "StoryView", + "StoryViewPublicForward", + "StoryViewPublicRepost", + "InputReplyToMessage", + "InputReplyToStory", + "InputReplyToMonoForum", + "ExportedStoryLink", + "StoriesStealthMode", + "MediaAreaCoordinates", + "MediaAreaVenue", + "InputMediaAreaVenue", + "MediaAreaGeoPoint", + "MediaAreaSuggestedReaction", + "MediaAreaChannelPost", + "InputMediaAreaChannelPost", + "MediaAreaUrl", + "MediaAreaWeather", + "MediaAreaStarGift", + "PeerStories", + "PremiumGiftCodeOption", + "PrepaidGiveaway", + "PrepaidStarsGiveaway", + "Boost", + "MyBoost", + "StoryFwdHeader", + "PostInteractionCountersMessage", + "PostInteractionCountersStory", + "PublicForwardMessage", + "PublicForwardStory", + "PeerColor", + "PeerColorCollectible", + "InputPeerColorCollectible", + "StoryReaction", + "StoryReactionPublicForward", + "StoryReactionPublicRepost", + "SavedDialog", + "MonoForumDialog", + "SavedReactionTag", + "OutboxReadDate", + "SmsJob", + "BusinessWeeklyOpen", + "BusinessWorkHours", + "BusinessLocation", + "InputBusinessRecipients", + "BusinessRecipients", + "BusinessAwayMessageScheduleAlways", + "BusinessAwayMessageScheduleOutsideWorkHours", + "BusinessAwayMessageScheduleCustom", + "InputBusinessGreetingMessage", + "BusinessGreetingMessage", + "InputBusinessAwayMessage", + "BusinessAwayMessage", + "Timezone", + "QuickReply", + "InputQuickReplyShortcut", + "InputQuickReplyShortcutId", + "ConnectedBot", + "Birthday", + "BotBusinessConnection", + "InputBusinessIntro", + "BusinessIntro", + "InputCollectibleUsername", + "InputCollectiblePhone", + "InputBusinessBotRecipients", + "BusinessBotRecipients", + "ContactBirthday", + "MissingInvitee", + "InputBusinessChatLink", + "BusinessChatLink", + "RequestedPeerUser", + "RequestedPeerChat", + "RequestedPeerChannel", + "SponsoredMessageReportOption", + "ReactionNotificationsFromContacts", + "ReactionNotificationsFromAll", + "ReactionsNotifySettings", + "AvailableEffect", + "FactCheck", + "StarsTransactionPeerUnsupported", + "StarsTransactionPeerAppStore", + "StarsTransactionPeerPlayMarket", + "StarsTransactionPeerPremiumBot", + "StarsTransactionPeerFragment", + "StarsTransactionPeer", + "StarsTransactionPeerAds", + "StarsTransactionPeerAPI", + "StarsTopupOption", + "StarsTransaction", + "FoundStory", + "GeoPointAddress", + "StarsRevenueStatus", + "InputStarsTransaction", + "StarsGiftOption", + "BotPreviewMedia", + "StarsSubscriptionPricing", + "StarsSubscription", + "MessageReactor", + "StarsGiveawayOption", + "StarsGiveawayWinnersOption", + "StarGift", + "StarGiftUnique", + "MessageReportOption", + "ReportResultChooseOption", + "ReportResultAddComment", + "ReportResultReported", + "BotAppSettings", + "StarRefProgram", + "ConnectedBotStarRef", + "StarsAmount", + "StarsTonAmount", + "BotVerifierSettings", + "BotVerification", + "StarGiftAttributeModel", + "StarGiftAttributePattern", + "StarGiftAttributeBackdrop", + "StarGiftAttributeOriginalDetails", + "SavedStarGift", + "InputSavedStarGiftUser", + "InputSavedStarGiftChat", + "InputSavedStarGiftSlug", + "PaidReactionPrivacyDefault", + "PaidReactionPrivacyAnonymous", + "PaidReactionPrivacyPeer", + "RequirementToContactEmpty", + "RequirementToContactPremium", + "RequirementToContactPaidMessages", + "BusinessBotRights", + "DisallowedGiftsSettings", + "SponsoredPeer", + "StarGiftAttributeIdModel", + "StarGiftAttributeIdPattern", + "StarGiftAttributeIdBackdrop", + "StarGiftAttributeCounter", + "PendingSuggestion", + "TodoItem", + "TodoList", + "TodoCompletion", + "SuggestedPost", + "StarsRating", + "StarGiftCollection", + "StoryAlbum", + "SearchPostsFlood", + "ProfileTabPosts", + "ProfileTabGifts", + "ProfileTabMedia", + "ProfileTabFiles", + "ProfileTabMusic", + "ProfileTabVoice", + "ProfileTabLinks", + "ProfileTabGifs", + "InputChatThemeEmpty", + "InputChatTheme", + "InputChatThemeUniqueGift", + "StarGiftUpgradePrice", + "GroupCallMessage", + "GroupCallDonor", + "RecentStory", + "AuctionBidLevel", + "StarGiftAuctionStateNotModified", + "StarGiftAuctionState", + "StarGiftAuctionStateFinished", + "StarGiftAuctionUserState", + "StarGiftAuctionAcquiredGift", + "StarGiftActiveAuctionState", + "InputStarGiftAuction", + "InputStarGiftAuctionSlug", + "Passkey", + "InputPasskeyResponseRegister", + "InputPasskeyResponseLogin", + "InputPasskeyCredentialPublicKey", + "InputPasskeyCredentialFirebasePNV", + "StarGiftBackground", + "StarGiftAuctionRound", + "StarGiftAuctionRoundExtendable", + "StarGiftAttributeRarity", + "StarGiftAttributeRarityEpic", + "StarGiftAttributeRarityLegendary", + "StarGiftAttributeRarityUncommon", + "StarGiftAttributeRarityRare", + "KeyboardButtonStyle", + "PremiumGiftOption", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/access_point_rule.py b/pyrogram/raw/types/access_point_rule.py new file mode 100644 index 00000000..dce091d6 --- /dev/null +++ b/pyrogram/raw/types/access_point_rule.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AccessPointRule(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.AccessPointRule`. + + Details: + - Layer: ``224`` + - ID: ``4679B65F`` + + Parameters: + phone_prefix_rules (``str``): + N/A + + dc_id (``int`` ``32-bit``): + N/A + + ips (List of :obj:`IpPort `): + N/A + + """ + + __slots__: List[str] = ["phone_prefix_rules", "dc_id", "ips"] + + ID = 0x4679b65f + QUALNAME = "types.AccessPointRule" + + def __init__(self, *, phone_prefix_rules: str, dc_id: int, ips: List["raw.base.IpPort"]) -> None: + self.phone_prefix_rules = phone_prefix_rules # string + self.dc_id = dc_id # int + self.ips = ips # vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AccessPointRule": + # No flags + + phone_prefix_rules = String.read(b) + + dc_id = Int.read(b) + + ips = TLObject.read(b) + + return AccessPointRule(phone_prefix_rules=phone_prefix_rules, dc_id=dc_id, ips=ips) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_prefix_rules)) + + b.write(Int(self.dc_id)) + + b.write(Vector(self.ips)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/__init__.py b/pyrogram/raw/types/account/__init__.py new file mode 100644 index 00000000..9e77eebe --- /dev/null +++ b/pyrogram/raw/types/account/__init__.py @@ -0,0 +1,107 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .privacy_rules import PrivacyRules +from .authorizations import Authorizations +from .password import Password +from .password_settings import PasswordSettings +from .password_input_settings import PasswordInputSettings +from .tmp_password import TmpPassword +from .web_authorizations import WebAuthorizations +from .authorization_form import AuthorizationForm +from .sent_email_code import SentEmailCode +from .takeout import Takeout +from .wall_papers_not_modified import WallPapersNotModified +from .wall_papers import WallPapers +from .auto_download_settings import AutoDownloadSettings +from .themes_not_modified import ThemesNotModified +from .themes import Themes +from .content_settings import ContentSettings +from .reset_password_failed_wait import ResetPasswordFailedWait +from .reset_password_requested_wait import ResetPasswordRequestedWait +from .reset_password_ok import ResetPasswordOk +from .chat_themes_not_modified import ChatThemesNotModified +from .chat_themes import ChatThemes +from .saved_ringtones_not_modified import SavedRingtonesNotModified +from .saved_ringtones import SavedRingtones +from .saved_ringtone import SavedRingtone +from .saved_ringtone_converted import SavedRingtoneConverted +from .emoji_statuses_not_modified import EmojiStatusesNotModified +from .emoji_statuses import EmojiStatuses +from .email_verified import EmailVerified +from .email_verified_login import EmailVerifiedLogin +from .auto_save_settings import AutoSaveSettings +from .connected_bots import ConnectedBots +from .business_chat_links import BusinessChatLinks +from .resolved_business_chat_links import ResolvedBusinessChatLinks +from .paid_messages_revenue import PaidMessagesRevenue +from .saved_music_ids_not_modified import SavedMusicIdsNotModified +from .saved_music_ids import SavedMusicIds +from .passkeys import Passkeys +from .passkey_registration_options import PasskeyRegistrationOptions + + +__all__ = [ + "PrivacyRules", + "Authorizations", + "Password", + "PasswordSettings", + "PasswordInputSettings", + "TmpPassword", + "WebAuthorizations", + "AuthorizationForm", + "SentEmailCode", + "Takeout", + "WallPapersNotModified", + "WallPapers", + "AutoDownloadSettings", + "ThemesNotModified", + "Themes", + "ContentSettings", + "ResetPasswordFailedWait", + "ResetPasswordRequestedWait", + "ResetPasswordOk", + "ChatThemesNotModified", + "ChatThemes", + "SavedRingtonesNotModified", + "SavedRingtones", + "SavedRingtone", + "SavedRingtoneConverted", + "EmojiStatusesNotModified", + "EmojiStatuses", + "EmailVerified", + "EmailVerifiedLogin", + "AutoSaveSettings", + "ConnectedBots", + "BusinessChatLinks", + "ResolvedBusinessChatLinks", + "PaidMessagesRevenue", + "SavedMusicIdsNotModified", + "SavedMusicIds", + "Passkeys", + "PasskeyRegistrationOptions", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/account/authorization_form.py b/pyrogram/raw/types/account/authorization_form.py new file mode 100644 index 00000000..c40abbca --- /dev/null +++ b/pyrogram/raw/types/account/authorization_form.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AuthorizationForm(TLObject): # type: ignore + """Telegram Passport authorization form + + Constructor of :obj:`~pyrogram.raw.base.account.AuthorizationForm`. + + Details: + - Layer: ``224`` + - ID: ``AD2E1CD8`` + + Parameters: + required_types (List of :obj:`SecureRequiredType `): + Required Telegram Passport documents + + values (List of :obj:`SecureValue `): + Already submitted Telegram Passport documents + + errors (List of :obj:`SecureValueError `): + Telegram Passport errors + + users (List of :obj:`User `): + Info about the bot to which the form will be submitted + + privacy_policy_url (``str``, *optional*): + URL of the service's privacy policy + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetAuthorizationForm + """ + + __slots__: List[str] = ["required_types", "values", "errors", "users", "privacy_policy_url"] + + ID = 0xad2e1cd8 + QUALNAME = "types.account.AuthorizationForm" + + def __init__(self, *, required_types: List["raw.base.SecureRequiredType"], values: List["raw.base.SecureValue"], errors: List["raw.base.SecureValueError"], users: List["raw.base.User"], privacy_policy_url: Optional[str] = None) -> None: + self.required_types = required_types # Vector + self.values = values # Vector + self.errors = errors # Vector + self.users = users # Vector + self.privacy_policy_url = privacy_policy_url # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AuthorizationForm": + + flags = Int.read(b) + + required_types = TLObject.read(b) + + values = TLObject.read(b) + + errors = TLObject.read(b) + + users = TLObject.read(b) + + privacy_policy_url = String.read(b) if flags & (1 << 0) else None + return AuthorizationForm(required_types=required_types, values=values, errors=errors, users=users, privacy_policy_url=privacy_policy_url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.privacy_policy_url is not None else 0 + b.write(Int(flags)) + + b.write(Vector(self.required_types)) + + b.write(Vector(self.values)) + + b.write(Vector(self.errors)) + + b.write(Vector(self.users)) + + if self.privacy_policy_url is not None: + b.write(String(self.privacy_policy_url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/authorizations.py b/pyrogram/raw/types/account/authorizations.py new file mode 100644 index 00000000..da973dd0 --- /dev/null +++ b/pyrogram/raw/types/account/authorizations.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Authorizations(TLObject): # type: ignore + """Logged-in sessions + + Constructor of :obj:`~pyrogram.raw.base.account.Authorizations`. + + Details: + - Layer: ``224`` + - ID: ``4BFF8EA0`` + + Parameters: + authorization_ttl_days (``int`` ``32-bit``): + Time-to-live of session + + authorizations (List of :obj:`Authorization `): + Logged-in sessions + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetAuthorizations + """ + + __slots__: List[str] = ["authorization_ttl_days", "authorizations"] + + ID = 0x4bff8ea0 + QUALNAME = "types.account.Authorizations" + + def __init__(self, *, authorization_ttl_days: int, authorizations: List["raw.base.Authorization"]) -> None: + self.authorization_ttl_days = authorization_ttl_days # int + self.authorizations = authorizations # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Authorizations": + # No flags + + authorization_ttl_days = Int.read(b) + + authorizations = TLObject.read(b) + + return Authorizations(authorization_ttl_days=authorization_ttl_days, authorizations=authorizations) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.authorization_ttl_days)) + + b.write(Vector(self.authorizations)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/auto_download_settings.py b/pyrogram/raw/types/account/auto_download_settings.py new file mode 100644 index 00000000..fff32417 --- /dev/null +++ b/pyrogram/raw/types/account/auto_download_settings.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AutoDownloadSettings(TLObject): # type: ignore + """Media autodownload settings + + Constructor of :obj:`~pyrogram.raw.base.account.AutoDownloadSettings`. + + Details: + - Layer: ``224`` + - ID: ``63CACF26`` + + Parameters: + low (:obj:`AutoDownloadSettings `): + Low data usage preset + + medium (:obj:`AutoDownloadSettings `): + Medium data usage preset + + high (:obj:`AutoDownloadSettings `): + High data usage preset + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetAutoDownloadSettings + """ + + __slots__: List[str] = ["low", "medium", "high"] + + ID = 0x63cacf26 + QUALNAME = "types.account.AutoDownloadSettings" + + def __init__(self, *, low: "raw.base.AutoDownloadSettings", medium: "raw.base.AutoDownloadSettings", high: "raw.base.AutoDownloadSettings") -> None: + self.low = low # AutoDownloadSettings + self.medium = medium # AutoDownloadSettings + self.high = high # AutoDownloadSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AutoDownloadSettings": + # No flags + + low = TLObject.read(b) + + medium = TLObject.read(b) + + high = TLObject.read(b) + + return AutoDownloadSettings(low=low, medium=medium, high=high) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.low.write()) + + b.write(self.medium.write()) + + b.write(self.high.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/auto_save_settings.py b/pyrogram/raw/types/account/auto_save_settings.py new file mode 100644 index 00000000..d4113b08 --- /dev/null +++ b/pyrogram/raw/types/account/auto_save_settings.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AutoSaveSettings(TLObject): # type: ignore + """Contains media autosave settings + + Constructor of :obj:`~pyrogram.raw.base.account.AutoSaveSettings`. + + Details: + - Layer: ``224`` + - ID: ``4C3E069D`` + + Parameters: + users_settings (:obj:`AutoSaveSettings `): + Default media autosave settings for private chats + + chats_settings (:obj:`AutoSaveSettings `): + Default media autosave settings for groups and supergroups + + broadcasts_settings (:obj:`AutoSaveSettings `): + Default media autosave settings for channels + + exceptions (List of :obj:`AutoSaveException `): + Peer-specific granular autosave settings + + chats (List of :obj:`Chat `): + Chats mentioned in the peer-specific granular autosave settings + + users (List of :obj:`User `): + Users mentioned in the peer-specific granular autosave settings + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetAutoSaveSettings + """ + + __slots__: List[str] = ["users_settings", "chats_settings", "broadcasts_settings", "exceptions", "chats", "users"] + + ID = 0x4c3e069d + QUALNAME = "types.account.AutoSaveSettings" + + def __init__(self, *, users_settings: "raw.base.AutoSaveSettings", chats_settings: "raw.base.AutoSaveSettings", broadcasts_settings: "raw.base.AutoSaveSettings", exceptions: List["raw.base.AutoSaveException"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.users_settings = users_settings # AutoSaveSettings + self.chats_settings = chats_settings # AutoSaveSettings + self.broadcasts_settings = broadcasts_settings # AutoSaveSettings + self.exceptions = exceptions # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AutoSaveSettings": + # No flags + + users_settings = TLObject.read(b) + + chats_settings = TLObject.read(b) + + broadcasts_settings = TLObject.read(b) + + exceptions = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return AutoSaveSettings(users_settings=users_settings, chats_settings=chats_settings, broadcasts_settings=broadcasts_settings, exceptions=exceptions, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.users_settings.write()) + + b.write(self.chats_settings.write()) + + b.write(self.broadcasts_settings.write()) + + b.write(Vector(self.exceptions)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/business_chat_links.py b/pyrogram/raw/types/account/business_chat_links.py new file mode 100644 index 00000000..92ad56e8 --- /dev/null +++ b/pyrogram/raw/types/account/business_chat_links.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessChatLinks(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.account.BusinessChatLinks`. + + Details: + - Layer: ``224`` + - ID: ``EC43A2D1`` + + Parameters: + links (List of :obj:`BusinessChatLink `): + + + chats (List of :obj:`Chat `): + + + users (List of :obj:`User `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetBusinessChatLinks + """ + + __slots__: List[str] = ["links", "chats", "users"] + + ID = 0xec43a2d1 + QUALNAME = "types.account.BusinessChatLinks" + + def __init__(self, *, links: List["raw.base.BusinessChatLink"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.links = links # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessChatLinks": + # No flags + + links = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return BusinessChatLinks(links=links, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.links)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/chat_themes.py b/pyrogram/raw/types/account/chat_themes.py new file mode 100644 index 00000000..299280d9 --- /dev/null +++ b/pyrogram/raw/types/account/chat_themes.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatThemes(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.ChatThemes`. + + Details: + - Layer: ``224`` + - ID: ``BE098173`` + + Parameters: + hash (``int`` ``64-bit``): + N/A + + themes (List of :obj:`ChatTheme `): + N/A + + chats (List of :obj:`Chat `): + N/A + + users (List of :obj:`User `): + N/A + + next_offset (``str``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetUniqueGiftChatThemes + """ + + __slots__: List[str] = ["hash", "themes", "chats", "users", "next_offset"] + + ID = 0xbe098173 + QUALNAME = "types.account.ChatThemes" + + def __init__(self, *, hash: int, themes: List["raw.base.ChatTheme"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None: + self.hash = hash # long + self.themes = themes # Vector + self.chats = chats # Vector + self.users = users # Vector + self.next_offset = next_offset # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatThemes": + + flags = Int.read(b) + + hash = Long.read(b) + + themes = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + next_offset = String.read(b) if flags & (1 << 0) else None + return ChatThemes(hash=hash, themes=themes, chats=chats, users=users, next_offset=next_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.next_offset is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.hash)) + + b.write(Vector(self.themes)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + if self.next_offset is not None: + b.write(String(self.next_offset)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/chat_themes_not_modified.py b/pyrogram/raw/types/account/chat_themes_not_modified.py new file mode 100644 index 00000000..67c09eca --- /dev/null +++ b/pyrogram/raw/types/account/chat_themes_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatThemesNotModified(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.ChatThemes`. + + Details: + - Layer: ``224`` + - ID: ``E011E1C4`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetUniqueGiftChatThemes + """ + + __slots__: List[str] = [] + + ID = 0xe011e1c4 + QUALNAME = "types.account.ChatThemesNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatThemesNotModified": + # No flags + + return ChatThemesNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/connected_bots.py b/pyrogram/raw/types/account/connected_bots.py new file mode 100644 index 00000000..5878a5f1 --- /dev/null +++ b/pyrogram/raw/types/account/connected_bots.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConnectedBots(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.account.ConnectedBots`. + + Details: + - Layer: ``224`` + - ID: ``17D7F87B`` + + Parameters: + connected_bots (List of :obj:`ConnectedBot `): + + + users (List of :obj:`User `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetConnectedBots + """ + + __slots__: List[str] = ["connected_bots", "users"] + + ID = 0x17d7f87b + QUALNAME = "types.account.ConnectedBots" + + def __init__(self, *, connected_bots: List["raw.base.ConnectedBot"], users: List["raw.base.User"]) -> None: + self.connected_bots = connected_bots # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConnectedBots": + # No flags + + connected_bots = TLObject.read(b) + + users = TLObject.read(b) + + return ConnectedBots(connected_bots=connected_bots, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.connected_bots)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/content_settings.py b/pyrogram/raw/types/account/content_settings.py new file mode 100644 index 00000000..64891658 --- /dev/null +++ b/pyrogram/raw/types/account/content_settings.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ContentSettings(TLObject): # type: ignore + """Sensitive content settings + + Constructor of :obj:`~pyrogram.raw.base.account.ContentSettings`. + + Details: + - Layer: ``224`` + - ID: ``57E28221`` + + Parameters: + sensitive_enabled (``bool``, *optional*): + Whether viewing of sensitive (NSFW) content is enabled + + sensitive_can_change (``bool``, *optional*): + Whether the current client can change the sensitive content settings to view NSFW content + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetContentSettings + """ + + __slots__: List[str] = ["sensitive_enabled", "sensitive_can_change"] + + ID = 0x57e28221 + QUALNAME = "types.account.ContentSettings" + + def __init__(self, *, sensitive_enabled: Optional[bool] = None, sensitive_can_change: Optional[bool] = None) -> None: + self.sensitive_enabled = sensitive_enabled # flags.0?true + self.sensitive_can_change = sensitive_can_change # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ContentSettings": + + flags = Int.read(b) + + sensitive_enabled = True if flags & (1 << 0) else False + sensitive_can_change = True if flags & (1 << 1) else False + return ContentSettings(sensitive_enabled=sensitive_enabled, sensitive_can_change=sensitive_can_change) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.sensitive_enabled else 0 + flags |= (1 << 1) if self.sensitive_can_change else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/email_verified.py b/pyrogram/raw/types/account/email_verified.py new file mode 100644 index 00000000..4970b4a6 --- /dev/null +++ b/pyrogram/raw/types/account/email_verified.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerified(TLObject): # type: ignore + """The email was verified correctly. + + Constructor of :obj:`~pyrogram.raw.base.account.EmailVerified`. + + Details: + - Layer: ``224`` + - ID: ``2B96CD1B`` + + Parameters: + email (``str``): + The verified email address. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.VerifyEmail + """ + + __slots__: List[str] = ["email"] + + ID = 0x2b96cd1b + QUALNAME = "types.account.EmailVerified" + + def __init__(self, *, email: str) -> None: + self.email = email # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerified": + # No flags + + email = String.read(b) + + return EmailVerified(email=email) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.email)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/email_verified_login.py b/pyrogram/raw/types/account/email_verified_login.py new file mode 100644 index 00000000..3d923038 --- /dev/null +++ b/pyrogram/raw/types/account/email_verified_login.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerifiedLogin(TLObject): # type: ignore + """The email was verified correctly, and a login code was just sent to it. + + Constructor of :obj:`~pyrogram.raw.base.account.EmailVerified`. + + Details: + - Layer: ``224`` + - ID: ``E1BB0D61`` + + Parameters: + email (``str``): + The verified email address. + + sent_code (:obj:`auth.SentCode `): + Info about the sent login code + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.VerifyEmail + """ + + __slots__: List[str] = ["email", "sent_code"] + + ID = 0xe1bb0d61 + QUALNAME = "types.account.EmailVerifiedLogin" + + def __init__(self, *, email: str, sent_code: "raw.base.auth.SentCode") -> None: + self.email = email # string + self.sent_code = sent_code # auth.SentCode + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerifiedLogin": + # No flags + + email = String.read(b) + + sent_code = TLObject.read(b) + + return EmailVerifiedLogin(email=email, sent_code=sent_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.email)) + + b.write(self.sent_code.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/emoji_statuses.py b/pyrogram/raw/types/account/emoji_statuses.py new file mode 100644 index 00000000..aa0437e0 --- /dev/null +++ b/pyrogram/raw/types/account/emoji_statuses.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiStatuses(TLObject): # type: ignore + """A list of emoji statuses + + Constructor of :obj:`~pyrogram.raw.base.account.EmojiStatuses`. + + Details: + - Layer: ``224`` + - ID: ``90C467D1`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + statuses (List of :obj:`EmojiStatus `): + Emoji statuses + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetDefaultEmojiStatuses + account.GetRecentEmojiStatuses + account.GetChannelDefaultEmojiStatuses + account.GetCollectibleEmojiStatuses + """ + + __slots__: List[str] = ["hash", "statuses"] + + ID = 0x90c467d1 + QUALNAME = "types.account.EmojiStatuses" + + def __init__(self, *, hash: int, statuses: List["raw.base.EmojiStatus"]) -> None: + self.hash = hash # long + self.statuses = statuses # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiStatuses": + # No flags + + hash = Long.read(b) + + statuses = TLObject.read(b) + + return EmojiStatuses(hash=hash, statuses=statuses) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.statuses)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/emoji_statuses_not_modified.py b/pyrogram/raw/types/account/emoji_statuses_not_modified.py new file mode 100644 index 00000000..92ea2524 --- /dev/null +++ b/pyrogram/raw/types/account/emoji_statuses_not_modified.py @@ -0,0 +1,61 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiStatusesNotModified(TLObject): # type: ignore + """The server-side list of emoji statuses hasn't changed + + Constructor of :obj:`~pyrogram.raw.base.account.EmojiStatuses`. + + Details: + - Layer: ``224`` + - ID: ``D08CE645`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetDefaultEmojiStatuses + account.GetRecentEmojiStatuses + account.GetChannelDefaultEmojiStatuses + account.GetCollectibleEmojiStatuses + """ + + __slots__: List[str] = [] + + ID = 0xd08ce645 + QUALNAME = "types.account.EmojiStatusesNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiStatusesNotModified": + # No flags + + return EmojiStatusesNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/paid_messages_revenue.py b/pyrogram/raw/types/account/paid_messages_revenue.py new file mode 100644 index 00000000..f61af667 --- /dev/null +++ b/pyrogram/raw/types/account/paid_messages_revenue.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PaidMessagesRevenue(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.PaidMessagesRevenue`. + + Details: + - Layer: ``224`` + - ID: ``1E109708`` + + Parameters: + stars_amount (``int`` ``64-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetPaidMessagesRevenue + """ + + __slots__: List[str] = ["stars_amount"] + + ID = 0x1e109708 + QUALNAME = "types.account.PaidMessagesRevenue" + + def __init__(self, *, stars_amount: int) -> None: + self.stars_amount = stars_amount # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PaidMessagesRevenue": + # No flags + + stars_amount = Long.read(b) + + return PaidMessagesRevenue(stars_amount=stars_amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.stars_amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/passkey_registration_options.py b/pyrogram/raw/types/account/passkey_registration_options.py new file mode 100644 index 00000000..d9b2dc78 --- /dev/null +++ b/pyrogram/raw/types/account/passkey_registration_options.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PasskeyRegistrationOptions(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.PasskeyRegistrationOptions`. + + Details: + - Layer: ``224`` + - ID: ``E16B5CE1`` + + Parameters: + options (:obj:`DataJSON `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.InitPasskeyRegistration + """ + + __slots__: List[str] = ["options"] + + ID = 0xe16b5ce1 + QUALNAME = "types.account.PasskeyRegistrationOptions" + + def __init__(self, *, options: "raw.base.DataJSON") -> None: + self.options = options # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PasskeyRegistrationOptions": + # No flags + + options = TLObject.read(b) + + return PasskeyRegistrationOptions(options=options) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.options.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/passkeys.py b/pyrogram/raw/types/account/passkeys.py new file mode 100644 index 00000000..73bd37a9 --- /dev/null +++ b/pyrogram/raw/types/account/passkeys.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Passkeys(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.Passkeys`. + + Details: + - Layer: ``224`` + - ID: ``F8E0AA1C`` + + Parameters: + passkeys (List of :obj:`Passkey `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetPasskeys + """ + + __slots__: List[str] = ["passkeys"] + + ID = 0xf8e0aa1c + QUALNAME = "types.account.Passkeys" + + def __init__(self, *, passkeys: List["raw.base.Passkey"]) -> None: + self.passkeys = passkeys # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Passkeys": + # No flags + + passkeys = TLObject.read(b) + + return Passkeys(passkeys=passkeys) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.passkeys)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/password.py b/pyrogram/raw/types/account/password.py new file mode 100644 index 00000000..57e7f6fb --- /dev/null +++ b/pyrogram/raw/types/account/password.py @@ -0,0 +1,163 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Password(TLObject): # type: ignore + """Configuration for two-factor authorization + + Constructor of :obj:`~pyrogram.raw.base.account.Password`. + + Details: + - Layer: ``224`` + - ID: ``957B50FB`` + + Parameters: + new_algo (:obj:`PasswordKdfAlgo `): + The KDF algorithm for SRP two-factor authentication to use when creating new passwords + + new_secure_algo (:obj:`SecurePasswordKdfAlgo `): + The KDF algorithm for telegram passport + + secure_random (``bytes``): + Secure random string + + has_recovery (``bool``, *optional*): + Whether the user has a recovery method configured + + has_secure_values (``bool``, *optional*): + Whether telegram passport is enabled + + has_password (``bool``, *optional*): + Whether the user has a password + + current_algo (:obj:`PasswordKdfAlgo `, *optional*): + The KDF algorithm for SRP two-factor authentication of the current password + + srp_B (``bytes``, *optional*): + Srp B param for SRP authorization + + srp_id (``int`` ``64-bit``, *optional*): + Srp ID param for SRP authorization + + hint (``str``, *optional*): + Text hint for the password + + email_unconfirmed_pattern (``str``, *optional*): + A password recovery email with the specified pattern is still awaiting verification + + pending_reset_date (``int`` ``32-bit``, *optional*): + The 2FA password will be automatically removed at this date, unless the user cancels the operation + + login_email_pattern (``str``, *optional*): + A verified login email with the specified pattern is configured + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetPassword + """ + + __slots__: List[str] = ["new_algo", "new_secure_algo", "secure_random", "has_recovery", "has_secure_values", "has_password", "current_algo", "srp_B", "srp_id", "hint", "email_unconfirmed_pattern", "pending_reset_date", "login_email_pattern"] + + ID = 0x957b50fb + QUALNAME = "types.account.Password" + + def __init__(self, *, new_algo: "raw.base.PasswordKdfAlgo", new_secure_algo: "raw.base.SecurePasswordKdfAlgo", secure_random: bytes, has_recovery: Optional[bool] = None, has_secure_values: Optional[bool] = None, has_password: Optional[bool] = None, current_algo: "raw.base.PasswordKdfAlgo" = None, srp_B: Optional[bytes] = None, srp_id: Optional[int] = None, hint: Optional[str] = None, email_unconfirmed_pattern: Optional[str] = None, pending_reset_date: Optional[int] = None, login_email_pattern: Optional[str] = None) -> None: + self.new_algo = new_algo # PasswordKdfAlgo + self.new_secure_algo = new_secure_algo # SecurePasswordKdfAlgo + self.secure_random = secure_random # bytes + self.has_recovery = has_recovery # flags.0?true + self.has_secure_values = has_secure_values # flags.1?true + self.has_password = has_password # flags.2?true + self.current_algo = current_algo # flags.2?PasswordKdfAlgo + self.srp_B = srp_B # flags.2?bytes + self.srp_id = srp_id # flags.2?long + self.hint = hint # flags.3?string + self.email_unconfirmed_pattern = email_unconfirmed_pattern # flags.4?string + self.pending_reset_date = pending_reset_date # flags.5?int + self.login_email_pattern = login_email_pattern # flags.6?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Password": + + flags = Int.read(b) + + has_recovery = True if flags & (1 << 0) else False + has_secure_values = True if flags & (1 << 1) else False + has_password = True if flags & (1 << 2) else False + current_algo = TLObject.read(b) if flags & (1 << 2) else None + + srp_B = Bytes.read(b) if flags & (1 << 2) else None + srp_id = Long.read(b) if flags & (1 << 2) else None + hint = String.read(b) if flags & (1 << 3) else None + email_unconfirmed_pattern = String.read(b) if flags & (1 << 4) else None + new_algo = TLObject.read(b) + + new_secure_algo = TLObject.read(b) + + secure_random = Bytes.read(b) + + pending_reset_date = Int.read(b) if flags & (1 << 5) else None + login_email_pattern = String.read(b) if flags & (1 << 6) else None + return Password(new_algo=new_algo, new_secure_algo=new_secure_algo, secure_random=secure_random, has_recovery=has_recovery, has_secure_values=has_secure_values, has_password=has_password, current_algo=current_algo, srp_B=srp_B, srp_id=srp_id, hint=hint, email_unconfirmed_pattern=email_unconfirmed_pattern, pending_reset_date=pending_reset_date, login_email_pattern=login_email_pattern) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.has_recovery else 0 + flags |= (1 << 1) if self.has_secure_values else 0 + flags |= (1 << 2) if self.has_password else 0 + flags |= (1 << 2) if self.current_algo is not None else 0 + flags |= (1 << 2) if self.srp_B is not None else 0 + flags |= (1 << 2) if self.srp_id is not None else 0 + flags |= (1 << 3) if self.hint is not None else 0 + flags |= (1 << 4) if self.email_unconfirmed_pattern is not None else 0 + flags |= (1 << 5) if self.pending_reset_date is not None else 0 + flags |= (1 << 6) if self.login_email_pattern is not None else 0 + b.write(Int(flags)) + + if self.current_algo is not None: + b.write(self.current_algo.write()) + + if self.srp_B is not None: + b.write(Bytes(self.srp_B)) + + if self.srp_id is not None: + b.write(Long(self.srp_id)) + + if self.hint is not None: + b.write(String(self.hint)) + + if self.email_unconfirmed_pattern is not None: + b.write(String(self.email_unconfirmed_pattern)) + + b.write(self.new_algo.write()) + + b.write(self.new_secure_algo.write()) + + b.write(Bytes(self.secure_random)) + + if self.pending_reset_date is not None: + b.write(Int(self.pending_reset_date)) + + if self.login_email_pattern is not None: + b.write(String(self.login_email_pattern)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/password_input_settings.py b/pyrogram/raw/types/account/password_input_settings.py new file mode 100644 index 00000000..b2a25b64 --- /dev/null +++ b/pyrogram/raw/types/account/password_input_settings.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PasswordInputSettings(TLObject): # type: ignore + """Settings for setting up a new password + + Constructor of :obj:`~pyrogram.raw.base.account.PasswordInputSettings`. + + Details: + - Layer: ``224`` + - ID: ``C23727C9`` + + Parameters: + new_algo (:obj:`PasswordKdfAlgo `, *optional*): + The SRP algorithm to use + + new_password_hash (``bytes``, *optional*): + The computed password hash + + hint (``str``, *optional*): + Text hint for the password + + email (``str``, *optional*): + Password recovery email + + new_secure_settings (:obj:`SecureSecretSettings `, *optional*): + Telegram passport settings + + """ + + __slots__: List[str] = ["new_algo", "new_password_hash", "hint", "email", "new_secure_settings"] + + ID = 0xc23727c9 + QUALNAME = "types.account.PasswordInputSettings" + + def __init__(self, *, new_algo: "raw.base.PasswordKdfAlgo" = None, new_password_hash: Optional[bytes] = None, hint: Optional[str] = None, email: Optional[str] = None, new_secure_settings: "raw.base.SecureSecretSettings" = None) -> None: + self.new_algo = new_algo # flags.0?PasswordKdfAlgo + self.new_password_hash = new_password_hash # flags.0?bytes + self.hint = hint # flags.0?string + self.email = email # flags.1?string + self.new_secure_settings = new_secure_settings # flags.2?SecureSecretSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PasswordInputSettings": + + flags = Int.read(b) + + new_algo = TLObject.read(b) if flags & (1 << 0) else None + + new_password_hash = Bytes.read(b) if flags & (1 << 0) else None + hint = String.read(b) if flags & (1 << 0) else None + email = String.read(b) if flags & (1 << 1) else None + new_secure_settings = TLObject.read(b) if flags & (1 << 2) else None + + return PasswordInputSettings(new_algo=new_algo, new_password_hash=new_password_hash, hint=hint, email=email, new_secure_settings=new_secure_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.new_algo is not None else 0 + flags |= (1 << 0) if self.new_password_hash is not None else 0 + flags |= (1 << 0) if self.hint is not None else 0 + flags |= (1 << 1) if self.email is not None else 0 + flags |= (1 << 2) if self.new_secure_settings is not None else 0 + b.write(Int(flags)) + + if self.new_algo is not None: + b.write(self.new_algo.write()) + + if self.new_password_hash is not None: + b.write(Bytes(self.new_password_hash)) + + if self.hint is not None: + b.write(String(self.hint)) + + if self.email is not None: + b.write(String(self.email)) + + if self.new_secure_settings is not None: + b.write(self.new_secure_settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/password_settings.py b/pyrogram/raw/types/account/password_settings.py new file mode 100644 index 00000000..d707e8d5 --- /dev/null +++ b/pyrogram/raw/types/account/password_settings.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PasswordSettings(TLObject): # type: ignore + """Private info associated to the password info (recovery email, telegram passport info & so on) + + Constructor of :obj:`~pyrogram.raw.base.account.PasswordSettings`. + + Details: + - Layer: ``224`` + - ID: ``9A5C33E5`` + + Parameters: + email (``str``, *optional*): + 2FA Recovery email + + secure_settings (:obj:`SecureSecretSettings `, *optional*): + Telegram passport settings + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetPasswordSettings + """ + + __slots__: List[str] = ["email", "secure_settings"] + + ID = 0x9a5c33e5 + QUALNAME = "types.account.PasswordSettings" + + def __init__(self, *, email: Optional[str] = None, secure_settings: "raw.base.SecureSecretSettings" = None) -> None: + self.email = email # flags.0?string + self.secure_settings = secure_settings # flags.1?SecureSecretSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PasswordSettings": + + flags = Int.read(b) + + email = String.read(b) if flags & (1 << 0) else None + secure_settings = TLObject.read(b) if flags & (1 << 1) else None + + return PasswordSettings(email=email, secure_settings=secure_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.email is not None else 0 + flags |= (1 << 1) if self.secure_settings is not None else 0 + b.write(Int(flags)) + + if self.email is not None: + b.write(String(self.email)) + + if self.secure_settings is not None: + b.write(self.secure_settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/privacy_rules.py b/pyrogram/raw/types/account/privacy_rules.py new file mode 100644 index 00000000..de843204 --- /dev/null +++ b/pyrogram/raw/types/account/privacy_rules.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PrivacyRules(TLObject): # type: ignore + """Privacy rules + + Constructor of :obj:`~pyrogram.raw.base.account.PrivacyRules`. + + Details: + - Layer: ``224`` + - ID: ``50A04E45`` + + Parameters: + rules (List of :obj:`PrivacyRule `): + Privacy rules + + chats (List of :obj:`Chat `): + Chats to which the rules apply + + users (List of :obj:`User `): + Users to which the rules apply + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetPrivacy + account.SetPrivacy + """ + + __slots__: List[str] = ["rules", "chats", "users"] + + ID = 0x50a04e45 + QUALNAME = "types.account.PrivacyRules" + + def __init__(self, *, rules: List["raw.base.PrivacyRule"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.rules = rules # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PrivacyRules": + # No flags + + rules = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return PrivacyRules(rules=rules, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.rules)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/reset_password_failed_wait.py b/pyrogram/raw/types/account/reset_password_failed_wait.py new file mode 100644 index 00000000..c2baf806 --- /dev/null +++ b/pyrogram/raw/types/account/reset_password_failed_wait.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetPasswordFailedWait(TLObject): # type: ignore + """You recently requested a password reset that was canceled, please wait until the specified date before requesting another reset. + + Constructor of :obj:`~pyrogram.raw.base.account.ResetPasswordResult`. + + Details: + - Layer: ``224`` + - ID: ``E3779861`` + + Parameters: + retry_date (``int`` ``32-bit``): + Wait until this date before requesting another reset. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.ResetPassword + """ + + __slots__: List[str] = ["retry_date"] + + ID = 0xe3779861 + QUALNAME = "types.account.ResetPasswordFailedWait" + + def __init__(self, *, retry_date: int) -> None: + self.retry_date = retry_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetPasswordFailedWait": + # No flags + + retry_date = Int.read(b) + + return ResetPasswordFailedWait(retry_date=retry_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.retry_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/reset_password_ok.py b/pyrogram/raw/types/account/reset_password_ok.py new file mode 100644 index 00000000..82b1625d --- /dev/null +++ b/pyrogram/raw/types/account/reset_password_ok.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetPasswordOk(TLObject): # type: ignore + """The 2FA password was reset successfully. + + Constructor of :obj:`~pyrogram.raw.base.account.ResetPasswordResult`. + + Details: + - Layer: ``224`` + - ID: ``E926D63E`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.ResetPassword + """ + + __slots__: List[str] = [] + + ID = 0xe926d63e + QUALNAME = "types.account.ResetPasswordOk" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetPasswordOk": + # No flags + + return ResetPasswordOk() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/reset_password_requested_wait.py b/pyrogram/raw/types/account/reset_password_requested_wait.py new file mode 100644 index 00000000..047e378f --- /dev/null +++ b/pyrogram/raw/types/account/reset_password_requested_wait.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResetPasswordRequestedWait(TLObject): # type: ignore + """You successfully requested a password reset, please wait until the specified date before finalizing the reset. + + Constructor of :obj:`~pyrogram.raw.base.account.ResetPasswordResult`. + + Details: + - Layer: ``224`` + - ID: ``E9EFFC7D`` + + Parameters: + until_date (``int`` ``32-bit``): + Wait until this date before finalizing the reset. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.ResetPassword + """ + + __slots__: List[str] = ["until_date"] + + ID = 0xe9effc7d + QUALNAME = "types.account.ResetPasswordRequestedWait" + + def __init__(self, *, until_date: int) -> None: + self.until_date = until_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResetPasswordRequestedWait": + # No flags + + until_date = Int.read(b) + + return ResetPasswordRequestedWait(until_date=until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/resolved_business_chat_links.py b/pyrogram/raw/types/account/resolved_business_chat_links.py new file mode 100644 index 00000000..f0054e4d --- /dev/null +++ b/pyrogram/raw/types/account/resolved_business_chat_links.py @@ -0,0 +1,99 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResolvedBusinessChatLinks(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.account.ResolvedBusinessChatLinks`. + + Details: + - Layer: ``224`` + - ID: ``9A23AF21`` + + Parameters: + peer (:obj:`Peer `): + + + message (``str``): + + + chats (List of :obj:`Chat `): + + + users (List of :obj:`User `): + + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.ResolveBusinessChatLink + """ + + __slots__: List[str] = ["peer", "message", "chats", "users", "entities"] + + ID = 0x9a23af21 + QUALNAME = "types.account.ResolvedBusinessChatLinks" + + def __init__(self, *, peer: "raw.base.Peer", message: str, chats: List["raw.base.Chat"], users: List["raw.base.User"], entities: Optional[List["raw.base.MessageEntity"]] = None) -> None: + self.peer = peer # Peer + self.message = message # string + self.chats = chats # Vector + self.users = users # Vector + self.entities = entities # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResolvedBusinessChatLinks": + + flags = Int.read(b) + + peer = TLObject.read(b) + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 0) else [] + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ResolvedBusinessChatLinks(peer=peer, message=message, chats=chats, users=users, entities=entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.entities else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/saved_music_ids.py b/pyrogram/raw/types/account/saved_music_ids.py new file mode 100644 index 00000000..fe3e1918 --- /dev/null +++ b/pyrogram/raw/types/account/saved_music_ids.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedMusicIds(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.SavedMusicIds`. + + Details: + - Layer: ``224`` + - ID: ``998D6636`` + + Parameters: + ids (List of ``int`` ``64-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetSavedMusicIds + """ + + __slots__: List[str] = ["ids"] + + ID = 0x998d6636 + QUALNAME = "types.account.SavedMusicIds" + + def __init__(self, *, ids: List[int]) -> None: + self.ids = ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedMusicIds": + # No flags + + ids = TLObject.read(b, Long) + + return SavedMusicIds(ids=ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/saved_music_ids_not_modified.py b/pyrogram/raw/types/account/saved_music_ids_not_modified.py new file mode 100644 index 00000000..a7cccf4f --- /dev/null +++ b/pyrogram/raw/types/account/saved_music_ids_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedMusicIdsNotModified(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.account.SavedMusicIds`. + + Details: + - Layer: ``224`` + - ID: ``4FC81D6E`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetSavedMusicIds + """ + + __slots__: List[str] = [] + + ID = 0x4fc81d6e + QUALNAME = "types.account.SavedMusicIdsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedMusicIdsNotModified": + # No flags + + return SavedMusicIdsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/saved_ringtone.py b/pyrogram/raw/types/account/saved_ringtone.py new file mode 100644 index 00000000..ca3a458b --- /dev/null +++ b/pyrogram/raw/types/account/saved_ringtone.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedRingtone(TLObject): # type: ignore + """The notification sound was already in MP3 format and was saved without any modification + + Constructor of :obj:`~pyrogram.raw.base.account.SavedRingtone`. + + Details: + - Layer: ``224`` + - ID: ``B7263F6D`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.SaveRingtone + """ + + __slots__: List[str] = [] + + ID = 0xb7263f6d + QUALNAME = "types.account.SavedRingtone" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedRingtone": + # No flags + + return SavedRingtone() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/saved_ringtone_converted.py b/pyrogram/raw/types/account/saved_ringtone_converted.py new file mode 100644 index 00000000..b761f304 --- /dev/null +++ b/pyrogram/raw/types/account/saved_ringtone_converted.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedRingtoneConverted(TLObject): # type: ignore + """The notification sound was not in MP3 format and was successfully converted and saved, use the returned Document to refer to the notification sound from now on + + Constructor of :obj:`~pyrogram.raw.base.account.SavedRingtone`. + + Details: + - Layer: ``224`` + - ID: ``1F307EB7`` + + Parameters: + document (:obj:`Document `): + The converted notification sound + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.SaveRingtone + """ + + __slots__: List[str] = ["document"] + + ID = 0x1f307eb7 + QUALNAME = "types.account.SavedRingtoneConverted" + + def __init__(self, *, document: "raw.base.Document") -> None: + self.document = document # Document + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedRingtoneConverted": + # No flags + + document = TLObject.read(b) + + return SavedRingtoneConverted(document=document) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.document.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/saved_ringtones.py b/pyrogram/raw/types/account/saved_ringtones.py new file mode 100644 index 00000000..a2416e31 --- /dev/null +++ b/pyrogram/raw/types/account/saved_ringtones.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedRingtones(TLObject): # type: ignore + """A list of saved notification sounds + + Constructor of :obj:`~pyrogram.raw.base.account.SavedRingtones`. + + Details: + - Layer: ``224`` + - ID: ``C1E92CC5`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + ringtones (List of :obj:`Document `): + Saved notification sounds + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetSavedRingtones + """ + + __slots__: List[str] = ["hash", "ringtones"] + + ID = 0xc1e92cc5 + QUALNAME = "types.account.SavedRingtones" + + def __init__(self, *, hash: int, ringtones: List["raw.base.Document"]) -> None: + self.hash = hash # long + self.ringtones = ringtones # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedRingtones": + # No flags + + hash = Long.read(b) + + ringtones = TLObject.read(b) + + return SavedRingtones(hash=hash, ringtones=ringtones) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.ringtones)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/saved_ringtones_not_modified.py b/pyrogram/raw/types/account/saved_ringtones_not_modified.py new file mode 100644 index 00000000..f5a6eb31 --- /dev/null +++ b/pyrogram/raw/types/account/saved_ringtones_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedRingtonesNotModified(TLObject): # type: ignore + """The notification sound list hasn't changed. + + Constructor of :obj:`~pyrogram.raw.base.account.SavedRingtones`. + + Details: + - Layer: ``224`` + - ID: ``FBF6E8B1`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetSavedRingtones + """ + + __slots__: List[str] = [] + + ID = 0xfbf6e8b1 + QUALNAME = "types.account.SavedRingtonesNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedRingtonesNotModified": + # No flags + + return SavedRingtonesNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/sent_email_code.py b/pyrogram/raw/types/account/sent_email_code.py new file mode 100644 index 00000000..cd6ad780 --- /dev/null +++ b/pyrogram/raw/types/account/sent_email_code.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentEmailCode(TLObject): # type: ignore + """The sent email code + + Constructor of :obj:`~pyrogram.raw.base.account.SentEmailCode`. + + Details: + - Layer: ``224`` + - ID: ``811F854F`` + + Parameters: + email_pattern (``str``): + The email (to which the code was sent) must match this pattern + + length (``int`` ``32-bit``): + The length of the verification code + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.SendVerifyEmailCode + """ + + __slots__: List[str] = ["email_pattern", "length"] + + ID = 0x811f854f + QUALNAME = "types.account.SentEmailCode" + + def __init__(self, *, email_pattern: str, length: int) -> None: + self.email_pattern = email_pattern # string + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentEmailCode": + # No flags + + email_pattern = String.read(b) + + length = Int.read(b) + + return SentEmailCode(email_pattern=email_pattern, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.email_pattern)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/takeout.py b/pyrogram/raw/types/account/takeout.py new file mode 100644 index 00000000..ffc8df11 --- /dev/null +++ b/pyrogram/raw/types/account/takeout.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Takeout(TLObject): # type: ignore + """Takeout info + + Constructor of :obj:`~pyrogram.raw.base.account.Takeout`. + + Details: + - Layer: ``224`` + - ID: ``4DBA4501`` + + Parameters: + id (``int`` ``64-bit``): + Takeout ID + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.InitTakeoutSession + """ + + __slots__: List[str] = ["id"] + + ID = 0x4dba4501 + QUALNAME = "types.account.Takeout" + + def __init__(self, *, id: int) -> None: + self.id = id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Takeout": + # No flags + + id = Long.read(b) + + return Takeout(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/themes.py b/pyrogram/raw/types/account/themes.py new file mode 100644 index 00000000..956c08f8 --- /dev/null +++ b/pyrogram/raw/types/account/themes.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Themes(TLObject): # type: ignore + """Installed themes + + Constructor of :obj:`~pyrogram.raw.base.account.Themes`. + + Details: + - Layer: ``224`` + - ID: ``9A3D8C6D`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + themes (List of :obj:`Theme `): + Themes + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetThemes + account.GetChatThemes + """ + + __slots__: List[str] = ["hash", "themes"] + + ID = 0x9a3d8c6d + QUALNAME = "types.account.Themes" + + def __init__(self, *, hash: int, themes: List["raw.base.Theme"]) -> None: + self.hash = hash # long + self.themes = themes # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Themes": + # No flags + + hash = Long.read(b) + + themes = TLObject.read(b) + + return Themes(hash=hash, themes=themes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.themes)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/themes_not_modified.py b/pyrogram/raw/types/account/themes_not_modified.py new file mode 100644 index 00000000..ba69c7fd --- /dev/null +++ b/pyrogram/raw/types/account/themes_not_modified.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ThemesNotModified(TLObject): # type: ignore + """No new themes were installed + + Constructor of :obj:`~pyrogram.raw.base.account.Themes`. + + Details: + - Layer: ``224`` + - ID: ``F41EB622`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetThemes + account.GetChatThemes + """ + + __slots__: List[str] = [] + + ID = 0xf41eb622 + QUALNAME = "types.account.ThemesNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ThemesNotModified": + # No flags + + return ThemesNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/tmp_password.py b/pyrogram/raw/types/account/tmp_password.py new file mode 100644 index 00000000..738b001e --- /dev/null +++ b/pyrogram/raw/types/account/tmp_password.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TmpPassword(TLObject): # type: ignore + """Temporary payment password + + Constructor of :obj:`~pyrogram.raw.base.account.TmpPassword`. + + Details: + - Layer: ``224`` + - ID: ``DB64FD34`` + + Parameters: + tmp_password (``bytes``): + Temporary password + + valid_until (``int`` ``32-bit``): + Validity period + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetTmpPassword + """ + + __slots__: List[str] = ["tmp_password", "valid_until"] + + ID = 0xdb64fd34 + QUALNAME = "types.account.TmpPassword" + + def __init__(self, *, tmp_password: bytes, valid_until: int) -> None: + self.tmp_password = tmp_password # bytes + self.valid_until = valid_until # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TmpPassword": + # No flags + + tmp_password = Bytes.read(b) + + valid_until = Int.read(b) + + return TmpPassword(tmp_password=tmp_password, valid_until=valid_until) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.tmp_password)) + + b.write(Int(self.valid_until)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/wall_papers.py b/pyrogram/raw/types/account/wall_papers.py new file mode 100644 index 00000000..4d0ea2b4 --- /dev/null +++ b/pyrogram/raw/types/account/wall_papers.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class WallPapers(TLObject): # type: ignore + """Installed wallpapers + + Constructor of :obj:`~pyrogram.raw.base.account.WallPapers`. + + Details: + - Layer: ``224`` + - ID: ``CDC3858C`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + wallpapers (List of :obj:`WallPaper `): + Wallpapers + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetWallPapers + """ + + __slots__: List[str] = ["hash", "wallpapers"] + + ID = 0xcdc3858c + QUALNAME = "types.account.WallPapers" + + def __init__(self, *, hash: int, wallpapers: List["raw.base.WallPaper"]) -> None: + self.hash = hash # long + self.wallpapers = wallpapers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "WallPapers": + # No flags + + hash = Long.read(b) + + wallpapers = TLObject.read(b) + + return WallPapers(hash=hash, wallpapers=wallpapers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.wallpapers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account/wall_papers_not_modified.py b/pyrogram/raw/types/account/wall_papers_not_modified.py new file mode 100644 index 00000000..54766f90 --- /dev/null +++ b/pyrogram/raw/types/account/wall_papers_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class WallPapersNotModified(TLObject): # type: ignore + """No new wallpapers were found + + Constructor of :obj:`~pyrogram.raw.base.account.WallPapers`. + + Details: + - Layer: ``224`` + - ID: ``1C199183`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetWallPapers + """ + + __slots__: List[str] = [] + + ID = 0x1c199183 + QUALNAME = "types.account.WallPapersNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "WallPapersNotModified": + # No flags + + return WallPapersNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/account/web_authorizations.py b/pyrogram/raw/types/account/web_authorizations.py new file mode 100644 index 00000000..608e5f5f --- /dev/null +++ b/pyrogram/raw/types/account/web_authorizations.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class WebAuthorizations(TLObject): # type: ignore + """Web authorizations + + Constructor of :obj:`~pyrogram.raw.base.account.WebAuthorizations`. + + Details: + - Layer: ``224`` + - ID: ``ED56C9FC`` + + Parameters: + authorizations (List of :obj:`WebAuthorization `): + Web authorization list + + users (List of :obj:`User `): + Users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetWebAuthorizations + """ + + __slots__: List[str] = ["authorizations", "users"] + + ID = 0xed56c9fc + QUALNAME = "types.account.WebAuthorizations" + + def __init__(self, *, authorizations: List["raw.base.WebAuthorization"], users: List["raw.base.User"]) -> None: + self.authorizations = authorizations # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "WebAuthorizations": + # No flags + + authorizations = TLObject.read(b) + + users = TLObject.read(b) + + return WebAuthorizations(authorizations=authorizations, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.authorizations)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/account_days_ttl.py b/pyrogram/raw/types/account_days_ttl.py new file mode 100644 index 00000000..86be2064 --- /dev/null +++ b/pyrogram/raw/types/account_days_ttl.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AccountDaysTTL(TLObject): # type: ignore + """Time to live in days of the current account + + Constructor of :obj:`~pyrogram.raw.base.AccountDaysTTL`. + + Details: + - Layer: ``224`` + - ID: ``B8D0AFDF`` + + Parameters: + days (``int`` ``32-bit``): + This account will self-destruct in the specified number of days + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetAccountTTL + """ + + __slots__: List[str] = ["days"] + + ID = 0xb8d0afdf + QUALNAME = "types.AccountDaysTTL" + + def __init__(self, *, days: int) -> None: + self.days = days # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AccountDaysTTL": + # No flags + + days = Int.read(b) + + return AccountDaysTTL(days=days) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.days)) + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_bot.py b/pyrogram/raw/types/attach_menu_bot.py new file mode 100644 index 00000000..54de11aa --- /dev/null +++ b/pyrogram/raw/types/attach_menu_bot.py @@ -0,0 +1,118 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuBot(TLObject): # type: ignore + """Represents a bot mini app that can be launched from the attachment/side menu » + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuBot`. + + Details: + - Layer: ``224`` + - ID: ``D90D8DFE`` + + Parameters: + bot_id (``int`` ``64-bit``): + Bot ID + + short_name (``str``): + Attachment menu item name + + icons (List of :obj:`AttachMenuBotIcon `): + List of platform-specific static icons and animations to use for the attachment menu button + + inactive (``bool``, *optional*): + If set, before launching the mini app the client should ask the user to add the mini app to the attachment/side menu, and only if the user accepts, after invoking messages.toggleBotInAttachMenu the app should be opened. + + has_settings (``bool``, *optional*): + Deprecated flag, can be ignored. + + request_write_access (``bool``, *optional*): + Whether the bot would like to send messages to the user. + + show_in_attach_menu (``bool``, *optional*): + Whether, when installed, an attachment menu entry should be shown for the Mini App. + + show_in_side_menu (``bool``, *optional*): + Whether, when installed, an entry in the main view side menu should be shown for the Mini App. + + side_menu_disclaimer_needed (``bool``, *optional*): + If inactive if set and the user hasn't previously accepted the third-party mini apps Terms of Service for this bot, when showing the mini app installation prompt, an additional mandatory checkbox to accept the mini apps TOS and a disclaimer indicating that this Mini App is not affiliated to Telegram should be shown. + + peer_types (List of :obj:`AttachMenuPeerType `, *optional*): + List of dialog types where this attachment menu entry should be shown + + """ + + __slots__: List[str] = ["bot_id", "short_name", "icons", "inactive", "has_settings", "request_write_access", "show_in_attach_menu", "show_in_side_menu", "side_menu_disclaimer_needed", "peer_types"] + + ID = 0xd90d8dfe + QUALNAME = "types.AttachMenuBot" + + def __init__(self, *, bot_id: int, short_name: str, icons: List["raw.base.AttachMenuBotIcon"], inactive: Optional[bool] = None, has_settings: Optional[bool] = None, request_write_access: Optional[bool] = None, show_in_attach_menu: Optional[bool] = None, show_in_side_menu: Optional[bool] = None, side_menu_disclaimer_needed: Optional[bool] = None, peer_types: Optional[List["raw.base.AttachMenuPeerType"]] = None) -> None: + self.bot_id = bot_id # long + self.short_name = short_name # string + self.icons = icons # Vector + self.inactive = inactive # flags.0?true + self.has_settings = has_settings # flags.1?true + self.request_write_access = request_write_access # flags.2?true + self.show_in_attach_menu = show_in_attach_menu # flags.3?true + self.show_in_side_menu = show_in_side_menu # flags.4?true + self.side_menu_disclaimer_needed = side_menu_disclaimer_needed # flags.5?true + self.peer_types = peer_types # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuBot": + + flags = Int.read(b) + + inactive = True if flags & (1 << 0) else False + has_settings = True if flags & (1 << 1) else False + request_write_access = True if flags & (1 << 2) else False + show_in_attach_menu = True if flags & (1 << 3) else False + show_in_side_menu = True if flags & (1 << 4) else False + side_menu_disclaimer_needed = True if flags & (1 << 5) else False + bot_id = Long.read(b) + + short_name = String.read(b) + + peer_types = TLObject.read(b) if flags & (1 << 3) else [] + + icons = TLObject.read(b) + + return AttachMenuBot(bot_id=bot_id, short_name=short_name, icons=icons, inactive=inactive, has_settings=has_settings, request_write_access=request_write_access, show_in_attach_menu=show_in_attach_menu, show_in_side_menu=show_in_side_menu, side_menu_disclaimer_needed=side_menu_disclaimer_needed, peer_types=peer_types) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.inactive else 0 + flags |= (1 << 1) if self.has_settings else 0 + flags |= (1 << 2) if self.request_write_access else 0 + flags |= (1 << 3) if self.show_in_attach_menu else 0 + flags |= (1 << 4) if self.show_in_side_menu else 0 + flags |= (1 << 5) if self.side_menu_disclaimer_needed else 0 + flags |= (1 << 3) if self.peer_types else 0 + b.write(Int(flags)) + + b.write(Long(self.bot_id)) + + b.write(String(self.short_name)) + + if self.peer_types is not None: + b.write(Vector(self.peer_types)) + + b.write(Vector(self.icons)) + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_bot_icon.py b/pyrogram/raw/types/attach_menu_bot_icon.py new file mode 100644 index 00000000..181d81b9 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_bot_icon.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuBotIcon(TLObject): # type: ignore + """Represents an attachment menu icon for bot mini apps » + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuBotIcon`. + + Details: + - Layer: ``224`` + - ID: ``B2A7386B`` + + Parameters: + name (``str``): + One of the following values: note that animated icons must be played when the user clicks on the button, activating the bot mini app. default_static - Default attachment menu icon in SVG format placeholder_static - Default placeholder for opened Web Apps in SVG format ios_static - Attachment menu icon in SVG format for the official iOS app ios_animated - Animated attachment menu icon in TGS format for the official iOS app android_animated - Animated attachment menu icon in TGS format for the official Android app macos_animated - Animated attachment menu icon in TGS format for the official native Mac OS app ios_side_menu_static - Side menu icon in PNG format for the official iOS app android_side_menu_static - Side menu icon in SVG format for the official android app macos_side_menu_static - Side menu icon in PNG format for the official native Mac OS app + + icon (:obj:`Document `): + The actual icon file. + + colors (List of :obj:`AttachMenuBotIconColor `, *optional*): + Attachment menu icon colors. + + """ + + __slots__: List[str] = ["name", "icon", "colors"] + + ID = 0xb2a7386b + QUALNAME = "types.AttachMenuBotIcon" + + def __init__(self, *, name: str, icon: "raw.base.Document", colors: Optional[List["raw.base.AttachMenuBotIconColor"]] = None) -> None: + self.name = name # string + self.icon = icon # Document + self.colors = colors # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuBotIcon": + + flags = Int.read(b) + + name = String.read(b) + + icon = TLObject.read(b) + + colors = TLObject.read(b) if flags & (1 << 0) else [] + + return AttachMenuBotIcon(name=name, icon=icon, colors=colors) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.colors else 0 + b.write(Int(flags)) + + b.write(String(self.name)) + + b.write(self.icon.write()) + + if self.colors is not None: + b.write(Vector(self.colors)) + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_bot_icon_color.py b/pyrogram/raw/types/attach_menu_bot_icon_color.py new file mode 100644 index 00000000..d3cec213 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_bot_icon_color.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuBotIconColor(TLObject): # type: ignore + """Represents an attachment menu icon color for bot mini apps » + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuBotIconColor`. + + Details: + - Layer: ``224`` + - ID: ``4576F3F0`` + + Parameters: + name (``str``): + One of the following values: light_icon - Color of the attachment menu icon (light mode) light_text - Color of the attachment menu label, once selected (light mode) dark_icon - Color of the attachment menu icon (dark mode) dark_text - Color of the attachment menu label, once selected (dark mode) + + color (``int`` ``32-bit``): + Color in RGB24 format + + """ + + __slots__: List[str] = ["name", "color"] + + ID = 0x4576f3f0 + QUALNAME = "types.AttachMenuBotIconColor" + + def __init__(self, *, name: str, color: int) -> None: + self.name = name # string + self.color = color # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuBotIconColor": + # No flags + + name = String.read(b) + + color = Int.read(b) + + return AttachMenuBotIconColor(name=name, color=color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.name)) + + b.write(Int(self.color)) + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_bots.py b/pyrogram/raw/types/attach_menu_bots.py new file mode 100644 index 00000000..0f573973 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_bots.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuBots(TLObject): # type: ignore + """Represents a list of bot mini apps that can be launched from the attachment menu » + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuBots`. + + Details: + - Layer: ``224`` + - ID: ``3C4301C0`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + bots (List of :obj:`AttachMenuBot `): + List of bot mini apps that can be launched from the attachment menu » + + users (List of :obj:`User `): + Info about related users/bots + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAttachMenuBots + """ + + __slots__: List[str] = ["hash", "bots", "users"] + + ID = 0x3c4301c0 + QUALNAME = "types.AttachMenuBots" + + def __init__(self, *, hash: int, bots: List["raw.base.AttachMenuBot"], users: List["raw.base.User"]) -> None: + self.hash = hash # long + self.bots = bots # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuBots": + # No flags + + hash = Long.read(b) + + bots = TLObject.read(b) + + users = TLObject.read(b) + + return AttachMenuBots(hash=hash, bots=bots, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.bots)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_bots_bot.py b/pyrogram/raw/types/attach_menu_bots_bot.py new file mode 100644 index 00000000..d8f6cc63 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_bots_bot.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuBotsBot(TLObject): # type: ignore + """Represents a bot mini app that can be launched from the attachment menu » + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuBotsBot`. + + Details: + - Layer: ``224`` + - ID: ``93BF667F`` + + Parameters: + bot (:obj:`AttachMenuBot `): + Represents a bot mini app that can be launched from the attachment menu » + + users (List of :obj:`User `): + Info about related users and bots + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAttachMenuBot + """ + + __slots__: List[str] = ["bot", "users"] + + ID = 0x93bf667f + QUALNAME = "types.AttachMenuBotsBot" + + def __init__(self, *, bot: "raw.base.AttachMenuBot", users: List["raw.base.User"]) -> None: + self.bot = bot # AttachMenuBot + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuBotsBot": + # No flags + + bot = TLObject.read(b) + + users = TLObject.read(b) + + return AttachMenuBotsBot(bot=bot, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_bots_not_modified.py b/pyrogram/raw/types/attach_menu_bots_not_modified.py new file mode 100644 index 00000000..980eea83 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_bots_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuBotsNotModified(TLObject): # type: ignore + """The list of bot mini apps hasn't changed + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuBots`. + + Details: + - Layer: ``224`` + - ID: ``F1D88A5C`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAttachMenuBots + """ + + __slots__: List[str] = [] + + ID = 0xf1d88a5c + QUALNAME = "types.AttachMenuBotsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuBotsNotModified": + # No flags + + return AttachMenuBotsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_peer_type_bot_pm.py b/pyrogram/raw/types/attach_menu_peer_type_bot_pm.py new file mode 100644 index 00000000..5e1d06221 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_peer_type_bot_pm.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuPeerTypeBotPM(TLObject): # type: ignore + """The bot attachment menu entry is available in private chats with other bots (excluding the bot that offers the current attachment menu) + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuPeerType`. + + Details: + - Layer: ``224`` + - ID: ``C32BFA1A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc32bfa1a + QUALNAME = "types.AttachMenuPeerTypeBotPM" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuPeerTypeBotPM": + # No flags + + return AttachMenuPeerTypeBotPM() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_peer_type_broadcast.py b/pyrogram/raw/types/attach_menu_peer_type_broadcast.py new file mode 100644 index 00000000..9b5c83f8 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_peer_type_broadcast.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuPeerTypeBroadcast(TLObject): # type: ignore + """The bot attachment menu entry is available in channels + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuPeerType`. + + Details: + - Layer: ``224`` + - ID: ``7BFBDEFC`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x7bfbdefc + QUALNAME = "types.AttachMenuPeerTypeBroadcast" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuPeerTypeBroadcast": + # No flags + + return AttachMenuPeerTypeBroadcast() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_peer_type_chat.py b/pyrogram/raw/types/attach_menu_peer_type_chat.py new file mode 100644 index 00000000..4cfb2f8d --- /dev/null +++ b/pyrogram/raw/types/attach_menu_peer_type_chat.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuPeerTypeChat(TLObject): # type: ignore + """The bot attachment menu entry is available in groups and supergroups + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuPeerType`. + + Details: + - Layer: ``224`` + - ID: ``509113F`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x509113f + QUALNAME = "types.AttachMenuPeerTypeChat" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuPeerTypeChat": + # No flags + + return AttachMenuPeerTypeChat() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_peer_type_pm.py b/pyrogram/raw/types/attach_menu_peer_type_pm.py new file mode 100644 index 00000000..b9c9a574 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_peer_type_pm.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuPeerTypePM(TLObject): # type: ignore + """The bot attachment menu entry is available in private chats with other users (not bots) + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuPeerType`. + + Details: + - Layer: ``224`` + - ID: ``F146D31F`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xf146d31f + QUALNAME = "types.AttachMenuPeerTypePM" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuPeerTypePM": + # No flags + + return AttachMenuPeerTypePM() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/attach_menu_peer_type_same_bot_pm.py b/pyrogram/raw/types/attach_menu_peer_type_same_bot_pm.py new file mode 100644 index 00000000..8d9cfe78 --- /dev/null +++ b/pyrogram/raw/types/attach_menu_peer_type_same_bot_pm.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AttachMenuPeerTypeSameBotPM(TLObject): # type: ignore + """The bot attachment menu entry is available in the chat with the bot that offers it + + Constructor of :obj:`~pyrogram.raw.base.AttachMenuPeerType`. + + Details: + - Layer: ``224`` + - ID: ``7D6BE90E`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x7d6be90e + QUALNAME = "types.AttachMenuPeerTypeSameBotPM" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AttachMenuPeerTypeSameBotPM": + # No flags + + return AttachMenuPeerTypeSameBotPM() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/auction_bid_level.py b/pyrogram/raw/types/auction_bid_level.py new file mode 100644 index 00000000..51e860da --- /dev/null +++ b/pyrogram/raw/types/auction_bid_level.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AuctionBidLevel(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.AuctionBidLevel`. + + Details: + - Layer: ``224`` + - ID: ``310240CC`` + + Parameters: + pos (``int`` ``32-bit``): + N/A + + amount (``int`` ``64-bit``): + N/A + + date (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["pos", "amount", "date"] + + ID = 0x310240cc + QUALNAME = "types.AuctionBidLevel" + + def __init__(self, *, pos: int, amount: int, date: int) -> None: + self.pos = pos # int + self.amount = amount # long + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AuctionBidLevel": + # No flags + + pos = Int.read(b) + + amount = Long.read(b) + + date = Int.read(b) + + return AuctionBidLevel(pos=pos, amount=amount, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.pos)) + + b.write(Long(self.amount)) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/__init__.py b/pyrogram/raw/types/auth/__init__.py new file mode 100644 index 00000000..7b5bbe1e --- /dev/null +++ b/pyrogram/raw/types/auth/__init__.py @@ -0,0 +1,87 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .sent_code import SentCode +from .sent_code_success import SentCodeSuccess +from .sent_code_payment_required import SentCodePaymentRequired +from .authorization import Authorization +from .authorization_sign_up_required import AuthorizationSignUpRequired +from .exported_authorization import ExportedAuthorization +from .password_recovery import PasswordRecovery +from .code_type_sms import CodeTypeSms +from .code_type_call import CodeTypeCall +from .code_type_flash_call import CodeTypeFlashCall +from .code_type_missed_call import CodeTypeMissedCall +from .code_type_fragment_sms import CodeTypeFragmentSms +from .sent_code_type_app import SentCodeTypeApp +from .sent_code_type_sms import SentCodeTypeSms +from .sent_code_type_call import SentCodeTypeCall +from .sent_code_type_flash_call import SentCodeTypeFlashCall +from .sent_code_type_missed_call import SentCodeTypeMissedCall +from .sent_code_type_email_code import SentCodeTypeEmailCode +from .sent_code_type_set_up_email_required import SentCodeTypeSetUpEmailRequired +from .sent_code_type_fragment_sms import SentCodeTypeFragmentSms +from .sent_code_type_firebase_sms import SentCodeTypeFirebaseSms +from .sent_code_type_sms_word import SentCodeTypeSmsWord +from .sent_code_type_sms_phrase import SentCodeTypeSmsPhrase +from .login_token import LoginToken +from .login_token_migrate_to import LoginTokenMigrateTo +from .login_token_success import LoginTokenSuccess +from .logged_out import LoggedOut +from .passkey_login_options import PasskeyLoginOptions + + +__all__ = [ + "SentCode", + "SentCodeSuccess", + "SentCodePaymentRequired", + "Authorization", + "AuthorizationSignUpRequired", + "ExportedAuthorization", + "PasswordRecovery", + "CodeTypeSms", + "CodeTypeCall", + "CodeTypeFlashCall", + "CodeTypeMissedCall", + "CodeTypeFragmentSms", + "SentCodeTypeApp", + "SentCodeTypeSms", + "SentCodeTypeCall", + "SentCodeTypeFlashCall", + "SentCodeTypeMissedCall", + "SentCodeTypeEmailCode", + "SentCodeTypeSetUpEmailRequired", + "SentCodeTypeFragmentSms", + "SentCodeTypeFirebaseSms", + "SentCodeTypeSmsWord", + "SentCodeTypeSmsPhrase", + "LoginToken", + "LoginTokenMigrateTo", + "LoginTokenSuccess", + "LoggedOut", + "PasskeyLoginOptions", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/auth/authorization.py b/pyrogram/raw/types/auth/authorization.py new file mode 100644 index 00000000..a82c96a1 --- /dev/null +++ b/pyrogram/raw/types/auth/authorization.py @@ -0,0 +1,105 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Authorization(TLObject): # type: ignore + """Contains user authorization info. + + Constructor of :obj:`~pyrogram.raw.base.auth.Authorization`. + + Details: + - Layer: ``224`` + - ID: ``2EA2C0D4`` + + Parameters: + user (:obj:`User `): + Info on authorized user + + setup_password_required (``bool``, *optional*): + Suggests the user to set up a 2-step verification password to be able to log in again + + otherwise_relogin_days (``int`` ``32-bit``, *optional*): + Iff setup_password_required is set and the user declines to set a 2-step verification password, they will be able to log into their account via SMS again only after this many days pass. + + tmp_sessions (``int`` ``32-bit``, *optional*): + Temporary passport sessions + + future_auth_token (``bytes``, *optional*): + A future auth token + + Functions: + This object can be returned by 8 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.SignUp + auth.SignIn + auth.ImportAuthorization + auth.ImportBotAuthorization + auth.CheckPassword + auth.RecoverPassword + auth.ImportWebTokenAuthorization + auth.FinishPasskeyLogin + """ + + __slots__: List[str] = ["user", "setup_password_required", "otherwise_relogin_days", "tmp_sessions", "future_auth_token"] + + ID = 0x2ea2c0d4 + QUALNAME = "types.auth.Authorization" + + def __init__(self, *, user: "raw.base.User", setup_password_required: Optional[bool] = None, otherwise_relogin_days: Optional[int] = None, tmp_sessions: Optional[int] = None, future_auth_token: Optional[bytes] = None) -> None: + self.user = user # User + self.setup_password_required = setup_password_required # flags.1?true + self.otherwise_relogin_days = otherwise_relogin_days # flags.1?int + self.tmp_sessions = tmp_sessions # flags.0?int + self.future_auth_token = future_auth_token # flags.2?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Authorization": + + flags = Int.read(b) + + setup_password_required = True if flags & (1 << 1) else False + otherwise_relogin_days = Int.read(b) if flags & (1 << 1) else None + tmp_sessions = Int.read(b) if flags & (1 << 0) else None + future_auth_token = Bytes.read(b) if flags & (1 << 2) else None + user = TLObject.read(b) + + return Authorization(user=user, setup_password_required=setup_password_required, otherwise_relogin_days=otherwise_relogin_days, tmp_sessions=tmp_sessions, future_auth_token=future_auth_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.setup_password_required else 0 + flags |= (1 << 1) if self.otherwise_relogin_days is not None else 0 + flags |= (1 << 0) if self.tmp_sessions is not None else 0 + flags |= (1 << 2) if self.future_auth_token is not None else 0 + b.write(Int(flags)) + + if self.otherwise_relogin_days is not None: + b.write(Int(self.otherwise_relogin_days)) + + if self.tmp_sessions is not None: + b.write(Int(self.tmp_sessions)) + + if self.future_auth_token is not None: + b.write(Bytes(self.future_auth_token)) + + b.write(self.user.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/authorization_sign_up_required.py b/pyrogram/raw/types/auth/authorization_sign_up_required.py new file mode 100644 index 00000000..173b6ae9 --- /dev/null +++ b/pyrogram/raw/types/auth/authorization_sign_up_required.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AuthorizationSignUpRequired(TLObject): # type: ignore + """An account with this phone number doesn't exist on telegram: the user has to enter basic information and sign up + + Constructor of :obj:`~pyrogram.raw.base.auth.Authorization`. + + Details: + - Layer: ``224`` + - ID: ``44747E9A`` + + Parameters: + terms_of_service (:obj:`help.TermsOfService `, *optional*): + Telegram's terms of service: the user must read and accept the terms of service before signing up to telegram + + Functions: + This object can be returned by 8 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.SignUp + auth.SignIn + auth.ImportAuthorization + auth.ImportBotAuthorization + auth.CheckPassword + auth.RecoverPassword + auth.ImportWebTokenAuthorization + auth.FinishPasskeyLogin + """ + + __slots__: List[str] = ["terms_of_service"] + + ID = 0x44747e9a + QUALNAME = "types.auth.AuthorizationSignUpRequired" + + def __init__(self, *, terms_of_service: "raw.base.help.TermsOfService" = None) -> None: + self.terms_of_service = terms_of_service # flags.0?help.TermsOfService + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AuthorizationSignUpRequired": + + flags = Int.read(b) + + terms_of_service = TLObject.read(b) if flags & (1 << 0) else None + + return AuthorizationSignUpRequired(terms_of_service=terms_of_service) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.terms_of_service is not None else 0 + b.write(Int(flags)) + + if self.terms_of_service is not None: + b.write(self.terms_of_service.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/code_type_call.py b/pyrogram/raw/types/auth/code_type_call.py new file mode 100644 index 00000000..b5fefdb4 --- /dev/null +++ b/pyrogram/raw/types/auth/code_type_call.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CodeTypeCall(TLObject): # type: ignore + """The next time, the authentication code is to be delivered via an outgoing phone call. + + Constructor of :obj:`~pyrogram.raw.base.auth.CodeType`. + + Details: + - Layer: ``224`` + - ID: ``741CD3E3`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x741cd3e3 + QUALNAME = "types.auth.CodeTypeCall" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CodeTypeCall": + # No flags + + return CodeTypeCall() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/code_type_flash_call.py b/pyrogram/raw/types/auth/code_type_flash_call.py new file mode 100644 index 00000000..ab9eeb7f --- /dev/null +++ b/pyrogram/raw/types/auth/code_type_flash_call.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CodeTypeFlashCall(TLObject): # type: ignore + """The next time, the authentication code will be delivered via an immediately canceled incoming call. + + Constructor of :obj:`~pyrogram.raw.base.auth.CodeType`. + + Details: + - Layer: ``224`` + - ID: ``226CCEFB`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x226ccefb + QUALNAME = "types.auth.CodeTypeFlashCall" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CodeTypeFlashCall": + # No flags + + return CodeTypeFlashCall() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/code_type_fragment_sms.py b/pyrogram/raw/types/auth/code_type_fragment_sms.py new file mode 100644 index 00000000..8ca33632 --- /dev/null +++ b/pyrogram/raw/types/auth/code_type_fragment_sms.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CodeTypeFragmentSms(TLObject): # type: ignore + """The next time, the authentication code will be delivered via fragment.com + + Constructor of :obj:`~pyrogram.raw.base.auth.CodeType`. + + Details: + - Layer: ``224`` + - ID: ``6ED998C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x6ed998c + QUALNAME = "types.auth.CodeTypeFragmentSms" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CodeTypeFragmentSms": + # No flags + + return CodeTypeFragmentSms() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/code_type_missed_call.py b/pyrogram/raw/types/auth/code_type_missed_call.py new file mode 100644 index 00000000..fd78f135 --- /dev/null +++ b/pyrogram/raw/types/auth/code_type_missed_call.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CodeTypeMissedCall(TLObject): # type: ignore + """The next time, the authentication code will be delivered via an immediately canceled incoming call, handled manually by the user. + + Constructor of :obj:`~pyrogram.raw.base.auth.CodeType`. + + Details: + - Layer: ``224`` + - ID: ``D61AD6EE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd61ad6ee + QUALNAME = "types.auth.CodeTypeMissedCall" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CodeTypeMissedCall": + # No flags + + return CodeTypeMissedCall() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/code_type_sms.py b/pyrogram/raw/types/auth/code_type_sms.py new file mode 100644 index 00000000..0d7c124a --- /dev/null +++ b/pyrogram/raw/types/auth/code_type_sms.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CodeTypeSms(TLObject): # type: ignore + """The next time, the authentication code will be delivered via an immediately canceled incoming call. + + Constructor of :obj:`~pyrogram.raw.base.auth.CodeType`. + + Details: + - Layer: ``224`` + - ID: ``72A3158C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x72a3158c + QUALNAME = "types.auth.CodeTypeSms" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CodeTypeSms": + # No flags + + return CodeTypeSms() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/exported_authorization.py b/pyrogram/raw/types/auth/exported_authorization.py new file mode 100644 index 00000000..2f7df0e6 --- /dev/null +++ b/pyrogram/raw/types/auth/exported_authorization.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedAuthorization(TLObject): # type: ignore + """Data for copying of authorization between data centers. + + Constructor of :obj:`~pyrogram.raw.base.auth.ExportedAuthorization`. + + Details: + - Layer: ``224`` + - ID: ``B434E2B8`` + + Parameters: + id (``int`` ``64-bit``): + current user identifier + + bytes (``bytes``): + authorizes key + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.ExportAuthorization + """ + + __slots__: List[str] = ["id", "bytes"] + + ID = 0xb434e2b8 + QUALNAME = "types.auth.ExportedAuthorization" + + def __init__(self, *, id: int, bytes: bytes) -> None: + self.id = id # long + self.bytes = bytes # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedAuthorization": + # No flags + + id = Long.read(b) + + bytes = Bytes.read(b) + + return ExportedAuthorization(id=id, bytes=bytes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Bytes(self.bytes)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/logged_out.py b/pyrogram/raw/types/auth/logged_out.py new file mode 100644 index 00000000..f7397599 --- /dev/null +++ b/pyrogram/raw/types/auth/logged_out.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LoggedOut(TLObject): # type: ignore + """Future auth token » to be used on subsequent authorizations + + Constructor of :obj:`~pyrogram.raw.base.auth.LoggedOut`. + + Details: + - Layer: ``224`` + - ID: ``C3A2835F`` + + Parameters: + future_auth_token (``bytes``, *optional*): + Future auth token » to be used on subsequent authorizations + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.LogOut + """ + + __slots__: List[str] = ["future_auth_token"] + + ID = 0xc3a2835f + QUALNAME = "types.auth.LoggedOut" + + def __init__(self, *, future_auth_token: Optional[bytes] = None) -> None: + self.future_auth_token = future_auth_token # flags.0?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LoggedOut": + + flags = Int.read(b) + + future_auth_token = Bytes.read(b) if flags & (1 << 0) else None + return LoggedOut(future_auth_token=future_auth_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.future_auth_token is not None else 0 + b.write(Int(flags)) + + if self.future_auth_token is not None: + b.write(Bytes(self.future_auth_token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/login_token.py b/pyrogram/raw/types/auth/login_token.py new file mode 100644 index 00000000..d0902d27 --- /dev/null +++ b/pyrogram/raw/types/auth/login_token.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LoginToken(TLObject): # type: ignore + """Login token (for QR code login) + + Constructor of :obj:`~pyrogram.raw.base.auth.LoginToken`. + + Details: + - Layer: ``224`` + - ID: ``629F1980`` + + Parameters: + expires (``int`` ``32-bit``): + Expiration date of QR code + + token (``bytes``): + Token to render in QR code + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.ExportLoginToken + auth.ImportLoginToken + """ + + __slots__: List[str] = ["expires", "token"] + + ID = 0x629f1980 + QUALNAME = "types.auth.LoginToken" + + def __init__(self, *, expires: int, token: bytes) -> None: + self.expires = expires # int + self.token = token # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LoginToken": + # No flags + + expires = Int.read(b) + + token = Bytes.read(b) + + return LoginToken(expires=expires, token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.expires)) + + b.write(Bytes(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/login_token_migrate_to.py b/pyrogram/raw/types/auth/login_token_migrate_to.py new file mode 100644 index 00000000..3f3521ee --- /dev/null +++ b/pyrogram/raw/types/auth/login_token_migrate_to.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LoginTokenMigrateTo(TLObject): # type: ignore + """Repeat the query to the specified DC + + Constructor of :obj:`~pyrogram.raw.base.auth.LoginToken`. + + Details: + - Layer: ``224`` + - ID: ``68E9916`` + + Parameters: + dc_id (``int`` ``32-bit``): + DC ID + + token (``bytes``): + Token to use for login + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.ExportLoginToken + auth.ImportLoginToken + """ + + __slots__: List[str] = ["dc_id", "token"] + + ID = 0x68e9916 + QUALNAME = "types.auth.LoginTokenMigrateTo" + + def __init__(self, *, dc_id: int, token: bytes) -> None: + self.dc_id = dc_id # int + self.token = token # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LoginTokenMigrateTo": + # No flags + + dc_id = Int.read(b) + + token = Bytes.read(b) + + return LoginTokenMigrateTo(dc_id=dc_id, token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.dc_id)) + + b.write(Bytes(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/login_token_success.py b/pyrogram/raw/types/auth/login_token_success.py new file mode 100644 index 00000000..33879b1d --- /dev/null +++ b/pyrogram/raw/types/auth/login_token_success.py @@ -0,0 +1,64 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LoginTokenSuccess(TLObject): # type: ignore + """Login via token (QR code) succeeded! + + Constructor of :obj:`~pyrogram.raw.base.auth.LoginToken`. + + Details: + - Layer: ``224`` + - ID: ``390D5C5E`` + + Parameters: + authorization (:obj:`auth.Authorization `): + Authorization info + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.ExportLoginToken + auth.ImportLoginToken + """ + + __slots__: List[str] = ["authorization"] + + ID = 0x390d5c5e + QUALNAME = "types.auth.LoginTokenSuccess" + + def __init__(self, *, authorization: "raw.base.auth.Authorization") -> None: + self.authorization = authorization # auth.Authorization + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LoginTokenSuccess": + # No flags + + authorization = TLObject.read(b) + + return LoginTokenSuccess(authorization=authorization) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.authorization.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/passkey_login_options.py b/pyrogram/raw/types/auth/passkey_login_options.py new file mode 100644 index 00000000..174ad8da --- /dev/null +++ b/pyrogram/raw/types/auth/passkey_login_options.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PasskeyLoginOptions(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.auth.PasskeyLoginOptions`. + + Details: + - Layer: ``224`` + - ID: ``E2037789`` + + Parameters: + options (:obj:`DataJSON `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.InitPasskeyLogin + """ + + __slots__: List[str] = ["options"] + + ID = 0xe2037789 + QUALNAME = "types.auth.PasskeyLoginOptions" + + def __init__(self, *, options: "raw.base.DataJSON") -> None: + self.options = options # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PasskeyLoginOptions": + # No flags + + options = TLObject.read(b) + + return PasskeyLoginOptions(options=options) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.options.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/password_recovery.py b/pyrogram/raw/types/auth/password_recovery.py new file mode 100644 index 00000000..55324611 --- /dev/null +++ b/pyrogram/raw/types/auth/password_recovery.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PasswordRecovery(TLObject): # type: ignore + """Recovery info of a 2FA password, only for accounts with a recovery email configured. + + Constructor of :obj:`~pyrogram.raw.base.auth.PasswordRecovery`. + + Details: + - Layer: ``224`` + - ID: ``137948A5`` + + Parameters: + email_pattern (``str``): + The email to which the recovery code was sent must match this pattern. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.RequestPasswordRecovery + """ + + __slots__: List[str] = ["email_pattern"] + + ID = 0x137948a5 + QUALNAME = "types.auth.PasswordRecovery" + + def __init__(self, *, email_pattern: str) -> None: + self.email_pattern = email_pattern # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PasswordRecovery": + # No flags + + email_pattern = String.read(b) + + return PasswordRecovery(email_pattern=email_pattern) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.email_pattern)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code.py b/pyrogram/raw/types/auth/sent_code.py new file mode 100644 index 00000000..b56d8531 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCode(TLObject): # type: ignore + """Contains info about a sent verification code. + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCode`. + + Details: + - Layer: ``224`` + - ID: ``5E002502`` + + Parameters: + type (:obj:`auth.SentCodeType `): + Phone code type + + phone_code_hash (``str``): + Phone code hash, to be stored and later re-used with auth.signIn + + next_type (:obj:`auth.CodeType `, *optional*): + Phone code type that will be sent next, if the phone code is not received within timeout seconds: to send it use auth.resendCode + + timeout (``int`` ``32-bit``, *optional*): + Timeout for reception of the phone code + + Functions: + This object can be returned by 7 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.SendCode + auth.ResendCode + auth.ResetLoginEmail + auth.CheckPaidAuth + account.SendChangePhoneCode + account.SendConfirmPhoneCode + account.SendVerifyPhoneCode + """ + + __slots__: List[str] = ["type", "phone_code_hash", "next_type", "timeout"] + + ID = 0x5e002502 + QUALNAME = "types.auth.SentCode" + + def __init__(self, *, type: "raw.base.auth.SentCodeType", phone_code_hash: str, next_type: "raw.base.auth.CodeType" = None, timeout: Optional[int] = None) -> None: + self.type = type # auth.SentCodeType + self.phone_code_hash = phone_code_hash # string + self.next_type = next_type # flags.1?auth.CodeType + self.timeout = timeout # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCode": + + flags = Int.read(b) + + type = TLObject.read(b) + + phone_code_hash = String.read(b) + + next_type = TLObject.read(b) if flags & (1 << 1) else None + + timeout = Int.read(b) if flags & (1 << 2) else None + return SentCode(type=type, phone_code_hash=phone_code_hash, next_type=next_type, timeout=timeout) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.next_type is not None else 0 + flags |= (1 << 2) if self.timeout is not None else 0 + b.write(Int(flags)) + + b.write(self.type.write()) + + b.write(String(self.phone_code_hash)) + + if self.next_type is not None: + b.write(self.next_type.write()) + + if self.timeout is not None: + b.write(Int(self.timeout)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_payment_required.py b/pyrogram/raw/types/auth/sent_code_payment_required.py new file mode 100644 index 00000000..1be8d037 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_payment_required.py @@ -0,0 +1,109 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodePaymentRequired(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCode`. + + Details: + - Layer: ``224`` + - ID: ``E0955A3C`` + + Parameters: + store_product (``str``): + N/A + + phone_code_hash (``str``): + N/A + + support_email_address (``str``): + N/A + + support_email_subject (``str``): + N/A + + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + Functions: + This object can be returned by 7 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.SendCode + auth.ResendCode + auth.ResetLoginEmail + auth.CheckPaidAuth + account.SendChangePhoneCode + account.SendConfirmPhoneCode + account.SendVerifyPhoneCode + """ + + __slots__: List[str] = ["store_product", "phone_code_hash", "support_email_address", "support_email_subject", "currency", "amount"] + + ID = 0xe0955a3c + QUALNAME = "types.auth.SentCodePaymentRequired" + + def __init__(self, *, store_product: str, phone_code_hash: str, support_email_address: str, support_email_subject: str, currency: str, amount: int) -> None: + self.store_product = store_product # string + self.phone_code_hash = phone_code_hash # string + self.support_email_address = support_email_address # string + self.support_email_subject = support_email_subject # string + self.currency = currency # string + self.amount = amount # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodePaymentRequired": + # No flags + + store_product = String.read(b) + + phone_code_hash = String.read(b) + + support_email_address = String.read(b) + + support_email_subject = String.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + return SentCodePaymentRequired(store_product=store_product, phone_code_hash=phone_code_hash, support_email_address=support_email_address, support_email_subject=support_email_subject, currency=currency, amount=amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.store_product)) + + b.write(String(self.phone_code_hash)) + + b.write(String(self.support_email_address)) + + b.write(String(self.support_email_subject)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_success.py b/pyrogram/raw/types/auth/sent_code_success.py new file mode 100644 index 00000000..a8e5cb57 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_success.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeSuccess(TLObject): # type: ignore + """The user successfully authorized using future auth tokens + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCode`. + + Details: + - Layer: ``224`` + - ID: ``2390FE44`` + + Parameters: + authorization (:obj:`auth.Authorization `): + Authorization info + + Functions: + This object can be returned by 7 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.SendCode + auth.ResendCode + auth.ResetLoginEmail + auth.CheckPaidAuth + account.SendChangePhoneCode + account.SendConfirmPhoneCode + account.SendVerifyPhoneCode + """ + + __slots__: List[str] = ["authorization"] + + ID = 0x2390fe44 + QUALNAME = "types.auth.SentCodeSuccess" + + def __init__(self, *, authorization: "raw.base.auth.Authorization") -> None: + self.authorization = authorization # auth.Authorization + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeSuccess": + # No flags + + authorization = TLObject.read(b) + + return SentCodeSuccess(authorization=authorization) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.authorization.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_app.py b/pyrogram/raw/types/auth/sent_code_type_app.py new file mode 100644 index 00000000..fc7fcf6c --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_app.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeApp(TLObject): # type: ignore + """The code was sent through the telegram app + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``3DBB5986`` + + Parameters: + length (``int`` ``32-bit``): + Length of the code in bytes + + """ + + __slots__: List[str] = ["length"] + + ID = 0x3dbb5986 + QUALNAME = "types.auth.SentCodeTypeApp" + + def __init__(self, *, length: int) -> None: + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeApp": + # No flags + + length = Int.read(b) + + return SentCodeTypeApp(length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_call.py b/pyrogram/raw/types/auth/sent_code_type_call.py new file mode 100644 index 00000000..d00b8872 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_call.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeCall(TLObject): # type: ignore + """The code will be sent via a phone call: a synthesized voice will tell the user which verification code to input. + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``5353E5A7`` + + Parameters: + length (``int`` ``32-bit``): + Length of the verification code + + """ + + __slots__: List[str] = ["length"] + + ID = 0x5353e5a7 + QUALNAME = "types.auth.SentCodeTypeCall" + + def __init__(self, *, length: int) -> None: + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeCall": + # No flags + + length = Int.read(b) + + return SentCodeTypeCall(length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_email_code.py b/pyrogram/raw/types/auth/sent_code_type_email_code.py new file mode 100644 index 00000000..27df6981 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_email_code.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeEmailCode(TLObject): # type: ignore + """The code was sent via the previously configured login email » + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``F450F59B`` + + Parameters: + email_pattern (``str``): + Pattern of the email + + length (``int`` ``32-bit``): + Length of the sent verification code + + apple_signin_allowed (``bool``, *optional*): + Whether authorization through Apple ID is allowed + + google_signin_allowed (``bool``, *optional*): + Whether authorization through Google ID is allowed + + reset_available_period (``int`` ``32-bit``, *optional*): + Clients should wait for the specified amount of seconds before allowing the user to invoke auth.resetLoginEmail (will be 0 for Premium users). + + reset_pending_date (``int`` ``32-bit``, *optional*): + An email reset was already requested, and will occur at the specified date. + + """ + + __slots__: List[str] = ["email_pattern", "length", "apple_signin_allowed", "google_signin_allowed", "reset_available_period", "reset_pending_date"] + + ID = 0xf450f59b + QUALNAME = "types.auth.SentCodeTypeEmailCode" + + def __init__(self, *, email_pattern: str, length: int, apple_signin_allowed: Optional[bool] = None, google_signin_allowed: Optional[bool] = None, reset_available_period: Optional[int] = None, reset_pending_date: Optional[int] = None) -> None: + self.email_pattern = email_pattern # string + self.length = length # int + self.apple_signin_allowed = apple_signin_allowed # flags.0?true + self.google_signin_allowed = google_signin_allowed # flags.1?true + self.reset_available_period = reset_available_period # flags.3?int + self.reset_pending_date = reset_pending_date # flags.4?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeEmailCode": + + flags = Int.read(b) + + apple_signin_allowed = True if flags & (1 << 0) else False + google_signin_allowed = True if flags & (1 << 1) else False + email_pattern = String.read(b) + + length = Int.read(b) + + reset_available_period = Int.read(b) if flags & (1 << 3) else None + reset_pending_date = Int.read(b) if flags & (1 << 4) else None + return SentCodeTypeEmailCode(email_pattern=email_pattern, length=length, apple_signin_allowed=apple_signin_allowed, google_signin_allowed=google_signin_allowed, reset_available_period=reset_available_period, reset_pending_date=reset_pending_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.apple_signin_allowed else 0 + flags |= (1 << 1) if self.google_signin_allowed else 0 + flags |= (1 << 3) if self.reset_available_period is not None else 0 + flags |= (1 << 4) if self.reset_pending_date is not None else 0 + b.write(Int(flags)) + + b.write(String(self.email_pattern)) + + b.write(Int(self.length)) + + if self.reset_available_period is not None: + b.write(Int(self.reset_available_period)) + + if self.reset_pending_date is not None: + b.write(Int(self.reset_pending_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_firebase_sms.py b/pyrogram/raw/types/auth/sent_code_type_firebase_sms.py new file mode 100644 index 00000000..79237354 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_firebase_sms.py @@ -0,0 +1,101 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeFirebaseSms(TLObject): # type: ignore + """An authentication code should be delivered via SMS after Firebase attestation, as described in the auth documentation ». + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``9FD736`` + + Parameters: + length (``int`` ``32-bit``): + Length of the code that will be delivered. + + nonce (``bytes``, *optional*): + On Android, the nonce to be used as described in the auth documentation » + + play_integrity_project_id (``int`` ``64-bit``, *optional*): + N/A + + play_integrity_nonce (``bytes``, *optional*): + + + receipt (``str``, *optional*): + On iOS, must be compared with the receipt extracted from the received push notification. + + push_timeout (``int`` ``32-bit``, *optional*): + On iOS: if a push notification with the ios_push_secret isn't received within push_timeout seconds, the next_type authentication method must be used, with auth.resendCode. + + """ + + __slots__: List[str] = ["length", "nonce", "play_integrity_project_id", "play_integrity_nonce", "receipt", "push_timeout"] + + ID = 0x9fd736 + QUALNAME = "types.auth.SentCodeTypeFirebaseSms" + + def __init__(self, *, length: int, nonce: Optional[bytes] = None, play_integrity_project_id: Optional[int] = None, play_integrity_nonce: Optional[bytes] = None, receipt: Optional[str] = None, push_timeout: Optional[int] = None) -> None: + self.length = length # int + self.nonce = nonce # flags.0?bytes + self.play_integrity_project_id = play_integrity_project_id # flags.2?long + self.play_integrity_nonce = play_integrity_nonce # flags.2?bytes + self.receipt = receipt # flags.1?string + self.push_timeout = push_timeout # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeFirebaseSms": + + flags = Int.read(b) + + nonce = Bytes.read(b) if flags & (1 << 0) else None + play_integrity_project_id = Long.read(b) if flags & (1 << 2) else None + play_integrity_nonce = Bytes.read(b) if flags & (1 << 2) else None + receipt = String.read(b) if flags & (1 << 1) else None + push_timeout = Int.read(b) if flags & (1 << 1) else None + length = Int.read(b) + + return SentCodeTypeFirebaseSms(length=length, nonce=nonce, play_integrity_project_id=play_integrity_project_id, play_integrity_nonce=play_integrity_nonce, receipt=receipt, push_timeout=push_timeout) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.nonce is not None else 0 + flags |= (1 << 2) if self.play_integrity_project_id is not None else 0 + flags |= (1 << 2) if self.play_integrity_nonce is not None else 0 + flags |= (1 << 1) if self.receipt is not None else 0 + flags |= (1 << 1) if self.push_timeout is not None else 0 + b.write(Int(flags)) + + if self.nonce is not None: + b.write(Bytes(self.nonce)) + + if self.play_integrity_project_id is not None: + b.write(Long(self.play_integrity_project_id)) + + if self.play_integrity_nonce is not None: + b.write(Bytes(self.play_integrity_nonce)) + + if self.receipt is not None: + b.write(String(self.receipt)) + + if self.push_timeout is not None: + b.write(Int(self.push_timeout)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_flash_call.py b/pyrogram/raw/types/auth/sent_code_type_flash_call.py new file mode 100644 index 00000000..cf8130b0 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_flash_call.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeFlashCall(TLObject): # type: ignore + """The code will be sent via a flash phone call, that will be closed immediately. The phone code will then be the phone number itself, just make sure that the phone number matches the specified pattern. + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``AB03C6D9`` + + Parameters: + pattern (``str``): + pattern to match + + """ + + __slots__: List[str] = ["pattern"] + + ID = 0xab03c6d9 + QUALNAME = "types.auth.SentCodeTypeFlashCall" + + def __init__(self, *, pattern: str) -> None: + self.pattern = pattern # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeFlashCall": + # No flags + + pattern = String.read(b) + + return SentCodeTypeFlashCall(pattern=pattern) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.pattern)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_fragment_sms.py b/pyrogram/raw/types/auth/sent_code_type_fragment_sms.py new file mode 100644 index 00000000..82dcaf98 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_fragment_sms.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeFragmentSms(TLObject): # type: ignore + """The code was delivered via fragment.com. + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``D9565C39`` + + Parameters: + url (``str``): + Open the specified URL to log into fragment.com with the wallet that owns the specified phone number and view the code. + + length (``int`` ``32-bit``): + Length of the delivered code. + + """ + + __slots__: List[str] = ["url", "length"] + + ID = 0xd9565c39 + QUALNAME = "types.auth.SentCodeTypeFragmentSms" + + def __init__(self, *, url: str, length: int) -> None: + self.url = url # string + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeFragmentSms": + # No flags + + url = String.read(b) + + length = Int.read(b) + + return SentCodeTypeFragmentSms(url=url, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_missed_call.py b/pyrogram/raw/types/auth/sent_code_type_missed_call.py new file mode 100644 index 00000000..6b6f7d6e --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_missed_call.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeMissedCall(TLObject): # type: ignore + """The code will be sent via a flash phone call, that will be closed immediately. The last digits of the phone number that calls are the code that must be entered manually by the user. + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``82006484`` + + Parameters: + prefix (``str``): + Prefix of the phone number from which the call will be made + + length (``int`` ``32-bit``): + Length of the verification code + + """ + + __slots__: List[str] = ["prefix", "length"] + + ID = 0x82006484 + QUALNAME = "types.auth.SentCodeTypeMissedCall" + + def __init__(self, *, prefix: str, length: int) -> None: + self.prefix = prefix # string + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeMissedCall": + # No flags + + prefix = String.read(b) + + length = Int.read(b) + + return SentCodeTypeMissedCall(prefix=prefix, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.prefix)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_set_up_email_required.py b/pyrogram/raw/types/auth/sent_code_type_set_up_email_required.py new file mode 100644 index 00000000..68afb1a9 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_set_up_email_required.py @@ -0,0 +1,60 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeSetUpEmailRequired(TLObject): # type: ignore + """The user should add and verify an email address in order to login as described here ». + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``A5491DEA`` + + Parameters: + apple_signin_allowed (``bool``, *optional*): + Whether authorization through Apple ID is allowed + + google_signin_allowed (``bool``, *optional*): + Whether authorization through Google ID is allowed + + """ + + __slots__: List[str] = ["apple_signin_allowed", "google_signin_allowed"] + + ID = 0xa5491dea + QUALNAME = "types.auth.SentCodeTypeSetUpEmailRequired" + + def __init__(self, *, apple_signin_allowed: Optional[bool] = None, google_signin_allowed: Optional[bool] = None) -> None: + self.apple_signin_allowed = apple_signin_allowed # flags.0?true + self.google_signin_allowed = google_signin_allowed # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeSetUpEmailRequired": + + flags = Int.read(b) + + apple_signin_allowed = True if flags & (1 << 0) else False + google_signin_allowed = True if flags & (1 << 1) else False + return SentCodeTypeSetUpEmailRequired(apple_signin_allowed=apple_signin_allowed, google_signin_allowed=google_signin_allowed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.apple_signin_allowed else 0 + flags |= (1 << 1) if self.google_signin_allowed else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_sms.py b/pyrogram/raw/types/auth/sent_code_type_sms.py new file mode 100644 index 00000000..336c9dce --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_sms.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeSms(TLObject): # type: ignore + """The code was sent via SMS + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``C000BBA2`` + + Parameters: + length (``int`` ``32-bit``): + Length of the code in bytes + + """ + + __slots__: List[str] = ["length"] + + ID = 0xc000bba2 + QUALNAME = "types.auth.SentCodeTypeSms" + + def __init__(self, *, length: int) -> None: + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeSms": + # No flags + + length = Int.read(b) + + return SentCodeTypeSms(length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_sms_phrase.py b/pyrogram/raw/types/auth/sent_code_type_sms_phrase.py new file mode 100644 index 00000000..d19738d1 --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_sms_phrase.py @@ -0,0 +1,57 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeSmsPhrase(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``B37794AF`` + + Parameters: + beginning (``str``, *optional*): + + + """ + + __slots__: List[str] = ["beginning"] + + ID = 0xb37794af + QUALNAME = "types.auth.SentCodeTypeSmsPhrase" + + def __init__(self, *, beginning: Optional[str] = None) -> None: + self.beginning = beginning # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeSmsPhrase": + + flags = Int.read(b) + + beginning = String.read(b) if flags & (1 << 0) else None + return SentCodeTypeSmsPhrase(beginning=beginning) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.beginning is not None else 0 + b.write(Int(flags)) + + if self.beginning is not None: + b.write(String(self.beginning)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auth/sent_code_type_sms_word.py b/pyrogram/raw/types/auth/sent_code_type_sms_word.py new file mode 100644 index 00000000..8d01634a --- /dev/null +++ b/pyrogram/raw/types/auth/sent_code_type_sms_word.py @@ -0,0 +1,57 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentCodeTypeSmsWord(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.auth.SentCodeType`. + + Details: + - Layer: ``224`` + - ID: ``A416AC81`` + + Parameters: + beginning (``str``, *optional*): + + + """ + + __slots__: List[str] = ["beginning"] + + ID = 0xa416ac81 + QUALNAME = "types.auth.SentCodeTypeSmsWord" + + def __init__(self, *, beginning: Optional[str] = None) -> None: + self.beginning = beginning # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentCodeTypeSmsWord": + + flags = Int.read(b) + + beginning = String.read(b) if flags & (1 << 0) else None + return SentCodeTypeSmsWord(beginning=beginning) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.beginning is not None else 0 + b.write(Int(flags)) + + if self.beginning is not None: + b.write(String(self.beginning)) + + return b.getvalue() diff --git a/pyrogram/raw/types/authorization.py b/pyrogram/raw/types/authorization.py new file mode 100644 index 00000000..f3c64a3e --- /dev/null +++ b/pyrogram/raw/types/authorization.py @@ -0,0 +1,189 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Authorization(TLObject): # type: ignore + """Logged-in session + + Constructor of :obj:`~pyrogram.raw.base.Authorization`. + + Details: + - Layer: ``224`` + - ID: ``AD01D61D`` + + Parameters: + hash (``int`` ``64-bit``): + Identifier + + device_model (``str``): + Device model + + platform (``str``): + Platform + + system_version (``str``): + System version + + api_id (``int`` ``32-bit``): + API ID + + app_name (``str``): + App name + + app_version (``str``): + App version + + date_created (``int`` ``32-bit``): + When was the session created + + date_active (``int`` ``32-bit``): + When was the session last active + + ip (``str``): + Last known IP + + country (``str``): + Country determined from IP + + region (``str``): + Region determined from IP + + current (``bool``, *optional*): + Whether this is the current session + + official_app (``bool``, *optional*): + Whether the session is from an official app + + password_pending (``bool``, *optional*): + Whether the session is still waiting for a 2FA password + + encrypted_requests_disabled (``bool``, *optional*): + Whether this session will accept encrypted chats + + call_requests_disabled (``bool``, *optional*): + Whether this session will accept phone calls + + unconfirmed (``bool``, *optional*): + Whether the session is unconfirmed, see here » for more info. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + auth.AcceptLoginToken + """ + + __slots__: List[str] = ["hash", "device_model", "platform", "system_version", "api_id", "app_name", "app_version", "date_created", "date_active", "ip", "country", "region", "current", "official_app", "password_pending", "encrypted_requests_disabled", "call_requests_disabled", "unconfirmed"] + + ID = 0xad01d61d + QUALNAME = "types.Authorization" + + def __init__(self, *, hash: int, device_model: str, platform: str, system_version: str, api_id: int, app_name: str, app_version: str, date_created: int, date_active: int, ip: str, country: str, region: str, current: Optional[bool] = None, official_app: Optional[bool] = None, password_pending: Optional[bool] = None, encrypted_requests_disabled: Optional[bool] = None, call_requests_disabled: Optional[bool] = None, unconfirmed: Optional[bool] = None) -> None: + self.hash = hash # long + self.device_model = device_model # string + self.platform = platform # string + self.system_version = system_version # string + self.api_id = api_id # int + self.app_name = app_name # string + self.app_version = app_version # string + self.date_created = date_created # int + self.date_active = date_active # int + self.ip = ip # string + self.country = country # string + self.region = region # string + self.current = current # flags.0?true + self.official_app = official_app # flags.1?true + self.password_pending = password_pending # flags.2?true + self.encrypted_requests_disabled = encrypted_requests_disabled # flags.3?true + self.call_requests_disabled = call_requests_disabled # flags.4?true + self.unconfirmed = unconfirmed # flags.5?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Authorization": + + flags = Int.read(b) + + current = True if flags & (1 << 0) else False + official_app = True if flags & (1 << 1) else False + password_pending = True if flags & (1 << 2) else False + encrypted_requests_disabled = True if flags & (1 << 3) else False + call_requests_disabled = True if flags & (1 << 4) else False + unconfirmed = True if flags & (1 << 5) else False + hash = Long.read(b) + + device_model = String.read(b) + + platform = String.read(b) + + system_version = String.read(b) + + api_id = Int.read(b) + + app_name = String.read(b) + + app_version = String.read(b) + + date_created = Int.read(b) + + date_active = Int.read(b) + + ip = String.read(b) + + country = String.read(b) + + region = String.read(b) + + return Authorization(hash=hash, device_model=device_model, platform=platform, system_version=system_version, api_id=api_id, app_name=app_name, app_version=app_version, date_created=date_created, date_active=date_active, ip=ip, country=country, region=region, current=current, official_app=official_app, password_pending=password_pending, encrypted_requests_disabled=encrypted_requests_disabled, call_requests_disabled=call_requests_disabled, unconfirmed=unconfirmed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.current else 0 + flags |= (1 << 1) if self.official_app else 0 + flags |= (1 << 2) if self.password_pending else 0 + flags |= (1 << 3) if self.encrypted_requests_disabled else 0 + flags |= (1 << 4) if self.call_requests_disabled else 0 + flags |= (1 << 5) if self.unconfirmed else 0 + b.write(Int(flags)) + + b.write(Long(self.hash)) + + b.write(String(self.device_model)) + + b.write(String(self.platform)) + + b.write(String(self.system_version)) + + b.write(Int(self.api_id)) + + b.write(String(self.app_name)) + + b.write(String(self.app_version)) + + b.write(Int(self.date_created)) + + b.write(Int(self.date_active)) + + b.write(String(self.ip)) + + b.write(String(self.country)) + + b.write(String(self.region)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auto_download_settings.py b/pyrogram/raw/types/auto_download_settings.py new file mode 100644 index 00000000..2ed5e785 --- /dev/null +++ b/pyrogram/raw/types/auto_download_settings.py @@ -0,0 +1,126 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AutoDownloadSettings(TLObject): # type: ignore + """Autodownload settings + + Constructor of :obj:`~pyrogram.raw.base.AutoDownloadSettings`. + + Details: + - Layer: ``224`` + - ID: ``BAA57628`` + + Parameters: + photo_size_max (``int`` ``32-bit``): + Maximum size of photos to preload + + video_size_max (``int`` ``64-bit``): + Maximum size of videos to preload + + file_size_max (``int`` ``64-bit``): + Maximum size of other files to preload + + video_upload_maxbitrate (``int`` ``32-bit``): + Maximum suggested bitrate for uploading videos + + small_queue_active_operations_max (``int`` ``32-bit``): + A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files smaller than 20MB. + + large_queue_active_operations_max (``int`` ``32-bit``): + A limit, specifying the maximum number of files that should be downloaded in parallel from the same DC, for files bigger than 20MB. + + disabled (``bool``, *optional*): + Disable automatic media downloads? + + video_preload_large (``bool``, *optional*): + Whether to preload the first seconds of videos larger than the specified limit + + audio_preload_next (``bool``, *optional*): + Whether to preload the next audio track when you're listening to music + + phonecalls_less_data (``bool``, *optional*): + Whether to enable data saving mode in phone calls + + stories_preload (``bool``, *optional*): + Whether to preload stories; in particular, the first documentAttributeVideo.preload_prefix_size bytes of story videos should be preloaded. + + """ + + __slots__: List[str] = ["photo_size_max", "video_size_max", "file_size_max", "video_upload_maxbitrate", "small_queue_active_operations_max", "large_queue_active_operations_max", "disabled", "video_preload_large", "audio_preload_next", "phonecalls_less_data", "stories_preload"] + + ID = 0xbaa57628 + QUALNAME = "types.AutoDownloadSettings" + + def __init__(self, *, photo_size_max: int, video_size_max: int, file_size_max: int, video_upload_maxbitrate: int, small_queue_active_operations_max: int, large_queue_active_operations_max: int, disabled: Optional[bool] = None, video_preload_large: Optional[bool] = None, audio_preload_next: Optional[bool] = None, phonecalls_less_data: Optional[bool] = None, stories_preload: Optional[bool] = None) -> None: + self.photo_size_max = photo_size_max # int + self.video_size_max = video_size_max # long + self.file_size_max = file_size_max # long + self.video_upload_maxbitrate = video_upload_maxbitrate # int + self.small_queue_active_operations_max = small_queue_active_operations_max # int + self.large_queue_active_operations_max = large_queue_active_operations_max # int + self.disabled = disabled # flags.0?true + self.video_preload_large = video_preload_large # flags.1?true + self.audio_preload_next = audio_preload_next # flags.2?true + self.phonecalls_less_data = phonecalls_less_data # flags.3?true + self.stories_preload = stories_preload # flags.4?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AutoDownloadSettings": + + flags = Int.read(b) + + disabled = True if flags & (1 << 0) else False + video_preload_large = True if flags & (1 << 1) else False + audio_preload_next = True if flags & (1 << 2) else False + phonecalls_less_data = True if flags & (1 << 3) else False + stories_preload = True if flags & (1 << 4) else False + photo_size_max = Int.read(b) + + video_size_max = Long.read(b) + + file_size_max = Long.read(b) + + video_upload_maxbitrate = Int.read(b) + + small_queue_active_operations_max = Int.read(b) + + large_queue_active_operations_max = Int.read(b) + + return AutoDownloadSettings(photo_size_max=photo_size_max, video_size_max=video_size_max, file_size_max=file_size_max, video_upload_maxbitrate=video_upload_maxbitrate, small_queue_active_operations_max=small_queue_active_operations_max, large_queue_active_operations_max=large_queue_active_operations_max, disabled=disabled, video_preload_large=video_preload_large, audio_preload_next=audio_preload_next, phonecalls_less_data=phonecalls_less_data, stories_preload=stories_preload) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.disabled else 0 + flags |= (1 << 1) if self.video_preload_large else 0 + flags |= (1 << 2) if self.audio_preload_next else 0 + flags |= (1 << 3) if self.phonecalls_less_data else 0 + flags |= (1 << 4) if self.stories_preload else 0 + b.write(Int(flags)) + + b.write(Int(self.photo_size_max)) + + b.write(Long(self.video_size_max)) + + b.write(Long(self.file_size_max)) + + b.write(Int(self.video_upload_maxbitrate)) + + b.write(Int(self.small_queue_active_operations_max)) + + b.write(Int(self.large_queue_active_operations_max)) + + return b.getvalue() diff --git a/pyrogram/raw/types/auto_save_exception.py b/pyrogram/raw/types/auto_save_exception.py new file mode 100644 index 00000000..592ae537 --- /dev/null +++ b/pyrogram/raw/types/auto_save_exception.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AutoSaveException(TLObject): # type: ignore + """Peer-specific media autosave settings + + Constructor of :obj:`~pyrogram.raw.base.AutoSaveException`. + + Details: + - Layer: ``224`` + - ID: ``81602D47`` + + Parameters: + peer (:obj:`Peer `): + The peer + + settings (:obj:`AutoSaveSettings `): + Media autosave settings + + """ + + __slots__: List[str] = ["peer", "settings"] + + ID = 0x81602d47 + QUALNAME = "types.AutoSaveException" + + def __init__(self, *, peer: "raw.base.Peer", settings: "raw.base.AutoSaveSettings") -> None: + self.peer = peer # Peer + self.settings = settings # AutoSaveSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AutoSaveException": + # No flags + + peer = TLObject.read(b) + + settings = TLObject.read(b) + + return AutoSaveException(peer=peer, settings=settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/auto_save_settings.py b/pyrogram/raw/types/auto_save_settings.py new file mode 100644 index 00000000..d1973b48 --- /dev/null +++ b/pyrogram/raw/types/auto_save_settings.py @@ -0,0 +1,69 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AutoSaveSettings(TLObject): # type: ignore + """Media autosave settings + + Constructor of :obj:`~pyrogram.raw.base.AutoSaveSettings`. + + Details: + - Layer: ``224`` + - ID: ``C84834CE`` + + Parameters: + photos (``bool``, *optional*): + Whether photos should be autosaved to the gallery. + + videos (``bool``, *optional*): + Whether videos should be autosaved to the gallery. + + video_max_size (``int`` ``64-bit``, *optional*): + If set, specifies a size limit for autosavable videos + + """ + + __slots__: List[str] = ["photos", "videos", "video_max_size"] + + ID = 0xc84834ce + QUALNAME = "types.AutoSaveSettings" + + def __init__(self, *, photos: Optional[bool] = None, videos: Optional[bool] = None, video_max_size: Optional[int] = None) -> None: + self.photos = photos # flags.0?true + self.videos = videos # flags.1?true + self.video_max_size = video_max_size # flags.2?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AutoSaveSettings": + + flags = Int.read(b) + + photos = True if flags & (1 << 0) else False + videos = True if flags & (1 << 1) else False + video_max_size = Long.read(b) if flags & (1 << 2) else None + return AutoSaveSettings(photos=photos, videos=videos, video_max_size=video_max_size) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.photos else 0 + flags |= (1 << 1) if self.videos else 0 + flags |= (1 << 2) if self.video_max_size is not None else 0 + b.write(Int(flags)) + + if self.video_max_size is not None: + b.write(Long(self.video_max_size)) + + return b.getvalue() diff --git a/pyrogram/raw/types/available_effect.py b/pyrogram/raw/types/available_effect.py new file mode 100644 index 00000000..f92f0a1d --- /dev/null +++ b/pyrogram/raw/types/available_effect.py @@ -0,0 +1,96 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AvailableEffect(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.AvailableEffect`. + + Details: + - Layer: ``224`` + - ID: ``93C3E27E`` + + Parameters: + id (``int`` ``64-bit``): + + + emoticon (``str``): + + + effect_sticker_id (``int`` ``64-bit``): + + + premium_required (``bool``, *optional*): + + + static_icon_id (``int`` ``64-bit``, *optional*): + + + effect_animation_id (``int`` ``64-bit``, *optional*): + + + """ + + __slots__: List[str] = ["id", "emoticon", "effect_sticker_id", "premium_required", "static_icon_id", "effect_animation_id"] + + ID = 0x93c3e27e + QUALNAME = "types.AvailableEffect" + + def __init__(self, *, id: int, emoticon: str, effect_sticker_id: int, premium_required: Optional[bool] = None, static_icon_id: Optional[int] = None, effect_animation_id: Optional[int] = None) -> None: + self.id = id # long + self.emoticon = emoticon # string + self.effect_sticker_id = effect_sticker_id # long + self.premium_required = premium_required # flags.2?true + self.static_icon_id = static_icon_id # flags.0?long + self.effect_animation_id = effect_animation_id # flags.1?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AvailableEffect": + + flags = Int.read(b) + + premium_required = True if flags & (1 << 2) else False + id = Long.read(b) + + emoticon = String.read(b) + + static_icon_id = Long.read(b) if flags & (1 << 0) else None + effect_sticker_id = Long.read(b) + + effect_animation_id = Long.read(b) if flags & (1 << 1) else None + return AvailableEffect(id=id, emoticon=emoticon, effect_sticker_id=effect_sticker_id, premium_required=premium_required, static_icon_id=static_icon_id, effect_animation_id=effect_animation_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.premium_required else 0 + flags |= (1 << 0) if self.static_icon_id is not None else 0 + flags |= (1 << 1) if self.effect_animation_id is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(String(self.emoticon)) + + if self.static_icon_id is not None: + b.write(Long(self.static_icon_id)) + + b.write(Long(self.effect_sticker_id)) + + if self.effect_animation_id is not None: + b.write(Long(self.effect_animation_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/available_reaction.py b/pyrogram/raw/types/available_reaction.py new file mode 100644 index 00000000..84d7f743 --- /dev/null +++ b/pyrogram/raw/types/available_reaction.py @@ -0,0 +1,136 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AvailableReaction(TLObject): # type: ignore + """Animations associated with a message reaction + + Constructor of :obj:`~pyrogram.raw.base.AvailableReaction`. + + Details: + - Layer: ``224`` + - ID: ``C077EC01`` + + Parameters: + reaction (``str``): + Reaction emoji + + title (``str``): + Reaction description + + static_icon (:obj:`Document `): + Static icon for the reaction + + appear_animation (:obj:`Document `): + The animated sticker to show when the user opens the reaction dropdown + + select_animation (:obj:`Document `): + The animated sticker to show when the user hovers over the reaction + + activate_animation (:obj:`Document `): + The animated sticker to show when the reaction is chosen and activated + + effect_animation (:obj:`Document `): + The background effect (still an animated sticker) to play under the activate_animation, when the reaction is chosen and activated + + inactive (``bool``, *optional*): + If not set, the reaction can be added to new messages and enabled in chats. + + premium (``bool``, *optional*): + Whether this reaction can only be used by Telegram Premium users + + around_animation (:obj:`Document `, *optional*): + The animation that plays around the button when you press an existing reaction (played together with center_icon). + + center_icon (:obj:`Document `, *optional*): + The animation of the emoji inside the button when you press an existing reaction (played together with around_animation). + + """ + + __slots__: List[str] = ["reaction", "title", "static_icon", "appear_animation", "select_animation", "activate_animation", "effect_animation", "inactive", "premium", "around_animation", "center_icon"] + + ID = 0xc077ec01 + QUALNAME = "types.AvailableReaction" + + def __init__(self, *, reaction: str, title: str, static_icon: "raw.base.Document", appear_animation: "raw.base.Document", select_animation: "raw.base.Document", activate_animation: "raw.base.Document", effect_animation: "raw.base.Document", inactive: Optional[bool] = None, premium: Optional[bool] = None, around_animation: "raw.base.Document" = None, center_icon: "raw.base.Document" = None) -> None: + self.reaction = reaction # string + self.title = title # string + self.static_icon = static_icon # Document + self.appear_animation = appear_animation # Document + self.select_animation = select_animation # Document + self.activate_animation = activate_animation # Document + self.effect_animation = effect_animation # Document + self.inactive = inactive # flags.0?true + self.premium = premium # flags.2?true + self.around_animation = around_animation # flags.1?Document + self.center_icon = center_icon # flags.1?Document + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AvailableReaction": + + flags = Int.read(b) + + inactive = True if flags & (1 << 0) else False + premium = True if flags & (1 << 2) else False + reaction = String.read(b) + + title = String.read(b) + + static_icon = TLObject.read(b) + + appear_animation = TLObject.read(b) + + select_animation = TLObject.read(b) + + activate_animation = TLObject.read(b) + + effect_animation = TLObject.read(b) + + around_animation = TLObject.read(b) if flags & (1 << 1) else None + + center_icon = TLObject.read(b) if flags & (1 << 1) else None + + return AvailableReaction(reaction=reaction, title=title, static_icon=static_icon, appear_animation=appear_animation, select_animation=select_animation, activate_animation=activate_animation, effect_animation=effect_animation, inactive=inactive, premium=premium, around_animation=around_animation, center_icon=center_icon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.inactive else 0 + flags |= (1 << 2) if self.premium else 0 + flags |= (1 << 1) if self.around_animation is not None else 0 + flags |= (1 << 1) if self.center_icon is not None else 0 + b.write(Int(flags)) + + b.write(String(self.reaction)) + + b.write(String(self.title)) + + b.write(self.static_icon.write()) + + b.write(self.appear_animation.write()) + + b.write(self.select_animation.write()) + + b.write(self.activate_animation.write()) + + b.write(self.effect_animation.write()) + + if self.around_animation is not None: + b.write(self.around_animation.write()) + + if self.center_icon is not None: + b.write(self.center_icon.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bad_msg_notification.py b/pyrogram/raw/types/bad_msg_notification.py new file mode 100644 index 00000000..7ea2d925 --- /dev/null +++ b/pyrogram/raw/types/bad_msg_notification.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BadMsgNotification(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BadMsgNotification`. + + Details: + - Layer: ``224`` + - ID: ``A7EFF811`` + + Parameters: + bad_msg_id (``int`` ``64-bit``): + N/A + + bad_msg_seqno (``int`` ``32-bit``): + N/A + + error_code (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["bad_msg_id", "bad_msg_seqno", "error_code"] + + ID = 0xa7eff811 + QUALNAME = "types.BadMsgNotification" + + def __init__(self, *, bad_msg_id: int, bad_msg_seqno: int, error_code: int) -> None: + self.bad_msg_id = bad_msg_id # long + self.bad_msg_seqno = bad_msg_seqno # int + self.error_code = error_code # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BadMsgNotification": + # No flags + + bad_msg_id = Long.read(b) + + bad_msg_seqno = Int.read(b) + + error_code = Int.read(b) + + return BadMsgNotification(bad_msg_id=bad_msg_id, bad_msg_seqno=bad_msg_seqno, error_code=error_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.bad_msg_id)) + + b.write(Int(self.bad_msg_seqno)) + + b.write(Int(self.error_code)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bad_server_salt.py b/pyrogram/raw/types/bad_server_salt.py new file mode 100644 index 00000000..ac775688 --- /dev/null +++ b/pyrogram/raw/types/bad_server_salt.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BadServerSalt(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BadMsgNotification`. + + Details: + - Layer: ``224`` + - ID: ``EDAB447B`` + + Parameters: + bad_msg_id (``int`` ``64-bit``): + N/A + + bad_msg_seqno (``int`` ``32-bit``): + N/A + + error_code (``int`` ``32-bit``): + N/A + + new_server_salt (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["bad_msg_id", "bad_msg_seqno", "error_code", "new_server_salt"] + + ID = 0xedab447b + QUALNAME = "types.BadServerSalt" + + def __init__(self, *, bad_msg_id: int, bad_msg_seqno: int, error_code: int, new_server_salt: int) -> None: + self.bad_msg_id = bad_msg_id # long + self.bad_msg_seqno = bad_msg_seqno # int + self.error_code = error_code # int + self.new_server_salt = new_server_salt # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BadServerSalt": + # No flags + + bad_msg_id = Long.read(b) + + bad_msg_seqno = Int.read(b) + + error_code = Int.read(b) + + new_server_salt = Long.read(b) + + return BadServerSalt(bad_msg_id=bad_msg_id, bad_msg_seqno=bad_msg_seqno, error_code=error_code, new_server_salt=new_server_salt) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.bad_msg_id)) + + b.write(Int(self.bad_msg_seqno)) + + b.write(Int(self.error_code)) + + b.write(Long(self.new_server_salt)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bank_card_open_url.py b/pyrogram/raw/types/bank_card_open_url.py new file mode 100644 index 00000000..0061cb82 --- /dev/null +++ b/pyrogram/raw/types/bank_card_open_url.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BankCardOpenUrl(TLObject): # type: ignore + """Credit card info URL provided by the bank + + Constructor of :obj:`~pyrogram.raw.base.BankCardOpenUrl`. + + Details: + - Layer: ``224`` + - ID: ``F568028A`` + + Parameters: + url (``str``): + Info URL + + name (``str``): + Bank name + + """ + + __slots__: List[str] = ["url", "name"] + + ID = 0xf568028a + QUALNAME = "types.BankCardOpenUrl" + + def __init__(self, *, url: str, name: str) -> None: + self.url = url # string + self.name = name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BankCardOpenUrl": + # No flags + + url = String.read(b) + + name = String.read(b) + + return BankCardOpenUrl(url=url, name=name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(String(self.name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/base_theme_arctic.py b/pyrogram/raw/types/base_theme_arctic.py new file mode 100644 index 00000000..5418511a --- /dev/null +++ b/pyrogram/raw/types/base_theme_arctic.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BaseThemeArctic(TLObject): # type: ignore + """Arctic theme + + Constructor of :obj:`~pyrogram.raw.base.BaseTheme`. + + Details: + - Layer: ``224`` + - ID: ``5B11125A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x5b11125a + QUALNAME = "types.BaseThemeArctic" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BaseThemeArctic": + # No flags + + return BaseThemeArctic() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/base_theme_classic.py b/pyrogram/raw/types/base_theme_classic.py new file mode 100644 index 00000000..27148150 --- /dev/null +++ b/pyrogram/raw/types/base_theme_classic.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BaseThemeClassic(TLObject): # type: ignore + """Classic theme + + Constructor of :obj:`~pyrogram.raw.base.BaseTheme`. + + Details: + - Layer: ``224`` + - ID: ``C3A12462`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc3a12462 + QUALNAME = "types.BaseThemeClassic" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BaseThemeClassic": + # No flags + + return BaseThemeClassic() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/base_theme_day.py b/pyrogram/raw/types/base_theme_day.py new file mode 100644 index 00000000..5422cde9 --- /dev/null +++ b/pyrogram/raw/types/base_theme_day.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BaseThemeDay(TLObject): # type: ignore + """Day theme + + Constructor of :obj:`~pyrogram.raw.base.BaseTheme`. + + Details: + - Layer: ``224`` + - ID: ``FBD81688`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xfbd81688 + QUALNAME = "types.BaseThemeDay" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BaseThemeDay": + # No flags + + return BaseThemeDay() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/base_theme_night.py b/pyrogram/raw/types/base_theme_night.py new file mode 100644 index 00000000..005eaf3e --- /dev/null +++ b/pyrogram/raw/types/base_theme_night.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BaseThemeNight(TLObject): # type: ignore + """Night theme + + Constructor of :obj:`~pyrogram.raw.base.BaseTheme`. + + Details: + - Layer: ``224`` + - ID: ``B7B31EA8`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb7b31ea8 + QUALNAME = "types.BaseThemeNight" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BaseThemeNight": + # No flags + + return BaseThemeNight() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/base_theme_tinted.py b/pyrogram/raw/types/base_theme_tinted.py new file mode 100644 index 00000000..ff64b67e --- /dev/null +++ b/pyrogram/raw/types/base_theme_tinted.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BaseThemeTinted(TLObject): # type: ignore + """Tinted theme + + Constructor of :obj:`~pyrogram.raw.base.BaseTheme`. + + Details: + - Layer: ``224`` + - ID: ``6D5F77EE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x6d5f77ee + QUALNAME = "types.BaseThemeTinted" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BaseThemeTinted": + # No flags + + return BaseThemeTinted() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bind_auth_key_inner.py b/pyrogram/raw/types/bind_auth_key_inner.py new file mode 100644 index 00000000..82a1e545 --- /dev/null +++ b/pyrogram/raw/types/bind_auth_key_inner.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BindAuthKeyInner(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BindAuthKeyInner`. + + Details: + - Layer: ``224`` + - ID: ``75A3F765`` + + Parameters: + nonce (``int`` ``64-bit``): + N/A + + temp_auth_key_id (``int`` ``64-bit``): + N/A + + perm_auth_key_id (``int`` ``64-bit``): + N/A + + temp_session_id (``int`` ``64-bit``): + N/A + + expires_at (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["nonce", "temp_auth_key_id", "perm_auth_key_id", "temp_session_id", "expires_at"] + + ID = 0x75a3f765 + QUALNAME = "types.BindAuthKeyInner" + + def __init__(self, *, nonce: int, temp_auth_key_id: int, perm_auth_key_id: int, temp_session_id: int, expires_at: int) -> None: + self.nonce = nonce # long + self.temp_auth_key_id = temp_auth_key_id # long + self.perm_auth_key_id = perm_auth_key_id # long + self.temp_session_id = temp_session_id # long + self.expires_at = expires_at # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BindAuthKeyInner": + # No flags + + nonce = Long.read(b) + + temp_auth_key_id = Long.read(b) + + perm_auth_key_id = Long.read(b) + + temp_session_id = Long.read(b) + + expires_at = Int.read(b) + + return BindAuthKeyInner(nonce=nonce, temp_auth_key_id=temp_auth_key_id, perm_auth_key_id=perm_auth_key_id, temp_session_id=temp_session_id, expires_at=expires_at) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.nonce)) + + b.write(Long(self.temp_auth_key_id)) + + b.write(Long(self.perm_auth_key_id)) + + b.write(Long(self.temp_session_id)) + + b.write(Int(self.expires_at)) + + return b.getvalue() diff --git a/pyrogram/raw/types/birthday.py b/pyrogram/raw/types/birthday.py new file mode 100644 index 00000000..b94cda96 --- /dev/null +++ b/pyrogram/raw/types/birthday.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Birthday(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.Birthday`. + + Details: + - Layer: ``224`` + - ID: ``6C8E1E06`` + + Parameters: + day (``int`` ``32-bit``): + + + month (``int`` ``32-bit``): + + + year (``int`` ``32-bit``, *optional*): + + + """ + + __slots__: List[str] = ["day", "month", "year"] + + ID = 0x6c8e1e06 + QUALNAME = "types.Birthday" + + def __init__(self, *, day: int, month: int, year: Optional[int] = None) -> None: + self.day = day # int + self.month = month # int + self.year = year # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Birthday": + + flags = Int.read(b) + + day = Int.read(b) + + month = Int.read(b) + + year = Int.read(b) if flags & (1 << 0) else None + return Birthday(day=day, month=month, year=year) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.year is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.day)) + + b.write(Int(self.month)) + + if self.year is not None: + b.write(Int(self.year)) + + return b.getvalue() diff --git a/pyrogram/raw/types/boost.py b/pyrogram/raw/types/boost.py new file mode 100644 index 00000000..1271b0f0 --- /dev/null +++ b/pyrogram/raw/types/boost.py @@ -0,0 +1,135 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Boost(TLObject): # type: ignore + """Info about one or more boosts applied by a specific user. + + Constructor of :obj:`~pyrogram.raw.base.Boost`. + + Details: + - Layer: ``224`` + - ID: ``4B3E14D6`` + + Parameters: + id (``str``): + Unique ID for this set of boosts. + + date (``int`` ``32-bit``): + When was the boost applied + + expires (``int`` ``32-bit``): + When does the boost expire + + gift (``bool``, *optional*): + Whether this boost was applied because the channel directly gifted a subscription to the user. + + giveaway (``bool``, *optional*): + Whether this boost was applied because the user was chosen in a giveaway started by the channel. + + unclaimed (``bool``, *optional*): + If set, the user hasn't yet invoked payments.applyGiftCode to claim a subscription gifted directly or in a giveaway by the channel. + + user_id (``int`` ``64-bit``, *optional*): + ID of the user that applied the boost. + + giveaway_msg_id (``int`` ``32-bit``, *optional*): + The message ID of the giveaway + + used_gift_slug (``str``, *optional*): + The created Telegram Premium gift code, only set if either gift or giveaway are set AND it is either a gift code for the currently logged in user or if it was already claimed. + + multiplier (``int`` ``32-bit``, *optional*): + If set, this boost counts as multiplier boosts, otherwise it counts as a single boost. + + stars (``int`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "date", "expires", "gift", "giveaway", "unclaimed", "user_id", "giveaway_msg_id", "used_gift_slug", "multiplier", "stars"] + + ID = 0x4b3e14d6 + QUALNAME = "types.Boost" + + def __init__(self, *, id: str, date: int, expires: int, gift: Optional[bool] = None, giveaway: Optional[bool] = None, unclaimed: Optional[bool] = None, user_id: Optional[int] = None, giveaway_msg_id: Optional[int] = None, used_gift_slug: Optional[str] = None, multiplier: Optional[int] = None, stars: Optional[int] = None) -> None: + self.id = id # string + self.date = date # int + self.expires = expires # int + self.gift = gift # flags.1?true + self.giveaway = giveaway # flags.2?true + self.unclaimed = unclaimed # flags.3?true + self.user_id = user_id # flags.0?long + self.giveaway_msg_id = giveaway_msg_id # flags.2?int + self.used_gift_slug = used_gift_slug # flags.4?string + self.multiplier = multiplier # flags.5?int + self.stars = stars # flags.6?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Boost": + + flags = Int.read(b) + + gift = True if flags & (1 << 1) else False + giveaway = True if flags & (1 << 2) else False + unclaimed = True if flags & (1 << 3) else False + id = String.read(b) + + user_id = Long.read(b) if flags & (1 << 0) else None + giveaway_msg_id = Int.read(b) if flags & (1 << 2) else None + date = Int.read(b) + + expires = Int.read(b) + + used_gift_slug = String.read(b) if flags & (1 << 4) else None + multiplier = Int.read(b) if flags & (1 << 5) else None + stars = Long.read(b) if flags & (1 << 6) else None + return Boost(id=id, date=date, expires=expires, gift=gift, giveaway=giveaway, unclaimed=unclaimed, user_id=user_id, giveaway_msg_id=giveaway_msg_id, used_gift_slug=used_gift_slug, multiplier=multiplier, stars=stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.gift else 0 + flags |= (1 << 2) if self.giveaway else 0 + flags |= (1 << 3) if self.unclaimed else 0 + flags |= (1 << 0) if self.user_id is not None else 0 + flags |= (1 << 2) if self.giveaway_msg_id is not None else 0 + flags |= (1 << 4) if self.used_gift_slug is not None else 0 + flags |= (1 << 5) if self.multiplier is not None else 0 + flags |= (1 << 6) if self.stars is not None else 0 + b.write(Int(flags)) + + b.write(String(self.id)) + + if self.user_id is not None: + b.write(Long(self.user_id)) + + if self.giveaway_msg_id is not None: + b.write(Int(self.giveaway_msg_id)) + + b.write(Int(self.date)) + + b.write(Int(self.expires)) + + if self.used_gift_slug is not None: + b.write(String(self.used_gift_slug)) + + if self.multiplier is not None: + b.write(Int(self.multiplier)) + + if self.stars is not None: + b.write(Long(self.stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_app.py b/pyrogram/raw/types/bot_app.py new file mode 100644 index 00000000..91efc035 --- /dev/null +++ b/pyrogram/raw/types/bot_app.py @@ -0,0 +1,114 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotApp(TLObject): # type: ignore + """Contains information about a direct link Mini App. + + Constructor of :obj:`~pyrogram.raw.base.BotApp`. + + Details: + - Layer: ``224`` + - ID: ``95FCD1D6`` + + Parameters: + id (``int`` ``64-bit``): + bot mini app ID + + access_hash (``int`` ``64-bit``): + bot mini app access hash + + short_name (``str``): + bot mini app short name, used to generate Direct Mini App deep links. + + title (``str``): + bot mini app title. + + description (``str``): + bot mini app description. + + photo (:obj:`Photo `): + bot mini app photo. + + hash (``int`` ``64-bit``): + Hash to pass to messages.getBotApp, to avoid refetching bot app info if it hasn't changed. + + document (:obj:`Document `, *optional*): + bot mini app animation. + + """ + + __slots__: List[str] = ["id", "access_hash", "short_name", "title", "description", "photo", "hash", "document"] + + ID = 0x95fcd1d6 + QUALNAME = "types.BotApp" + + def __init__(self, *, id: int, access_hash: int, short_name: str, title: str, description: str, photo: "raw.base.Photo", hash: int, document: "raw.base.Document" = None) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.short_name = short_name # string + self.title = title # string + self.description = description # string + self.photo = photo # Photo + self.hash = hash # long + self.document = document # flags.0?Document + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotApp": + + flags = Int.read(b) + + id = Long.read(b) + + access_hash = Long.read(b) + + short_name = String.read(b) + + title = String.read(b) + + description = String.read(b) + + photo = TLObject.read(b) + + document = TLObject.read(b) if flags & (1 << 0) else None + + hash = Long.read(b) + + return BotApp(id=id, access_hash=access_hash, short_name=short_name, title=title, description=description, photo=photo, hash=hash, document=document) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.document is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(String(self.short_name)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + b.write(self.photo.write()) + + if self.document is not None: + b.write(self.document.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_app_not_modified.py b/pyrogram/raw/types/bot_app_not_modified.py new file mode 100644 index 00000000..7a9b18ed --- /dev/null +++ b/pyrogram/raw/types/bot_app_not_modified.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotAppNotModified(TLObject): # type: ignore + """Bot app info hasn't changed. + + Constructor of :obj:`~pyrogram.raw.base.BotApp`. + + Details: + - Layer: ``224`` + - ID: ``5DA674B7`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x5da674b7 + QUALNAME = "types.BotAppNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotAppNotModified": + # No flags + + return BotAppNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_app_settings.py b/pyrogram/raw/types/bot_app_settings.py new file mode 100644 index 00000000..6693be0c --- /dev/null +++ b/pyrogram/raw/types/bot_app_settings.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotAppSettings(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BotAppSettings`. + + Details: + - Layer: ``224`` + - ID: ``C99B1950`` + + Parameters: + placeholder_path (``bytes``, *optional*): + N/A + + background_color (``int`` ``32-bit``, *optional*): + N/A + + background_dark_color (``int`` ``32-bit``, *optional*): + N/A + + header_color (``int`` ``32-bit``, *optional*): + N/A + + header_dark_color (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["placeholder_path", "background_color", "background_dark_color", "header_color", "header_dark_color"] + + ID = 0xc99b1950 + QUALNAME = "types.BotAppSettings" + + def __init__(self, *, placeholder_path: Optional[bytes] = None, background_color: Optional[int] = None, background_dark_color: Optional[int] = None, header_color: Optional[int] = None, header_dark_color: Optional[int] = None) -> None: + self.placeholder_path = placeholder_path # flags.0?bytes + self.background_color = background_color # flags.1?int + self.background_dark_color = background_dark_color # flags.2?int + self.header_color = header_color # flags.3?int + self.header_dark_color = header_dark_color # flags.4?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotAppSettings": + + flags = Int.read(b) + + placeholder_path = Bytes.read(b) if flags & (1 << 0) else None + background_color = Int.read(b) if flags & (1 << 1) else None + background_dark_color = Int.read(b) if flags & (1 << 2) else None + header_color = Int.read(b) if flags & (1 << 3) else None + header_dark_color = Int.read(b) if flags & (1 << 4) else None + return BotAppSettings(placeholder_path=placeholder_path, background_color=background_color, background_dark_color=background_dark_color, header_color=header_color, header_dark_color=header_dark_color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.placeholder_path is not None else 0 + flags |= (1 << 1) if self.background_color is not None else 0 + flags |= (1 << 2) if self.background_dark_color is not None else 0 + flags |= (1 << 3) if self.header_color is not None else 0 + flags |= (1 << 4) if self.header_dark_color is not None else 0 + b.write(Int(flags)) + + if self.placeholder_path is not None: + b.write(Bytes(self.placeholder_path)) + + if self.background_color is not None: + b.write(Int(self.background_color)) + + if self.background_dark_color is not None: + b.write(Int(self.background_dark_color)) + + if self.header_color is not None: + b.write(Int(self.header_color)) + + if self.header_dark_color is not None: + b.write(Int(self.header_dark_color)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_business_connection.py b/pyrogram/raw/types/bot_business_connection.py new file mode 100644 index 00000000..dc893eac --- /dev/null +++ b/pyrogram/raw/types/bot_business_connection.py @@ -0,0 +1,96 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotBusinessConnection(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BotBusinessConnection`. + + Details: + - Layer: ``224`` + - ID: ``8F34B2F5`` + + Parameters: + connection_id (``str``): + + + user_id (``int`` ``64-bit``): + + + dc_id (``int`` ``32-bit``): + + + date (``int`` ``32-bit``): + + + disabled (``bool``, *optional*): + + + rights (:obj:`BusinessBotRights `, *optional*): + N/A + + """ + + __slots__: List[str] = ["connection_id", "user_id", "dc_id", "date", "disabled", "rights"] + + ID = 0x8f34b2f5 + QUALNAME = "types.BotBusinessConnection" + + def __init__(self, *, connection_id: str, user_id: int, dc_id: int, date: int, disabled: Optional[bool] = None, rights: "raw.base.BusinessBotRights" = None) -> None: + self.connection_id = connection_id # string + self.user_id = user_id # long + self.dc_id = dc_id # int + self.date = date # int + self.disabled = disabled # flags.1?true + self.rights = rights # flags.2?BusinessBotRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotBusinessConnection": + + flags = Int.read(b) + + disabled = True if flags & (1 << 1) else False + connection_id = String.read(b) + + user_id = Long.read(b) + + dc_id = Int.read(b) + + date = Int.read(b) + + rights = TLObject.read(b) if flags & (1 << 2) else None + + return BotBusinessConnection(connection_id=connection_id, user_id=user_id, dc_id=dc_id, date=date, disabled=disabled, rights=rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.disabled else 0 + flags |= (1 << 2) if self.rights is not None else 0 + b.write(Int(flags)) + + b.write(String(self.connection_id)) + + b.write(Long(self.user_id)) + + b.write(Int(self.dc_id)) + + b.write(Int(self.date)) + + if self.rights is not None: + b.write(self.rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command.py b/pyrogram/raw/types/bot_command.py new file mode 100644 index 00000000..450404b6 --- /dev/null +++ b/pyrogram/raw/types/bot_command.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommand(TLObject): # type: ignore + """Describes a bot command that can be used in a chat + + Constructor of :obj:`~pyrogram.raw.base.BotCommand`. + + Details: + - Layer: ``224`` + - ID: ``C27AC8C7`` + + Parameters: + command (``str``): + /command name + + description (``str``): + Description of the command + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetBotCommands + """ + + __slots__: List[str] = ["command", "description"] + + ID = 0xc27ac8c7 + QUALNAME = "types.BotCommand" + + def __init__(self, *, command: str, description: str) -> None: + self.command = command # string + self.description = description # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommand": + # No flags + + command = String.read(b) + + description = String.read(b) + + return BotCommand(command=command, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.command)) + + b.write(String(self.description)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_chat_admins.py b/pyrogram/raw/types/bot_command_scope_chat_admins.py new file mode 100644 index 00000000..b5e2cc67 --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_chat_admins.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopeChatAdmins(TLObject): # type: ignore + """The specified bot commands will be valid only for chat administrators, in all groups and supergroups. + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``B9AA606A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb9aa606a + QUALNAME = "types.BotCommandScopeChatAdmins" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopeChatAdmins": + # No flags + + return BotCommandScopeChatAdmins() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_chats.py b/pyrogram/raw/types/bot_command_scope_chats.py new file mode 100644 index 00000000..68aaace7 --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_chats.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopeChats(TLObject): # type: ignore + """The specified bot commands will be valid in all groups and supergroups. + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``6FE1A881`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x6fe1a881 + QUALNAME = "types.BotCommandScopeChats" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopeChats": + # No flags + + return BotCommandScopeChats() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_default.py b/pyrogram/raw/types/bot_command_scope_default.py new file mode 100644 index 00000000..c7121ffc --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_default.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopeDefault(TLObject): # type: ignore + """The commands will be valid in all dialogs + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``2F6CB2AB`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x2f6cb2ab + QUALNAME = "types.BotCommandScopeDefault" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopeDefault": + # No flags + + return BotCommandScopeDefault() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_peer.py b/pyrogram/raw/types/bot_command_scope_peer.py new file mode 100644 index 00000000..299a7327 --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_peer.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopePeer(TLObject): # type: ignore + """The specified bot commands will be valid only in a specific dialog. + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``DB9D897D`` + + Parameters: + peer (:obj:`InputPeer `): + The dialog + + """ + + __slots__: List[str] = ["peer"] + + ID = 0xdb9d897d + QUALNAME = "types.BotCommandScopePeer" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopePeer": + # No flags + + peer = TLObject.read(b) + + return BotCommandScopePeer(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_peer_admins.py b/pyrogram/raw/types/bot_command_scope_peer_admins.py new file mode 100644 index 00000000..2c5da4e5 --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_peer_admins.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopePeerAdmins(TLObject): # type: ignore + """The specified bot commands will be valid for all admins of the specified group or supergroup. + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``3FD863D1`` + + Parameters: + peer (:obj:`InputPeer `): + The chat + + """ + + __slots__: List[str] = ["peer"] + + ID = 0x3fd863d1 + QUALNAME = "types.BotCommandScopePeerAdmins" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopePeerAdmins": + # No flags + + peer = TLObject.read(b) + + return BotCommandScopePeerAdmins(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_peer_user.py b/pyrogram/raw/types/bot_command_scope_peer_user.py new file mode 100644 index 00000000..9fb170f8 --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_peer_user.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopePeerUser(TLObject): # type: ignore + """The specified bot commands will be valid only for a specific user in the specified group or supergroup. + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``A1321F3`` + + Parameters: + peer (:obj:`InputPeer `): + The chat + + user_id (:obj:`InputUser `): + The user + + """ + + __slots__: List[str] = ["peer", "user_id"] + + ID = 0xa1321f3 + QUALNAME = "types.BotCommandScopePeerUser" + + def __init__(self, *, peer: "raw.base.InputPeer", user_id: "raw.base.InputUser") -> None: + self.peer = peer # InputPeer + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopePeerUser": + # No flags + + peer = TLObject.read(b) + + user_id = TLObject.read(b) + + return BotCommandScopePeerUser(peer=peer, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_command_scope_users.py b/pyrogram/raw/types/bot_command_scope_users.py new file mode 100644 index 00000000..cbcde3ee --- /dev/null +++ b/pyrogram/raw/types/bot_command_scope_users.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCommandScopeUsers(TLObject): # type: ignore + """The specified bot commands will only be valid in all private chats with users. + + Constructor of :obj:`~pyrogram.raw.base.BotCommandScope`. + + Details: + - Layer: ``224`` + - ID: ``3C4F04D8`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3c4f04d8 + QUALNAME = "types.BotCommandScopeUsers" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCommandScopeUsers": + # No flags + + return BotCommandScopeUsers() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_info.py b/pyrogram/raw/types/bot_info.py new file mode 100644 index 00000000..c3330e02 --- /dev/null +++ b/pyrogram/raw/types/bot_info.py @@ -0,0 +1,141 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInfo(TLObject): # type: ignore + """Info about bots (available bot commands, etc) + + Constructor of :obj:`~pyrogram.raw.base.BotInfo`. + + Details: + - Layer: ``224`` + - ID: ``4D8A0299`` + + Parameters: + has_preview_medias (``bool``, *optional*): + N/A + + user_id (``int`` ``64-bit``, *optional*): + ID of the bot + + description (``str``, *optional*): + Description of the bot + + description_photo (:obj:`Photo `, *optional*): + Description photo + + description_document (:obj:`Document `, *optional*): + Description animation in MPEG4 format + + commands (List of :obj:`BotCommand `, *optional*): + Bot commands that can be used in the chat + + menu_button (:obj:`BotMenuButton `, *optional*): + Indicates the action to execute when pressing the in-UI menu button for bots + + privacy_policy_url (``str``, *optional*): + N/A + + app_settings (:obj:`BotAppSettings `, *optional*): + N/A + + verifier_settings (:obj:`BotVerifierSettings `, *optional*): + N/A + + """ + + __slots__: List[str] = ["has_preview_medias", "user_id", "description", "description_photo", "description_document", "commands", "menu_button", "privacy_policy_url", "app_settings", "verifier_settings"] + + ID = 0x4d8a0299 + QUALNAME = "types.BotInfo" + + def __init__(self, *, has_preview_medias: Optional[bool] = None, user_id: Optional[int] = None, description: Optional[str] = None, description_photo: "raw.base.Photo" = None, description_document: "raw.base.Document" = None, commands: Optional[List["raw.base.BotCommand"]] = None, menu_button: "raw.base.BotMenuButton" = None, privacy_policy_url: Optional[str] = None, app_settings: "raw.base.BotAppSettings" = None, verifier_settings: "raw.base.BotVerifierSettings" = None) -> None: + self.has_preview_medias = has_preview_medias # flags.6?true + self.user_id = user_id # flags.0?long + self.description = description # flags.1?string + self.description_photo = description_photo # flags.4?Photo + self.description_document = description_document # flags.5?Document + self.commands = commands # flags.2?Vector + self.menu_button = menu_button # flags.3?BotMenuButton + self.privacy_policy_url = privacy_policy_url # flags.7?string + self.app_settings = app_settings # flags.8?BotAppSettings + self.verifier_settings = verifier_settings # flags.9?BotVerifierSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInfo": + + flags = Int.read(b) + + has_preview_medias = True if flags & (1 << 6) else False + user_id = Long.read(b) if flags & (1 << 0) else None + description = String.read(b) if flags & (1 << 1) else None + description_photo = TLObject.read(b) if flags & (1 << 4) else None + + description_document = TLObject.read(b) if flags & (1 << 5) else None + + commands = TLObject.read(b) if flags & (1 << 2) else [] + + menu_button = TLObject.read(b) if flags & (1 << 3) else None + + privacy_policy_url = String.read(b) if flags & (1 << 7) else None + app_settings = TLObject.read(b) if flags & (1 << 8) else None + + verifier_settings = TLObject.read(b) if flags & (1 << 9) else None + + return BotInfo(has_preview_medias=has_preview_medias, user_id=user_id, description=description, description_photo=description_photo, description_document=description_document, commands=commands, menu_button=menu_button, privacy_policy_url=privacy_policy_url, app_settings=app_settings, verifier_settings=verifier_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 6) if self.has_preview_medias else 0 + flags |= (1 << 0) if self.user_id is not None else 0 + flags |= (1 << 1) if self.description is not None else 0 + flags |= (1 << 4) if self.description_photo is not None else 0 + flags |= (1 << 5) if self.description_document is not None else 0 + flags |= (1 << 2) if self.commands else 0 + flags |= (1 << 3) if self.menu_button is not None else 0 + flags |= (1 << 7) if self.privacy_policy_url is not None else 0 + flags |= (1 << 8) if self.app_settings is not None else 0 + flags |= (1 << 9) if self.verifier_settings is not None else 0 + b.write(Int(flags)) + + if self.user_id is not None: + b.write(Long(self.user_id)) + + if self.description is not None: + b.write(String(self.description)) + + if self.description_photo is not None: + b.write(self.description_photo.write()) + + if self.description_document is not None: + b.write(self.description_document.write()) + + if self.commands is not None: + b.write(Vector(self.commands)) + + if self.menu_button is not None: + b.write(self.menu_button.write()) + + if self.privacy_policy_url is not None: + b.write(String(self.privacy_policy_url)) + + if self.app_settings is not None: + b.write(self.app_settings.write()) + + if self.verifier_settings is not None: + b.write(self.verifier_settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_media_result.py b/pyrogram/raw/types/bot_inline_media_result.py new file mode 100644 index 00000000..ae971a71 --- /dev/null +++ b/pyrogram/raw/types/bot_inline_media_result.py @@ -0,0 +1,110 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMediaResult(TLObject): # type: ignore + """Media result + + Constructor of :obj:`~pyrogram.raw.base.BotInlineResult`. + + Details: + - Layer: ``224`` + - ID: ``17DB940B`` + + Parameters: + id (``str``): + Result ID + + type (``str``): + Result type (see bot API docs) + + send_message (:obj:`BotInlineMessage `): + Depending on the type and on the constructor, contains the caption of the media or the content of the message to be sent instead of the media + + photo (:obj:`Photo `, *optional*): + If type is photo, the photo to send + + document (:obj:`Document `, *optional*): + If type is document, the document to send + + title (``str``, *optional*): + Result title + + description (``str``, *optional*): + Description + + """ + + __slots__: List[str] = ["id", "type", "send_message", "photo", "document", "title", "description"] + + ID = 0x17db940b + QUALNAME = "types.BotInlineMediaResult" + + def __init__(self, *, id: str, type: str, send_message: "raw.base.BotInlineMessage", photo: "raw.base.Photo" = None, document: "raw.base.Document" = None, title: Optional[str] = None, description: Optional[str] = None) -> None: + self.id = id # string + self.type = type # string + self.send_message = send_message # BotInlineMessage + self.photo = photo # flags.0?Photo + self.document = document # flags.1?Document + self.title = title # flags.2?string + self.description = description # flags.3?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMediaResult": + + flags = Int.read(b) + + id = String.read(b) + + type = String.read(b) + + photo = TLObject.read(b) if flags & (1 << 0) else None + + document = TLObject.read(b) if flags & (1 << 1) else None + + title = String.read(b) if flags & (1 << 2) else None + description = String.read(b) if flags & (1 << 3) else None + send_message = TLObject.read(b) + + return BotInlineMediaResult(id=id, type=type, send_message=send_message, photo=photo, document=document, title=title, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.photo is not None else 0 + flags |= (1 << 1) if self.document is not None else 0 + flags |= (1 << 2) if self.title is not None else 0 + flags |= (1 << 3) if self.description is not None else 0 + b.write(Int(flags)) + + b.write(String(self.id)) + + b.write(String(self.type)) + + if self.photo is not None: + b.write(self.photo.write()) + + if self.document is not None: + b.write(self.document.write()) + + if self.title is not None: + b.write(String(self.title)) + + if self.description is not None: + b.write(String(self.description)) + + b.write(self.send_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_media_auto.py b/pyrogram/raw/types/bot_inline_message_media_auto.py new file mode 100644 index 00000000..82cfec9f --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_media_auto.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageMediaAuto(TLObject): # type: ignore + """Send whatever media is attached to the botInlineMediaResult + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``764CF810`` + + Parameters: + message (``str``): + Caption + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["message", "invert_media", "entities", "reply_markup"] + + ID = 0x764cf810 + QUALNAME = "types.BotInlineMessageMediaAuto" + + def __init__(self, *, message: str, invert_media: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.message = message # string + self.invert_media = invert_media # flags.3?true + self.entities = entities # flags.1?Vector + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageMediaAuto": + + flags = Int.read(b) + + invert_media = True if flags & (1 << 3) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageMediaAuto(message=message, invert_media=invert_media, entities=entities, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.invert_media else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_media_contact.py b/pyrogram/raw/types/bot_inline_message_media_contact.py new file mode 100644 index 00000000..6a9c2cfa --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_media_contact.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageMediaContact(TLObject): # type: ignore + """Send a contact + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``18D1CDC2`` + + Parameters: + phone_number (``str``): + Phone number + + first_name (``str``): + First name + + last_name (``str``): + Last name + + vcard (``str``): + VCard info + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["phone_number", "first_name", "last_name", "vcard", "reply_markup"] + + ID = 0x18d1cdc2 + QUALNAME = "types.BotInlineMessageMediaContact" + + def __init__(self, *, phone_number: str, first_name: str, last_name: str, vcard: str, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.phone_number = phone_number # string + self.first_name = first_name # string + self.last_name = last_name # string + self.vcard = vcard # string + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageMediaContact": + + flags = Int.read(b) + + phone_number = String.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + vcard = String.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageMediaContact(phone_number=phone_number, first_name=first_name, last_name=last_name, vcard=vcard, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + b.write(String(self.vcard)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_media_geo.py b/pyrogram/raw/types/bot_inline_message_media_geo.py new file mode 100644 index 00000000..41122f0b --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_media_geo.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageMediaGeo(TLObject): # type: ignore + """Send a geolocation + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``51846FD`` + + Parameters: + geo (:obj:`GeoPoint `): + Geolocation + + heading (``int`` ``32-bit``, *optional*): + For live locations, a direction in which the location moves, in degrees; 1-360. + + period (``int`` ``32-bit``, *optional*): + Validity period + + proximity_notification_radius (``int`` ``32-bit``, *optional*): + For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["geo", "heading", "period", "proximity_notification_radius", "reply_markup"] + + ID = 0x51846fd + QUALNAME = "types.BotInlineMessageMediaGeo" + + def __init__(self, *, geo: "raw.base.GeoPoint", heading: Optional[int] = None, period: Optional[int] = None, proximity_notification_radius: Optional[int] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.geo = geo # GeoPoint + self.heading = heading # flags.0?int + self.period = period # flags.1?int + self.proximity_notification_radius = proximity_notification_radius # flags.3?int + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageMediaGeo": + + flags = Int.read(b) + + geo = TLObject.read(b) + + heading = Int.read(b) if flags & (1 << 0) else None + period = Int.read(b) if flags & (1 << 1) else None + proximity_notification_radius = Int.read(b) if flags & (1 << 3) else None + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageMediaGeo(geo=geo, heading=heading, period=period, proximity_notification_radius=proximity_notification_radius, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.heading is not None else 0 + flags |= (1 << 1) if self.period is not None else 0 + flags |= (1 << 3) if self.proximity_notification_radius is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(self.geo.write()) + + if self.heading is not None: + b.write(Int(self.heading)) + + if self.period is not None: + b.write(Int(self.period)) + + if self.proximity_notification_radius is not None: + b.write(Int(self.proximity_notification_radius)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_media_invoice.py b/pyrogram/raw/types/bot_inline_message_media_invoice.py new file mode 100644 index 00000000..6b631fc4 --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_media_invoice.py @@ -0,0 +1,112 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageMediaInvoice(TLObject): # type: ignore + """Send an invoice + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``354A9B09`` + + Parameters: + title (``str``): + Product name, 1-32 characters + + description (``str``): + Product description, 1-255 characters + + currency (``str``): + Three-letter ISO 4217 currency code + + total_amount (``int`` ``64-bit``): + Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + shipping_address_requested (``bool``, *optional*): + Set this flag if you require the user's shipping address to complete the order + + test (``bool``, *optional*): + Test invoice + + photo (:obj:`WebDocument `, *optional*): + Product photo + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["title", "description", "currency", "total_amount", "shipping_address_requested", "test", "photo", "reply_markup"] + + ID = 0x354a9b09 + QUALNAME = "types.BotInlineMessageMediaInvoice" + + def __init__(self, *, title: str, description: str, currency: str, total_amount: int, shipping_address_requested: Optional[bool] = None, test: Optional[bool] = None, photo: "raw.base.WebDocument" = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.title = title # string + self.description = description # string + self.currency = currency # string + self.total_amount = total_amount # long + self.shipping_address_requested = shipping_address_requested # flags.1?true + self.test = test # flags.3?true + self.photo = photo # flags.0?WebDocument + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageMediaInvoice": + + flags = Int.read(b) + + shipping_address_requested = True if flags & (1 << 1) else False + test = True if flags & (1 << 3) else False + title = String.read(b) + + description = String.read(b) + + photo = TLObject.read(b) if flags & (1 << 0) else None + + currency = String.read(b) + + total_amount = Long.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageMediaInvoice(title=title, description=description, currency=currency, total_amount=total_amount, shipping_address_requested=shipping_address_requested, test=test, photo=photo, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.shipping_address_requested else 0 + flags |= (1 << 3) if self.test else 0 + flags |= (1 << 0) if self.photo is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + if self.photo is not None: + b.write(self.photo.write()) + + b.write(String(self.currency)) + + b.write(Long(self.total_amount)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_media_venue.py b/pyrogram/raw/types/bot_inline_message_media_venue.py new file mode 100644 index 00000000..fe4272dd --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_media_venue.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageMediaVenue(TLObject): # type: ignore + """Send a venue + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``8A86659C`` + + Parameters: + geo (:obj:`GeoPoint `): + Geolocation of venue + + title (``str``): + Venue name + + address (``str``): + Address + + provider (``str``): + Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported + + venue_id (``str``): + Venue ID in the provider's database + + venue_type (``str``): + Venue type in the provider's database + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["geo", "title", "address", "provider", "venue_id", "venue_type", "reply_markup"] + + ID = 0x8a86659c + QUALNAME = "types.BotInlineMessageMediaVenue" + + def __init__(self, *, geo: "raw.base.GeoPoint", title: str, address: str, provider: str, venue_id: str, venue_type: str, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.geo = geo # GeoPoint + self.title = title # string + self.address = address # string + self.provider = provider # string + self.venue_id = venue_id # string + self.venue_type = venue_type # string + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageMediaVenue": + + flags = Int.read(b) + + geo = TLObject.read(b) + + title = String.read(b) + + address = String.read(b) + + provider = String.read(b) + + venue_id = String.read(b) + + venue_type = String.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageMediaVenue(geo=geo, title=title, address=address, provider=provider, venue_id=venue_id, venue_type=venue_type, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(self.geo.write()) + + b.write(String(self.title)) + + b.write(String(self.address)) + + b.write(String(self.provider)) + + b.write(String(self.venue_id)) + + b.write(String(self.venue_type)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_media_web_page.py b/pyrogram/raw/types/bot_inline_message_media_web_page.py new file mode 100644 index 00000000..6474acce --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_media_web_page.py @@ -0,0 +1,114 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageMediaWebPage(TLObject): # type: ignore + """Specifies options that must be used to generate the link preview for the message, or even a standalone link preview without an attached message. + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``809AD9A6`` + + Parameters: + message (``str``): + The message, can be empty. + + url (``str``): + The URL to use for the link preview. + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + force_large_media (``bool``, *optional*): + If set, specifies that a large media preview should be used. + + force_small_media (``bool``, *optional*): + If set, specifies that a small media preview should be used. + + manual (``bool``, *optional*): + If set, indicates that the URL used for the webpage preview was specified manually using inputMediaWebPage, and may not be related to any of the URLs specified in the message. + + safe (``bool``, *optional*): + If set, the link can be opened directly without user confirmation. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup for sending bot buttons + + """ + + __slots__: List[str] = ["message", "url", "invert_media", "force_large_media", "force_small_media", "manual", "safe", "entities", "reply_markup"] + + ID = 0x809ad9a6 + QUALNAME = "types.BotInlineMessageMediaWebPage" + + def __init__(self, *, message: str, url: str, invert_media: Optional[bool] = None, force_large_media: Optional[bool] = None, force_small_media: Optional[bool] = None, manual: Optional[bool] = None, safe: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.message = message # string + self.url = url # string + self.invert_media = invert_media # flags.3?true + self.force_large_media = force_large_media # flags.4?true + self.force_small_media = force_small_media # flags.5?true + self.manual = manual # flags.7?true + self.safe = safe # flags.8?true + self.entities = entities # flags.1?Vector + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageMediaWebPage": + + flags = Int.read(b) + + invert_media = True if flags & (1 << 3) else False + force_large_media = True if flags & (1 << 4) else False + force_small_media = True if flags & (1 << 5) else False + manual = True if flags & (1 << 7) else False + safe = True if flags & (1 << 8) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + url = String.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageMediaWebPage(message=message, url=url, invert_media=invert_media, force_large_media=force_large_media, force_small_media=force_small_media, manual=manual, safe=safe, entities=entities, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.invert_media else 0 + flags |= (1 << 4) if self.force_large_media else 0 + flags |= (1 << 5) if self.force_small_media else 0 + flags |= (1 << 7) if self.manual else 0 + flags |= (1 << 8) if self.safe else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + b.write(String(self.url)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_message_text.py b/pyrogram/raw/types/bot_inline_message_text.py new file mode 100644 index 00000000..98e7fdcc --- /dev/null +++ b/pyrogram/raw/types/bot_inline_message_text.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineMessageText(TLObject): # type: ignore + """Send a simple text message + + Constructor of :obj:`~pyrogram.raw.base.BotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``8C7F65E2`` + + Parameters: + message (``str``): + The message + + no_webpage (``bool``, *optional*): + Disable webpage preview + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["message", "no_webpage", "invert_media", "entities", "reply_markup"] + + ID = 0x8c7f65e2 + QUALNAME = "types.BotInlineMessageText" + + def __init__(self, *, message: str, no_webpage: Optional[bool] = None, invert_media: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.message = message # string + self.no_webpage = no_webpage # flags.0?true + self.invert_media = invert_media # flags.3?true + self.entities = entities # flags.1?Vector + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineMessageText": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 0) else False + invert_media = True if flags & (1 << 3) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return BotInlineMessageText(message=message, no_webpage=no_webpage, invert_media=invert_media, entities=entities, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.no_webpage else 0 + flags |= (1 << 3) if self.invert_media else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_inline_result.py b/pyrogram/raw/types/bot_inline_result.py new file mode 100644 index 00000000..0b667a4d --- /dev/null +++ b/pyrogram/raw/types/bot_inline_result.py @@ -0,0 +1,119 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInlineResult(TLObject): # type: ignore + """Generic result + + Constructor of :obj:`~pyrogram.raw.base.BotInlineResult`. + + Details: + - Layer: ``224`` + - ID: ``11965F3A`` + + Parameters: + id (``str``): + Result ID + + type (``str``): + Result type (see bot API docs) + + send_message (:obj:`BotInlineMessage `): + Message to send + + title (``str``, *optional*): + Result title + + description (``str``, *optional*): + Result description + + url (``str``, *optional*): + URL of article or webpage + + thumb (:obj:`WebDocument `, *optional*): + Thumbnail for the result + + content (:obj:`WebDocument `, *optional*): + Content of the result + + """ + + __slots__: List[str] = ["id", "type", "send_message", "title", "description", "url", "thumb", "content"] + + ID = 0x11965f3a + QUALNAME = "types.BotInlineResult" + + def __init__(self, *, id: str, type: str, send_message: "raw.base.BotInlineMessage", title: Optional[str] = None, description: Optional[str] = None, url: Optional[str] = None, thumb: "raw.base.WebDocument" = None, content: "raw.base.WebDocument" = None) -> None: + self.id = id # string + self.type = type # string + self.send_message = send_message # BotInlineMessage + self.title = title # flags.1?string + self.description = description # flags.2?string + self.url = url # flags.3?string + self.thumb = thumb # flags.4?WebDocument + self.content = content # flags.5?WebDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInlineResult": + + flags = Int.read(b) + + id = String.read(b) + + type = String.read(b) + + title = String.read(b) if flags & (1 << 1) else None + description = String.read(b) if flags & (1 << 2) else None + url = String.read(b) if flags & (1 << 3) else None + thumb = TLObject.read(b) if flags & (1 << 4) else None + + content = TLObject.read(b) if flags & (1 << 5) else None + + send_message = TLObject.read(b) + + return BotInlineResult(id=id, type=type, send_message=send_message, title=title, description=description, url=url, thumb=thumb, content=content) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 2) if self.description is not None else 0 + flags |= (1 << 3) if self.url is not None else 0 + flags |= (1 << 4) if self.thumb is not None else 0 + flags |= (1 << 5) if self.content is not None else 0 + b.write(Int(flags)) + + b.write(String(self.id)) + + b.write(String(self.type)) + + if self.title is not None: + b.write(String(self.title)) + + if self.description is not None: + b.write(String(self.description)) + + if self.url is not None: + b.write(String(self.url)) + + if self.thumb is not None: + b.write(self.thumb.write()) + + if self.content is not None: + b.write(self.content.write()) + + b.write(self.send_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_menu_button.py b/pyrogram/raw/types/bot_menu_button.py new file mode 100644 index 00000000..af99645c --- /dev/null +++ b/pyrogram/raw/types/bot_menu_button.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotMenuButton(TLObject): # type: ignore + """Bot menu button that opens a web app when clicked. + + Constructor of :obj:`~pyrogram.raw.base.BotMenuButton`. + + Details: + - Layer: ``224`` + - ID: ``C7B57CE6`` + + Parameters: + text (``str``): + Title to be displayed on the menu button instead of 'Menu' + + url (``str``): + URL of a web app to open when the user clicks on the button + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetBotMenuButton + """ + + __slots__: List[str] = ["text", "url"] + + ID = 0xc7b57ce6 + QUALNAME = "types.BotMenuButton" + + def __init__(self, *, text: str, url: str) -> None: + self.text = text # string + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotMenuButton": + # No flags + + text = String.read(b) + + url = String.read(b) + + return BotMenuButton(text=text, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.text)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_menu_button_commands.py b/pyrogram/raw/types/bot_menu_button_commands.py new file mode 100644 index 00000000..b21814fb --- /dev/null +++ b/pyrogram/raw/types/bot_menu_button_commands.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotMenuButtonCommands(TLObject): # type: ignore + """Bot menu button that opens the bot command list when clicked. + + Constructor of :obj:`~pyrogram.raw.base.BotMenuButton`. + + Details: + - Layer: ``224`` + - ID: ``4258C205`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetBotMenuButton + """ + + __slots__: List[str] = [] + + ID = 0x4258c205 + QUALNAME = "types.BotMenuButtonCommands" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotMenuButtonCommands": + # No flags + + return BotMenuButtonCommands() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_menu_button_default.py b/pyrogram/raw/types/bot_menu_button_default.py new file mode 100644 index 00000000..06f39558 --- /dev/null +++ b/pyrogram/raw/types/bot_menu_button_default.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotMenuButtonDefault(TLObject): # type: ignore + """Placeholder bot menu button never returned to users: see the docs for more info. + + Constructor of :obj:`~pyrogram.raw.base.BotMenuButton`. + + Details: + - Layer: ``224`` + - ID: ``7533A588`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetBotMenuButton + """ + + __slots__: List[str] = [] + + ID = 0x7533a588 + QUALNAME = "types.BotMenuButtonDefault" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotMenuButtonDefault": + # No flags + + return BotMenuButtonDefault() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_preview_media.py b/pyrogram/raw/types/bot_preview_media.py new file mode 100644 index 00000000..d5c9a4b1 --- /dev/null +++ b/pyrogram/raw/types/bot_preview_media.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotPreviewMedia(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BotPreviewMedia`. + + Details: + - Layer: ``224`` + - ID: ``23E91BA3`` + + Parameters: + date (``int`` ``32-bit``): + N/A + + media (:obj:`MessageMedia `): + N/A + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.AddPreviewMedia + bots.EditPreviewMedia + bots.GetPreviewMedias + """ + + __slots__: List[str] = ["date", "media"] + + ID = 0x23e91ba3 + QUALNAME = "types.BotPreviewMedia" + + def __init__(self, *, date: int, media: "raw.base.MessageMedia") -> None: + self.date = date # int + self.media = media # MessageMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotPreviewMedia": + # No flags + + date = Int.read(b) + + media = TLObject.read(b) + + return BotPreviewMedia(date=date, media=media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.date)) + + b.write(self.media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_verification.py b/pyrogram/raw/types/bot_verification.py new file mode 100644 index 00000000..b6ff3e2d --- /dev/null +++ b/pyrogram/raw/types/bot_verification.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotVerification(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BotVerification`. + + Details: + - Layer: ``224`` + - ID: ``F93CD45C`` + + Parameters: + bot_id (``int`` ``64-bit``): + N/A + + icon (``int`` ``64-bit``): + N/A + + description (``str``): + N/A + + """ + + __slots__: List[str] = ["bot_id", "icon", "description"] + + ID = 0xf93cd45c + QUALNAME = "types.BotVerification" + + def __init__(self, *, bot_id: int, icon: int, description: str) -> None: + self.bot_id = bot_id # long + self.icon = icon # long + self.description = description # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotVerification": + # No flags + + bot_id = Long.read(b) + + icon = Long.read(b) + + description = String.read(b) + + return BotVerification(bot_id=bot_id, icon=icon, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.bot_id)) + + b.write(Long(self.icon)) + + b.write(String(self.description)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bot_verifier_settings.py b/pyrogram/raw/types/bot_verifier_settings.py new file mode 100644 index 00000000..e386d60b --- /dev/null +++ b/pyrogram/raw/types/bot_verifier_settings.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotVerifierSettings(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BotVerifierSettings`. + + Details: + - Layer: ``224`` + - ID: ``B0CD6617`` + + Parameters: + icon (``int`` ``64-bit``): + N/A + + company (``str``): + N/A + + can_modify_custom_description (``bool``, *optional*): + N/A + + custom_description (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["icon", "company", "can_modify_custom_description", "custom_description"] + + ID = 0xb0cd6617 + QUALNAME = "types.BotVerifierSettings" + + def __init__(self, *, icon: int, company: str, can_modify_custom_description: Optional[bool] = None, custom_description: Optional[str] = None) -> None: + self.icon = icon # long + self.company = company # string + self.can_modify_custom_description = can_modify_custom_description # flags.1?true + self.custom_description = custom_description # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotVerifierSettings": + + flags = Int.read(b) + + can_modify_custom_description = True if flags & (1 << 1) else False + icon = Long.read(b) + + company = String.read(b) + + custom_description = String.read(b) if flags & (1 << 0) else None + return BotVerifierSettings(icon=icon, company=company, can_modify_custom_description=can_modify_custom_description, custom_description=custom_description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.can_modify_custom_description else 0 + flags |= (1 << 0) if self.custom_description is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.icon)) + + b.write(String(self.company)) + + if self.custom_description is not None: + b.write(String(self.custom_description)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bots/__init__.py b/pyrogram/raw/types/bots/__init__.py new file mode 100644 index 00000000..9bd6e28d --- /dev/null +++ b/pyrogram/raw/types/bots/__init__.py @@ -0,0 +1,37 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .bot_info import BotInfo +from .popular_app_bots import PopularAppBots +from .preview_info import PreviewInfo + + +__all__ = [ + "BotInfo", + "PopularAppBots", + "PreviewInfo", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/bots/bot_info.py b/pyrogram/raw/types/bots/bot_info.py new file mode 100644 index 00000000..f25b68b5 --- /dev/null +++ b/pyrogram/raw/types/bots/bot_info.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotInfo(TLObject): # type: ignore + """Localized information about a bot. + + Constructor of :obj:`~pyrogram.raw.base.bots.BotInfo`. + + Details: + - Layer: ``224`` + - ID: ``E8A775B0`` + + Parameters: + name (``str``): + Bot name + + about (``str``): + Bot about text + + description (``str``): + Bot description + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetBotInfo + """ + + __slots__: List[str] = ["name", "about", "description"] + + ID = 0xe8a775b0 + QUALNAME = "types.bots.BotInfo" + + def __init__(self, *, name: str, about: str, description: str) -> None: + self.name = name # string + self.about = about # string + self.description = description # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotInfo": + # No flags + + name = String.read(b) + + about = String.read(b) + + description = String.read(b) + + return BotInfo(name=name, about=about, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.name)) + + b.write(String(self.about)) + + b.write(String(self.description)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bots/popular_app_bots.py b/pyrogram/raw/types/bots/popular_app_bots.py new file mode 100644 index 00000000..a6c88324 --- /dev/null +++ b/pyrogram/raw/types/bots/popular_app_bots.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PopularAppBots(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.bots.PopularAppBots`. + + Details: + - Layer: ``224`` + - ID: ``1991B13B`` + + Parameters: + users (List of :obj:`User `): + N/A + + next_offset (``str``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetPopularAppBots + """ + + __slots__: List[str] = ["users", "next_offset"] + + ID = 0x1991b13b + QUALNAME = "types.bots.PopularAppBots" + + def __init__(self, *, users: List["raw.base.User"], next_offset: Optional[str] = None) -> None: + self.users = users # Vector + self.next_offset = next_offset # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PopularAppBots": + + flags = Int.read(b) + + next_offset = String.read(b) if flags & (1 << 0) else None + users = TLObject.read(b) + + return PopularAppBots(users=users, next_offset=next_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.next_offset is not None else 0 + b.write(Int(flags)) + + if self.next_offset is not None: + b.write(String(self.next_offset)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/bots/preview_info.py b/pyrogram/raw/types/bots/preview_info.py new file mode 100644 index 00000000..bfb12921 --- /dev/null +++ b/pyrogram/raw/types/bots/preview_info.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PreviewInfo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.bots.PreviewInfo`. + + Details: + - Layer: ``224`` + - ID: ``CA71D64`` + + Parameters: + media (List of :obj:`BotPreviewMedia `): + N/A + + lang_codes (List of ``str``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.GetPreviewInfo + """ + + __slots__: List[str] = ["media", "lang_codes"] + + ID = 0xca71d64 + QUALNAME = "types.bots.PreviewInfo" + + def __init__(self, *, media: List["raw.base.BotPreviewMedia"], lang_codes: List[str]) -> None: + self.media = media # Vector + self.lang_codes = lang_codes # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PreviewInfo": + # No flags + + media = TLObject.read(b) + + lang_codes = TLObject.read(b, String) + + return PreviewInfo(media=media, lang_codes=lang_codes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.media)) + + b.write(Vector(self.lang_codes, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_away_message.py b/pyrogram/raw/types/business_away_message.py new file mode 100644 index 00000000..593d85bd --- /dev/null +++ b/pyrogram/raw/types/business_away_message.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessAwayMessage(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessAwayMessage`. + + Details: + - Layer: ``224`` + - ID: ``EF156A5C`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + schedule (:obj:`BusinessAwayMessageSchedule `): + + + recipients (:obj:`BusinessRecipients `): + + + offline_only (``bool``, *optional*): + + + """ + + __slots__: List[str] = ["shortcut_id", "schedule", "recipients", "offline_only"] + + ID = 0xef156a5c + QUALNAME = "types.BusinessAwayMessage" + + def __init__(self, *, shortcut_id: int, schedule: "raw.base.BusinessAwayMessageSchedule", recipients: "raw.base.BusinessRecipients", offline_only: Optional[bool] = None) -> None: + self.shortcut_id = shortcut_id # int + self.schedule = schedule # BusinessAwayMessageSchedule + self.recipients = recipients # BusinessRecipients + self.offline_only = offline_only # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessAwayMessage": + + flags = Int.read(b) + + offline_only = True if flags & (1 << 0) else False + shortcut_id = Int.read(b) + + schedule = TLObject.read(b) + + recipients = TLObject.read(b) + + return BusinessAwayMessage(shortcut_id=shortcut_id, schedule=schedule, recipients=recipients, offline_only=offline_only) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.offline_only else 0 + b.write(Int(flags)) + + b.write(Int(self.shortcut_id)) + + b.write(self.schedule.write()) + + b.write(self.recipients.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_away_message_schedule_always.py b/pyrogram/raw/types/business_away_message_schedule_always.py new file mode 100644 index 00000000..c8b3b7c6 --- /dev/null +++ b/pyrogram/raw/types/business_away_message_schedule_always.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessAwayMessageScheduleAlways(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessAwayMessageSchedule`. + + Details: + - Layer: ``224`` + - ID: ``C9B9E2B9`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc9b9e2b9 + QUALNAME = "types.BusinessAwayMessageScheduleAlways" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessAwayMessageScheduleAlways": + # No flags + + return BusinessAwayMessageScheduleAlways() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/business_away_message_schedule_custom.py b/pyrogram/raw/types/business_away_message_schedule_custom.py new file mode 100644 index 00000000..414401a8 --- /dev/null +++ b/pyrogram/raw/types/business_away_message_schedule_custom.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessAwayMessageScheduleCustom(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessAwayMessageSchedule`. + + Details: + - Layer: ``224`` + - ID: ``CC4D9ECC`` + + Parameters: + start_date (``int`` ``32-bit``): + + + end_date (``int`` ``32-bit``): + + + """ + + __slots__: List[str] = ["start_date", "end_date"] + + ID = 0xcc4d9ecc + QUALNAME = "types.BusinessAwayMessageScheduleCustom" + + def __init__(self, *, start_date: int, end_date: int) -> None: + self.start_date = start_date # int + self.end_date = end_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessAwayMessageScheduleCustom": + # No flags + + start_date = Int.read(b) + + end_date = Int.read(b) + + return BusinessAwayMessageScheduleCustom(start_date=start_date, end_date=end_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.start_date)) + + b.write(Int(self.end_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_away_message_schedule_outside_work_hours.py b/pyrogram/raw/types/business_away_message_schedule_outside_work_hours.py new file mode 100644 index 00000000..0283cb3f --- /dev/null +++ b/pyrogram/raw/types/business_away_message_schedule_outside_work_hours.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessAwayMessageScheduleOutsideWorkHours(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessAwayMessageSchedule`. + + Details: + - Layer: ``224`` + - ID: ``C3F2F501`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc3f2f501 + QUALNAME = "types.BusinessAwayMessageScheduleOutsideWorkHours" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessAwayMessageScheduleOutsideWorkHours": + # No flags + + return BusinessAwayMessageScheduleOutsideWorkHours() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/business_bot_recipients.py b/pyrogram/raw/types/business_bot_recipients.py new file mode 100644 index 00000000..3f8e068c --- /dev/null +++ b/pyrogram/raw/types/business_bot_recipients.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessBotRecipients(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessBotRecipients`. + + Details: + - Layer: ``224`` + - ID: ``B88CF373`` + + Parameters: + existing_chats (``bool``, *optional*): + + + new_chats (``bool``, *optional*): + + + contacts (``bool``, *optional*): + + + non_contacts (``bool``, *optional*): + + + exclude_selected (``bool``, *optional*): + + + users (List of ``int`` ``64-bit``, *optional*): + + + exclude_users (List of ``int`` ``64-bit``, *optional*): + + + """ + + __slots__: List[str] = ["existing_chats", "new_chats", "contacts", "non_contacts", "exclude_selected", "users", "exclude_users"] + + ID = 0xb88cf373 + QUALNAME = "types.BusinessBotRecipients" + + def __init__(self, *, existing_chats: Optional[bool] = None, new_chats: Optional[bool] = None, contacts: Optional[bool] = None, non_contacts: Optional[bool] = None, exclude_selected: Optional[bool] = None, users: Optional[List[int]] = None, exclude_users: Optional[List[int]] = None) -> None: + self.existing_chats = existing_chats # flags.0?true + self.new_chats = new_chats # flags.1?true + self.contacts = contacts # flags.2?true + self.non_contacts = non_contacts # flags.3?true + self.exclude_selected = exclude_selected # flags.5?true + self.users = users # flags.4?Vector + self.exclude_users = exclude_users # flags.6?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessBotRecipients": + + flags = Int.read(b) + + existing_chats = True if flags & (1 << 0) else False + new_chats = True if flags & (1 << 1) else False + contacts = True if flags & (1 << 2) else False + non_contacts = True if flags & (1 << 3) else False + exclude_selected = True if flags & (1 << 5) else False + users = TLObject.read(b, Long) if flags & (1 << 4) else [] + + exclude_users = TLObject.read(b, Long) if flags & (1 << 6) else [] + + return BusinessBotRecipients(existing_chats=existing_chats, new_chats=new_chats, contacts=contacts, non_contacts=non_contacts, exclude_selected=exclude_selected, users=users, exclude_users=exclude_users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.existing_chats else 0 + flags |= (1 << 1) if self.new_chats else 0 + flags |= (1 << 2) if self.contacts else 0 + flags |= (1 << 3) if self.non_contacts else 0 + flags |= (1 << 5) if self.exclude_selected else 0 + flags |= (1 << 4) if self.users else 0 + flags |= (1 << 6) if self.exclude_users else 0 + b.write(Int(flags)) + + if self.users is not None: + b.write(Vector(self.users, Long)) + + if self.exclude_users is not None: + b.write(Vector(self.exclude_users, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_bot_rights.py b/pyrogram/raw/types/business_bot_rights.py new file mode 100644 index 00000000..e982bfd5 --- /dev/null +++ b/pyrogram/raw/types/business_bot_rights.py @@ -0,0 +1,132 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessBotRights(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.BusinessBotRights`. + + Details: + - Layer: ``224`` + - ID: ``A0624CF7`` + + Parameters: + reply (``bool``, *optional*): + N/A + + read_messages (``bool``, *optional*): + N/A + + delete_sent_messages (``bool``, *optional*): + N/A + + delete_received_messages (``bool``, *optional*): + N/A + + edit_name (``bool``, *optional*): + N/A + + edit_bio (``bool``, *optional*): + N/A + + edit_profile_photo (``bool``, *optional*): + N/A + + edit_username (``bool``, *optional*): + N/A + + view_gifts (``bool``, *optional*): + N/A + + sell_gifts (``bool``, *optional*): + N/A + + change_gift_settings (``bool``, *optional*): + N/A + + transfer_and_upgrade_gifts (``bool``, *optional*): + N/A + + transfer_stars (``bool``, *optional*): + N/A + + manage_stories (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["reply", "read_messages", "delete_sent_messages", "delete_received_messages", "edit_name", "edit_bio", "edit_profile_photo", "edit_username", "view_gifts", "sell_gifts", "change_gift_settings", "transfer_and_upgrade_gifts", "transfer_stars", "manage_stories"] + + ID = 0xa0624cf7 + QUALNAME = "types.BusinessBotRights" + + def __init__(self, *, reply: Optional[bool] = None, read_messages: Optional[bool] = None, delete_sent_messages: Optional[bool] = None, delete_received_messages: Optional[bool] = None, edit_name: Optional[bool] = None, edit_bio: Optional[bool] = None, edit_profile_photo: Optional[bool] = None, edit_username: Optional[bool] = None, view_gifts: Optional[bool] = None, sell_gifts: Optional[bool] = None, change_gift_settings: Optional[bool] = None, transfer_and_upgrade_gifts: Optional[bool] = None, transfer_stars: Optional[bool] = None, manage_stories: Optional[bool] = None) -> None: + self.reply = reply # flags.0?true + self.read_messages = read_messages # flags.1?true + self.delete_sent_messages = delete_sent_messages # flags.2?true + self.delete_received_messages = delete_received_messages # flags.3?true + self.edit_name = edit_name # flags.4?true + self.edit_bio = edit_bio # flags.5?true + self.edit_profile_photo = edit_profile_photo # flags.6?true + self.edit_username = edit_username # flags.7?true + self.view_gifts = view_gifts # flags.8?true + self.sell_gifts = sell_gifts # flags.9?true + self.change_gift_settings = change_gift_settings # flags.10?true + self.transfer_and_upgrade_gifts = transfer_and_upgrade_gifts # flags.11?true + self.transfer_stars = transfer_stars # flags.12?true + self.manage_stories = manage_stories # flags.13?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessBotRights": + + flags = Int.read(b) + + reply = True if flags & (1 << 0) else False + read_messages = True if flags & (1 << 1) else False + delete_sent_messages = True if flags & (1 << 2) else False + delete_received_messages = True if flags & (1 << 3) else False + edit_name = True if flags & (1 << 4) else False + edit_bio = True if flags & (1 << 5) else False + edit_profile_photo = True if flags & (1 << 6) else False + edit_username = True if flags & (1 << 7) else False + view_gifts = True if flags & (1 << 8) else False + sell_gifts = True if flags & (1 << 9) else False + change_gift_settings = True if flags & (1 << 10) else False + transfer_and_upgrade_gifts = True if flags & (1 << 11) else False + transfer_stars = True if flags & (1 << 12) else False + manage_stories = True if flags & (1 << 13) else False + return BusinessBotRights(reply=reply, read_messages=read_messages, delete_sent_messages=delete_sent_messages, delete_received_messages=delete_received_messages, edit_name=edit_name, edit_bio=edit_bio, edit_profile_photo=edit_profile_photo, edit_username=edit_username, view_gifts=view_gifts, sell_gifts=sell_gifts, change_gift_settings=change_gift_settings, transfer_and_upgrade_gifts=transfer_and_upgrade_gifts, transfer_stars=transfer_stars, manage_stories=manage_stories) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.reply else 0 + flags |= (1 << 1) if self.read_messages else 0 + flags |= (1 << 2) if self.delete_sent_messages else 0 + flags |= (1 << 3) if self.delete_received_messages else 0 + flags |= (1 << 4) if self.edit_name else 0 + flags |= (1 << 5) if self.edit_bio else 0 + flags |= (1 << 6) if self.edit_profile_photo else 0 + flags |= (1 << 7) if self.edit_username else 0 + flags |= (1 << 8) if self.view_gifts else 0 + flags |= (1 << 9) if self.sell_gifts else 0 + flags |= (1 << 10) if self.change_gift_settings else 0 + flags |= (1 << 11) if self.transfer_and_upgrade_gifts else 0 + flags |= (1 << 12) if self.transfer_stars else 0 + flags |= (1 << 13) if self.manage_stories else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_chat_link.py b/pyrogram/raw/types/business_chat_link.py new file mode 100644 index 00000000..f6e79afb --- /dev/null +++ b/pyrogram/raw/types/business_chat_link.py @@ -0,0 +1,101 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessChatLink(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessChatLink`. + + Details: + - Layer: ``224`` + - ID: ``B4AE666F`` + + Parameters: + link (``str``): + + + message (``str``): + + + views (``int`` ``32-bit``): + + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + title (``str``, *optional*): + + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.CreateBusinessChatLink + account.EditBusinessChatLink + """ + + __slots__: List[str] = ["link", "message", "views", "entities", "title"] + + ID = 0xb4ae666f + QUALNAME = "types.BusinessChatLink" + + def __init__(self, *, link: str, message: str, views: int, entities: Optional[List["raw.base.MessageEntity"]] = None, title: Optional[str] = None) -> None: + self.link = link # string + self.message = message # string + self.views = views # int + self.entities = entities # flags.0?Vector + self.title = title # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessChatLink": + + flags = Int.read(b) + + link = String.read(b) + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 0) else [] + + title = String.read(b) if flags & (1 << 1) else None + views = Int.read(b) + + return BusinessChatLink(link=link, message=message, views=views, entities=entities, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.entities else 0 + flags |= (1 << 1) if self.title is not None else 0 + b.write(Int(flags)) + + b.write(String(self.link)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.title is not None: + b.write(String(self.title)) + + b.write(Int(self.views)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_greeting_message.py b/pyrogram/raw/types/business_greeting_message.py new file mode 100644 index 00000000..0f7af260 --- /dev/null +++ b/pyrogram/raw/types/business_greeting_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessGreetingMessage(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessGreetingMessage`. + + Details: + - Layer: ``224`` + - ID: ``E519ABAB`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + recipients (:obj:`BusinessRecipients `): + + + no_activity_days (``int`` ``32-bit``): + + + """ + + __slots__: List[str] = ["shortcut_id", "recipients", "no_activity_days"] + + ID = 0xe519abab + QUALNAME = "types.BusinessGreetingMessage" + + def __init__(self, *, shortcut_id: int, recipients: "raw.base.BusinessRecipients", no_activity_days: int) -> None: + self.shortcut_id = shortcut_id # int + self.recipients = recipients # BusinessRecipients + self.no_activity_days = no_activity_days # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessGreetingMessage": + # No flags + + shortcut_id = Int.read(b) + + recipients = TLObject.read(b) + + no_activity_days = Int.read(b) + + return BusinessGreetingMessage(shortcut_id=shortcut_id, recipients=recipients, no_activity_days=no_activity_days) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.shortcut_id)) + + b.write(self.recipients.write()) + + b.write(Int(self.no_activity_days)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_intro.py b/pyrogram/raw/types/business_intro.py new file mode 100644 index 00000000..1e94336a --- /dev/null +++ b/pyrogram/raw/types/business_intro.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessIntro(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessIntro`. + + Details: + - Layer: ``224`` + - ID: ``5A0A066D`` + + Parameters: + title (``str``): + + + description (``str``): + + + sticker (:obj:`Document `, *optional*): + + + """ + + __slots__: List[str] = ["title", "description", "sticker"] + + ID = 0x5a0a066d + QUALNAME = "types.BusinessIntro" + + def __init__(self, *, title: str, description: str, sticker: "raw.base.Document" = None) -> None: + self.title = title # string + self.description = description # string + self.sticker = sticker # flags.0?Document + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessIntro": + + flags = Int.read(b) + + title = String.read(b) + + description = String.read(b) + + sticker = TLObject.read(b) if flags & (1 << 0) else None + + return BusinessIntro(title=title, description=description, sticker=sticker) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.sticker is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + if self.sticker is not None: + b.write(self.sticker.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_location.py b/pyrogram/raw/types/business_location.py new file mode 100644 index 00000000..342b5241 --- /dev/null +++ b/pyrogram/raw/types/business_location.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessLocation(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessLocation`. + + Details: + - Layer: ``224`` + - ID: ``AC5C1AF7`` + + Parameters: + address (``str``): + + + geo_point (:obj:`GeoPoint `, *optional*): + + + """ + + __slots__: List[str] = ["address", "geo_point"] + + ID = 0xac5c1af7 + QUALNAME = "types.BusinessLocation" + + def __init__(self, *, address: str, geo_point: "raw.base.GeoPoint" = None) -> None: + self.address = address # string + self.geo_point = geo_point # flags.0?GeoPoint + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessLocation": + + flags = Int.read(b) + + geo_point = TLObject.read(b) if flags & (1 << 0) else None + + address = String.read(b) + + return BusinessLocation(address=address, geo_point=geo_point) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.geo_point is not None else 0 + b.write(Int(flags)) + + if self.geo_point is not None: + b.write(self.geo_point.write()) + + b.write(String(self.address)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_recipients.py b/pyrogram/raw/types/business_recipients.py new file mode 100644 index 00000000..8954bdba --- /dev/null +++ b/pyrogram/raw/types/business_recipients.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessRecipients(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessRecipients`. + + Details: + - Layer: ``224`` + - ID: ``21108FF7`` + + Parameters: + existing_chats (``bool``, *optional*): + + + new_chats (``bool``, *optional*): + + + contacts (``bool``, *optional*): + + + non_contacts (``bool``, *optional*): + + + exclude_selected (``bool``, *optional*): + + + users (List of ``int`` ``64-bit``, *optional*): + + + """ + + __slots__: List[str] = ["existing_chats", "new_chats", "contacts", "non_contacts", "exclude_selected", "users"] + + ID = 0x21108ff7 + QUALNAME = "types.BusinessRecipients" + + def __init__(self, *, existing_chats: Optional[bool] = None, new_chats: Optional[bool] = None, contacts: Optional[bool] = None, non_contacts: Optional[bool] = None, exclude_selected: Optional[bool] = None, users: Optional[List[int]] = None) -> None: + self.existing_chats = existing_chats # flags.0?true + self.new_chats = new_chats # flags.1?true + self.contacts = contacts # flags.2?true + self.non_contacts = non_contacts # flags.3?true + self.exclude_selected = exclude_selected # flags.5?true + self.users = users # flags.4?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessRecipients": + + flags = Int.read(b) + + existing_chats = True if flags & (1 << 0) else False + new_chats = True if flags & (1 << 1) else False + contacts = True if flags & (1 << 2) else False + non_contacts = True if flags & (1 << 3) else False + exclude_selected = True if flags & (1 << 5) else False + users = TLObject.read(b, Long) if flags & (1 << 4) else [] + + return BusinessRecipients(existing_chats=existing_chats, new_chats=new_chats, contacts=contacts, non_contacts=non_contacts, exclude_selected=exclude_selected, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.existing_chats else 0 + flags |= (1 << 1) if self.new_chats else 0 + flags |= (1 << 2) if self.contacts else 0 + flags |= (1 << 3) if self.non_contacts else 0 + flags |= (1 << 5) if self.exclude_selected else 0 + flags |= (1 << 4) if self.users else 0 + b.write(Int(flags)) + + if self.users is not None: + b.write(Vector(self.users, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_weekly_open.py b/pyrogram/raw/types/business_weekly_open.py new file mode 100644 index 00000000..e32a1b21 --- /dev/null +++ b/pyrogram/raw/types/business_weekly_open.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessWeeklyOpen(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessWeeklyOpen`. + + Details: + - Layer: ``224`` + - ID: ``120B1AB9`` + + Parameters: + start_minute (``int`` ``32-bit``): + + + end_minute (``int`` ``32-bit``): + + + """ + + __slots__: List[str] = ["start_minute", "end_minute"] + + ID = 0x120b1ab9 + QUALNAME = "types.BusinessWeeklyOpen" + + def __init__(self, *, start_minute: int, end_minute: int) -> None: + self.start_minute = start_minute # int + self.end_minute = end_minute # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessWeeklyOpen": + # No flags + + start_minute = Int.read(b) + + end_minute = Int.read(b) + + return BusinessWeeklyOpen(start_minute=start_minute, end_minute=end_minute) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.start_minute)) + + b.write(Int(self.end_minute)) + + return b.getvalue() diff --git a/pyrogram/raw/types/business_work_hours.py b/pyrogram/raw/types/business_work_hours.py new file mode 100644 index 00000000..778ceb46 --- /dev/null +++ b/pyrogram/raw/types/business_work_hours.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BusinessWorkHours(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.BusinessWorkHours`. + + Details: + - Layer: ``224`` + - ID: ``8C92B098`` + + Parameters: + timezone_id (``str``): + + + weekly_open (List of :obj:`BusinessWeeklyOpen `): + + + open_now (``bool``, *optional*): + + + """ + + __slots__: List[str] = ["timezone_id", "weekly_open", "open_now"] + + ID = 0x8c92b098 + QUALNAME = "types.BusinessWorkHours" + + def __init__(self, *, timezone_id: str, weekly_open: List["raw.base.BusinessWeeklyOpen"], open_now: Optional[bool] = None) -> None: + self.timezone_id = timezone_id # string + self.weekly_open = weekly_open # Vector + self.open_now = open_now # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BusinessWorkHours": + + flags = Int.read(b) + + open_now = True if flags & (1 << 0) else False + timezone_id = String.read(b) + + weekly_open = TLObject.read(b) + + return BusinessWorkHours(timezone_id=timezone_id, weekly_open=weekly_open, open_now=open_now) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.open_now else 0 + b.write(Int(flags)) + + b.write(String(self.timezone_id)) + + b.write(Vector(self.weekly_open)) + + return b.getvalue() diff --git a/pyrogram/raw/types/cdn_config.py b/pyrogram/raw/types/cdn_config.py new file mode 100644 index 00000000..f98fda59 --- /dev/null +++ b/pyrogram/raw/types/cdn_config.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CdnConfig(TLObject): # type: ignore + """Configuration for CDN file downloads. + + Constructor of :obj:`~pyrogram.raw.base.CdnConfig`. + + Details: + - Layer: ``224`` + - ID: ``5725E40A`` + + Parameters: + public_keys (List of :obj:`CdnPublicKey `): + Vector of public keys to use only during handshakes to CDN DCs. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetCdnConfig + """ + + __slots__: List[str] = ["public_keys"] + + ID = 0x5725e40a + QUALNAME = "types.CdnConfig" + + def __init__(self, *, public_keys: List["raw.base.CdnPublicKey"]) -> None: + self.public_keys = public_keys # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CdnConfig": + # No flags + + public_keys = TLObject.read(b) + + return CdnConfig(public_keys=public_keys) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.public_keys)) + + return b.getvalue() diff --git a/pyrogram/raw/types/cdn_public_key.py b/pyrogram/raw/types/cdn_public_key.py new file mode 100644 index 00000000..f5363e2a --- /dev/null +++ b/pyrogram/raw/types/cdn_public_key.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CdnPublicKey(TLObject): # type: ignore + """Public key to use only during handshakes to CDN DCs. + + Constructor of :obj:`~pyrogram.raw.base.CdnPublicKey`. + + Details: + - Layer: ``224`` + - ID: ``C982EABA`` + + Parameters: + dc_id (``int`` ``32-bit``): + CDN DC ID + + public_key (``str``): + RSA public key + + """ + + __slots__: List[str] = ["dc_id", "public_key"] + + ID = 0xc982eaba + QUALNAME = "types.CdnPublicKey" + + def __init__(self, *, dc_id: int, public_key: str) -> None: + self.dc_id = dc_id # int + self.public_key = public_key # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CdnPublicKey": + # No flags + + dc_id = Int.read(b) + + public_key = String.read(b) + + return CdnPublicKey(dc_id=dc_id, public_key=public_key) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.dc_id)) + + b.write(String(self.public_key)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel.py b/pyrogram/raw/types/channel.py new file mode 100644 index 00000000..5ce61041 --- /dev/null +++ b/pyrogram/raw/types/channel.py @@ -0,0 +1,414 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Channel(TLObject): # type: ignore + """Channel/supergroup info + + Constructor of :obj:`~pyrogram.raw.base.Chat`. + + Details: + - Layer: ``224`` + - ID: ``1C32B11C`` + + Parameters: + id (``int`` ``64-bit``): + ID of the channel + + title (``str``): + Title + + photo (:obj:`ChatPhoto `): + Profile photo + + date (``int`` ``32-bit``): + Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date + + creator (``bool``, *optional*): + Whether the current user is the creator of this channel + + left (``bool``, *optional*): + Whether the current user has left or is not a member of this channel + + broadcast (``bool``, *optional*): + Is this a channel? + + verified (``bool``, *optional*): + Is this channel verified by telegram? + + megagroup (``bool``, *optional*): + Is this a supergroup? + + restricted (``bool``, *optional*): + Whether viewing/writing in this channel for a reason (see restriction_reason + + signatures (``bool``, *optional*): + Whether signatures are enabled (channels) + + min (``bool``, *optional*): + See min + + scam (``bool``, *optional*): + This channel/supergroup is probably a scam + + has_link (``bool``, *optional*): + Whether this channel has a private join link + + has_geo (``bool``, *optional*): + Whether this chanel has a geoposition + + slowmode_enabled (``bool``, *optional*): + Whether slow mode is enabled for groups to prevent flood in chat + + call_active (``bool``, *optional*): + Whether a group call or livestream is currently active + + call_not_empty (``bool``, *optional*): + Whether there's anyone in the group call or livestream + + fake (``bool``, *optional*): + If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it. + + gigagroup (``bool``, *optional*): + Whether this supergroup is a gigagroup + + noforwards (``bool``, *optional*): + Whether this channel or group is protected, thus does not allow forwarding messages from it + + join_to_send (``bool``, *optional*): + Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend + + join_request (``bool``, *optional*): + Whether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSend + + forum (``bool``, *optional*): + Whether this supergroup is a forum + + stories_hidden (``bool``, *optional*): + Whether we have hidden all stories posted by this channel ». + + stories_hidden_min (``bool``, *optional*): + If set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using channels.getChannels to obtain the latest value of the stories_hidden flag. + + stories_unavailable (``bool``, *optional*): + No stories from the channel are visible. + + signature_profiles (``bool``, *optional*): + N/A + + autotranslation (``bool``, *optional*): + N/A + + broadcast_messages_allowed (``bool``, *optional*): + N/A + + monoforum (``bool``, *optional*): + N/A + + forum_tabs (``bool``, *optional*): + N/A + + access_hash (``int`` ``64-bit``, *optional*): + Access hash + + username (``str``, *optional*): + Username + + restriction_reason (List of :obj:`RestrictionReason `, *optional*): + Contains the reason why access to this channel must be restricted. + + admin_rights (:obj:`ChatAdminRights `, *optional*): + Admin rights of the user in this channel (see rights) + + banned_rights (:obj:`ChatBannedRights `, *optional*): + Banned rights of the user in this channel (see rights) + + default_banned_rights (:obj:`ChatBannedRights `, *optional*): + Default chat rights (see rights) + + participants_count (``int`` ``32-bit``, *optional*): + Participant count + + usernames (List of :obj:`Username `, *optional*): + Additional usernames + + stories_max_id (:obj:`RecentStory `, *optional*): + ID of the maximum read story. + + color (:obj:`PeerColor `, *optional*): + The channel's accent color. + + profile_color (:obj:`PeerColor `, *optional*): + The channel's profile color. + + emoji_status (:obj:`EmojiStatus `, *optional*): + Emoji status + + level (``int`` ``32-bit``, *optional*): + Boost level + + subscription_until_date (``int`` ``32-bit``, *optional*): + N/A + + bot_verification_icon (``int`` ``64-bit``, *optional*): + N/A + + send_paid_messages_stars (``int`` ``64-bit``, *optional*): + N/A + + linked_monoforum_id (``int`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "title", "photo", "date", "creator", "left", "broadcast", "verified", "megagroup", "restricted", "signatures", "min", "scam", "has_link", "has_geo", "slowmode_enabled", "call_active", "call_not_empty", "fake", "gigagroup", "noforwards", "join_to_send", "join_request", "forum", "stories_hidden", "stories_hidden_min", "stories_unavailable", "signature_profiles", "autotranslation", "broadcast_messages_allowed", "monoforum", "forum_tabs", "access_hash", "username", "restriction_reason", "admin_rights", "banned_rights", "default_banned_rights", "participants_count", "usernames", "stories_max_id", "color", "profile_color", "emoji_status", "level", "subscription_until_date", "bot_verification_icon", "send_paid_messages_stars", "linked_monoforum_id"] + + ID = 0x1c32b11c + QUALNAME = "types.Channel" + + def __init__(self, *, id: int, title: str, photo: "raw.base.ChatPhoto", date: int, creator: Optional[bool] = None, left: Optional[bool] = None, broadcast: Optional[bool] = None, verified: Optional[bool] = None, megagroup: Optional[bool] = None, restricted: Optional[bool] = None, signatures: Optional[bool] = None, min: Optional[bool] = None, scam: Optional[bool] = None, has_link: Optional[bool] = None, has_geo: Optional[bool] = None, slowmode_enabled: Optional[bool] = None, call_active: Optional[bool] = None, call_not_empty: Optional[bool] = None, fake: Optional[bool] = None, gigagroup: Optional[bool] = None, noforwards: Optional[bool] = None, join_to_send: Optional[bool] = None, join_request: Optional[bool] = None, forum: Optional[bool] = None, stories_hidden: Optional[bool] = None, stories_hidden_min: Optional[bool] = None, stories_unavailable: Optional[bool] = None, signature_profiles: Optional[bool] = None, autotranslation: Optional[bool] = None, broadcast_messages_allowed: Optional[bool] = None, monoforum: Optional[bool] = None, forum_tabs: Optional[bool] = None, access_hash: Optional[int] = None, username: Optional[str] = None, restriction_reason: Optional[List["raw.base.RestrictionReason"]] = None, admin_rights: "raw.base.ChatAdminRights" = None, banned_rights: "raw.base.ChatBannedRights" = None, default_banned_rights: "raw.base.ChatBannedRights" = None, participants_count: Optional[int] = None, usernames: Optional[List["raw.base.Username"]] = None, stories_max_id: "raw.base.RecentStory" = None, color: "raw.base.PeerColor" = None, profile_color: "raw.base.PeerColor" = None, emoji_status: "raw.base.EmojiStatus" = None, level: Optional[int] = None, subscription_until_date: Optional[int] = None, bot_verification_icon: Optional[int] = None, send_paid_messages_stars: Optional[int] = None, linked_monoforum_id: Optional[int] = None) -> None: + self.id = id # long + self.title = title # string + self.photo = photo # ChatPhoto + self.date = date # int + self.creator = creator # flags.0?true + self.left = left # flags.2?true + self.broadcast = broadcast # flags.5?true + self.verified = verified # flags.7?true + self.megagroup = megagroup # flags.8?true + self.restricted = restricted # flags.9?true + self.signatures = signatures # flags.11?true + self.min = min # flags.12?true + self.scam = scam # flags.19?true + self.has_link = has_link # flags.20?true + self.has_geo = has_geo # flags.21?true + self.slowmode_enabled = slowmode_enabled # flags.22?true + self.call_active = call_active # flags.23?true + self.call_not_empty = call_not_empty # flags.24?true + self.fake = fake # flags.25?true + self.gigagroup = gigagroup # flags.26?true + self.noforwards = noforwards # flags.27?true + self.join_to_send = join_to_send # flags.28?true + self.join_request = join_request # flags.29?true + self.forum = forum # flags.30?true + self.stories_hidden = stories_hidden # flags2.1?true + self.stories_hidden_min = stories_hidden_min # flags2.2?true + self.stories_unavailable = stories_unavailable # flags2.3?true + self.signature_profiles = signature_profiles # flags2.12?true + self.autotranslation = autotranslation # flags2.15?true + self.broadcast_messages_allowed = broadcast_messages_allowed # flags2.16?true + self.monoforum = monoforum # flags2.17?true + self.forum_tabs = forum_tabs # flags2.19?true + self.access_hash = access_hash # flags.13?long + self.username = username # flags.6?string + self.restriction_reason = restriction_reason # flags.9?Vector + self.admin_rights = admin_rights # flags.14?ChatAdminRights + self.banned_rights = banned_rights # flags.15?ChatBannedRights + self.default_banned_rights = default_banned_rights # flags.18?ChatBannedRights + self.participants_count = participants_count # flags.17?int + self.usernames = usernames # flags2.0?Vector + self.stories_max_id = stories_max_id # flags2.4?RecentStory + self.color = color # flags2.7?PeerColor + self.profile_color = profile_color # flags2.8?PeerColor + self.emoji_status = emoji_status # flags2.9?EmojiStatus + self.level = level # flags2.10?int + self.subscription_until_date = subscription_until_date # flags2.11?int + self.bot_verification_icon = bot_verification_icon # flags2.13?long + self.send_paid_messages_stars = send_paid_messages_stars # flags2.14?long + self.linked_monoforum_id = linked_monoforum_id # flags2.18?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Channel": + + flags = Int.read(b) + + creator = True if flags & (1 << 0) else False + left = True if flags & (1 << 2) else False + broadcast = True if flags & (1 << 5) else False + verified = True if flags & (1 << 7) else False + megagroup = True if flags & (1 << 8) else False + restricted = True if flags & (1 << 9) else False + signatures = True if flags & (1 << 11) else False + min = True if flags & (1 << 12) else False + scam = True if flags & (1 << 19) else False + has_link = True if flags & (1 << 20) else False + has_geo = True if flags & (1 << 21) else False + slowmode_enabled = True if flags & (1 << 22) else False + call_active = True if flags & (1 << 23) else False + call_not_empty = True if flags & (1 << 24) else False + fake = True if flags & (1 << 25) else False + gigagroup = True if flags & (1 << 26) else False + noforwards = True if flags & (1 << 27) else False + join_to_send = True if flags & (1 << 28) else False + join_request = True if flags & (1 << 29) else False + forum = True if flags & (1 << 30) else False + flags2 = Int.read(b) + + stories_hidden = True if flags2 & (1 << 1) else False + stories_hidden_min = True if flags2 & (1 << 2) else False + stories_unavailable = True if flags2 & (1 << 3) else False + signature_profiles = True if flags2 & (1 << 12) else False + autotranslation = True if flags2 & (1 << 15) else False + broadcast_messages_allowed = True if flags2 & (1 << 16) else False + monoforum = True if flags2 & (1 << 17) else False + forum_tabs = True if flags2 & (1 << 19) else False + id = Long.read(b) + + access_hash = Long.read(b) if flags & (1 << 13) else None + title = String.read(b) + + username = String.read(b) if flags & (1 << 6) else None + photo = TLObject.read(b) + + date = Int.read(b) + + restriction_reason = TLObject.read(b) if flags & (1 << 9) else [] + + admin_rights = TLObject.read(b) if flags & (1 << 14) else None + + banned_rights = TLObject.read(b) if flags & (1 << 15) else None + + default_banned_rights = TLObject.read(b) if flags & (1 << 18) else None + + participants_count = Int.read(b) if flags & (1 << 17) else None + usernames = TLObject.read(b) if flags2 & (1 << 0) else [] + + stories_max_id = TLObject.read(b) if flags2 & (1 << 4) else None + + color = TLObject.read(b) if flags2 & (1 << 7) else None + + profile_color = TLObject.read(b) if flags2 & (1 << 8) else None + + emoji_status = TLObject.read(b) if flags2 & (1 << 9) else None + + level = Int.read(b) if flags2 & (1 << 10) else None + subscription_until_date = Int.read(b) if flags2 & (1 << 11) else None + bot_verification_icon = Long.read(b) if flags2 & (1 << 13) else None + send_paid_messages_stars = Long.read(b) if flags2 & (1 << 14) else None + linked_monoforum_id = Long.read(b) if flags2 & (1 << 18) else None + return Channel(id=id, title=title, photo=photo, date=date, creator=creator, left=left, broadcast=broadcast, verified=verified, megagroup=megagroup, restricted=restricted, signatures=signatures, min=min, scam=scam, has_link=has_link, has_geo=has_geo, slowmode_enabled=slowmode_enabled, call_active=call_active, call_not_empty=call_not_empty, fake=fake, gigagroup=gigagroup, noforwards=noforwards, join_to_send=join_to_send, join_request=join_request, forum=forum, stories_hidden=stories_hidden, stories_hidden_min=stories_hidden_min, stories_unavailable=stories_unavailable, signature_profiles=signature_profiles, autotranslation=autotranslation, broadcast_messages_allowed=broadcast_messages_allowed, monoforum=monoforum, forum_tabs=forum_tabs, access_hash=access_hash, username=username, restriction_reason=restriction_reason, admin_rights=admin_rights, banned_rights=banned_rights, default_banned_rights=default_banned_rights, participants_count=participants_count, usernames=usernames, stories_max_id=stories_max_id, color=color, profile_color=profile_color, emoji_status=emoji_status, level=level, subscription_until_date=subscription_until_date, bot_verification_icon=bot_verification_icon, send_paid_messages_stars=send_paid_messages_stars, linked_monoforum_id=linked_monoforum_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.creator else 0 + flags |= (1 << 2) if self.left else 0 + flags |= (1 << 5) if self.broadcast else 0 + flags |= (1 << 7) if self.verified else 0 + flags |= (1 << 8) if self.megagroup else 0 + flags |= (1 << 9) if self.restricted else 0 + flags |= (1 << 11) if self.signatures else 0 + flags |= (1 << 12) if self.min else 0 + flags |= (1 << 19) if self.scam else 0 + flags |= (1 << 20) if self.has_link else 0 + flags |= (1 << 21) if self.has_geo else 0 + flags |= (1 << 22) if self.slowmode_enabled else 0 + flags |= (1 << 23) if self.call_active else 0 + flags |= (1 << 24) if self.call_not_empty else 0 + flags |= (1 << 25) if self.fake else 0 + flags |= (1 << 26) if self.gigagroup else 0 + flags |= (1 << 27) if self.noforwards else 0 + flags |= (1 << 28) if self.join_to_send else 0 + flags |= (1 << 29) if self.join_request else 0 + flags |= (1 << 30) if self.forum else 0 + flags |= (1 << 13) if self.access_hash is not None else 0 + flags |= (1 << 6) if self.username is not None else 0 + flags |= (1 << 9) if self.restriction_reason else 0 + flags |= (1 << 14) if self.admin_rights is not None else 0 + flags |= (1 << 15) if self.banned_rights is not None else 0 + flags |= (1 << 18) if self.default_banned_rights is not None else 0 + flags |= (1 << 17) if self.participants_count is not None else 0 + b.write(Int(flags)) + flags2 = 0 + flags2 |= (1 << 1) if self.stories_hidden else 0 + flags2 |= (1 << 2) if self.stories_hidden_min else 0 + flags2 |= (1 << 3) if self.stories_unavailable else 0 + flags2 |= (1 << 12) if self.signature_profiles else 0 + flags2 |= (1 << 15) if self.autotranslation else 0 + flags2 |= (1 << 16) if self.broadcast_messages_allowed else 0 + flags2 |= (1 << 17) if self.monoforum else 0 + flags2 |= (1 << 19) if self.forum_tabs else 0 + flags2 |= (1 << 0) if self.usernames else 0 + flags2 |= (1 << 4) if self.stories_max_id is not None else 0 + flags2 |= (1 << 7) if self.color is not None else 0 + flags2 |= (1 << 8) if self.profile_color is not None else 0 + flags2 |= (1 << 9) if self.emoji_status is not None else 0 + flags2 |= (1 << 10) if self.level is not None else 0 + flags2 |= (1 << 11) if self.subscription_until_date is not None else 0 + flags2 |= (1 << 13) if self.bot_verification_icon is not None else 0 + flags2 |= (1 << 14) if self.send_paid_messages_stars is not None else 0 + flags2 |= (1 << 18) if self.linked_monoforum_id is not None else 0 + b.write(Int(flags2)) + + b.write(Long(self.id)) + + if self.access_hash is not None: + b.write(Long(self.access_hash)) + + b.write(String(self.title)) + + if self.username is not None: + b.write(String(self.username)) + + b.write(self.photo.write()) + + b.write(Int(self.date)) + + if self.restriction_reason is not None: + b.write(Vector(self.restriction_reason)) + + if self.admin_rights is not None: + b.write(self.admin_rights.write()) + + if self.banned_rights is not None: + b.write(self.banned_rights.write()) + + if self.default_banned_rights is not None: + b.write(self.default_banned_rights.write()) + + if self.participants_count is not None: + b.write(Int(self.participants_count)) + + if self.usernames is not None: + b.write(Vector(self.usernames)) + + if self.stories_max_id is not None: + b.write(self.stories_max_id.write()) + + if self.color is not None: + b.write(self.color.write()) + + if self.profile_color is not None: + b.write(self.profile_color.write()) + + if self.emoji_status is not None: + b.write(self.emoji_status.write()) + + if self.level is not None: + b.write(Int(self.level)) + + if self.subscription_until_date is not None: + b.write(Int(self.subscription_until_date)) + + if self.bot_verification_icon is not None: + b.write(Long(self.bot_verification_icon)) + + if self.send_paid_messages_stars is not None: + b.write(Long(self.send_paid_messages_stars)) + + if self.linked_monoforum_id is not None: + b.write(Long(self.linked_monoforum_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event.py b/pyrogram/raw/types/channel_admin_log_event.py new file mode 100644 index 00000000..d6b13cb1 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEvent(TLObject): # type: ignore + """Admin log event + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEvent`. + + Details: + - Layer: ``224`` + - ID: ``1FAD68CD`` + + Parameters: + id (``int`` ``64-bit``): + Event ID + + date (``int`` ``32-bit``): + Date + + user_id (``int`` ``64-bit``): + User ID + + action (:obj:`ChannelAdminLogEventAction `): + Action + + """ + + __slots__: List[str] = ["id", "date", "user_id", "action"] + + ID = 0x1fad68cd + QUALNAME = "types.ChannelAdminLogEvent" + + def __init__(self, *, id: int, date: int, user_id: int, action: "raw.base.ChannelAdminLogEventAction") -> None: + self.id = id # long + self.date = date # int + self.user_id = user_id # long + self.action = action # ChannelAdminLogEventAction + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEvent": + # No flags + + id = Long.read(b) + + date = Int.read(b) + + user_id = Long.read(b) + + action = TLObject.read(b) + + return ChannelAdminLogEvent(id=id, date=date, user_id=user_id, action=action) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Int(self.date)) + + b.write(Long(self.user_id)) + + b.write(self.action.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_about.py b/pyrogram/raw/types/channel_admin_log_event_action_change_about.py new file mode 100644 index 00000000..bb7f7669 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_about.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeAbout(TLObject): # type: ignore + """The description was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``55188A2E`` + + Parameters: + prev_value (``str``): + Previous description + + new_value (``str``): + New description + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x55188a2e + QUALNAME = "types.ChannelAdminLogEventActionChangeAbout" + + def __init__(self, *, prev_value: str, new_value: str) -> None: + self.prev_value = prev_value # string + self.new_value = new_value # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeAbout": + # No flags + + prev_value = String.read(b) + + new_value = String.read(b) + + return ChannelAdminLogEventActionChangeAbout(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.prev_value)) + + b.write(String(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_available_reactions.py b/pyrogram/raw/types/channel_admin_log_event_action_change_available_reactions.py new file mode 100644 index 00000000..256626fc --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_available_reactions.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeAvailableReactions(TLObject): # type: ignore + """The set of allowed message reactions » for this channel has changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``BE4E0EF8`` + + Parameters: + prev_value (:obj:`ChatReactions `): + Previously allowed reaction emojis + + new_value (:obj:`ChatReactions `): + New allowed reaction emojis + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0xbe4e0ef8 + QUALNAME = "types.ChannelAdminLogEventActionChangeAvailableReactions" + + def __init__(self, *, prev_value: "raw.base.ChatReactions", new_value: "raw.base.ChatReactions") -> None: + self.prev_value = prev_value # ChatReactions + self.new_value = new_value # ChatReactions + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeAvailableReactions": + # No flags + + prev_value = TLObject.read(b) + + new_value = TLObject.read(b) + + return ChannelAdminLogEventActionChangeAvailableReactions(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_value.write()) + + b.write(self.new_value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_emoji_status.py b/pyrogram/raw/types/channel_admin_log_event_action_change_emoji_status.py new file mode 100644 index 00000000..31da1cc6 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_emoji_status.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeEmojiStatus(TLObject): # type: ignore + """The emoji status was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``3EA9FEB1`` + + Parameters: + prev_value (:obj:`EmojiStatus `): + Previous emoji status + + new_value (:obj:`EmojiStatus `): + New emoji status + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x3ea9feb1 + QUALNAME = "types.ChannelAdminLogEventActionChangeEmojiStatus" + + def __init__(self, *, prev_value: "raw.base.EmojiStatus", new_value: "raw.base.EmojiStatus") -> None: + self.prev_value = prev_value # EmojiStatus + self.new_value = new_value # EmojiStatus + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeEmojiStatus": + # No flags + + prev_value = TLObject.read(b) + + new_value = TLObject.read(b) + + return ChannelAdminLogEventActionChangeEmojiStatus(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_value.write()) + + b.write(self.new_value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_emoji_sticker_set.py b/pyrogram/raw/types/channel_admin_log_event_action_change_emoji_sticker_set.py new file mode 100644 index 00000000..ecf7ca73 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_emoji_sticker_set.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeEmojiStickerSet(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``46D840AB`` + + Parameters: + prev_stickerset (:obj:`InputStickerSet `): + + + new_stickerset (:obj:`InputStickerSet `): + + + """ + + __slots__: List[str] = ["prev_stickerset", "new_stickerset"] + + ID = 0x46d840ab + QUALNAME = "types.ChannelAdminLogEventActionChangeEmojiStickerSet" + + def __init__(self, *, prev_stickerset: "raw.base.InputStickerSet", new_stickerset: "raw.base.InputStickerSet") -> None: + self.prev_stickerset = prev_stickerset # InputStickerSet + self.new_stickerset = new_stickerset # InputStickerSet + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeEmojiStickerSet": + # No flags + + prev_stickerset = TLObject.read(b) + + new_stickerset = TLObject.read(b) + + return ChannelAdminLogEventActionChangeEmojiStickerSet(prev_stickerset=prev_stickerset, new_stickerset=new_stickerset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_stickerset.write()) + + b.write(self.new_stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_history_ttl.py b/pyrogram/raw/types/channel_admin_log_event_action_change_history_ttl.py new file mode 100644 index 00000000..66884850 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_history_ttl.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeHistoryTTL(TLObject): # type: ignore + """The Time-To-Live of messages in this chat was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``6E941A38`` + + Parameters: + prev_value (``int`` ``32-bit``): + Previous value + + new_value (``int`` ``32-bit``): + New value + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x6e941a38 + QUALNAME = "types.ChannelAdminLogEventActionChangeHistoryTTL" + + def __init__(self, *, prev_value: int, new_value: int) -> None: + self.prev_value = prev_value # int + self.new_value = new_value # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeHistoryTTL": + # No flags + + prev_value = Int.read(b) + + new_value = Int.read(b) + + return ChannelAdminLogEventActionChangeHistoryTTL(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.prev_value)) + + b.write(Int(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_linked_chat.py b/pyrogram/raw/types/channel_admin_log_event_action_change_linked_chat.py new file mode 100644 index 00000000..796a9dc0 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_linked_chat.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeLinkedChat(TLObject): # type: ignore + """The linked chat was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``50C7AC8`` + + Parameters: + prev_value (``int`` ``64-bit``): + Previous linked chat + + new_value (``int`` ``64-bit``): + New linked chat + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x50c7ac8 + QUALNAME = "types.ChannelAdminLogEventActionChangeLinkedChat" + + def __init__(self, *, prev_value: int, new_value: int) -> None: + self.prev_value = prev_value # long + self.new_value = new_value # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeLinkedChat": + # No flags + + prev_value = Long.read(b) + + new_value = Long.read(b) + + return ChannelAdminLogEventActionChangeLinkedChat(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.prev_value)) + + b.write(Long(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_location.py b/pyrogram/raw/types/channel_admin_log_event_action_change_location.py new file mode 100644 index 00000000..529d7268 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_location.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeLocation(TLObject): # type: ignore + """The geogroup location was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E6B76AE`` + + Parameters: + prev_value (:obj:`ChannelLocation `): + Previous location + + new_value (:obj:`ChannelLocation `): + New location + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0xe6b76ae + QUALNAME = "types.ChannelAdminLogEventActionChangeLocation" + + def __init__(self, *, prev_value: "raw.base.ChannelLocation", new_value: "raw.base.ChannelLocation") -> None: + self.prev_value = prev_value # ChannelLocation + self.new_value = new_value # ChannelLocation + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeLocation": + # No flags + + prev_value = TLObject.read(b) + + new_value = TLObject.read(b) + + return ChannelAdminLogEventActionChangeLocation(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_value.write()) + + b.write(self.new_value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_peer_color.py b/pyrogram/raw/types/channel_admin_log_event_action_change_peer_color.py new file mode 100644 index 00000000..215fd14e --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_peer_color.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangePeerColor(TLObject): # type: ignore + """The message accent color was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``5796E780`` + + Parameters: + prev_value (:obj:`PeerColor `): + Previous accent palette + + new_value (:obj:`PeerColor `): + New accent palette + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x5796e780 + QUALNAME = "types.ChannelAdminLogEventActionChangePeerColor" + + def __init__(self, *, prev_value: "raw.base.PeerColor", new_value: "raw.base.PeerColor") -> None: + self.prev_value = prev_value # PeerColor + self.new_value = new_value # PeerColor + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangePeerColor": + # No flags + + prev_value = TLObject.read(b) + + new_value = TLObject.read(b) + + return ChannelAdminLogEventActionChangePeerColor(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_value.write()) + + b.write(self.new_value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_photo.py b/pyrogram/raw/types/channel_admin_log_event_action_change_photo.py new file mode 100644 index 00000000..52669233 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_photo.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangePhoto(TLObject): # type: ignore + """The channel/supergroup's picture was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``434BD2AF`` + + Parameters: + prev_photo (:obj:`Photo `): + Previous picture + + new_photo (:obj:`Photo `): + New picture + + """ + + __slots__: List[str] = ["prev_photo", "new_photo"] + + ID = 0x434bd2af + QUALNAME = "types.ChannelAdminLogEventActionChangePhoto" + + def __init__(self, *, prev_photo: "raw.base.Photo", new_photo: "raw.base.Photo") -> None: + self.prev_photo = prev_photo # Photo + self.new_photo = new_photo # Photo + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangePhoto": + # No flags + + prev_photo = TLObject.read(b) + + new_photo = TLObject.read(b) + + return ChannelAdminLogEventActionChangePhoto(prev_photo=prev_photo, new_photo=new_photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_photo.write()) + + b.write(self.new_photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_profile_peer_color.py b/pyrogram/raw/types/channel_admin_log_event_action_change_profile_peer_color.py new file mode 100644 index 00000000..3d5bb579 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_profile_peer_color.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeProfilePeerColor(TLObject): # type: ignore + """The profile accent color was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``5E477B25`` + + Parameters: + prev_value (:obj:`PeerColor `): + Previous accent palette + + new_value (:obj:`PeerColor `): + New accent palette + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x5e477b25 + QUALNAME = "types.ChannelAdminLogEventActionChangeProfilePeerColor" + + def __init__(self, *, prev_value: "raw.base.PeerColor", new_value: "raw.base.PeerColor") -> None: + self.prev_value = prev_value # PeerColor + self.new_value = new_value # PeerColor + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeProfilePeerColor": + # No flags + + prev_value = TLObject.read(b) + + new_value = TLObject.read(b) + + return ChannelAdminLogEventActionChangeProfilePeerColor(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_value.write()) + + b.write(self.new_value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_sticker_set.py b/pyrogram/raw/types/channel_admin_log_event_action_change_sticker_set.py new file mode 100644 index 00000000..c25220af --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_sticker_set.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeStickerSet(TLObject): # type: ignore + """The supergroup's stickerset was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``B1C3CAA7`` + + Parameters: + prev_stickerset (:obj:`InputStickerSet `): + Previous stickerset + + new_stickerset (:obj:`InputStickerSet `): + New stickerset + + """ + + __slots__: List[str] = ["prev_stickerset", "new_stickerset"] + + ID = 0xb1c3caa7 + QUALNAME = "types.ChannelAdminLogEventActionChangeStickerSet" + + def __init__(self, *, prev_stickerset: "raw.base.InputStickerSet", new_stickerset: "raw.base.InputStickerSet") -> None: + self.prev_stickerset = prev_stickerset # InputStickerSet + self.new_stickerset = new_stickerset # InputStickerSet + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeStickerSet": + # No flags + + prev_stickerset = TLObject.read(b) + + new_stickerset = TLObject.read(b) + + return ChannelAdminLogEventActionChangeStickerSet(prev_stickerset=prev_stickerset, new_stickerset=new_stickerset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_stickerset.write()) + + b.write(self.new_stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_theme.py b/pyrogram/raw/types/channel_admin_log_event_action_change_theme.py new file mode 100644 index 00000000..7a009efc --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_theme.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeTheme(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``FE69018D`` + + Parameters: + prev_value (``str``): + N/A + + new_value (``str``): + N/A + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0xfe69018d + QUALNAME = "types.ChannelAdminLogEventActionChangeTheme" + + def __init__(self, *, prev_value: str, new_value: str) -> None: + self.prev_value = prev_value # string + self.new_value = new_value # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeTheme": + # No flags + + prev_value = String.read(b) + + new_value = String.read(b) + + return ChannelAdminLogEventActionChangeTheme(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.prev_value)) + + b.write(String(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_title.py b/pyrogram/raw/types/channel_admin_log_event_action_change_title.py new file mode 100644 index 00000000..45336341 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_title.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeTitle(TLObject): # type: ignore + """Channel/supergroup title was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E6DFB825`` + + Parameters: + prev_value (``str``): + Previous title + + new_value (``str``): + New title + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0xe6dfb825 + QUALNAME = "types.ChannelAdminLogEventActionChangeTitle" + + def __init__(self, *, prev_value: str, new_value: str) -> None: + self.prev_value = prev_value # string + self.new_value = new_value # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeTitle": + # No flags + + prev_value = String.read(b) + + new_value = String.read(b) + + return ChannelAdminLogEventActionChangeTitle(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.prev_value)) + + b.write(String(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_username.py b/pyrogram/raw/types/channel_admin_log_event_action_change_username.py new file mode 100644 index 00000000..403b0b36 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_username.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeUsername(TLObject): # type: ignore + """Channel/supergroup username was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``6A4AFC38`` + + Parameters: + prev_value (``str``): + Old username + + new_value (``str``): + New username + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x6a4afc38 + QUALNAME = "types.ChannelAdminLogEventActionChangeUsername" + + def __init__(self, *, prev_value: str, new_value: str) -> None: + self.prev_value = prev_value # string + self.new_value = new_value # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeUsername": + # No flags + + prev_value = String.read(b) + + new_value = String.read(b) + + return ChannelAdminLogEventActionChangeUsername(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.prev_value)) + + b.write(String(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_usernames.py b/pyrogram/raw/types/channel_admin_log_event_action_change_usernames.py new file mode 100644 index 00000000..d7448d1a --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_usernames.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeUsernames(TLObject): # type: ignore + """The list of usernames associated with the channel was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``F04FB3A9`` + + Parameters: + prev_value (List of ``str``): + Previous set of usernames + + new_value (List of ``str``): + New set of usernames + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0xf04fb3a9 + QUALNAME = "types.ChannelAdminLogEventActionChangeUsernames" + + def __init__(self, *, prev_value: List[str], new_value: List[str]) -> None: + self.prev_value = prev_value # Vector + self.new_value = new_value # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeUsernames": + # No flags + + prev_value = TLObject.read(b, String) + + new_value = TLObject.read(b, String) + + return ChannelAdminLogEventActionChangeUsernames(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.prev_value, String)) + + b.write(Vector(self.new_value, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_change_wallpaper.py b/pyrogram/raw/types/channel_admin_log_event_action_change_wallpaper.py new file mode 100644 index 00000000..593e8b14 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_change_wallpaper.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionChangeWallpaper(TLObject): # type: ignore + """The wallpaper was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``31BB5D52`` + + Parameters: + prev_value (:obj:`WallPaper `): + Previous wallpaper + + new_value (:obj:`WallPaper `): + New wallpaper + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x31bb5d52 + QUALNAME = "types.ChannelAdminLogEventActionChangeWallpaper" + + def __init__(self, *, prev_value: "raw.base.WallPaper", new_value: "raw.base.WallPaper") -> None: + self.prev_value = prev_value # WallPaper + self.new_value = new_value # WallPaper + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionChangeWallpaper": + # No flags + + prev_value = TLObject.read(b) + + new_value = TLObject.read(b) + + return ChannelAdminLogEventActionChangeWallpaper(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_value.write()) + + b.write(self.new_value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_create_topic.py b/pyrogram/raw/types/channel_admin_log_event_action_create_topic.py new file mode 100644 index 00000000..5eac98b3 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_create_topic.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionCreateTopic(TLObject): # type: ignore + """A forum topic was created + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``58707D28`` + + Parameters: + topic (:obj:`ForumTopic `): + The forum topic that was created + + """ + + __slots__: List[str] = ["topic"] + + ID = 0x58707d28 + QUALNAME = "types.ChannelAdminLogEventActionCreateTopic" + + def __init__(self, *, topic: "raw.base.ForumTopic") -> None: + self.topic = topic # ForumTopic + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionCreateTopic": + # No flags + + topic = TLObject.read(b) + + return ChannelAdminLogEventActionCreateTopic(topic=topic) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.topic.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_default_banned_rights.py b/pyrogram/raw/types/channel_admin_log_event_action_default_banned_rights.py new file mode 100644 index 00000000..f3e4f107 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_default_banned_rights.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionDefaultBannedRights(TLObject): # type: ignore + """The default banned rights were modified + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``2DF5FC0A`` + + Parameters: + prev_banned_rights (:obj:`ChatBannedRights `): + Previous global banned rights + + new_banned_rights (:obj:`ChatBannedRights `): + New global banned rights. + + """ + + __slots__: List[str] = ["prev_banned_rights", "new_banned_rights"] + + ID = 0x2df5fc0a + QUALNAME = "types.ChannelAdminLogEventActionDefaultBannedRights" + + def __init__(self, *, prev_banned_rights: "raw.base.ChatBannedRights", new_banned_rights: "raw.base.ChatBannedRights") -> None: + self.prev_banned_rights = prev_banned_rights # ChatBannedRights + self.new_banned_rights = new_banned_rights # ChatBannedRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionDefaultBannedRights": + # No flags + + prev_banned_rights = TLObject.read(b) + + new_banned_rights = TLObject.read(b) + + return ChannelAdminLogEventActionDefaultBannedRights(prev_banned_rights=prev_banned_rights, new_banned_rights=new_banned_rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_banned_rights.write()) + + b.write(self.new_banned_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_delete_message.py b/pyrogram/raw/types/channel_admin_log_event_action_delete_message.py new file mode 100644 index 00000000..92b41f34 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_delete_message.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionDeleteMessage(TLObject): # type: ignore + """A message was deleted + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``42E047BB`` + + Parameters: + message (:obj:`Message `): + The message that was deleted + + """ + + __slots__: List[str] = ["message"] + + ID = 0x42e047bb + QUALNAME = "types.ChannelAdminLogEventActionDeleteMessage" + + def __init__(self, *, message: "raw.base.Message") -> None: + self.message = message # Message + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionDeleteMessage": + # No flags + + message = TLObject.read(b) + + return ChannelAdminLogEventActionDeleteMessage(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_delete_topic.py b/pyrogram/raw/types/channel_admin_log_event_action_delete_topic.py new file mode 100644 index 00000000..9dcee8fb --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_delete_topic.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionDeleteTopic(TLObject): # type: ignore + """A forum topic was deleted + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``AE168909`` + + Parameters: + topic (:obj:`ForumTopic `): + The forum topic that was deleted + + """ + + __slots__: List[str] = ["topic"] + + ID = 0xae168909 + QUALNAME = "types.ChannelAdminLogEventActionDeleteTopic" + + def __init__(self, *, topic: "raw.base.ForumTopic") -> None: + self.topic = topic # ForumTopic + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionDeleteTopic": + # No flags + + topic = TLObject.read(b) + + return ChannelAdminLogEventActionDeleteTopic(topic=topic) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.topic.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_discard_group_call.py b/pyrogram/raw/types/channel_admin_log_event_action_discard_group_call.py new file mode 100644 index 00000000..4585232e --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_discard_group_call.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionDiscardGroupCall(TLObject): # type: ignore + """A group call was terminated + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``DB9F9140`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call that was terminated + + """ + + __slots__: List[str] = ["call"] + + ID = 0xdb9f9140 + QUALNAME = "types.ChannelAdminLogEventActionDiscardGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionDiscardGroupCall": + # No flags + + call = TLObject.read(b) + + return ChannelAdminLogEventActionDiscardGroupCall(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_edit_message.py b/pyrogram/raw/types/channel_admin_log_event_action_edit_message.py new file mode 100644 index 00000000..4d1a18ba --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_edit_message.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionEditMessage(TLObject): # type: ignore + """A message was edited + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``709B2405`` + + Parameters: + prev_message (:obj:`Message `): + Old message + + new_message (:obj:`Message `): + New message + + """ + + __slots__: List[str] = ["prev_message", "new_message"] + + ID = 0x709b2405 + QUALNAME = "types.ChannelAdminLogEventActionEditMessage" + + def __init__(self, *, prev_message: "raw.base.Message", new_message: "raw.base.Message") -> None: + self.prev_message = prev_message # Message + self.new_message = new_message # Message + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionEditMessage": + # No flags + + prev_message = TLObject.read(b) + + new_message = TLObject.read(b) + + return ChannelAdminLogEventActionEditMessage(prev_message=prev_message, new_message=new_message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_message.write()) + + b.write(self.new_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_edit_topic.py b/pyrogram/raw/types/channel_admin_log_event_action_edit_topic.py new file mode 100644 index 00000000..f1a32c41 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_edit_topic.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionEditTopic(TLObject): # type: ignore + """A forum topic was edited + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``F06FE208`` + + Parameters: + prev_topic (:obj:`ForumTopic `): + Previous topic information + + new_topic (:obj:`ForumTopic `): + New topic information + + """ + + __slots__: List[str] = ["prev_topic", "new_topic"] + + ID = 0xf06fe208 + QUALNAME = "types.ChannelAdminLogEventActionEditTopic" + + def __init__(self, *, prev_topic: "raw.base.ForumTopic", new_topic: "raw.base.ForumTopic") -> None: + self.prev_topic = prev_topic # ForumTopic + self.new_topic = new_topic # ForumTopic + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionEditTopic": + # No flags + + prev_topic = TLObject.read(b) + + new_topic = TLObject.read(b) + + return ChannelAdminLogEventActionEditTopic(prev_topic=prev_topic, new_topic=new_topic) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_topic.write()) + + b.write(self.new_topic.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_delete.py b/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_delete.py new file mode 100644 index 00000000..960e5e45 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_delete.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionExportedInviteDelete(TLObject): # type: ignore + """A chat invite was deleted + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``5A50FCA4`` + + Parameters: + invite (:obj:`ExportedChatInvite `): + The deleted chat invite + + """ + + __slots__: List[str] = ["invite"] + + ID = 0x5a50fca4 + QUALNAME = "types.ChannelAdminLogEventActionExportedInviteDelete" + + def __init__(self, *, invite: "raw.base.ExportedChatInvite") -> None: + self.invite = invite # ExportedChatInvite + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionExportedInviteDelete": + # No flags + + invite = TLObject.read(b) + + return ChannelAdminLogEventActionExportedInviteDelete(invite=invite) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.invite.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_edit.py b/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_edit.py new file mode 100644 index 00000000..1fad90f0 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_edit.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionExportedInviteEdit(TLObject): # type: ignore + """A chat invite was edited + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E90EBB59`` + + Parameters: + prev_invite (:obj:`ExportedChatInvite `): + Previous chat invite information + + new_invite (:obj:`ExportedChatInvite `): + New chat invite information + + """ + + __slots__: List[str] = ["prev_invite", "new_invite"] + + ID = 0xe90ebb59 + QUALNAME = "types.ChannelAdminLogEventActionExportedInviteEdit" + + def __init__(self, *, prev_invite: "raw.base.ExportedChatInvite", new_invite: "raw.base.ExportedChatInvite") -> None: + self.prev_invite = prev_invite # ExportedChatInvite + self.new_invite = new_invite # ExportedChatInvite + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionExportedInviteEdit": + # No flags + + prev_invite = TLObject.read(b) + + new_invite = TLObject.read(b) + + return ChannelAdminLogEventActionExportedInviteEdit(prev_invite=prev_invite, new_invite=new_invite) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_invite.write()) + + b.write(self.new_invite.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_revoke.py b/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_revoke.py new file mode 100644 index 00000000..234f64f5 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_exported_invite_revoke.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionExportedInviteRevoke(TLObject): # type: ignore + """A specific invite link was revoked + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``410A134E`` + + Parameters: + invite (:obj:`ExportedChatInvite `): + The invite link that was revoked + + """ + + __slots__: List[str] = ["invite"] + + ID = 0x410a134e + QUALNAME = "types.ChannelAdminLogEventActionExportedInviteRevoke" + + def __init__(self, *, invite: "raw.base.ExportedChatInvite") -> None: + self.invite = invite # ExportedChatInvite + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionExportedInviteRevoke": + # No flags + + invite = TLObject.read(b) + + return ChannelAdminLogEventActionExportedInviteRevoke(invite=invite) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.invite.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_invite.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_invite.py new file mode 100644 index 00000000..9303bb46 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_invite.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantInvite(TLObject): # type: ignore + """A user was invited to the group + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E31C34D8`` + + Parameters: + participant (:obj:`ChannelParticipant `): + The user that was invited + + """ + + __slots__: List[str] = ["participant"] + + ID = 0xe31c34d8 + QUALNAME = "types.ChannelAdminLogEventActionParticipantInvite" + + def __init__(self, *, participant: "raw.base.ChannelParticipant") -> None: + self.participant = participant # ChannelParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantInvite": + # No flags + + participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantInvite(participant=participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_join.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_join.py new file mode 100644 index 00000000..8de80050 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_join.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantJoin(TLObject): # type: ignore + """A user has joined the group (in the case of big groups, info of the user that has joined isn't shown) + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``183040D3`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x183040d3 + QUALNAME = "types.ChannelAdminLogEventActionParticipantJoin" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantJoin": + # No flags + + return ChannelAdminLogEventActionParticipantJoin() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_invite.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_invite.py new file mode 100644 index 00000000..ced9dfac --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_invite.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantJoinByInvite(TLObject): # type: ignore + """A user joined the supergroup/channel using a specific invite link + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``FE9FC158`` + + Parameters: + invite (:obj:`ExportedChatInvite `): + The invite link used to join the supergroup/channel + + via_chatlist (``bool``, *optional*): + The participant joined by importing a chat folder deep link ». + + """ + + __slots__: List[str] = ["invite", "via_chatlist"] + + ID = 0xfe9fc158 + QUALNAME = "types.ChannelAdminLogEventActionParticipantJoinByInvite" + + def __init__(self, *, invite: "raw.base.ExportedChatInvite", via_chatlist: Optional[bool] = None) -> None: + self.invite = invite # ExportedChatInvite + self.via_chatlist = via_chatlist # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantJoinByInvite": + + flags = Int.read(b) + + via_chatlist = True if flags & (1 << 0) else False + invite = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantJoinByInvite(invite=invite, via_chatlist=via_chatlist) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.via_chatlist else 0 + b.write(Int(flags)) + + b.write(self.invite.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_request.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_request.py new file mode 100644 index 00000000..7a735152 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_join_by_request.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantJoinByRequest(TLObject): # type: ignore + """A new member was accepted to the chat by an admin + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``AFB6144A`` + + Parameters: + invite (:obj:`ExportedChatInvite `): + The invite link that was used to join the chat + + approved_by (``int`` ``64-bit``): + ID of the admin that approved the invite + + """ + + __slots__: List[str] = ["invite", "approved_by"] + + ID = 0xafb6144a + QUALNAME = "types.ChannelAdminLogEventActionParticipantJoinByRequest" + + def __init__(self, *, invite: "raw.base.ExportedChatInvite", approved_by: int) -> None: + self.invite = invite # ExportedChatInvite + self.approved_by = approved_by # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantJoinByRequest": + # No flags + + invite = TLObject.read(b) + + approved_by = Long.read(b) + + return ChannelAdminLogEventActionParticipantJoinByRequest(invite=invite, approved_by=approved_by) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.invite.write()) + + b.write(Long(self.approved_by)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_leave.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_leave.py new file mode 100644 index 00000000..a4e63d69 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_leave.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantLeave(TLObject): # type: ignore + """A user left the channel/supergroup (in the case of big groups, info of the user that has joined isn't shown) + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``F89777F2`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xf89777f2 + QUALNAME = "types.ChannelAdminLogEventActionParticipantLeave" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantLeave": + # No flags + + return ChannelAdminLogEventActionParticipantLeave() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_mute.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_mute.py new file mode 100644 index 00000000..d77d2358 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_mute.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantMute(TLObject): # type: ignore + """A group call participant was muted + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``F92424D2`` + + Parameters: + participant (:obj:`GroupCallParticipant `): + The participant that was muted + + """ + + __slots__: List[str] = ["participant"] + + ID = 0xf92424d2 + QUALNAME = "types.ChannelAdminLogEventActionParticipantMute" + + def __init__(self, *, participant: "raw.base.GroupCallParticipant") -> None: + self.participant = participant # GroupCallParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantMute": + # No flags + + participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantMute(participant=participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_sub_extend.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_sub_extend.py new file mode 100644 index 00000000..ae460d23 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_sub_extend.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantSubExtend(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``64642DB3`` + + Parameters: + prev_participant (:obj:`ChannelParticipant `): + N/A + + new_participant (:obj:`ChannelParticipant `): + N/A + + """ + + __slots__: List[str] = ["prev_participant", "new_participant"] + + ID = 0x64642db3 + QUALNAME = "types.ChannelAdminLogEventActionParticipantSubExtend" + + def __init__(self, *, prev_participant: "raw.base.ChannelParticipant", new_participant: "raw.base.ChannelParticipant") -> None: + self.prev_participant = prev_participant # ChannelParticipant + self.new_participant = new_participant # ChannelParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantSubExtend": + # No flags + + prev_participant = TLObject.read(b) + + new_participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantSubExtend(prev_participant=prev_participant, new_participant=new_participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_participant.write()) + + b.write(self.new_participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_admin.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_admin.py new file mode 100644 index 00000000..72f48c00 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_admin.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantToggleAdmin(TLObject): # type: ignore + """The admin rights of a user were changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``D5676710`` + + Parameters: + prev_participant (:obj:`ChannelParticipant `): + Previous admin rights + + new_participant (:obj:`ChannelParticipant `): + New admin rights + + """ + + __slots__: List[str] = ["prev_participant", "new_participant"] + + ID = 0xd5676710 + QUALNAME = "types.ChannelAdminLogEventActionParticipantToggleAdmin" + + def __init__(self, *, prev_participant: "raw.base.ChannelParticipant", new_participant: "raw.base.ChannelParticipant") -> None: + self.prev_participant = prev_participant # ChannelParticipant + self.new_participant = new_participant # ChannelParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantToggleAdmin": + # No flags + + prev_participant = TLObject.read(b) + + new_participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantToggleAdmin(prev_participant=prev_participant, new_participant=new_participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_participant.write()) + + b.write(self.new_participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_ban.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_ban.py new file mode 100644 index 00000000..720da36c --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_toggle_ban.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantToggleBan(TLObject): # type: ignore + """The banned rights of a user were changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E6D83D7E`` + + Parameters: + prev_participant (:obj:`ChannelParticipant `): + Old banned rights of user + + new_participant (:obj:`ChannelParticipant `): + New banned rights of user + + """ + + __slots__: List[str] = ["prev_participant", "new_participant"] + + ID = 0xe6d83d7e + QUALNAME = "types.ChannelAdminLogEventActionParticipantToggleBan" + + def __init__(self, *, prev_participant: "raw.base.ChannelParticipant", new_participant: "raw.base.ChannelParticipant") -> None: + self.prev_participant = prev_participant # ChannelParticipant + self.new_participant = new_participant # ChannelParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantToggleBan": + # No flags + + prev_participant = TLObject.read(b) + + new_participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantToggleBan(prev_participant=prev_participant, new_participant=new_participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.prev_participant.write()) + + b.write(self.new_participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_unmute.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_unmute.py new file mode 100644 index 00000000..86594d83 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_unmute.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantUnmute(TLObject): # type: ignore + """A group call participant was unmuted + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E64429C0`` + + Parameters: + participant (:obj:`GroupCallParticipant `): + The participant that was unmuted + + """ + + __slots__: List[str] = ["participant"] + + ID = 0xe64429c0 + QUALNAME = "types.ChannelAdminLogEventActionParticipantUnmute" + + def __init__(self, *, participant: "raw.base.GroupCallParticipant") -> None: + self.participant = participant # GroupCallParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantUnmute": + # No flags + + participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantUnmute(participant=participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_participant_volume.py b/pyrogram/raw/types/channel_admin_log_event_action_participant_volume.py new file mode 100644 index 00000000..51afa591 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_participant_volume.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionParticipantVolume(TLObject): # type: ignore + """channelAdminLogEvent.user_id has set the volume of participant.peer to participant.volume + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``3E7F6847`` + + Parameters: + participant (:obj:`GroupCallParticipant `): + The participant whose volume was changed + + """ + + __slots__: List[str] = ["participant"] + + ID = 0x3e7f6847 + QUALNAME = "types.ChannelAdminLogEventActionParticipantVolume" + + def __init__(self, *, participant: "raw.base.GroupCallParticipant") -> None: + self.participant = participant # GroupCallParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionParticipantVolume": + # No flags + + participant = TLObject.read(b) + + return ChannelAdminLogEventActionParticipantVolume(participant=participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_pin_topic.py b/pyrogram/raw/types/channel_admin_log_event_action_pin_topic.py new file mode 100644 index 00000000..c69f516e --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_pin_topic.py @@ -0,0 +1,68 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionPinTopic(TLObject): # type: ignore + """A forum topic was pinned or unpinned + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``5D8D353B`` + + Parameters: + prev_topic (:obj:`ForumTopic `, *optional*): + Previous topic information + + new_topic (:obj:`ForumTopic `, *optional*): + New topic information + + """ + + __slots__: List[str] = ["prev_topic", "new_topic"] + + ID = 0x5d8d353b + QUALNAME = "types.ChannelAdminLogEventActionPinTopic" + + def __init__(self, *, prev_topic: "raw.base.ForumTopic" = None, new_topic: "raw.base.ForumTopic" = None) -> None: + self.prev_topic = prev_topic # flags.0?ForumTopic + self.new_topic = new_topic # flags.1?ForumTopic + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionPinTopic": + + flags = Int.read(b) + + prev_topic = TLObject.read(b) if flags & (1 << 0) else None + + new_topic = TLObject.read(b) if flags & (1 << 1) else None + + return ChannelAdminLogEventActionPinTopic(prev_topic=prev_topic, new_topic=new_topic) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.prev_topic is not None else 0 + flags |= (1 << 1) if self.new_topic is not None else 0 + b.write(Int(flags)) + + if self.prev_topic is not None: + b.write(self.prev_topic.write()) + + if self.new_topic is not None: + b.write(self.new_topic.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_send_message.py b/pyrogram/raw/types/channel_admin_log_event_action_send_message.py new file mode 100644 index 00000000..00dbffa9 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_send_message.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionSendMessage(TLObject): # type: ignore + """A message was posted in a channel + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``278F2868`` + + Parameters: + message (:obj:`Message `): + The message that was sent + + """ + + __slots__: List[str] = ["message"] + + ID = 0x278f2868 + QUALNAME = "types.ChannelAdminLogEventActionSendMessage" + + def __init__(self, *, message: "raw.base.Message") -> None: + self.message = message # Message + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionSendMessage": + # No flags + + message = TLObject.read(b) + + return ChannelAdminLogEventActionSendMessage(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_start_group_call.py b/pyrogram/raw/types/channel_admin_log_event_action_start_group_call.py new file mode 100644 index 00000000..9f2450fb --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_start_group_call.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionStartGroupCall(TLObject): # type: ignore + """A group call was started + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``23209745`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call + + """ + + __slots__: List[str] = ["call"] + + ID = 0x23209745 + QUALNAME = "types.ChannelAdminLogEventActionStartGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall") -> None: + self.call = call # InputGroupCall + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionStartGroupCall": + # No flags + + call = TLObject.read(b) + + return ChannelAdminLogEventActionStartGroupCall(call=call) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_stop_poll.py b/pyrogram/raw/types/channel_admin_log_event_action_stop_poll.py new file mode 100644 index 00000000..7c0ce9cc --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_stop_poll.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionStopPoll(TLObject): # type: ignore + """A poll was stopped + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``8F079643`` + + Parameters: + message (:obj:`Message `): + The poll that was stopped + + """ + + __slots__: List[str] = ["message"] + + ID = 0x8f079643 + QUALNAME = "types.ChannelAdminLogEventActionStopPoll" + + def __init__(self, *, message: "raw.base.Message") -> None: + self.message = message # Message + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionStopPoll": + # No flags + + message = TLObject.read(b) + + return ChannelAdminLogEventActionStopPoll(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_anti_spam.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_anti_spam.py new file mode 100644 index 00000000..3f7bcea2 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_anti_spam.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleAntiSpam(TLObject): # type: ignore + """Native antispam functionality was enabled or disabled. + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``64F36DFC`` + + Parameters: + new_value (``bool``): + Whether antispam functionality was enabled or disabled. + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0x64f36dfc + QUALNAME = "types.ChannelAdminLogEventActionToggleAntiSpam" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleAntiSpam": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleAntiSpam(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_autotranslation.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_autotranslation.py new file mode 100644 index 00000000..3985ffa7 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_autotranslation.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleAutotranslation(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``C517F77E`` + + Parameters: + new_value (``bool``): + N/A + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0xc517f77e + QUALNAME = "types.ChannelAdminLogEventActionToggleAutotranslation" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleAutotranslation": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleAutotranslation(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_forum.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_forum.py new file mode 100644 index 00000000..723ee366 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_forum.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleForum(TLObject): # type: ignore + """Forum functionality was enabled or disabled. + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``2CC6383`` + + Parameters: + new_value (``bool``): + Whether forum functionality was enabled or disabled. + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0x2cc6383 + QUALNAME = "types.ChannelAdminLogEventActionToggleForum" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleForum": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleForum(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_group_call_setting.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_group_call_setting.py new file mode 100644 index 00000000..ea441637 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_group_call_setting.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleGroupCallSetting(TLObject): # type: ignore + """Group call settings were changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``56D6A247`` + + Parameters: + join_muted (``bool``): + Whether all users are muted by default upon joining + + """ + + __slots__: List[str] = ["join_muted"] + + ID = 0x56d6a247 + QUALNAME = "types.ChannelAdminLogEventActionToggleGroupCallSetting" + + def __init__(self, *, join_muted: bool) -> None: + self.join_muted = join_muted # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleGroupCallSetting": + # No flags + + join_muted = Bool.read(b) + + return ChannelAdminLogEventActionToggleGroupCallSetting(join_muted=join_muted) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.join_muted)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py new file mode 100644 index 00000000..96e64b39 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_invites.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleInvites(TLObject): # type: ignore + """Invites were enabled/disabled + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``1B7907AE`` + + Parameters: + new_value (``bool``): + New value + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0x1b7907ae + QUALNAME = "types.ChannelAdminLogEventActionToggleInvites" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleInvites": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleInvites(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_no_forwards.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_no_forwards.py new file mode 100644 index 00000000..3e6d4c8f --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_no_forwards.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleNoForwards(TLObject): # type: ignore + """Forwards were enabled or disabled + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``CB2AC766`` + + Parameters: + new_value (``bool``): + Old value + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0xcb2ac766 + QUALNAME = "types.ChannelAdminLogEventActionToggleNoForwards" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleNoForwards": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleNoForwards(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_pre_history_hidden.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_pre_history_hidden.py new file mode 100644 index 00000000..3918df99 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_pre_history_hidden.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionTogglePreHistoryHidden(TLObject): # type: ignore + """The hidden prehistory setting was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``5F5C95F1`` + + Parameters: + new_value (``bool``): + New value + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0x5f5c95f1 + QUALNAME = "types.ChannelAdminLogEventActionTogglePreHistoryHidden" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionTogglePreHistoryHidden": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionTogglePreHistoryHidden(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_signature_profiles.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_signature_profiles.py new file mode 100644 index 00000000..db7d8e11 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_signature_profiles.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleSignatureProfiles(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``60A79C79`` + + Parameters: + new_value (``bool``): + N/A + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0x60a79c79 + QUALNAME = "types.ChannelAdminLogEventActionToggleSignatureProfiles" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleSignatureProfiles": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleSignatureProfiles(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_signatures.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_signatures.py new file mode 100644 index 00000000..4d7c9206 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_signatures.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleSignatures(TLObject): # type: ignore + """Channel signatures were enabled/disabled + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``26AE0971`` + + Parameters: + new_value (``bool``): + New value + + """ + + __slots__: List[str] = ["new_value"] + + ID = 0x26ae0971 + QUALNAME = "types.ChannelAdminLogEventActionToggleSignatures" + + def __init__(self, *, new_value: bool) -> None: + self.new_value = new_value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleSignatures": + # No flags + + new_value = Bool.read(b) + + return ChannelAdminLogEventActionToggleSignatures(new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_toggle_slow_mode.py b/pyrogram/raw/types/channel_admin_log_event_action_toggle_slow_mode.py new file mode 100644 index 00000000..95424ea3 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_toggle_slow_mode.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionToggleSlowMode(TLObject): # type: ignore + """Slow mode setting for supergroups was changed + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``53909779`` + + Parameters: + prev_value (``int`` ``32-bit``): + Previous slow mode value + + new_value (``int`` ``32-bit``): + New slow mode value + + """ + + __slots__: List[str] = ["prev_value", "new_value"] + + ID = 0x53909779 + QUALNAME = "types.ChannelAdminLogEventActionToggleSlowMode" + + def __init__(self, *, prev_value: int, new_value: int) -> None: + self.prev_value = prev_value # int + self.new_value = new_value # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionToggleSlowMode": + # No flags + + prev_value = Int.read(b) + + new_value = Int.read(b) + + return ChannelAdminLogEventActionToggleSlowMode(prev_value=prev_value, new_value=new_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.prev_value)) + + b.write(Int(self.new_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_event_action_update_pinned.py b/pyrogram/raw/types/channel_admin_log_event_action_update_pinned.py new file mode 100644 index 00000000..9ae12e6d --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_event_action_update_pinned.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventActionUpdatePinned(TLObject): # type: ignore + """A message was pinned + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventAction`. + + Details: + - Layer: ``224`` + - ID: ``E9E82C18`` + + Parameters: + message (:obj:`Message `): + The message that was pinned + + """ + + __slots__: List[str] = ["message"] + + ID = 0xe9e82c18 + QUALNAME = "types.ChannelAdminLogEventActionUpdatePinned" + + def __init__(self, *, message: "raw.base.Message") -> None: + self.message = message # Message + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventActionUpdatePinned": + # No flags + + message = TLObject.read(b) + + return ChannelAdminLogEventActionUpdatePinned(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_admin_log_events_filter.py b/pyrogram/raw/types/channel_admin_log_events_filter.py new file mode 100644 index 00000000..d7c03246 --- /dev/null +++ b/pyrogram/raw/types/channel_admin_log_events_filter.py @@ -0,0 +1,162 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelAdminLogEventsFilter(TLObject): # type: ignore + """Filter only certain admin log events + + Constructor of :obj:`~pyrogram.raw.base.ChannelAdminLogEventsFilter`. + + Details: + - Layer: ``224`` + - ID: ``EA107AE4`` + + Parameters: + join (``bool``, *optional*): + Join events, including joins using invite links and join requests. + + leave (``bool``, *optional*): + Leave events + + invite (``bool``, *optional*): + Invite events + + ban (``bool``, *optional*): + Ban events + + unban (``bool``, *optional*): + Unban events + + kick (``bool``, *optional*): + Kick events + + unkick (``bool``, *optional*): + Unkick events + + promote (``bool``, *optional*): + Admin promotion events + + demote (``bool``, *optional*): + Admin demotion events + + info (``bool``, *optional*): + Info change events (when about, linked chat, location, photo, stickerset, title or username, slowmode, history TTL settings of a channel gets modified) + + settings (``bool``, *optional*): + Settings change events (invites, hidden prehistory, signatures, default banned rights, forum toggle events) + + pinned (``bool``, *optional*): + Message pin events + + edit (``bool``, *optional*): + Message edit events + + delete (``bool``, *optional*): + Message deletion events + + group_call (``bool``, *optional*): + Group call events + + invites (``bool``, *optional*): + Invite events + + send (``bool``, *optional*): + A message was posted in a channel + + forums (``bool``, *optional*): + Forum-related events + + sub_extend (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["join", "leave", "invite", "ban", "unban", "kick", "unkick", "promote", "demote", "info", "settings", "pinned", "edit", "delete", "group_call", "invites", "send", "forums", "sub_extend"] + + ID = 0xea107ae4 + QUALNAME = "types.ChannelAdminLogEventsFilter" + + def __init__(self, *, join: Optional[bool] = None, leave: Optional[bool] = None, invite: Optional[bool] = None, ban: Optional[bool] = None, unban: Optional[bool] = None, kick: Optional[bool] = None, unkick: Optional[bool] = None, promote: Optional[bool] = None, demote: Optional[bool] = None, info: Optional[bool] = None, settings: Optional[bool] = None, pinned: Optional[bool] = None, edit: Optional[bool] = None, delete: Optional[bool] = None, group_call: Optional[bool] = None, invites: Optional[bool] = None, send: Optional[bool] = None, forums: Optional[bool] = None, sub_extend: Optional[bool] = None) -> None: + self.join = join # flags.0?true + self.leave = leave # flags.1?true + self.invite = invite # flags.2?true + self.ban = ban # flags.3?true + self.unban = unban # flags.4?true + self.kick = kick # flags.5?true + self.unkick = unkick # flags.6?true + self.promote = promote # flags.7?true + self.demote = demote # flags.8?true + self.info = info # flags.9?true + self.settings = settings # flags.10?true + self.pinned = pinned # flags.11?true + self.edit = edit # flags.12?true + self.delete = delete # flags.13?true + self.group_call = group_call # flags.14?true + self.invites = invites # flags.15?true + self.send = send # flags.16?true + self.forums = forums # flags.17?true + self.sub_extend = sub_extend # flags.18?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelAdminLogEventsFilter": + + flags = Int.read(b) + + join = True if flags & (1 << 0) else False + leave = True if flags & (1 << 1) else False + invite = True if flags & (1 << 2) else False + ban = True if flags & (1 << 3) else False + unban = True if flags & (1 << 4) else False + kick = True if flags & (1 << 5) else False + unkick = True if flags & (1 << 6) else False + promote = True if flags & (1 << 7) else False + demote = True if flags & (1 << 8) else False + info = True if flags & (1 << 9) else False + settings = True if flags & (1 << 10) else False + pinned = True if flags & (1 << 11) else False + edit = True if flags & (1 << 12) else False + delete = True if flags & (1 << 13) else False + group_call = True if flags & (1 << 14) else False + invites = True if flags & (1 << 15) else False + send = True if flags & (1 << 16) else False + forums = True if flags & (1 << 17) else False + sub_extend = True if flags & (1 << 18) else False + return ChannelAdminLogEventsFilter(join=join, leave=leave, invite=invite, ban=ban, unban=unban, kick=kick, unkick=unkick, promote=promote, demote=demote, info=info, settings=settings, pinned=pinned, edit=edit, delete=delete, group_call=group_call, invites=invites, send=send, forums=forums, sub_extend=sub_extend) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.join else 0 + flags |= (1 << 1) if self.leave else 0 + flags |= (1 << 2) if self.invite else 0 + flags |= (1 << 3) if self.ban else 0 + flags |= (1 << 4) if self.unban else 0 + flags |= (1 << 5) if self.kick else 0 + flags |= (1 << 6) if self.unkick else 0 + flags |= (1 << 7) if self.promote else 0 + flags |= (1 << 8) if self.demote else 0 + flags |= (1 << 9) if self.info else 0 + flags |= (1 << 10) if self.settings else 0 + flags |= (1 << 11) if self.pinned else 0 + flags |= (1 << 12) if self.edit else 0 + flags |= (1 << 13) if self.delete else 0 + flags |= (1 << 14) if self.group_call else 0 + flags |= (1 << 15) if self.invites else 0 + flags |= (1 << 16) if self.send else 0 + flags |= (1 << 17) if self.forums else 0 + flags |= (1 << 18) if self.sub_extend else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_forbidden.py b/pyrogram/raw/types/channel_forbidden.py new file mode 100644 index 00000000..bb4c2e9a --- /dev/null +++ b/pyrogram/raw/types/channel_forbidden.py @@ -0,0 +1,99 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelForbidden(TLObject): # type: ignore + """Indicates a channel/supergroup we can't access because we were banned, or for some other reason. + + Constructor of :obj:`~pyrogram.raw.base.Chat`. + + Details: + - Layer: ``224`` + - ID: ``17D493D5`` + + Parameters: + id (``int`` ``64-bit``): + Channel ID + + access_hash (``int`` ``64-bit``): + Access hash + + title (``str``): + Title + + broadcast (``bool``, *optional*): + Is this a channel + + megagroup (``bool``, *optional*): + Is this a supergroup + + monoforum (``bool``, *optional*): + N/A + + until_date (``int`` ``32-bit``, *optional*): + The ban is valid until the specified date + + """ + + __slots__: List[str] = ["id", "access_hash", "title", "broadcast", "megagroup", "monoforum", "until_date"] + + ID = 0x17d493d5 + QUALNAME = "types.ChannelForbidden" + + def __init__(self, *, id: int, access_hash: int, title: str, broadcast: Optional[bool] = None, megagroup: Optional[bool] = None, monoforum: Optional[bool] = None, until_date: Optional[int] = None) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.title = title # string + self.broadcast = broadcast # flags.5?true + self.megagroup = megagroup # flags.8?true + self.monoforum = monoforum # flags.10?true + self.until_date = until_date # flags.16?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelForbidden": + + flags = Int.read(b) + + broadcast = True if flags & (1 << 5) else False + megagroup = True if flags & (1 << 8) else False + monoforum = True if flags & (1 << 10) else False + id = Long.read(b) + + access_hash = Long.read(b) + + title = String.read(b) + + until_date = Int.read(b) if flags & (1 << 16) else None + return ChannelForbidden(id=id, access_hash=access_hash, title=title, broadcast=broadcast, megagroup=megagroup, monoforum=monoforum, until_date=until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 5) if self.broadcast else 0 + flags |= (1 << 8) if self.megagroup else 0 + flags |= (1 << 10) if self.monoforum else 0 + flags |= (1 << 16) if self.until_date is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(String(self.title)) + + if self.until_date is not None: + b.write(Int(self.until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_full.py b/pyrogram/raw/types/channel_full.py new file mode 100644 index 00000000..c5c40a5b --- /dev/null +++ b/pyrogram/raw/types/channel_full.py @@ -0,0 +1,588 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelFull(TLObject): # type: ignore + """Full info about a channel, supergroup or gigagroup. + + Constructor of :obj:`~pyrogram.raw.base.ChatFull`. + + Details: + - Layer: ``224`` + - ID: ``E4E0B29D`` + + Parameters: + id (``int`` ``64-bit``): + ID of the channel + + about (``str``): + Info about the channel + + read_inbox_max_id (``int`` ``32-bit``): + Position up to which all incoming messages are read. + + read_outbox_max_id (``int`` ``32-bit``): + Position up to which all outgoing messages are read. + + unread_count (``int`` ``32-bit``): + Count of unread messages + + chat_photo (:obj:`Photo `): + Channel picture + + notify_settings (:obj:`PeerNotifySettings `): + Notification settings + + bot_info (List of :obj:`BotInfo `): + Info about bots in the channel/supergroup + + pts (``int`` ``32-bit``): + Latest PTS for this channel + + can_view_participants (``bool``, *optional*): + Can we view the participant list? + + can_set_username (``bool``, *optional*): + Can we set the channel's username? + + can_set_stickers (``bool``, *optional*): + Can we associate a stickerpack to the supergroup? + + hidden_prehistory (``bool``, *optional*): + Is the history before we joined hidden to us? + + can_set_location (``bool``, *optional*): + Can we set the geolocation of this group (for geogroups) + + has_scheduled (``bool``, *optional*): + Whether scheduled messages are available + + can_view_stats (``bool``, *optional*): + Can the user view channel/supergroup statistics + + blocked (``bool``, *optional*): + Whether any anonymous admin of this supergroup was blocked: if set, you won't receive messages from anonymous group admins in discussion replies via @replies + + can_delete_channel (``bool``, *optional*): + Can we delete this channel? + + antispam (``bool``, *optional*): + Whether native antispam functionality is enabled in this supergroup. + + participants_hidden (``bool``, *optional*): + Whether the participant list is hidden. + + translations_disabled (``bool``, *optional*): + Whether the real-time chat translation popup should be hidden. + + stories_pinned_available (``bool``, *optional*): + Whether this user has some pinned stories. + + view_forum_as_messages (``bool``, *optional*): + Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client. This setting only affects the current account, and is synced to other logged in sessions using the channels.toggleViewForumAsMessages method; invoking this method will update the value of this flag. + + restricted_sponsored (``bool``, *optional*): + + + can_view_revenue (``bool``, *optional*): + + + paid_media_allowed (``bool``, *optional*): + N/A + + can_view_stars_revenue (``bool``, *optional*): + N/A + + paid_reactions_available (``bool``, *optional*): + N/A + + stargifts_available (``bool``, *optional*): + N/A + + paid_messages_available (``bool``, *optional*): + N/A + + participants_count (``int`` ``32-bit``, *optional*): + Number of participants of the channel + + admins_count (``int`` ``32-bit``, *optional*): + Number of channel admins + + kicked_count (``int`` ``32-bit``, *optional*): + Number of users kicked from the channel + + banned_count (``int`` ``32-bit``, *optional*): + Number of users banned from the channel + + online_count (``int`` ``32-bit``, *optional*): + Number of users currently online + + exported_invite (:obj:`ExportedChatInvite `, *optional*): + Invite link + + migrated_from_chat_id (``int`` ``64-bit``, *optional*): + The chat ID from which this group was migrated + + migrated_from_max_id (``int`` ``32-bit``, *optional*): + The message ID in the original chat at which this group was migrated + + pinned_msg_id (``int`` ``32-bit``, *optional*): + Message ID of the last pinned message + + stickerset (:obj:`StickerSet `, *optional*): + Associated stickerset + + available_min_id (``int`` ``32-bit``, *optional*): + Identifier of a maximum unavailable message in a channel due to hidden history. + + folder_id (``int`` ``32-bit``, *optional*): + Peer folder ID, for more info click here + + linked_chat_id (``int`` ``64-bit``, *optional*): + ID of the linked discussion chat for channels + + location (:obj:`ChannelLocation `, *optional*): + Location of the geogroup + + slowmode_seconds (``int`` ``32-bit``, *optional*): + If specified, users in supergroups will only be able to send one message every slowmode_seconds seconds + + slowmode_next_send_date (``int`` ``32-bit``, *optional*): + Indicates when the user will be allowed to send another message in the supergroup (unixtime) + + stats_dc (``int`` ``32-bit``, *optional*): + If set, specifies the DC to use for fetching channel statistics + + call (:obj:`InputGroupCall `, *optional*): + Livestream or group call information + + ttl_period (``int`` ``32-bit``, *optional*): + Time-To-Live of messages in this channel or supergroup + + pending_suggestions (List of ``str``, *optional*): + A list of suggested actions for the supergroup admin, see here for more info ». + + groupcall_default_join_as (:obj:`Peer `, *optional*): + When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. + + theme_emoticon (``str``, *optional*): + Emoji representing a specific chat theme + + requests_pending (``int`` ``32-bit``, *optional*): + Pending join requests » + + recent_requesters (List of ``int`` ``64-bit``, *optional*): + IDs of users who requested to join recently + + default_send_as (:obj:`Peer `, *optional*): + Default peer used for sending messages to this channel + + available_reactions (:obj:`ChatReactions `, *optional*): + Allowed message reactions » + + reactions_limit (``int`` ``32-bit``, *optional*): + + + stories (:obj:`PeerStories `, *optional*): + Channel stories + + wallpaper (:obj:`WallPaper `, *optional*): + Wallpaper + + boosts_applied (``int`` ``32-bit``, *optional*): + + + boosts_unrestrict (``int`` ``32-bit``, *optional*): + + + emojiset (:obj:`StickerSet `, *optional*): + + + bot_verification (:obj:`BotVerification `, *optional*): + N/A + + stargifts_count (``int`` ``32-bit``, *optional*): + N/A + + send_paid_messages_stars (``int`` ``64-bit``, *optional*): + N/A + + main_tab (:obj:`ProfileTab `, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "about", "read_inbox_max_id", "read_outbox_max_id", "unread_count", "chat_photo", "notify_settings", "bot_info", "pts", "can_view_participants", "can_set_username", "can_set_stickers", "hidden_prehistory", "can_set_location", "has_scheduled", "can_view_stats", "blocked", "can_delete_channel", "antispam", "participants_hidden", "translations_disabled", "stories_pinned_available", "view_forum_as_messages", "restricted_sponsored", "can_view_revenue", "paid_media_allowed", "can_view_stars_revenue", "paid_reactions_available", "stargifts_available", "paid_messages_available", "participants_count", "admins_count", "kicked_count", "banned_count", "online_count", "exported_invite", "migrated_from_chat_id", "migrated_from_max_id", "pinned_msg_id", "stickerset", "available_min_id", "folder_id", "linked_chat_id", "location", "slowmode_seconds", "slowmode_next_send_date", "stats_dc", "call", "ttl_period", "pending_suggestions", "groupcall_default_join_as", "theme_emoticon", "requests_pending", "recent_requesters", "default_send_as", "available_reactions", "reactions_limit", "stories", "wallpaper", "boosts_applied", "boosts_unrestrict", "emojiset", "bot_verification", "stargifts_count", "send_paid_messages_stars", "main_tab"] + + ID = 0xe4e0b29d + QUALNAME = "types.ChannelFull" + + def __init__(self, *, id: int, about: str, read_inbox_max_id: int, read_outbox_max_id: int, unread_count: int, chat_photo: "raw.base.Photo", notify_settings: "raw.base.PeerNotifySettings", bot_info: List["raw.base.BotInfo"], pts: int, can_view_participants: Optional[bool] = None, can_set_username: Optional[bool] = None, can_set_stickers: Optional[bool] = None, hidden_prehistory: Optional[bool] = None, can_set_location: Optional[bool] = None, has_scheduled: Optional[bool] = None, can_view_stats: Optional[bool] = None, blocked: Optional[bool] = None, can_delete_channel: Optional[bool] = None, antispam: Optional[bool] = None, participants_hidden: Optional[bool] = None, translations_disabled: Optional[bool] = None, stories_pinned_available: Optional[bool] = None, view_forum_as_messages: Optional[bool] = None, restricted_sponsored: Optional[bool] = None, can_view_revenue: Optional[bool] = None, paid_media_allowed: Optional[bool] = None, can_view_stars_revenue: Optional[bool] = None, paid_reactions_available: Optional[bool] = None, stargifts_available: Optional[bool] = None, paid_messages_available: Optional[bool] = None, participants_count: Optional[int] = None, admins_count: Optional[int] = None, kicked_count: Optional[int] = None, banned_count: Optional[int] = None, online_count: Optional[int] = None, exported_invite: "raw.base.ExportedChatInvite" = None, migrated_from_chat_id: Optional[int] = None, migrated_from_max_id: Optional[int] = None, pinned_msg_id: Optional[int] = None, stickerset: "raw.base.StickerSet" = None, available_min_id: Optional[int] = None, folder_id: Optional[int] = None, linked_chat_id: Optional[int] = None, location: "raw.base.ChannelLocation" = None, slowmode_seconds: Optional[int] = None, slowmode_next_send_date: Optional[int] = None, stats_dc: Optional[int] = None, call: "raw.base.InputGroupCall" = None, ttl_period: Optional[int] = None, pending_suggestions: Optional[List[str]] = None, groupcall_default_join_as: "raw.base.Peer" = None, theme_emoticon: Optional[str] = None, requests_pending: Optional[int] = None, recent_requesters: Optional[List[int]] = None, default_send_as: "raw.base.Peer" = None, available_reactions: "raw.base.ChatReactions" = None, reactions_limit: Optional[int] = None, stories: "raw.base.PeerStories" = None, wallpaper: "raw.base.WallPaper" = None, boosts_applied: Optional[int] = None, boosts_unrestrict: Optional[int] = None, emojiset: "raw.base.StickerSet" = None, bot_verification: "raw.base.BotVerification" = None, stargifts_count: Optional[int] = None, send_paid_messages_stars: Optional[int] = None, main_tab: "raw.base.ProfileTab" = None) -> None: + self.id = id # long + self.about = about # string + self.read_inbox_max_id = read_inbox_max_id # int + self.read_outbox_max_id = read_outbox_max_id # int + self.unread_count = unread_count # int + self.chat_photo = chat_photo # Photo + self.notify_settings = notify_settings # PeerNotifySettings + self.bot_info = bot_info # Vector + self.pts = pts # int + self.can_view_participants = can_view_participants # flags.3?true + self.can_set_username = can_set_username # flags.6?true + self.can_set_stickers = can_set_stickers # flags.7?true + self.hidden_prehistory = hidden_prehistory # flags.10?true + self.can_set_location = can_set_location # flags.16?true + self.has_scheduled = has_scheduled # flags.19?true + self.can_view_stats = can_view_stats # flags.20?true + self.blocked = blocked # flags.22?true + self.can_delete_channel = can_delete_channel # flags2.0?true + self.antispam = antispam # flags2.1?true + self.participants_hidden = participants_hidden # flags2.2?true + self.translations_disabled = translations_disabled # flags2.3?true + self.stories_pinned_available = stories_pinned_available # flags2.5?true + self.view_forum_as_messages = view_forum_as_messages # flags2.6?true + self.restricted_sponsored = restricted_sponsored # flags2.11?true + self.can_view_revenue = can_view_revenue # flags2.12?true + self.paid_media_allowed = paid_media_allowed # flags2.14?true + self.can_view_stars_revenue = can_view_stars_revenue # flags2.15?true + self.paid_reactions_available = paid_reactions_available # flags2.16?true + self.stargifts_available = stargifts_available # flags2.19?true + self.paid_messages_available = paid_messages_available # flags2.20?true + self.participants_count = participants_count # flags.0?int + self.admins_count = admins_count # flags.1?int + self.kicked_count = kicked_count # flags.2?int + self.banned_count = banned_count # flags.2?int + self.online_count = online_count # flags.13?int + self.exported_invite = exported_invite # flags.23?ExportedChatInvite + self.migrated_from_chat_id = migrated_from_chat_id # flags.4?long + self.migrated_from_max_id = migrated_from_max_id # flags.4?int + self.pinned_msg_id = pinned_msg_id # flags.5?int + self.stickerset = stickerset # flags.8?StickerSet + self.available_min_id = available_min_id # flags.9?int + self.folder_id = folder_id # flags.11?int + self.linked_chat_id = linked_chat_id # flags.14?long + self.location = location # flags.15?ChannelLocation + self.slowmode_seconds = slowmode_seconds # flags.17?int + self.slowmode_next_send_date = slowmode_next_send_date # flags.18?int + self.stats_dc = stats_dc # flags.12?int + self.call = call # flags.21?InputGroupCall + self.ttl_period = ttl_period # flags.24?int + self.pending_suggestions = pending_suggestions # flags.25?Vector + self.groupcall_default_join_as = groupcall_default_join_as # flags.26?Peer + self.theme_emoticon = theme_emoticon # flags.27?string + self.requests_pending = requests_pending # flags.28?int + self.recent_requesters = recent_requesters # flags.28?Vector + self.default_send_as = default_send_as # flags.29?Peer + self.available_reactions = available_reactions # flags.30?ChatReactions + self.reactions_limit = reactions_limit # flags2.13?int + self.stories = stories # flags2.4?PeerStories + self.wallpaper = wallpaper # flags2.7?WallPaper + self.boosts_applied = boosts_applied # flags2.8?int + self.boosts_unrestrict = boosts_unrestrict # flags2.9?int + self.emojiset = emojiset # flags2.10?StickerSet + self.bot_verification = bot_verification # flags2.17?BotVerification + self.stargifts_count = stargifts_count # flags2.18?int + self.send_paid_messages_stars = send_paid_messages_stars # flags2.21?long + self.main_tab = main_tab # flags2.22?ProfileTab + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelFull": + + flags = Int.read(b) + + can_view_participants = True if flags & (1 << 3) else False + can_set_username = True if flags & (1 << 6) else False + can_set_stickers = True if flags & (1 << 7) else False + hidden_prehistory = True if flags & (1 << 10) else False + can_set_location = True if flags & (1 << 16) else False + has_scheduled = True if flags & (1 << 19) else False + can_view_stats = True if flags & (1 << 20) else False + blocked = True if flags & (1 << 22) else False + flags2 = Int.read(b) + + can_delete_channel = True if flags2 & (1 << 0) else False + antispam = True if flags2 & (1 << 1) else False + participants_hidden = True if flags2 & (1 << 2) else False + translations_disabled = True if flags2 & (1 << 3) else False + stories_pinned_available = True if flags2 & (1 << 5) else False + view_forum_as_messages = True if flags2 & (1 << 6) else False + restricted_sponsored = True if flags2 & (1 << 11) else False + can_view_revenue = True if flags2 & (1 << 12) else False + paid_media_allowed = True if flags2 & (1 << 14) else False + can_view_stars_revenue = True if flags2 & (1 << 15) else False + paid_reactions_available = True if flags2 & (1 << 16) else False + stargifts_available = True if flags2 & (1 << 19) else False + paid_messages_available = True if flags2 & (1 << 20) else False + id = Long.read(b) + + about = String.read(b) + + participants_count = Int.read(b) if flags & (1 << 0) else None + admins_count = Int.read(b) if flags & (1 << 1) else None + kicked_count = Int.read(b) if flags & (1 << 2) else None + banned_count = Int.read(b) if flags & (1 << 2) else None + online_count = Int.read(b) if flags & (1 << 13) else None + read_inbox_max_id = Int.read(b) + + read_outbox_max_id = Int.read(b) + + unread_count = Int.read(b) + + chat_photo = TLObject.read(b) + + notify_settings = TLObject.read(b) + + exported_invite = TLObject.read(b) if flags & (1 << 23) else None + + bot_info = TLObject.read(b) + + migrated_from_chat_id = Long.read(b) if flags & (1 << 4) else None + migrated_from_max_id = Int.read(b) if flags & (1 << 4) else None + pinned_msg_id = Int.read(b) if flags & (1 << 5) else None + stickerset = TLObject.read(b) if flags & (1 << 8) else None + + available_min_id = Int.read(b) if flags & (1 << 9) else None + folder_id = Int.read(b) if flags & (1 << 11) else None + linked_chat_id = Long.read(b) if flags & (1 << 14) else None + location = TLObject.read(b) if flags & (1 << 15) else None + + slowmode_seconds = Int.read(b) if flags & (1 << 17) else None + slowmode_next_send_date = Int.read(b) if flags & (1 << 18) else None + stats_dc = Int.read(b) if flags & (1 << 12) else None + pts = Int.read(b) + + call = TLObject.read(b) if flags & (1 << 21) else None + + ttl_period = Int.read(b) if flags & (1 << 24) else None + pending_suggestions = TLObject.read(b, String) if flags & (1 << 25) else [] + + groupcall_default_join_as = TLObject.read(b) if flags & (1 << 26) else None + + theme_emoticon = String.read(b) if flags & (1 << 27) else None + requests_pending = Int.read(b) if flags & (1 << 28) else None + recent_requesters = TLObject.read(b, Long) if flags & (1 << 28) else [] + + default_send_as = TLObject.read(b) if flags & (1 << 29) else None + + available_reactions = TLObject.read(b) if flags & (1 << 30) else None + + reactions_limit = Int.read(b) if flags2 & (1 << 13) else None + stories = TLObject.read(b) if flags2 & (1 << 4) else None + + wallpaper = TLObject.read(b) if flags2 & (1 << 7) else None + + boosts_applied = Int.read(b) if flags2 & (1 << 8) else None + boosts_unrestrict = Int.read(b) if flags2 & (1 << 9) else None + emojiset = TLObject.read(b) if flags2 & (1 << 10) else None + + bot_verification = TLObject.read(b) if flags2 & (1 << 17) else None + + stargifts_count = Int.read(b) if flags2 & (1 << 18) else None + send_paid_messages_stars = Long.read(b) if flags2 & (1 << 21) else None + main_tab = TLObject.read(b) if flags2 & (1 << 22) else None + + return ChannelFull(id=id, about=about, read_inbox_max_id=read_inbox_max_id, read_outbox_max_id=read_outbox_max_id, unread_count=unread_count, chat_photo=chat_photo, notify_settings=notify_settings, bot_info=bot_info, pts=pts, can_view_participants=can_view_participants, can_set_username=can_set_username, can_set_stickers=can_set_stickers, hidden_prehistory=hidden_prehistory, can_set_location=can_set_location, has_scheduled=has_scheduled, can_view_stats=can_view_stats, blocked=blocked, can_delete_channel=can_delete_channel, antispam=antispam, participants_hidden=participants_hidden, translations_disabled=translations_disabled, stories_pinned_available=stories_pinned_available, view_forum_as_messages=view_forum_as_messages, restricted_sponsored=restricted_sponsored, can_view_revenue=can_view_revenue, paid_media_allowed=paid_media_allowed, can_view_stars_revenue=can_view_stars_revenue, paid_reactions_available=paid_reactions_available, stargifts_available=stargifts_available, paid_messages_available=paid_messages_available, participants_count=participants_count, admins_count=admins_count, kicked_count=kicked_count, banned_count=banned_count, online_count=online_count, exported_invite=exported_invite, migrated_from_chat_id=migrated_from_chat_id, migrated_from_max_id=migrated_from_max_id, pinned_msg_id=pinned_msg_id, stickerset=stickerset, available_min_id=available_min_id, folder_id=folder_id, linked_chat_id=linked_chat_id, location=location, slowmode_seconds=slowmode_seconds, slowmode_next_send_date=slowmode_next_send_date, stats_dc=stats_dc, call=call, ttl_period=ttl_period, pending_suggestions=pending_suggestions, groupcall_default_join_as=groupcall_default_join_as, theme_emoticon=theme_emoticon, requests_pending=requests_pending, recent_requesters=recent_requesters, default_send_as=default_send_as, available_reactions=available_reactions, reactions_limit=reactions_limit, stories=stories, wallpaper=wallpaper, boosts_applied=boosts_applied, boosts_unrestrict=boosts_unrestrict, emojiset=emojiset, bot_verification=bot_verification, stargifts_count=stargifts_count, send_paid_messages_stars=send_paid_messages_stars, main_tab=main_tab) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.can_view_participants else 0 + flags |= (1 << 6) if self.can_set_username else 0 + flags |= (1 << 7) if self.can_set_stickers else 0 + flags |= (1 << 10) if self.hidden_prehistory else 0 + flags |= (1 << 16) if self.can_set_location else 0 + flags |= (1 << 19) if self.has_scheduled else 0 + flags |= (1 << 20) if self.can_view_stats else 0 + flags |= (1 << 22) if self.blocked else 0 + flags |= (1 << 0) if self.participants_count is not None else 0 + flags |= (1 << 1) if self.admins_count is not None else 0 + flags |= (1 << 2) if self.kicked_count is not None else 0 + flags |= (1 << 2) if self.banned_count is not None else 0 + flags |= (1 << 13) if self.online_count is not None else 0 + flags |= (1 << 23) if self.exported_invite is not None else 0 + flags |= (1 << 4) if self.migrated_from_chat_id is not None else 0 + flags |= (1 << 4) if self.migrated_from_max_id is not None else 0 + flags |= (1 << 5) if self.pinned_msg_id is not None else 0 + flags |= (1 << 8) if self.stickerset is not None else 0 + flags |= (1 << 9) if self.available_min_id is not None else 0 + flags |= (1 << 11) if self.folder_id is not None else 0 + flags |= (1 << 14) if self.linked_chat_id is not None else 0 + flags |= (1 << 15) if self.location is not None else 0 + flags |= (1 << 17) if self.slowmode_seconds is not None else 0 + flags |= (1 << 18) if self.slowmode_next_send_date is not None else 0 + flags |= (1 << 12) if self.stats_dc is not None else 0 + flags |= (1 << 21) if self.call is not None else 0 + flags |= (1 << 24) if self.ttl_period is not None else 0 + flags |= (1 << 25) if self.pending_suggestions else 0 + flags |= (1 << 26) if self.groupcall_default_join_as is not None else 0 + flags |= (1 << 27) if self.theme_emoticon is not None else 0 + flags |= (1 << 28) if self.requests_pending is not None else 0 + flags |= (1 << 28) if self.recent_requesters else 0 + flags |= (1 << 29) if self.default_send_as is not None else 0 + flags |= (1 << 30) if self.available_reactions is not None else 0 + b.write(Int(flags)) + flags2 = 0 + flags2 |= (1 << 0) if self.can_delete_channel else 0 + flags2 |= (1 << 1) if self.antispam else 0 + flags2 |= (1 << 2) if self.participants_hidden else 0 + flags2 |= (1 << 3) if self.translations_disabled else 0 + flags2 |= (1 << 5) if self.stories_pinned_available else 0 + flags2 |= (1 << 6) if self.view_forum_as_messages else 0 + flags2 |= (1 << 11) if self.restricted_sponsored else 0 + flags2 |= (1 << 12) if self.can_view_revenue else 0 + flags2 |= (1 << 14) if self.paid_media_allowed else 0 + flags2 |= (1 << 15) if self.can_view_stars_revenue else 0 + flags2 |= (1 << 16) if self.paid_reactions_available else 0 + flags2 |= (1 << 19) if self.stargifts_available else 0 + flags2 |= (1 << 20) if self.paid_messages_available else 0 + flags2 |= (1 << 13) if self.reactions_limit is not None else 0 + flags2 |= (1 << 4) if self.stories is not None else 0 + flags2 |= (1 << 7) if self.wallpaper is not None else 0 + flags2 |= (1 << 8) if self.boosts_applied is not None else 0 + flags2 |= (1 << 9) if self.boosts_unrestrict is not None else 0 + flags2 |= (1 << 10) if self.emojiset is not None else 0 + flags2 |= (1 << 17) if self.bot_verification is not None else 0 + flags2 |= (1 << 18) if self.stargifts_count is not None else 0 + flags2 |= (1 << 21) if self.send_paid_messages_stars is not None else 0 + flags2 |= (1 << 22) if self.main_tab is not None else 0 + b.write(Int(flags2)) + + b.write(Long(self.id)) + + b.write(String(self.about)) + + if self.participants_count is not None: + b.write(Int(self.participants_count)) + + if self.admins_count is not None: + b.write(Int(self.admins_count)) + + if self.kicked_count is not None: + b.write(Int(self.kicked_count)) + + if self.banned_count is not None: + b.write(Int(self.banned_count)) + + if self.online_count is not None: + b.write(Int(self.online_count)) + + b.write(Int(self.read_inbox_max_id)) + + b.write(Int(self.read_outbox_max_id)) + + b.write(Int(self.unread_count)) + + b.write(self.chat_photo.write()) + + b.write(self.notify_settings.write()) + + if self.exported_invite is not None: + b.write(self.exported_invite.write()) + + b.write(Vector(self.bot_info)) + + if self.migrated_from_chat_id is not None: + b.write(Long(self.migrated_from_chat_id)) + + if self.migrated_from_max_id is not None: + b.write(Int(self.migrated_from_max_id)) + + if self.pinned_msg_id is not None: + b.write(Int(self.pinned_msg_id)) + + if self.stickerset is not None: + b.write(self.stickerset.write()) + + if self.available_min_id is not None: + b.write(Int(self.available_min_id)) + + if self.folder_id is not None: + b.write(Int(self.folder_id)) + + if self.linked_chat_id is not None: + b.write(Long(self.linked_chat_id)) + + if self.location is not None: + b.write(self.location.write()) + + if self.slowmode_seconds is not None: + b.write(Int(self.slowmode_seconds)) + + if self.slowmode_next_send_date is not None: + b.write(Int(self.slowmode_next_send_date)) + + if self.stats_dc is not None: + b.write(Int(self.stats_dc)) + + b.write(Int(self.pts)) + + if self.call is not None: + b.write(self.call.write()) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + if self.pending_suggestions is not None: + b.write(Vector(self.pending_suggestions, String)) + + if self.groupcall_default_join_as is not None: + b.write(self.groupcall_default_join_as.write()) + + if self.theme_emoticon is not None: + b.write(String(self.theme_emoticon)) + + if self.requests_pending is not None: + b.write(Int(self.requests_pending)) + + if self.recent_requesters is not None: + b.write(Vector(self.recent_requesters, Long)) + + if self.default_send_as is not None: + b.write(self.default_send_as.write()) + + if self.available_reactions is not None: + b.write(self.available_reactions.write()) + + if self.reactions_limit is not None: + b.write(Int(self.reactions_limit)) + + if self.stories is not None: + b.write(self.stories.write()) + + if self.wallpaper is not None: + b.write(self.wallpaper.write()) + + if self.boosts_applied is not None: + b.write(Int(self.boosts_applied)) + + if self.boosts_unrestrict is not None: + b.write(Int(self.boosts_unrestrict)) + + if self.emojiset is not None: + b.write(self.emojiset.write()) + + if self.bot_verification is not None: + b.write(self.bot_verification.write()) + + if self.stargifts_count is not None: + b.write(Int(self.stargifts_count)) + + if self.send_paid_messages_stars is not None: + b.write(Long(self.send_paid_messages_stars)) + + if self.main_tab is not None: + b.write(self.main_tab.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_location.py b/pyrogram/raw/types/channel_location.py new file mode 100644 index 00000000..14e964e9 --- /dev/null +++ b/pyrogram/raw/types/channel_location.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelLocation(TLObject): # type: ignore + """Geographical location of supergroup (geogroups) + + Constructor of :obj:`~pyrogram.raw.base.ChannelLocation`. + + Details: + - Layer: ``224`` + - ID: ``209B82DB`` + + Parameters: + geo_point (:obj:`GeoPoint `): + Geographical location of supergroup + + address (``str``): + Textual description of the address + + """ + + __slots__: List[str] = ["geo_point", "address"] + + ID = 0x209b82db + QUALNAME = "types.ChannelLocation" + + def __init__(self, *, geo_point: "raw.base.GeoPoint", address: str) -> None: + self.geo_point = geo_point # GeoPoint + self.address = address # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelLocation": + # No flags + + geo_point = TLObject.read(b) + + address = String.read(b) + + return ChannelLocation(geo_point=geo_point, address=address) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo_point.write()) + + b.write(String(self.address)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_location_empty.py b/pyrogram/raw/types/channel_location_empty.py new file mode 100644 index 00000000..6d91cd09 --- /dev/null +++ b/pyrogram/raw/types/channel_location_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelLocationEmpty(TLObject): # type: ignore + """No location (normal supergroup) + + Constructor of :obj:`~pyrogram.raw.base.ChannelLocation`. + + Details: + - Layer: ``224`` + - ID: ``BFB5AD8B`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xbfb5ad8b + QUALNAME = "types.ChannelLocationEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelLocationEmpty": + # No flags + + return ChannelLocationEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_messages_filter.py b/pyrogram/raw/types/channel_messages_filter.py new file mode 100644 index 00000000..ff26fd88 --- /dev/null +++ b/pyrogram/raw/types/channel_messages_filter.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelMessagesFilter(TLObject): # type: ignore + """Filter for getting only certain types of channel messages + + Constructor of :obj:`~pyrogram.raw.base.ChannelMessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``CD77D957`` + + Parameters: + ranges (List of :obj:`MessageRange `): + A range of messages to fetch + + exclude_new_messages (``bool``, *optional*): + Whether to exclude new messages from the search + + """ + + __slots__: List[str] = ["ranges", "exclude_new_messages"] + + ID = 0xcd77d957 + QUALNAME = "types.ChannelMessagesFilter" + + def __init__(self, *, ranges: List["raw.base.MessageRange"], exclude_new_messages: Optional[bool] = None) -> None: + self.ranges = ranges # Vector + self.exclude_new_messages = exclude_new_messages # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelMessagesFilter": + + flags = Int.read(b) + + exclude_new_messages = True if flags & (1 << 1) else False + ranges = TLObject.read(b) + + return ChannelMessagesFilter(ranges=ranges, exclude_new_messages=exclude_new_messages) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.exclude_new_messages else 0 + b.write(Int(flags)) + + b.write(Vector(self.ranges)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_messages_filter_empty.py b/pyrogram/raw/types/channel_messages_filter_empty.py new file mode 100644 index 00000000..0af06f37 --- /dev/null +++ b/pyrogram/raw/types/channel_messages_filter_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelMessagesFilterEmpty(TLObject): # type: ignore + """No filter + + Constructor of :obj:`~pyrogram.raw.base.ChannelMessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``94D42EE7`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x94d42ee7 + QUALNAME = "types.ChannelMessagesFilterEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelMessagesFilterEmpty": + # No flags + + return ChannelMessagesFilterEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participant.py b/pyrogram/raw/types/channel_participant.py new file mode 100644 index 00000000..6bcecc1b --- /dev/null +++ b/pyrogram/raw/types/channel_participant.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipant(TLObject): # type: ignore + """Channel/supergroup participant + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``CB397619`` + + Parameters: + user_id (``int`` ``64-bit``): + Participant user ID + + date (``int`` ``32-bit``): + Date joined + + subscription_until_date (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["user_id", "date", "subscription_until_date"] + + ID = 0xcb397619 + QUALNAME = "types.ChannelParticipant" + + def __init__(self, *, user_id: int, date: int, subscription_until_date: Optional[int] = None) -> None: + self.user_id = user_id # long + self.date = date # int + self.subscription_until_date = subscription_until_date # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipant": + + flags = Int.read(b) + + user_id = Long.read(b) + + date = Int.read(b) + + subscription_until_date = Int.read(b) if flags & (1 << 0) else None + return ChannelParticipant(user_id=user_id, date=date, subscription_until_date=subscription_until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.subscription_until_date is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.user_id)) + + b.write(Int(self.date)) + + if self.subscription_until_date is not None: + b.write(Int(self.subscription_until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participant_admin.py b/pyrogram/raw/types/channel_participant_admin.py new file mode 100644 index 00000000..3c45cb7d --- /dev/null +++ b/pyrogram/raw/types/channel_participant_admin.py @@ -0,0 +1,110 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantAdmin(TLObject): # type: ignore + """Admin + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``34C3BB53`` + + Parameters: + user_id (``int`` ``64-bit``): + Admin user ID + + promoted_by (``int`` ``64-bit``): + User that promoted the user to admin + + date (``int`` ``32-bit``): + When did the user join + + admin_rights (:obj:`ChatAdminRights `): + Admin rights + + can_edit (``bool``, *optional*): + Can this admin promote other admins with the same permissions? + + is_self (``bool``, *optional*): + N/A + + inviter_id (``int`` ``64-bit``, *optional*): + User that invited the admin to the channel/group + + rank (``str``, *optional*): + The role (rank) of the admin in the group: just an arbitrary string, admin by default + + """ + + __slots__: List[str] = ["user_id", "promoted_by", "date", "admin_rights", "can_edit", "is_self", "inviter_id", "rank"] + + ID = 0x34c3bb53 + QUALNAME = "types.ChannelParticipantAdmin" + + def __init__(self, *, user_id: int, promoted_by: int, date: int, admin_rights: "raw.base.ChatAdminRights", can_edit: Optional[bool] = None, is_self: Optional[bool] = None, inviter_id: Optional[int] = None, rank: Optional[str] = None) -> None: + self.user_id = user_id # long + self.promoted_by = promoted_by # long + self.date = date # int + self.admin_rights = admin_rights # ChatAdminRights + self.can_edit = can_edit # flags.0?true + self.is_self = is_self # flags.1?true + self.inviter_id = inviter_id # flags.1?long + self.rank = rank # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantAdmin": + + flags = Int.read(b) + + can_edit = True if flags & (1 << 0) else False + is_self = True if flags & (1 << 1) else False + user_id = Long.read(b) + + inviter_id = Long.read(b) if flags & (1 << 1) else None + promoted_by = Long.read(b) + + date = Int.read(b) + + admin_rights = TLObject.read(b) + + rank = String.read(b) if flags & (1 << 2) else None + return ChannelParticipantAdmin(user_id=user_id, promoted_by=promoted_by, date=date, admin_rights=admin_rights, can_edit=can_edit, is_self=is_self, inviter_id=inviter_id, rank=rank) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.can_edit else 0 + flags |= (1 << 1) if self.is_self else 0 + flags |= (1 << 1) if self.inviter_id is not None else 0 + flags |= (1 << 2) if self.rank is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.user_id)) + + if self.inviter_id is not None: + b.write(Long(self.inviter_id)) + + b.write(Long(self.promoted_by)) + + b.write(Int(self.date)) + + b.write(self.admin_rights.write()) + + if self.rank is not None: + b.write(String(self.rank)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participant_banned.py b/pyrogram/raw/types/channel_participant_banned.py new file mode 100644 index 00000000..fe795b66 --- /dev/null +++ b/pyrogram/raw/types/channel_participant_banned.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantBanned(TLObject): # type: ignore + """Banned/kicked user + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``6DF8014E`` + + Parameters: + peer (:obj:`Peer `): + The banned peer + + kicked_by (``int`` ``64-bit``): + User was kicked by the specified admin + + date (``int`` ``32-bit``): + When did the user join the group + + banned_rights (:obj:`ChatBannedRights `): + Banned rights + + left (``bool``, *optional*): + Whether the user has left the group + + """ + + __slots__: List[str] = ["peer", "kicked_by", "date", "banned_rights", "left"] + + ID = 0x6df8014e + QUALNAME = "types.ChannelParticipantBanned" + + def __init__(self, *, peer: "raw.base.Peer", kicked_by: int, date: int, banned_rights: "raw.base.ChatBannedRights", left: Optional[bool] = None) -> None: + self.peer = peer # Peer + self.kicked_by = kicked_by # long + self.date = date # int + self.banned_rights = banned_rights # ChatBannedRights + self.left = left # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantBanned": + + flags = Int.read(b) + + left = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + kicked_by = Long.read(b) + + date = Int.read(b) + + banned_rights = TLObject.read(b) + + return ChannelParticipantBanned(peer=peer, kicked_by=kicked_by, date=date, banned_rights=banned_rights, left=left) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.left else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Long(self.kicked_by)) + + b.write(Int(self.date)) + + b.write(self.banned_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participant_creator.py b/pyrogram/raw/types/channel_participant_creator.py new file mode 100644 index 00000000..14348147 --- /dev/null +++ b/pyrogram/raw/types/channel_participant_creator.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantCreator(TLObject): # type: ignore + """Channel/supergroup creator + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``2FE601D3`` + + Parameters: + user_id (``int`` ``64-bit``): + User ID + + admin_rights (:obj:`ChatAdminRights `): + Creator admin rights + + rank (``str``, *optional*): + The role (rank) of the group creator in the group: just an arbitrary string, admin by default + + """ + + __slots__: List[str] = ["user_id", "admin_rights", "rank"] + + ID = 0x2fe601d3 + QUALNAME = "types.ChannelParticipantCreator" + + def __init__(self, *, user_id: int, admin_rights: "raw.base.ChatAdminRights", rank: Optional[str] = None) -> None: + self.user_id = user_id # long + self.admin_rights = admin_rights # ChatAdminRights + self.rank = rank # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantCreator": + + flags = Int.read(b) + + user_id = Long.read(b) + + admin_rights = TLObject.read(b) + + rank = String.read(b) if flags & (1 << 0) else None + return ChannelParticipantCreator(user_id=user_id, admin_rights=admin_rights, rank=rank) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.rank is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.user_id)) + + b.write(self.admin_rights.write()) + + if self.rank is not None: + b.write(String(self.rank)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participant_left.py b/pyrogram/raw/types/channel_participant_left.py new file mode 100644 index 00000000..6a0f1c37 --- /dev/null +++ b/pyrogram/raw/types/channel_participant_left.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantLeft(TLObject): # type: ignore + """A participant that left the channel/supergroup + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``1B03F006`` + + Parameters: + peer (:obj:`Peer `): + The peer that left + + """ + + __slots__: List[str] = ["peer"] + + ID = 0x1b03f006 + QUALNAME = "types.ChannelParticipantLeft" + + def __init__(self, *, peer: "raw.base.Peer") -> None: + self.peer = peer # Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantLeft": + # No flags + + peer = TLObject.read(b) + + return ChannelParticipantLeft(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participant_self.py b/pyrogram/raw/types/channel_participant_self.py new file mode 100644 index 00000000..32600af5 --- /dev/null +++ b/pyrogram/raw/types/channel_participant_self.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantSelf(TLObject): # type: ignore + """Myself + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``4F607BEF`` + + Parameters: + user_id (``int`` ``64-bit``): + User ID + + inviter_id (``int`` ``64-bit``): + User that invited me to the channel/supergroup + + date (``int`` ``32-bit``): + When did I join the channel/supergroup + + via_request (``bool``, *optional*): + Whether I joined upon specific approval of an admin + + subscription_until_date (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["user_id", "inviter_id", "date", "via_request", "subscription_until_date"] + + ID = 0x4f607bef + QUALNAME = "types.ChannelParticipantSelf" + + def __init__(self, *, user_id: int, inviter_id: int, date: int, via_request: Optional[bool] = None, subscription_until_date: Optional[int] = None) -> None: + self.user_id = user_id # long + self.inviter_id = inviter_id # long + self.date = date # int + self.via_request = via_request # flags.0?true + self.subscription_until_date = subscription_until_date # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantSelf": + + flags = Int.read(b) + + via_request = True if flags & (1 << 0) else False + user_id = Long.read(b) + + inviter_id = Long.read(b) + + date = Int.read(b) + + subscription_until_date = Int.read(b) if flags & (1 << 1) else None + return ChannelParticipantSelf(user_id=user_id, inviter_id=inviter_id, date=date, via_request=via_request, subscription_until_date=subscription_until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.via_request else 0 + flags |= (1 << 1) if self.subscription_until_date is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.user_id)) + + b.write(Long(self.inviter_id)) + + b.write(Int(self.date)) + + if self.subscription_until_date is not None: + b.write(Int(self.subscription_until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_admins.py b/pyrogram/raw/types/channel_participants_admins.py new file mode 100644 index 00000000..f18733b4 --- /dev/null +++ b/pyrogram/raw/types/channel_participants_admins.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsAdmins(TLObject): # type: ignore + """Fetch only admin participants + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``B4608969`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb4608969 + QUALNAME = "types.ChannelParticipantsAdmins" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsAdmins": + # No flags + + return ChannelParticipantsAdmins() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_banned.py b/pyrogram/raw/types/channel_participants_banned.py new file mode 100644 index 00000000..e35a7a0a --- /dev/null +++ b/pyrogram/raw/types/channel_participants_banned.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsBanned(TLObject): # type: ignore + """Fetch only banned participants + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``1427A5E1`` + + Parameters: + q (``str``): + Optional filter for searching banned participants by name (otherwise empty) + + """ + + __slots__: List[str] = ["q"] + + ID = 0x1427a5e1 + QUALNAME = "types.ChannelParticipantsBanned" + + def __init__(self, *, q: str) -> None: + self.q = q # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsBanned": + # No flags + + q = String.read(b) + + return ChannelParticipantsBanned(q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_bots.py b/pyrogram/raw/types/channel_participants_bots.py new file mode 100644 index 00000000..3735ead0 --- /dev/null +++ b/pyrogram/raw/types/channel_participants_bots.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsBots(TLObject): # type: ignore + """Fetch only bot participants + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``B0D1865B`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb0d1865b + QUALNAME = "types.ChannelParticipantsBots" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsBots": + # No flags + + return ChannelParticipantsBots() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_contacts.py b/pyrogram/raw/types/channel_participants_contacts.py new file mode 100644 index 00000000..f9a6bff6 --- /dev/null +++ b/pyrogram/raw/types/channel_participants_contacts.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsContacts(TLObject): # type: ignore + """Fetch only participants that are also contacts + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``BB6AE88D`` + + Parameters: + q (``str``): + Optional search query for searching contact participants by name + + """ + + __slots__: List[str] = ["q"] + + ID = 0xbb6ae88d + QUALNAME = "types.ChannelParticipantsContacts" + + def __init__(self, *, q: str) -> None: + self.q = q # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsContacts": + # No flags + + q = String.read(b) + + return ChannelParticipantsContacts(q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_kicked.py b/pyrogram/raw/types/channel_participants_kicked.py new file mode 100644 index 00000000..765a961e --- /dev/null +++ b/pyrogram/raw/types/channel_participants_kicked.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsKicked(TLObject): # type: ignore + """Fetch only kicked participants + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``A3B54985`` + + Parameters: + q (``str``): + Optional filter for searching kicked participants by name (otherwise empty) + + """ + + __slots__: List[str] = ["q"] + + ID = 0xa3b54985 + QUALNAME = "types.ChannelParticipantsKicked" + + def __init__(self, *, q: str) -> None: + self.q = q # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsKicked": + # No flags + + q = String.read(b) + + return ChannelParticipantsKicked(q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_mentions.py b/pyrogram/raw/types/channel_participants_mentions.py new file mode 100644 index 00000000..75424baa --- /dev/null +++ b/pyrogram/raw/types/channel_participants_mentions.py @@ -0,0 +1,67 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsMentions(TLObject): # type: ignore + """This filter is used when looking for supergroup members to mention. +This filter will automatically remove anonymous admins, and return even non-participant users that replied to a specific thread through the comment section of a channel. + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``E04B5CEB`` + + Parameters: + q (``str``, *optional*): + Filter by user name or username + + top_msg_id (``int`` ``32-bit``, *optional*): + Look only for users that posted in this thread + + """ + + __slots__: List[str] = ["q", "top_msg_id"] + + ID = 0xe04b5ceb + QUALNAME = "types.ChannelParticipantsMentions" + + def __init__(self, *, q: Optional[str] = None, top_msg_id: Optional[int] = None) -> None: + self.q = q # flags.0?string + self.top_msg_id = top_msg_id # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsMentions": + + flags = Int.read(b) + + q = String.read(b) if flags & (1 << 0) else None + top_msg_id = Int.read(b) if flags & (1 << 1) else None + return ChannelParticipantsMentions(q=q, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.q is not None else 0 + flags |= (1 << 1) if self.top_msg_id is not None else 0 + b.write(Int(flags)) + + if self.q is not None: + b.write(String(self.q)) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_recent.py b/pyrogram/raw/types/channel_participants_recent.py new file mode 100644 index 00000000..1d4958b0 --- /dev/null +++ b/pyrogram/raw/types/channel_participants_recent.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsRecent(TLObject): # type: ignore + """Fetch only recent participants + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``DE3F3C79`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xde3f3c79 + QUALNAME = "types.ChannelParticipantsRecent" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsRecent": + # No flags + + return ChannelParticipantsRecent() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channel_participants_search.py b/pyrogram/raw/types/channel_participants_search.py new file mode 100644 index 00000000..a834f63b --- /dev/null +++ b/pyrogram/raw/types/channel_participants_search.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsSearch(TLObject): # type: ignore + """Query participants by name + + Constructor of :obj:`~pyrogram.raw.base.ChannelParticipantsFilter`. + + Details: + - Layer: ``224`` + - ID: ``656AC4B`` + + Parameters: + q (``str``): + Search query + + """ + + __slots__: List[str] = ["q"] + + ID = 0x656ac4b + QUALNAME = "types.ChannelParticipantsSearch" + + def __init__(self, *, q: str) -> None: + self.q = q # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsSearch": + # No flags + + q = String.read(b) + + return ChannelParticipantsSearch(q=q) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.q)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/__init__.py b/pyrogram/raw/types/channels/__init__.py new file mode 100644 index 00000000..28b2473b --- /dev/null +++ b/pyrogram/raw/types/channels/__init__.py @@ -0,0 +1,47 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .channel_participants import ChannelParticipants +from .channel_participants_not_modified import ChannelParticipantsNotModified +from .channel_participant import ChannelParticipant +from .admin_log_results import AdminLogResults +from .send_as_peers import SendAsPeers +from .sponsored_message_report_result_choose_option import SponsoredMessageReportResultChooseOption +from .sponsored_message_report_result_ads_hidden import SponsoredMessageReportResultAdsHidden +from .sponsored_message_report_result_reported import SponsoredMessageReportResultReported + + +__all__ = [ + "ChannelParticipants", + "ChannelParticipantsNotModified", + "ChannelParticipant", + "AdminLogResults", + "SendAsPeers", + "SponsoredMessageReportResultChooseOption", + "SponsoredMessageReportResultAdsHidden", + "SponsoredMessageReportResultReported", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/channels/admin_log_results.py b/pyrogram/raw/types/channels/admin_log_results.py new file mode 100644 index 00000000..f37775b1 --- /dev/null +++ b/pyrogram/raw/types/channels/admin_log_results.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AdminLogResults(TLObject): # type: ignore + """Admin log events + + Constructor of :obj:`~pyrogram.raw.base.channels.AdminLogResults`. + + Details: + - Layer: ``224`` + - ID: ``ED8AF74D`` + + Parameters: + events (List of :obj:`ChannelAdminLogEvent `): + Admin log events + + chats (List of :obj:`Chat `): + Chats mentioned in events + + users (List of :obj:`User `): + Users mentioned in events + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.GetAdminLog + """ + + __slots__: List[str] = ["events", "chats", "users"] + + ID = 0xed8af74d + QUALNAME = "types.channels.AdminLogResults" + + def __init__(self, *, events: List["raw.base.ChannelAdminLogEvent"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.events = events # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AdminLogResults": + # No flags + + events = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return AdminLogResults(events=events, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.events)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/channel_participant.py b/pyrogram/raw/types/channels/channel_participant.py new file mode 100644 index 00000000..2a6d4f19 --- /dev/null +++ b/pyrogram/raw/types/channels/channel_participant.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipant(TLObject): # type: ignore + """Represents a channel participant + + Constructor of :obj:`~pyrogram.raw.base.channels.ChannelParticipant`. + + Details: + - Layer: ``224`` + - ID: ``DFB80317`` + + Parameters: + participant (:obj:`ChannelParticipant `): + The channel participant + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.GetParticipant + """ + + __slots__: List[str] = ["participant", "chats", "users"] + + ID = 0xdfb80317 + QUALNAME = "types.channels.ChannelParticipant" + + def __init__(self, *, participant: "raw.base.ChannelParticipant", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.participant = participant # ChannelParticipant + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipant": + # No flags + + participant = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChannelParticipant(participant=participant, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.participant.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/channel_participants.py b/pyrogram/raw/types/channels/channel_participants.py new file mode 100644 index 00000000..2aa05aec --- /dev/null +++ b/pyrogram/raw/types/channels/channel_participants.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipants(TLObject): # type: ignore + """Represents multiple channel participants + + Constructor of :obj:`~pyrogram.raw.base.channels.ChannelParticipants`. + + Details: + - Layer: ``224`` + - ID: ``9AB0FEAF`` + + Parameters: + count (``int`` ``32-bit``): + Total number of participants that correspond to the given query + + participants (List of :obj:`ChannelParticipant `): + Participants + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Users mentioned in participant info + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.GetParticipants + """ + + __slots__: List[str] = ["count", "participants", "chats", "users"] + + ID = 0x9ab0feaf + QUALNAME = "types.channels.ChannelParticipants" + + def __init__(self, *, count: int, participants: List["raw.base.ChannelParticipant"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.count = count # int + self.participants = participants # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipants": + # No flags + + count = Int.read(b) + + participants = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChannelParticipants(count=count, participants=participants, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.participants)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/channel_participants_not_modified.py b/pyrogram/raw/types/channels/channel_participants_not_modified.py new file mode 100644 index 00000000..8275ccc4 --- /dev/null +++ b/pyrogram/raw/types/channels/channel_participants_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelParticipantsNotModified(TLObject): # type: ignore + """No new participant info could be found + + Constructor of :obj:`~pyrogram.raw.base.channels.ChannelParticipants`. + + Details: + - Layer: ``224`` + - ID: ``F0173FE9`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.GetParticipants + """ + + __slots__: List[str] = [] + + ID = 0xf0173fe9 + QUALNAME = "types.channels.ChannelParticipantsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelParticipantsNotModified": + # No flags + + return ChannelParticipantsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/send_as_peers.py b/pyrogram/raw/types/channels/send_as_peers.py new file mode 100644 index 00000000..eede22fd --- /dev/null +++ b/pyrogram/raw/types/channels/send_as_peers.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SendAsPeers(TLObject): # type: ignore + """A list of peers that can be used to send messages in a specific group + + Constructor of :obj:`~pyrogram.raw.base.channels.SendAsPeers`. + + Details: + - Layer: ``224`` + - ID: ``F496B0C6`` + + Parameters: + peers (List of :obj:`SendAsPeer `): + Peers that can be used to send messages to the group + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.GetSendAs + """ + + __slots__: List[str] = ["peers", "chats", "users"] + + ID = 0xf496b0c6 + QUALNAME = "types.channels.SendAsPeers" + + def __init__(self, *, peers: List["raw.base.SendAsPeer"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.peers = peers # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SendAsPeers": + # No flags + + peers = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return SendAsPeers(peers=peers, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.peers)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/sponsored_message_report_result_ads_hidden.py b/pyrogram/raw/types/channels/sponsored_message_report_result_ads_hidden.py new file mode 100644 index 00000000..f4f8b183 --- /dev/null +++ b/pyrogram/raw/types/channels/sponsored_message_report_result_ads_hidden.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredMessageReportResultAdsHidden(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.channels.SponsoredMessageReportResult`. + + Details: + - Layer: ``224`` + - ID: ``3E3BCF2F`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.ReportSponsoredMessage + """ + + __slots__: List[str] = [] + + ID = 0x3e3bcf2f + QUALNAME = "types.channels.SponsoredMessageReportResultAdsHidden" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredMessageReportResultAdsHidden": + # No flags + + return SponsoredMessageReportResultAdsHidden() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/sponsored_message_report_result_choose_option.py b/pyrogram/raw/types/channels/sponsored_message_report_result_choose_option.py new file mode 100644 index 00000000..bf3bef83 --- /dev/null +++ b/pyrogram/raw/types/channels/sponsored_message_report_result_choose_option.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredMessageReportResultChooseOption(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.channels.SponsoredMessageReportResult`. + + Details: + - Layer: ``224`` + - ID: ``846F9E42`` + + Parameters: + title (``str``): + + + options (List of :obj:`SponsoredMessageReportOption `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.ReportSponsoredMessage + """ + + __slots__: List[str] = ["title", "options"] + + ID = 0x846f9e42 + QUALNAME = "types.channels.SponsoredMessageReportResultChooseOption" + + def __init__(self, *, title: str, options: List["raw.base.SponsoredMessageReportOption"]) -> None: + self.title = title # string + self.options = options # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredMessageReportResultChooseOption": + # No flags + + title = String.read(b) + + options = TLObject.read(b) + + return SponsoredMessageReportResultChooseOption(title=title, options=options) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(Vector(self.options)) + + return b.getvalue() diff --git a/pyrogram/raw/types/channels/sponsored_message_report_result_reported.py b/pyrogram/raw/types/channels/sponsored_message_report_result_reported.py new file mode 100644 index 00000000..cba0dcaa --- /dev/null +++ b/pyrogram/raw/types/channels/sponsored_message_report_result_reported.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredMessageReportResultReported(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.channels.SponsoredMessageReportResult`. + + Details: + - Layer: ``224`` + - ID: ``AD798849`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.ReportSponsoredMessage + """ + + __slots__: List[str] = [] + + ID = 0xad798849 + QUALNAME = "types.channels.SponsoredMessageReportResultReported" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredMessageReportResultReported": + # No flags + + return SponsoredMessageReportResultReported() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/chat.py b/pyrogram/raw/types/chat.py new file mode 100644 index 00000000..6be72702 --- /dev/null +++ b/pyrogram/raw/types/chat.py @@ -0,0 +1,168 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Chat(TLObject): # type: ignore + """Info about a group + + Constructor of :obj:`~pyrogram.raw.base.Chat`. + + Details: + - Layer: ``224`` + - ID: ``41CBF256`` + + Parameters: + id (``int`` ``64-bit``): + ID of the group + + title (``str``): + Title + + photo (:obj:`ChatPhoto `): + Chat photo + + participants_count (``int`` ``32-bit``): + Participant count + + date (``int`` ``32-bit``): + Date of creation of the group + + version (``int`` ``32-bit``): + Used in basic groups to reorder updates and make sure that all of them were received. + + creator (``bool``, *optional*): + Whether the current user is the creator of the group + + kicked (``bool``, *optional*): + N/A + + left (``bool``, *optional*): + Whether the current user has left the group + + deactivated (``bool``, *optional*): + Whether the group was migrated + + call_active (``bool``, *optional*): + Whether a group call is currently active + + call_not_empty (``bool``, *optional*): + Whether there's anyone in the group call + + noforwards (``bool``, *optional*): + Whether this group is protected, thus does not allow forwarding messages from it + + migrated_to (:obj:`InputChannel `, *optional*): + Means this chat was upgraded to a supergroup + + admin_rights (:obj:`ChatAdminRights `, *optional*): + Admin rights of the user in the group + + default_banned_rights (:obj:`ChatBannedRights `, *optional*): + Default banned rights of all users in the group + + """ + + __slots__: List[str] = ["id", "title", "photo", "participants_count", "date", "version", "creator", "kicked", "left", "deactivated", "call_active", "call_not_empty", "noforwards", "migrated_to", "admin_rights", "default_banned_rights"] + + ID = 0x41cbf256 + QUALNAME = "types.Chat" + + def __init__(self, *, id: int, title: str, photo: "raw.base.ChatPhoto", participants_count: int, date: int, version: int, creator: Optional[bool] = None, kicked: Optional[bool] = None, left: Optional[bool] = None, deactivated: Optional[bool] = None, call_active: Optional[bool] = None, call_not_empty: Optional[bool] = None, noforwards: Optional[bool] = None, migrated_to: "raw.base.InputChannel" = None, admin_rights: "raw.base.ChatAdminRights" = None, default_banned_rights: "raw.base.ChatBannedRights" = None) -> None: + self.id = id # long + self.title = title # string + self.photo = photo # ChatPhoto + self.participants_count = participants_count # int + self.date = date # int + self.version = version # int + self.creator = creator # flags.0?true + self.kicked = kicked # flags.1?true + self.left = left # flags.2?true + self.deactivated = deactivated # flags.5?true + self.call_active = call_active # flags.23?true + self.call_not_empty = call_not_empty # flags.24?true + self.noforwards = noforwards # flags.25?true + self.migrated_to = migrated_to # flags.6?InputChannel + self.admin_rights = admin_rights # flags.14?ChatAdminRights + self.default_banned_rights = default_banned_rights # flags.18?ChatBannedRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Chat": + + flags = Int.read(b) + + creator = True if flags & (1 << 0) else False + kicked = True if flags & (1 << 1) else False + left = True if flags & (1 << 2) else False + deactivated = True if flags & (1 << 5) else False + call_active = True if flags & (1 << 23) else False + call_not_empty = True if flags & (1 << 24) else False + noforwards = True if flags & (1 << 25) else False + id = Long.read(b) + + title = String.read(b) + + photo = TLObject.read(b) + + participants_count = Int.read(b) + + date = Int.read(b) + + version = Int.read(b) + + migrated_to = TLObject.read(b) if flags & (1 << 6) else None + + admin_rights = TLObject.read(b) if flags & (1 << 14) else None + + default_banned_rights = TLObject.read(b) if flags & (1 << 18) else None + + return Chat(id=id, title=title, photo=photo, participants_count=participants_count, date=date, version=version, creator=creator, kicked=kicked, left=left, deactivated=deactivated, call_active=call_active, call_not_empty=call_not_empty, noforwards=noforwards, migrated_to=migrated_to, admin_rights=admin_rights, default_banned_rights=default_banned_rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.creator else 0 + flags |= (1 << 1) if self.kicked else 0 + flags |= (1 << 2) if self.left else 0 + flags |= (1 << 5) if self.deactivated else 0 + flags |= (1 << 23) if self.call_active else 0 + flags |= (1 << 24) if self.call_not_empty else 0 + flags |= (1 << 25) if self.noforwards else 0 + flags |= (1 << 6) if self.migrated_to is not None else 0 + flags |= (1 << 14) if self.admin_rights is not None else 0 + flags |= (1 << 18) if self.default_banned_rights is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(String(self.title)) + + b.write(self.photo.write()) + + b.write(Int(self.participants_count)) + + b.write(Int(self.date)) + + b.write(Int(self.version)) + + if self.migrated_to is not None: + b.write(self.migrated_to.write()) + + if self.admin_rights is not None: + b.write(self.admin_rights.write()) + + if self.default_banned_rights is not None: + b.write(self.default_banned_rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_admin_rights.py b/pyrogram/raw/types/chat_admin_rights.py new file mode 100644 index 00000000..c282e8b3 --- /dev/null +++ b/pyrogram/raw/types/chat_admin_rights.py @@ -0,0 +1,144 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatAdminRights(TLObject): # type: ignore + """Represents the rights of an admin in a channel/supergroup. + + Constructor of :obj:`~pyrogram.raw.base.ChatAdminRights`. + + Details: + - Layer: ``224`` + - ID: ``5FB224D5`` + + Parameters: + change_info (``bool``, *optional*): + If set, allows the admin to modify the description of the channel/supergroup + + post_messages (``bool``, *optional*): + If set, allows the admin to post messages in the channel + + edit_messages (``bool``, *optional*): + If set, allows the admin to also edit messages from other admins in the channel + + delete_messages (``bool``, *optional*): + If set, allows the admin to also delete messages from other admins in the channel + + ban_users (``bool``, *optional*): + If set, allows the admin to ban users from the channel/supergroup + + invite_users (``bool``, *optional*): + If set, allows the admin to invite users in the channel/supergroup + + pin_messages (``bool``, *optional*): + If set, allows the admin to pin messages in the channel/supergroup + + add_admins (``bool``, *optional*): + If set, allows the admin to add other admins with the same (or more limited) permissions in the channel/supergroup + + anonymous (``bool``, *optional*): + Whether this admin is anonymous + + manage_call (``bool``, *optional*): + If set, allows the admin to change group call/livestream settings + + other (``bool``, *optional*): + Set this flag if none of the other flags are set, but you still want the user to be an admin: if this or any of the other flags are set, the admin can get the chat admin log, get chat statistics, get message statistics in channels, get channel members, see anonymous administrators in supergroups and ignore slow mode. + + manage_topics (``bool``, *optional*): + If set, allows the admin to create, delete or modify forum topics ». + + post_stories (``bool``, *optional*): + If set, allows the admin to post stories as the channel. + + edit_stories (``bool``, *optional*): + If set, allows the admin to edit stories posted by the other admins of the channel. + + delete_stories (``bool``, *optional*): + If set, allows the admin to delete stories posted by the other admins of the channel. + + manage_direct_messages (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["change_info", "post_messages", "edit_messages", "delete_messages", "ban_users", "invite_users", "pin_messages", "add_admins", "anonymous", "manage_call", "other", "manage_topics", "post_stories", "edit_stories", "delete_stories", "manage_direct_messages"] + + ID = 0x5fb224d5 + QUALNAME = "types.ChatAdminRights" + + def __init__(self, *, change_info: Optional[bool] = None, post_messages: Optional[bool] = None, edit_messages: Optional[bool] = None, delete_messages: Optional[bool] = None, ban_users: Optional[bool] = None, invite_users: Optional[bool] = None, pin_messages: Optional[bool] = None, add_admins: Optional[bool] = None, anonymous: Optional[bool] = None, manage_call: Optional[bool] = None, other: Optional[bool] = None, manage_topics: Optional[bool] = None, post_stories: Optional[bool] = None, edit_stories: Optional[bool] = None, delete_stories: Optional[bool] = None, manage_direct_messages: Optional[bool] = None) -> None: + self.change_info = change_info # flags.0?true + self.post_messages = post_messages # flags.1?true + self.edit_messages = edit_messages # flags.2?true + self.delete_messages = delete_messages # flags.3?true + self.ban_users = ban_users # flags.4?true + self.invite_users = invite_users # flags.5?true + self.pin_messages = pin_messages # flags.7?true + self.add_admins = add_admins # flags.9?true + self.anonymous = anonymous # flags.10?true + self.manage_call = manage_call # flags.11?true + self.other = other # flags.12?true + self.manage_topics = manage_topics # flags.13?true + self.post_stories = post_stories # flags.14?true + self.edit_stories = edit_stories # flags.15?true + self.delete_stories = delete_stories # flags.16?true + self.manage_direct_messages = manage_direct_messages # flags.17?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatAdminRights": + + flags = Int.read(b) + + change_info = True if flags & (1 << 0) else False + post_messages = True if flags & (1 << 1) else False + edit_messages = True if flags & (1 << 2) else False + delete_messages = True if flags & (1 << 3) else False + ban_users = True if flags & (1 << 4) else False + invite_users = True if flags & (1 << 5) else False + pin_messages = True if flags & (1 << 7) else False + add_admins = True if flags & (1 << 9) else False + anonymous = True if flags & (1 << 10) else False + manage_call = True if flags & (1 << 11) else False + other = True if flags & (1 << 12) else False + manage_topics = True if flags & (1 << 13) else False + post_stories = True if flags & (1 << 14) else False + edit_stories = True if flags & (1 << 15) else False + delete_stories = True if flags & (1 << 16) else False + manage_direct_messages = True if flags & (1 << 17) else False + return ChatAdminRights(change_info=change_info, post_messages=post_messages, edit_messages=edit_messages, delete_messages=delete_messages, ban_users=ban_users, invite_users=invite_users, pin_messages=pin_messages, add_admins=add_admins, anonymous=anonymous, manage_call=manage_call, other=other, manage_topics=manage_topics, post_stories=post_stories, edit_stories=edit_stories, delete_stories=delete_stories, manage_direct_messages=manage_direct_messages) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.change_info else 0 + flags |= (1 << 1) if self.post_messages else 0 + flags |= (1 << 2) if self.edit_messages else 0 + flags |= (1 << 3) if self.delete_messages else 0 + flags |= (1 << 4) if self.ban_users else 0 + flags |= (1 << 5) if self.invite_users else 0 + flags |= (1 << 7) if self.pin_messages else 0 + flags |= (1 << 9) if self.add_admins else 0 + flags |= (1 << 10) if self.anonymous else 0 + flags |= (1 << 11) if self.manage_call else 0 + flags |= (1 << 12) if self.other else 0 + flags |= (1 << 13) if self.manage_topics else 0 + flags |= (1 << 14) if self.post_stories else 0 + flags |= (1 << 15) if self.edit_stories else 0 + flags |= (1 << 16) if self.delete_stories else 0 + flags |= (1 << 17) if self.manage_direct_messages else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_admin_with_invites.py b/pyrogram/raw/types/chat_admin_with_invites.py new file mode 100644 index 00000000..6e641f3c --- /dev/null +++ b/pyrogram/raw/types/chat_admin_with_invites.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatAdminWithInvites(TLObject): # type: ignore + """Info about chat invites generated by admins. + + Constructor of :obj:`~pyrogram.raw.base.ChatAdminWithInvites`. + + Details: + - Layer: ``224`` + - ID: ``F2ECEF23`` + + Parameters: + admin_id (``int`` ``64-bit``): + The admin + + invites_count (``int`` ``32-bit``): + Number of invites generated by the admin + + revoked_invites_count (``int`` ``32-bit``): + Number of revoked invites + + """ + + __slots__: List[str] = ["admin_id", "invites_count", "revoked_invites_count"] + + ID = 0xf2ecef23 + QUALNAME = "types.ChatAdminWithInvites" + + def __init__(self, *, admin_id: int, invites_count: int, revoked_invites_count: int) -> None: + self.admin_id = admin_id # long + self.invites_count = invites_count # int + self.revoked_invites_count = revoked_invites_count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatAdminWithInvites": + # No flags + + admin_id = Long.read(b) + + invites_count = Int.read(b) + + revoked_invites_count = Int.read(b) + + return ChatAdminWithInvites(admin_id=admin_id, invites_count=invites_count, revoked_invites_count=revoked_invites_count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.admin_id)) + + b.write(Int(self.invites_count)) + + b.write(Int(self.revoked_invites_count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_banned_rights.py b/pyrogram/raw/types/chat_banned_rights.py new file mode 100644 index 00000000..5da47ccb --- /dev/null +++ b/pyrogram/raw/types/chat_banned_rights.py @@ -0,0 +1,176 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatBannedRights(TLObject): # type: ignore + """Represents the rights of a normal user in a supergroup/channel/chat. In this case, the flags are inverted: if set, a flag does not allow a user to do X. + + Constructor of :obj:`~pyrogram.raw.base.ChatBannedRights`. + + Details: + - Layer: ``224`` + - ID: ``9F120418`` + + Parameters: + until_date (``int`` ``32-bit``): + Validity of said permissions (it is considered forever any value less then 30 seconds or more then 366 days). + + view_messages (``bool``, *optional*): + If set, does not allow a user to view messages in a supergroup/channel/chat + + send_messages (``bool``, *optional*): + If set, does not allow a user to send messages in a supergroup/chat + + send_media (``bool``, *optional*): + If set, does not allow a user to send any media in a supergroup/chat + + send_stickers (``bool``, *optional*): + If set, does not allow a user to send stickers in a supergroup/chat + + send_gifs (``bool``, *optional*): + If set, does not allow a user to send gifs in a supergroup/chat + + send_games (``bool``, *optional*): + If set, does not allow a user to send games in a supergroup/chat + + send_inline (``bool``, *optional*): + If set, does not allow a user to use inline bots in a supergroup/chat. + + embed_links (``bool``, *optional*): + If set, does not allow a user to embed links in the messages of a supergroup/chat + + send_polls (``bool``, *optional*): + If set, does not allow a user to send polls in a supergroup/chat + + change_info (``bool``, *optional*): + If set, does not allow any user to change the description of a supergroup/chat + + invite_users (``bool``, *optional*): + If set, does not allow any user to invite users in a supergroup/chat + + pin_messages (``bool``, *optional*): + If set, does not allow any user to pin messages in a supergroup/chat + + manage_topics (``bool``, *optional*): + If set, does not allow any user to create, delete or modify forum topics ». + + send_photos (``bool``, *optional*): + If set, does not allow a user to send photos in a supergroup/chat. + + send_videos (``bool``, *optional*): + If set, does not allow a user to send videos in a supergroup/chat. + + send_roundvideos (``bool``, *optional*): + If set, does not allow a user to send round videos in a supergroup/chat. + + send_audios (``bool``, *optional*): + If set, does not allow a user to send audio files in a supergroup/chat. + + send_voices (``bool``, *optional*): + If set, does not allow a user to send voice messages in a supergroup/chat. + + send_docs (``bool``, *optional*): + If set, does not allow a user to send documents in a supergroup/chat. + + send_plain (``bool``, *optional*): + If set, does not allow a user to send text messages in a supergroup/chat. + + """ + + __slots__: List[str] = ["until_date", "view_messages", "send_messages", "send_media", "send_stickers", "send_gifs", "send_games", "send_inline", "embed_links", "send_polls", "change_info", "invite_users", "pin_messages", "manage_topics", "send_photos", "send_videos", "send_roundvideos", "send_audios", "send_voices", "send_docs", "send_plain"] + + ID = 0x9f120418 + QUALNAME = "types.ChatBannedRights" + + def __init__(self, *, until_date: int, view_messages: Optional[bool] = None, send_messages: Optional[bool] = None, send_media: Optional[bool] = None, send_stickers: Optional[bool] = None, send_gifs: Optional[bool] = None, send_games: Optional[bool] = None, send_inline: Optional[bool] = None, embed_links: Optional[bool] = None, send_polls: Optional[bool] = None, change_info: Optional[bool] = None, invite_users: Optional[bool] = None, pin_messages: Optional[bool] = None, manage_topics: Optional[bool] = None, send_photos: Optional[bool] = None, send_videos: Optional[bool] = None, send_roundvideos: Optional[bool] = None, send_audios: Optional[bool] = None, send_voices: Optional[bool] = None, send_docs: Optional[bool] = None, send_plain: Optional[bool] = None) -> None: + self.until_date = until_date # int + self.view_messages = view_messages # flags.0?true + self.send_messages = send_messages # flags.1?true + self.send_media = send_media # flags.2?true + self.send_stickers = send_stickers # flags.3?true + self.send_gifs = send_gifs # flags.4?true + self.send_games = send_games # flags.5?true + self.send_inline = send_inline # flags.6?true + self.embed_links = embed_links # flags.7?true + self.send_polls = send_polls # flags.8?true + self.change_info = change_info # flags.10?true + self.invite_users = invite_users # flags.15?true + self.pin_messages = pin_messages # flags.17?true + self.manage_topics = manage_topics # flags.18?true + self.send_photos = send_photos # flags.19?true + self.send_videos = send_videos # flags.20?true + self.send_roundvideos = send_roundvideos # flags.21?true + self.send_audios = send_audios # flags.22?true + self.send_voices = send_voices # flags.23?true + self.send_docs = send_docs # flags.24?true + self.send_plain = send_plain # flags.25?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatBannedRights": + + flags = Int.read(b) + + view_messages = True if flags & (1 << 0) else False + send_messages = True if flags & (1 << 1) else False + send_media = True if flags & (1 << 2) else False + send_stickers = True if flags & (1 << 3) else False + send_gifs = True if flags & (1 << 4) else False + send_games = True if flags & (1 << 5) else False + send_inline = True if flags & (1 << 6) else False + embed_links = True if flags & (1 << 7) else False + send_polls = True if flags & (1 << 8) else False + change_info = True if flags & (1 << 10) else False + invite_users = True if flags & (1 << 15) else False + pin_messages = True if flags & (1 << 17) else False + manage_topics = True if flags & (1 << 18) else False + send_photos = True if flags & (1 << 19) else False + send_videos = True if flags & (1 << 20) else False + send_roundvideos = True if flags & (1 << 21) else False + send_audios = True if flags & (1 << 22) else False + send_voices = True if flags & (1 << 23) else False + send_docs = True if flags & (1 << 24) else False + send_plain = True if flags & (1 << 25) else False + until_date = Int.read(b) + + return ChatBannedRights(until_date=until_date, view_messages=view_messages, send_messages=send_messages, send_media=send_media, send_stickers=send_stickers, send_gifs=send_gifs, send_games=send_games, send_inline=send_inline, embed_links=embed_links, send_polls=send_polls, change_info=change_info, invite_users=invite_users, pin_messages=pin_messages, manage_topics=manage_topics, send_photos=send_photos, send_videos=send_videos, send_roundvideos=send_roundvideos, send_audios=send_audios, send_voices=send_voices, send_docs=send_docs, send_plain=send_plain) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.view_messages else 0 + flags |= (1 << 1) if self.send_messages else 0 + flags |= (1 << 2) if self.send_media else 0 + flags |= (1 << 3) if self.send_stickers else 0 + flags |= (1 << 4) if self.send_gifs else 0 + flags |= (1 << 5) if self.send_games else 0 + flags |= (1 << 6) if self.send_inline else 0 + flags |= (1 << 7) if self.embed_links else 0 + flags |= (1 << 8) if self.send_polls else 0 + flags |= (1 << 10) if self.change_info else 0 + flags |= (1 << 15) if self.invite_users else 0 + flags |= (1 << 17) if self.pin_messages else 0 + flags |= (1 << 18) if self.manage_topics else 0 + flags |= (1 << 19) if self.send_photos else 0 + flags |= (1 << 20) if self.send_videos else 0 + flags |= (1 << 21) if self.send_roundvideos else 0 + flags |= (1 << 22) if self.send_audios else 0 + flags |= (1 << 23) if self.send_voices else 0 + flags |= (1 << 24) if self.send_docs else 0 + flags |= (1 << 25) if self.send_plain else 0 + b.write(Int(flags)) + + b.write(Int(self.until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_empty.py b/pyrogram/raw/types/chat_empty.py new file mode 100644 index 00000000..2703ff97 --- /dev/null +++ b/pyrogram/raw/types/chat_empty.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatEmpty(TLObject): # type: ignore + """Empty constructor, group doesn't exist + + Constructor of :obj:`~pyrogram.raw.base.Chat`. + + Details: + - Layer: ``224`` + - ID: ``29562865`` + + Parameters: + id (``int`` ``64-bit``): + Group identifier + + """ + + __slots__: List[str] = ["id"] + + ID = 0x29562865 + QUALNAME = "types.ChatEmpty" + + def __init__(self, *, id: int) -> None: + self.id = id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatEmpty": + # No flags + + id = Long.read(b) + + return ChatEmpty(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_forbidden.py b/pyrogram/raw/types/chat_forbidden.py new file mode 100644 index 00000000..bf7e847d --- /dev/null +++ b/pyrogram/raw/types/chat_forbidden.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatForbidden(TLObject): # type: ignore + """A group to which the user has no access. E.g., because the user was kicked from the group. + + Constructor of :obj:`~pyrogram.raw.base.Chat`. + + Details: + - Layer: ``224`` + - ID: ``6592A1A7`` + + Parameters: + id (``int`` ``64-bit``): + User identifier + + title (``str``): + Group name + + """ + + __slots__: List[str] = ["id", "title"] + + ID = 0x6592a1a7 + QUALNAME = "types.ChatForbidden" + + def __init__(self, *, id: int, title: str) -> None: + self.id = id # long + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatForbidden": + # No flags + + id = Long.read(b) + + title = String.read(b) + + return ChatForbidden(id=id, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_full.py b/pyrogram/raw/types/chat_full.py new file mode 100644 index 00000000..ee8a0cf7 --- /dev/null +++ b/pyrogram/raw/types/chat_full.py @@ -0,0 +1,222 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatFull(TLObject): # type: ignore + """Full info about a basic group. + + Constructor of :obj:`~pyrogram.raw.base.ChatFull`. + + Details: + - Layer: ``224`` + - ID: ``2633421B`` + + Parameters: + id (``int`` ``64-bit``): + ID of the chat + + about (``str``): + About string for this chat + + participants (:obj:`ChatParticipants `): + Participant list + + notify_settings (:obj:`PeerNotifySettings `): + Notification settings + + can_set_username (``bool``, *optional*): + Can we change the username of this chat + + has_scheduled (``bool``, *optional*): + Whether scheduled messages are available + + translations_disabled (``bool``, *optional*): + Whether the real-time chat translation popup should be hidden. + + chat_photo (:obj:`Photo `, *optional*): + Chat photo + + exported_invite (:obj:`ExportedChatInvite `, *optional*): + Chat invite + + bot_info (List of :obj:`BotInfo `, *optional*): + Info about bots that are in this chat + + pinned_msg_id (``int`` ``32-bit``, *optional*): + Message ID of the last pinned message + + folder_id (``int`` ``32-bit``, *optional*): + Peer folder ID, for more info click here + + call (:obj:`InputGroupCall `, *optional*): + Group call information + + ttl_period (``int`` ``32-bit``, *optional*): + Time-To-Live of messages sent by the current user to this chat + + groupcall_default_join_as (:obj:`Peer `, *optional*): + When using phone.getGroupCallJoinAs to get a list of peers that can be used to join a group call, this field indicates the peer that should be selected by default. + + theme_emoticon (``str``, *optional*): + Emoji representing a specific chat theme + + requests_pending (``int`` ``32-bit``, *optional*): + Pending join requests » + + recent_requesters (List of ``int`` ``64-bit``, *optional*): + IDs of users who requested to join recently + + available_reactions (:obj:`ChatReactions `, *optional*): + Allowed message reactions » + + reactions_limit (``int`` ``32-bit``, *optional*): + + + """ + + __slots__: List[str] = ["id", "about", "participants", "notify_settings", "can_set_username", "has_scheduled", "translations_disabled", "chat_photo", "exported_invite", "bot_info", "pinned_msg_id", "folder_id", "call", "ttl_period", "groupcall_default_join_as", "theme_emoticon", "requests_pending", "recent_requesters", "available_reactions", "reactions_limit"] + + ID = 0x2633421b + QUALNAME = "types.ChatFull" + + def __init__(self, *, id: int, about: str, participants: "raw.base.ChatParticipants", notify_settings: "raw.base.PeerNotifySettings", can_set_username: Optional[bool] = None, has_scheduled: Optional[bool] = None, translations_disabled: Optional[bool] = None, chat_photo: "raw.base.Photo" = None, exported_invite: "raw.base.ExportedChatInvite" = None, bot_info: Optional[List["raw.base.BotInfo"]] = None, pinned_msg_id: Optional[int] = None, folder_id: Optional[int] = None, call: "raw.base.InputGroupCall" = None, ttl_period: Optional[int] = None, groupcall_default_join_as: "raw.base.Peer" = None, theme_emoticon: Optional[str] = None, requests_pending: Optional[int] = None, recent_requesters: Optional[List[int]] = None, available_reactions: "raw.base.ChatReactions" = None, reactions_limit: Optional[int] = None) -> None: + self.id = id # long + self.about = about # string + self.participants = participants # ChatParticipants + self.notify_settings = notify_settings # PeerNotifySettings + self.can_set_username = can_set_username # flags.7?true + self.has_scheduled = has_scheduled # flags.8?true + self.translations_disabled = translations_disabled # flags.19?true + self.chat_photo = chat_photo # flags.2?Photo + self.exported_invite = exported_invite # flags.13?ExportedChatInvite + self.bot_info = bot_info # flags.3?Vector + self.pinned_msg_id = pinned_msg_id # flags.6?int + self.folder_id = folder_id # flags.11?int + self.call = call # flags.12?InputGroupCall + self.ttl_period = ttl_period # flags.14?int + self.groupcall_default_join_as = groupcall_default_join_as # flags.15?Peer + self.theme_emoticon = theme_emoticon # flags.16?string + self.requests_pending = requests_pending # flags.17?int + self.recent_requesters = recent_requesters # flags.17?Vector + self.available_reactions = available_reactions # flags.18?ChatReactions + self.reactions_limit = reactions_limit # flags.20?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatFull": + + flags = Int.read(b) + + can_set_username = True if flags & (1 << 7) else False + has_scheduled = True if flags & (1 << 8) else False + translations_disabled = True if flags & (1 << 19) else False + id = Long.read(b) + + about = String.read(b) + + participants = TLObject.read(b) + + chat_photo = TLObject.read(b) if flags & (1 << 2) else None + + notify_settings = TLObject.read(b) + + exported_invite = TLObject.read(b) if flags & (1 << 13) else None + + bot_info = TLObject.read(b) if flags & (1 << 3) else [] + + pinned_msg_id = Int.read(b) if flags & (1 << 6) else None + folder_id = Int.read(b) if flags & (1 << 11) else None + call = TLObject.read(b) if flags & (1 << 12) else None + + ttl_period = Int.read(b) if flags & (1 << 14) else None + groupcall_default_join_as = TLObject.read(b) if flags & (1 << 15) else None + + theme_emoticon = String.read(b) if flags & (1 << 16) else None + requests_pending = Int.read(b) if flags & (1 << 17) else None + recent_requesters = TLObject.read(b, Long) if flags & (1 << 17) else [] + + available_reactions = TLObject.read(b) if flags & (1 << 18) else None + + reactions_limit = Int.read(b) if flags & (1 << 20) else None + return ChatFull(id=id, about=about, participants=participants, notify_settings=notify_settings, can_set_username=can_set_username, has_scheduled=has_scheduled, translations_disabled=translations_disabled, chat_photo=chat_photo, exported_invite=exported_invite, bot_info=bot_info, pinned_msg_id=pinned_msg_id, folder_id=folder_id, call=call, ttl_period=ttl_period, groupcall_default_join_as=groupcall_default_join_as, theme_emoticon=theme_emoticon, requests_pending=requests_pending, recent_requesters=recent_requesters, available_reactions=available_reactions, reactions_limit=reactions_limit) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 7) if self.can_set_username else 0 + flags |= (1 << 8) if self.has_scheduled else 0 + flags |= (1 << 19) if self.translations_disabled else 0 + flags |= (1 << 2) if self.chat_photo is not None else 0 + flags |= (1 << 13) if self.exported_invite is not None else 0 + flags |= (1 << 3) if self.bot_info else 0 + flags |= (1 << 6) if self.pinned_msg_id is not None else 0 + flags |= (1 << 11) if self.folder_id is not None else 0 + flags |= (1 << 12) if self.call is not None else 0 + flags |= (1 << 14) if self.ttl_period is not None else 0 + flags |= (1 << 15) if self.groupcall_default_join_as is not None else 0 + flags |= (1 << 16) if self.theme_emoticon is not None else 0 + flags |= (1 << 17) if self.requests_pending is not None else 0 + flags |= (1 << 17) if self.recent_requesters else 0 + flags |= (1 << 18) if self.available_reactions is not None else 0 + flags |= (1 << 20) if self.reactions_limit is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(String(self.about)) + + b.write(self.participants.write()) + + if self.chat_photo is not None: + b.write(self.chat_photo.write()) + + b.write(self.notify_settings.write()) + + if self.exported_invite is not None: + b.write(self.exported_invite.write()) + + if self.bot_info is not None: + b.write(Vector(self.bot_info)) + + if self.pinned_msg_id is not None: + b.write(Int(self.pinned_msg_id)) + + if self.folder_id is not None: + b.write(Int(self.folder_id)) + + if self.call is not None: + b.write(self.call.write()) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + if self.groupcall_default_join_as is not None: + b.write(self.groupcall_default_join_as.write()) + + if self.theme_emoticon is not None: + b.write(String(self.theme_emoticon)) + + if self.requests_pending is not None: + b.write(Int(self.requests_pending)) + + if self.recent_requesters is not None: + b.write(Vector(self.recent_requesters, Long)) + + if self.available_reactions is not None: + b.write(self.available_reactions.write()) + + if self.reactions_limit is not None: + b.write(Int(self.reactions_limit)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_invite.py b/pyrogram/raw/types/chat_invite.py new file mode 100644 index 00000000..2cb5b8ef --- /dev/null +++ b/pyrogram/raw/types/chat_invite.py @@ -0,0 +1,191 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInvite(TLObject): # type: ignore + """Chat invite info + + Constructor of :obj:`~pyrogram.raw.base.ChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``5C9D3702`` + + Parameters: + title (``str``): + Chat/supergroup/channel title + + photo (:obj:`Photo `): + Chat/supergroup/channel photo + + participants_count (``int`` ``32-bit``): + Participant count + + color (``int`` ``32-bit``): + Profile color palette ID + + channel (``bool``, *optional*): + Whether this is a channel/supergroup or a normal group + + broadcast (``bool``, *optional*): + Whether this is a channel + + public (``bool``, *optional*): + Whether this is a public channel/supergroup + + megagroup (``bool``, *optional*): + Whether this is a supergroup + + request_needed (``bool``, *optional*): + Whether the join request » must be first approved by an administrator + + verified (``bool``, *optional*): + Is this chat or channel verified by Telegram? + + scam (``bool``, *optional*): + This chat is probably a scam + + fake (``bool``, *optional*): + If set, this chat was reported by many users as a fake or scam: be careful when interacting with it. + + can_refulfill_subscription (``bool``, *optional*): + N/A + + about (``str``, *optional*): + Description of the group of channel + + participants (List of :obj:`User `, *optional*): + A few of the participants that are in the group + + subscription_pricing (:obj:`StarsSubscriptionPricing `, *optional*): + N/A + + subscription_form_id (``int`` ``64-bit``, *optional*): + N/A + + bot_verification (:obj:`BotVerification `, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.CheckChatInvite + """ + + __slots__: List[str] = ["title", "photo", "participants_count", "color", "channel", "broadcast", "public", "megagroup", "request_needed", "verified", "scam", "fake", "can_refulfill_subscription", "about", "participants", "subscription_pricing", "subscription_form_id", "bot_verification"] + + ID = 0x5c9d3702 + QUALNAME = "types.ChatInvite" + + def __init__(self, *, title: str, photo: "raw.base.Photo", participants_count: int, color: int, channel: Optional[bool] = None, broadcast: Optional[bool] = None, public: Optional[bool] = None, megagroup: Optional[bool] = None, request_needed: Optional[bool] = None, verified: Optional[bool] = None, scam: Optional[bool] = None, fake: Optional[bool] = None, can_refulfill_subscription: Optional[bool] = None, about: Optional[str] = None, participants: Optional[List["raw.base.User"]] = None, subscription_pricing: "raw.base.StarsSubscriptionPricing" = None, subscription_form_id: Optional[int] = None, bot_verification: "raw.base.BotVerification" = None) -> None: + self.title = title # string + self.photo = photo # Photo + self.participants_count = participants_count # int + self.color = color # int + self.channel = channel # flags.0?true + self.broadcast = broadcast # flags.1?true + self.public = public # flags.2?true + self.megagroup = megagroup # flags.3?true + self.request_needed = request_needed # flags.6?true + self.verified = verified # flags.7?true + self.scam = scam # flags.8?true + self.fake = fake # flags.9?true + self.can_refulfill_subscription = can_refulfill_subscription # flags.11?true + self.about = about # flags.5?string + self.participants = participants # flags.4?Vector + self.subscription_pricing = subscription_pricing # flags.10?StarsSubscriptionPricing + self.subscription_form_id = subscription_form_id # flags.12?long + self.bot_verification = bot_verification # flags.13?BotVerification + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInvite": + + flags = Int.read(b) + + channel = True if flags & (1 << 0) else False + broadcast = True if flags & (1 << 1) else False + public = True if flags & (1 << 2) else False + megagroup = True if flags & (1 << 3) else False + request_needed = True if flags & (1 << 6) else False + verified = True if flags & (1 << 7) else False + scam = True if flags & (1 << 8) else False + fake = True if flags & (1 << 9) else False + can_refulfill_subscription = True if flags & (1 << 11) else False + title = String.read(b) + + about = String.read(b) if flags & (1 << 5) else None + photo = TLObject.read(b) + + participants_count = Int.read(b) + + participants = TLObject.read(b) if flags & (1 << 4) else [] + + color = Int.read(b) + + subscription_pricing = TLObject.read(b) if flags & (1 << 10) else None + + subscription_form_id = Long.read(b) if flags & (1 << 12) else None + bot_verification = TLObject.read(b) if flags & (1 << 13) else None + + return ChatInvite(title=title, photo=photo, participants_count=participants_count, color=color, channel=channel, broadcast=broadcast, public=public, megagroup=megagroup, request_needed=request_needed, verified=verified, scam=scam, fake=fake, can_refulfill_subscription=can_refulfill_subscription, about=about, participants=participants, subscription_pricing=subscription_pricing, subscription_form_id=subscription_form_id, bot_verification=bot_verification) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.channel else 0 + flags |= (1 << 1) if self.broadcast else 0 + flags |= (1 << 2) if self.public else 0 + flags |= (1 << 3) if self.megagroup else 0 + flags |= (1 << 6) if self.request_needed else 0 + flags |= (1 << 7) if self.verified else 0 + flags |= (1 << 8) if self.scam else 0 + flags |= (1 << 9) if self.fake else 0 + flags |= (1 << 11) if self.can_refulfill_subscription else 0 + flags |= (1 << 5) if self.about is not None else 0 + flags |= (1 << 4) if self.participants else 0 + flags |= (1 << 10) if self.subscription_pricing is not None else 0 + flags |= (1 << 12) if self.subscription_form_id is not None else 0 + flags |= (1 << 13) if self.bot_verification is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + if self.about is not None: + b.write(String(self.about)) + + b.write(self.photo.write()) + + b.write(Int(self.participants_count)) + + if self.participants is not None: + b.write(Vector(self.participants)) + + b.write(Int(self.color)) + + if self.subscription_pricing is not None: + b.write(self.subscription_pricing.write()) + + if self.subscription_form_id is not None: + b.write(Long(self.subscription_form_id)) + + if self.bot_verification is not None: + b.write(self.bot_verification.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_invite_already.py b/pyrogram/raw/types/chat_invite_already.py new file mode 100644 index 00000000..f7966483 --- /dev/null +++ b/pyrogram/raw/types/chat_invite_already.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInviteAlready(TLObject): # type: ignore + """The user has already joined this chat + + Constructor of :obj:`~pyrogram.raw.base.ChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``5A686D7C`` + + Parameters: + chat (:obj:`Chat `): + The chat connected to the invite + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.CheckChatInvite + """ + + __slots__: List[str] = ["chat"] + + ID = 0x5a686d7c + QUALNAME = "types.ChatInviteAlready" + + def __init__(self, *, chat: "raw.base.Chat") -> None: + self.chat = chat # Chat + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInviteAlready": + # No flags + + chat = TLObject.read(b) + + return ChatInviteAlready(chat=chat) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chat.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_invite_exported.py b/pyrogram/raw/types/chat_invite_exported.py new file mode 100644 index 00000000..1475facb --- /dev/null +++ b/pyrogram/raw/types/chat_invite_exported.py @@ -0,0 +1,172 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInviteExported(TLObject): # type: ignore + """Exported chat invite + + Constructor of :obj:`~pyrogram.raw.base.ExportedChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``A22CBD96`` + + Parameters: + link (``str``): + Chat invitation link + + admin_id (``int`` ``64-bit``): + ID of the admin that created this chat invite + + date (``int`` ``32-bit``): + When was this chat invite created + + revoked (``bool``, *optional*): + Whether this chat invite was revoked + + permanent (``bool``, *optional*): + Whether this chat invite has no expiration + + request_needed (``bool``, *optional*): + Whether users importing this invite link will have to be approved to join the channel or group + + start_date (``int`` ``32-bit``, *optional*): + When was this chat invite last modified + + expire_date (``int`` ``32-bit``, *optional*): + When does this chat invite expire + + usage_limit (``int`` ``32-bit``, *optional*): + Maximum number of users that can join using this link + + usage (``int`` ``32-bit``, *optional*): + How many users joined using this link + + requested (``int`` ``32-bit``, *optional*): + Number of users that have already used this link to join + + subscription_expired (``int`` ``32-bit``, *optional*): + N/A + + title (``str``, *optional*): + Custom description for the invite link, visible only to admins + + subscription_pricing (:obj:`StarsSubscriptionPricing `, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.ExportChatInvite + """ + + __slots__: List[str] = ["link", "admin_id", "date", "revoked", "permanent", "request_needed", "start_date", "expire_date", "usage_limit", "usage", "requested", "subscription_expired", "title", "subscription_pricing"] + + ID = 0xa22cbd96 + QUALNAME = "types.ChatInviteExported" + + def __init__(self, *, link: str, admin_id: int, date: int, revoked: Optional[bool] = None, permanent: Optional[bool] = None, request_needed: Optional[bool] = None, start_date: Optional[int] = None, expire_date: Optional[int] = None, usage_limit: Optional[int] = None, usage: Optional[int] = None, requested: Optional[int] = None, subscription_expired: Optional[int] = None, title: Optional[str] = None, subscription_pricing: "raw.base.StarsSubscriptionPricing" = None) -> None: + self.link = link # string + self.admin_id = admin_id # long + self.date = date # int + self.revoked = revoked # flags.0?true + self.permanent = permanent # flags.5?true + self.request_needed = request_needed # flags.6?true + self.start_date = start_date # flags.4?int + self.expire_date = expire_date # flags.1?int + self.usage_limit = usage_limit # flags.2?int + self.usage = usage # flags.3?int + self.requested = requested # flags.7?int + self.subscription_expired = subscription_expired # flags.10?int + self.title = title # flags.8?string + self.subscription_pricing = subscription_pricing # flags.9?StarsSubscriptionPricing + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInviteExported": + + flags = Int.read(b) + + revoked = True if flags & (1 << 0) else False + permanent = True if flags & (1 << 5) else False + request_needed = True if flags & (1 << 6) else False + link = String.read(b) + + admin_id = Long.read(b) + + date = Int.read(b) + + start_date = Int.read(b) if flags & (1 << 4) else None + expire_date = Int.read(b) if flags & (1 << 1) else None + usage_limit = Int.read(b) if flags & (1 << 2) else None + usage = Int.read(b) if flags & (1 << 3) else None + requested = Int.read(b) if flags & (1 << 7) else None + subscription_expired = Int.read(b) if flags & (1 << 10) else None + title = String.read(b) if flags & (1 << 8) else None + subscription_pricing = TLObject.read(b) if flags & (1 << 9) else None + + return ChatInviteExported(link=link, admin_id=admin_id, date=date, revoked=revoked, permanent=permanent, request_needed=request_needed, start_date=start_date, expire_date=expire_date, usage_limit=usage_limit, usage=usage, requested=requested, subscription_expired=subscription_expired, title=title, subscription_pricing=subscription_pricing) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoked else 0 + flags |= (1 << 5) if self.permanent else 0 + flags |= (1 << 6) if self.request_needed else 0 + flags |= (1 << 4) if self.start_date is not None else 0 + flags |= (1 << 1) if self.expire_date is not None else 0 + flags |= (1 << 2) if self.usage_limit is not None else 0 + flags |= (1 << 3) if self.usage is not None else 0 + flags |= (1 << 7) if self.requested is not None else 0 + flags |= (1 << 10) if self.subscription_expired is not None else 0 + flags |= (1 << 8) if self.title is not None else 0 + flags |= (1 << 9) if self.subscription_pricing is not None else 0 + b.write(Int(flags)) + + b.write(String(self.link)) + + b.write(Long(self.admin_id)) + + b.write(Int(self.date)) + + if self.start_date is not None: + b.write(Int(self.start_date)) + + if self.expire_date is not None: + b.write(Int(self.expire_date)) + + if self.usage_limit is not None: + b.write(Int(self.usage_limit)) + + if self.usage is not None: + b.write(Int(self.usage)) + + if self.requested is not None: + b.write(Int(self.requested)) + + if self.subscription_expired is not None: + b.write(Int(self.subscription_expired)) + + if self.title is not None: + b.write(String(self.title)) + + if self.subscription_pricing is not None: + b.write(self.subscription_pricing.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_invite_importer.py b/pyrogram/raw/types/chat_invite_importer.py new file mode 100644 index 00000000..f80d6dfe --- /dev/null +++ b/pyrogram/raw/types/chat_invite_importer.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInviteImporter(TLObject): # type: ignore + """When and which user joined the chat using a chat invite + + Constructor of :obj:`~pyrogram.raw.base.ChatInviteImporter`. + + Details: + - Layer: ``224`` + - ID: ``8C5ADFD9`` + + Parameters: + user_id (``int`` ``64-bit``): + The user + + date (``int`` ``32-bit``): + When did the user join + + requested (``bool``, *optional*): + Whether this user currently has a pending join request » + + via_chatlist (``bool``, *optional*): + The participant joined by importing a chat folder deep link ». + + about (``str``, *optional*): + For users with pending requests, contains bio of the user that requested to join + + approved_by (``int`` ``64-bit``, *optional*): + The administrator that approved the join request » of the user + + """ + + __slots__: List[str] = ["user_id", "date", "requested", "via_chatlist", "about", "approved_by"] + + ID = 0x8c5adfd9 + QUALNAME = "types.ChatInviteImporter" + + def __init__(self, *, user_id: int, date: int, requested: Optional[bool] = None, via_chatlist: Optional[bool] = None, about: Optional[str] = None, approved_by: Optional[int] = None) -> None: + self.user_id = user_id # long + self.date = date # int + self.requested = requested # flags.0?true + self.via_chatlist = via_chatlist # flags.3?true + self.about = about # flags.2?string + self.approved_by = approved_by # flags.1?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInviteImporter": + + flags = Int.read(b) + + requested = True if flags & (1 << 0) else False + via_chatlist = True if flags & (1 << 3) else False + user_id = Long.read(b) + + date = Int.read(b) + + about = String.read(b) if flags & (1 << 2) else None + approved_by = Long.read(b) if flags & (1 << 1) else None + return ChatInviteImporter(user_id=user_id, date=date, requested=requested, via_chatlist=via_chatlist, about=about, approved_by=approved_by) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.requested else 0 + flags |= (1 << 3) if self.via_chatlist else 0 + flags |= (1 << 2) if self.about is not None else 0 + flags |= (1 << 1) if self.approved_by is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.user_id)) + + b.write(Int(self.date)) + + if self.about is not None: + b.write(String(self.about)) + + if self.approved_by is not None: + b.write(Long(self.approved_by)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_invite_peek.py b/pyrogram/raw/types/chat_invite_peek.py new file mode 100644 index 00000000..8547de3a --- /dev/null +++ b/pyrogram/raw/types/chat_invite_peek.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInvitePeek(TLObject): # type: ignore + """A chat invitation that also allows peeking into the group to read messages without joining it. + + Constructor of :obj:`~pyrogram.raw.base.ChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``61695CB0`` + + Parameters: + chat (:obj:`Chat `): + Chat information + + expires (``int`` ``32-bit``): + Read-only anonymous access to this group will be revoked at this date + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.CheckChatInvite + """ + + __slots__: List[str] = ["chat", "expires"] + + ID = 0x61695cb0 + QUALNAME = "types.ChatInvitePeek" + + def __init__(self, *, chat: "raw.base.Chat", expires: int) -> None: + self.chat = chat # Chat + self.expires = expires # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInvitePeek": + # No flags + + chat = TLObject.read(b) + + expires = Int.read(b) + + return ChatInvitePeek(chat=chat, expires=expires) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.chat.write()) + + b.write(Int(self.expires)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_invite_public_join_requests.py b/pyrogram/raw/types/chat_invite_public_join_requests.py new file mode 100644 index 00000000..149ace72 --- /dev/null +++ b/pyrogram/raw/types/chat_invite_public_join_requests.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInvitePublicJoinRequests(TLObject): # type: ignore + """Used in updates and in the channel log to indicate when a user is requesting to join or has joined a discussion group + + Constructor of :obj:`~pyrogram.raw.base.ExportedChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``ED107AB7`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.ExportChatInvite + """ + + __slots__: List[str] = [] + + ID = 0xed107ab7 + QUALNAME = "types.ChatInvitePublicJoinRequests" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInvitePublicJoinRequests": + # No flags + + return ChatInvitePublicJoinRequests() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_onlines.py b/pyrogram/raw/types/chat_onlines.py new file mode 100644 index 00000000..3334f458 --- /dev/null +++ b/pyrogram/raw/types/chat_onlines.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatOnlines(TLObject): # type: ignore + """Number of online users in a chat + + Constructor of :obj:`~pyrogram.raw.base.ChatOnlines`. + + Details: + - Layer: ``224`` + - ID: ``F041E250`` + + Parameters: + onlines (``int`` ``32-bit``): + Number of online users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetOnlines + """ + + __slots__: List[str] = ["onlines"] + + ID = 0xf041e250 + QUALNAME = "types.ChatOnlines" + + def __init__(self, *, onlines: int) -> None: + self.onlines = onlines # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatOnlines": + # No flags + + onlines = Int.read(b) + + return ChatOnlines(onlines=onlines) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.onlines)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_participant.py b/pyrogram/raw/types/chat_participant.py new file mode 100644 index 00000000..a7f2a472 --- /dev/null +++ b/pyrogram/raw/types/chat_participant.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatParticipant(TLObject): # type: ignore + """Group member. + + Constructor of :obj:`~pyrogram.raw.base.ChatParticipant`. + + Details: + - Layer: ``224`` + - ID: ``C02D4007`` + + Parameters: + user_id (``int`` ``64-bit``): + Member user ID + + inviter_id (``int`` ``64-bit``): + ID of the user that added the member to the group + + date (``int`` ``32-bit``): + Date added to the group + + """ + + __slots__: List[str] = ["user_id", "inviter_id", "date"] + + ID = 0xc02d4007 + QUALNAME = "types.ChatParticipant" + + def __init__(self, *, user_id: int, inviter_id: int, date: int) -> None: + self.user_id = user_id # long + self.inviter_id = inviter_id # long + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatParticipant": + # No flags + + user_id = Long.read(b) + + inviter_id = Long.read(b) + + date = Int.read(b) + + return ChatParticipant(user_id=user_id, inviter_id=inviter_id, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(Long(self.inviter_id)) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_participant_admin.py b/pyrogram/raw/types/chat_participant_admin.py new file mode 100644 index 00000000..1c25e2a0 --- /dev/null +++ b/pyrogram/raw/types/chat_participant_admin.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatParticipantAdmin(TLObject): # type: ignore + """Chat admin + + Constructor of :obj:`~pyrogram.raw.base.ChatParticipant`. + + Details: + - Layer: ``224`` + - ID: ``A0933F5B`` + + Parameters: + user_id (``int`` ``64-bit``): + ID of a group member that is admin + + inviter_id (``int`` ``64-bit``): + ID of the user that added the member to the group + + date (``int`` ``32-bit``): + Date when the user was added + + """ + + __slots__: List[str] = ["user_id", "inviter_id", "date"] + + ID = 0xa0933f5b + QUALNAME = "types.ChatParticipantAdmin" + + def __init__(self, *, user_id: int, inviter_id: int, date: int) -> None: + self.user_id = user_id # long + self.inviter_id = inviter_id # long + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatParticipantAdmin": + # No flags + + user_id = Long.read(b) + + inviter_id = Long.read(b) + + date = Int.read(b) + + return ChatParticipantAdmin(user_id=user_id, inviter_id=inviter_id, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(Long(self.inviter_id)) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_participant_creator.py b/pyrogram/raw/types/chat_participant_creator.py new file mode 100644 index 00000000..143b2fbd --- /dev/null +++ b/pyrogram/raw/types/chat_participant_creator.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatParticipantCreator(TLObject): # type: ignore + """Represents the creator of the group + + Constructor of :obj:`~pyrogram.raw.base.ChatParticipant`. + + Details: + - Layer: ``224`` + - ID: ``E46BCEE4`` + + Parameters: + user_id (``int`` ``64-bit``): + ID of the user that created the group + + """ + + __slots__: List[str] = ["user_id"] + + ID = 0xe46bcee4 + QUALNAME = "types.ChatParticipantCreator" + + def __init__(self, *, user_id: int) -> None: + self.user_id = user_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatParticipantCreator": + # No flags + + user_id = Long.read(b) + + return ChatParticipantCreator(user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_participants.py b/pyrogram/raw/types/chat_participants.py new file mode 100644 index 00000000..020d1f8a --- /dev/null +++ b/pyrogram/raw/types/chat_participants.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatParticipants(TLObject): # type: ignore + """Group members. + + Constructor of :obj:`~pyrogram.raw.base.ChatParticipants`. + + Details: + - Layer: ``224`` + - ID: ``3CBC93F8`` + + Parameters: + chat_id (``int`` ``64-bit``): + Group identifier + + participants (List of :obj:`ChatParticipant `): + List of group members + + version (``int`` ``32-bit``): + Group version number + + """ + + __slots__: List[str] = ["chat_id", "participants", "version"] + + ID = 0x3cbc93f8 + QUALNAME = "types.ChatParticipants" + + def __init__(self, *, chat_id: int, participants: List["raw.base.ChatParticipant"], version: int) -> None: + self.chat_id = chat_id # long + self.participants = participants # Vector + self.version = version # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatParticipants": + # No flags + + chat_id = Long.read(b) + + participants = TLObject.read(b) + + version = Int.read(b) + + return ChatParticipants(chat_id=chat_id, participants=participants, version=version) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + b.write(Vector(self.participants)) + + b.write(Int(self.version)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_participants_forbidden.py b/pyrogram/raw/types/chat_participants_forbidden.py new file mode 100644 index 00000000..5e7ede3a --- /dev/null +++ b/pyrogram/raw/types/chat_participants_forbidden.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatParticipantsForbidden(TLObject): # type: ignore + """Info on members is unavailable + + Constructor of :obj:`~pyrogram.raw.base.ChatParticipants`. + + Details: + - Layer: ``224`` + - ID: ``8763D3E1`` + + Parameters: + chat_id (``int`` ``64-bit``): + Group ID + + self_participant (:obj:`ChatParticipant `, *optional*): + Info about the group membership of the current user + + """ + + __slots__: List[str] = ["chat_id", "self_participant"] + + ID = 0x8763d3e1 + QUALNAME = "types.ChatParticipantsForbidden" + + def __init__(self, *, chat_id: int, self_participant: "raw.base.ChatParticipant" = None) -> None: + self.chat_id = chat_id # long + self.self_participant = self_participant # flags.0?ChatParticipant + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatParticipantsForbidden": + + flags = Int.read(b) + + chat_id = Long.read(b) + + self_participant = TLObject.read(b) if flags & (1 << 0) else None + + return ChatParticipantsForbidden(chat_id=chat_id, self_participant=self_participant) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.self_participant is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.chat_id)) + + if self.self_participant is not None: + b.write(self.self_participant.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_photo.py b/pyrogram/raw/types/chat_photo.py new file mode 100644 index 00000000..e1e49079 --- /dev/null +++ b/pyrogram/raw/types/chat_photo.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatPhoto(TLObject): # type: ignore + """Group profile photo. + + Constructor of :obj:`~pyrogram.raw.base.ChatPhoto`. + + Details: + - Layer: ``224`` + - ID: ``1C6E1C11`` + + Parameters: + photo_id (``int`` ``64-bit``): + Photo ID + + dc_id (``int`` ``32-bit``): + DC where this photo is stored + + has_video (``bool``, *optional*): + Whether the user has an animated profile picture + + stripped_thumb (``bytes``, *optional*): + Stripped thumbnail + + """ + + __slots__: List[str] = ["photo_id", "dc_id", "has_video", "stripped_thumb"] + + ID = 0x1c6e1c11 + QUALNAME = "types.ChatPhoto" + + def __init__(self, *, photo_id: int, dc_id: int, has_video: Optional[bool] = None, stripped_thumb: Optional[bytes] = None) -> None: + self.photo_id = photo_id # long + self.dc_id = dc_id # int + self.has_video = has_video # flags.0?true + self.stripped_thumb = stripped_thumb # flags.1?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatPhoto": + + flags = Int.read(b) + + has_video = True if flags & (1 << 0) else False + photo_id = Long.read(b) + + stripped_thumb = Bytes.read(b) if flags & (1 << 1) else None + dc_id = Int.read(b) + + return ChatPhoto(photo_id=photo_id, dc_id=dc_id, has_video=has_video, stripped_thumb=stripped_thumb) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.has_video else 0 + flags |= (1 << 1) if self.stripped_thumb is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.photo_id)) + + if self.stripped_thumb is not None: + b.write(Bytes(self.stripped_thumb)) + + b.write(Int(self.dc_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_photo_empty.py b/pyrogram/raw/types/chat_photo_empty.py new file mode 100644 index 00000000..f59e0d59 --- /dev/null +++ b/pyrogram/raw/types/chat_photo_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatPhotoEmpty(TLObject): # type: ignore + """Group photo is not set. + + Constructor of :obj:`~pyrogram.raw.base.ChatPhoto`. + + Details: + - Layer: ``224`` + - ID: ``37C1011C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x37c1011c + QUALNAME = "types.ChatPhotoEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatPhotoEmpty": + # No flags + + return ChatPhotoEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_reactions_all.py b/pyrogram/raw/types/chat_reactions_all.py new file mode 100644 index 00000000..a0f87532 --- /dev/null +++ b/pyrogram/raw/types/chat_reactions_all.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatReactionsAll(TLObject): # type: ignore + """All reactions or all non-custom reactions are allowed + + Constructor of :obj:`~pyrogram.raw.base.ChatReactions`. + + Details: + - Layer: ``224`` + - ID: ``52928BCA`` + + Parameters: + allow_custom (``bool``, *optional*): + Whether to allow custom reactions + + """ + + __slots__: List[str] = ["allow_custom"] + + ID = 0x52928bca + QUALNAME = "types.ChatReactionsAll" + + def __init__(self, *, allow_custom: Optional[bool] = None) -> None: + self.allow_custom = allow_custom # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatReactionsAll": + + flags = Int.read(b) + + allow_custom = True if flags & (1 << 0) else False + return ChatReactionsAll(allow_custom=allow_custom) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.allow_custom else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_reactions_none.py b/pyrogram/raw/types/chat_reactions_none.py new file mode 100644 index 00000000..4ebcc9f5 --- /dev/null +++ b/pyrogram/raw/types/chat_reactions_none.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatReactionsNone(TLObject): # type: ignore + """No reactions are allowed + + Constructor of :obj:`~pyrogram.raw.base.ChatReactions`. + + Details: + - Layer: ``224`` + - ID: ``EAFC32BC`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xeafc32bc + QUALNAME = "types.ChatReactionsNone" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatReactionsNone": + # No flags + + return ChatReactionsNone() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_reactions_some.py b/pyrogram/raw/types/chat_reactions_some.py new file mode 100644 index 00000000..e06b8353 --- /dev/null +++ b/pyrogram/raw/types/chat_reactions_some.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatReactionsSome(TLObject): # type: ignore + """Some reactions are allowed + + Constructor of :obj:`~pyrogram.raw.base.ChatReactions`. + + Details: + - Layer: ``224`` + - ID: ``661D4037`` + + Parameters: + reactions (List of :obj:`Reaction `): + Allowed set of reactions: the reactions_in_chat_max configuration field indicates the maximum number of reactions that can be specified in this field. + + """ + + __slots__: List[str] = ["reactions"] + + ID = 0x661d4037 + QUALNAME = "types.ChatReactionsSome" + + def __init__(self, *, reactions: List["raw.base.Reaction"]) -> None: + self.reactions = reactions # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatReactionsSome": + # No flags + + reactions = TLObject.read(b) + + return ChatReactionsSome(reactions=reactions) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.reactions)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_theme.py b/pyrogram/raw/types/chat_theme.py new file mode 100644 index 00000000..360c2804 --- /dev/null +++ b/pyrogram/raw/types/chat_theme.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatTheme(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ChatTheme`. + + Details: + - Layer: ``224`` + - ID: ``C3DFFC04`` + + Parameters: + emoticon (``str``): + N/A + + """ + + __slots__: List[str] = ["emoticon"] + + ID = 0xc3dffc04 + QUALNAME = "types.ChatTheme" + + def __init__(self, *, emoticon: str) -> None: + self.emoticon = emoticon # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatTheme": + # No flags + + emoticon = String.read(b) + + return ChatTheme(emoticon=emoticon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.emoticon)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chat_theme_unique_gift.py b/pyrogram/raw/types/chat_theme_unique_gift.py new file mode 100644 index 00000000..1696e18a --- /dev/null +++ b/pyrogram/raw/types/chat_theme_unique_gift.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatThemeUniqueGift(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ChatTheme`. + + Details: + - Layer: ``224`` + - ID: ``3458F9C8`` + + Parameters: + gift (:obj:`StarGift `): + N/A + + theme_settings (List of :obj:`ThemeSettings `): + N/A + + """ + + __slots__: List[str] = ["gift", "theme_settings"] + + ID = 0x3458f9c8 + QUALNAME = "types.ChatThemeUniqueGift" + + def __init__(self, *, gift: "raw.base.StarGift", theme_settings: List["raw.base.ThemeSettings"]) -> None: + self.gift = gift # StarGift + self.theme_settings = theme_settings # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatThemeUniqueGift": + # No flags + + gift = TLObject.read(b) + + theme_settings = TLObject.read(b) + + return ChatThemeUniqueGift(gift=gift, theme_settings=theme_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.gift.write()) + + b.write(Vector(self.theme_settings)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chatlists/__init__.py b/pyrogram/raw/types/chatlists/__init__.py new file mode 100644 index 00000000..04e7d746 --- /dev/null +++ b/pyrogram/raw/types/chatlists/__init__.py @@ -0,0 +1,41 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .exported_chatlist_invite import ExportedChatlistInvite +from .exported_invites import ExportedInvites +from .chatlist_invite_already import ChatlistInviteAlready +from .chatlist_invite import ChatlistInvite +from .chatlist_updates import ChatlistUpdates + + +__all__ = [ + "ExportedChatlistInvite", + "ExportedInvites", + "ChatlistInviteAlready", + "ChatlistInvite", + "ChatlistUpdates", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/chatlists/chatlist_invite.py b/pyrogram/raw/types/chatlists/chatlist_invite.py new file mode 100644 index 00000000..a8d58fcc --- /dev/null +++ b/pyrogram/raw/types/chatlists/chatlist_invite.py @@ -0,0 +1,104 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatlistInvite(TLObject): # type: ignore + """Info about a chat folder deep link ». + + Constructor of :obj:`~pyrogram.raw.base.chatlists.ChatlistInvite`. + + Details: + - Layer: ``224`` + - ID: ``F10ECE2F`` + + Parameters: + title (:obj:`TextWithEntities `): + Name of the link + + peers (List of :obj:`Peer `): + Supergroups and channels to join + + chats (List of :obj:`Chat `): + Related chat information + + users (List of :obj:`User `): + Related user information + + title_noanimate (``bool``, *optional*): + N/A + + emoticon (``str``, *optional*): + Emoji to use as icon for the folder. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + chatlists.CheckChatlistInvite + """ + + __slots__: List[str] = ["title", "peers", "chats", "users", "title_noanimate", "emoticon"] + + ID = 0xf10ece2f + QUALNAME = "types.chatlists.ChatlistInvite" + + def __init__(self, *, title: "raw.base.TextWithEntities", peers: List["raw.base.Peer"], chats: List["raw.base.Chat"], users: List["raw.base.User"], title_noanimate: Optional[bool] = None, emoticon: Optional[str] = None) -> None: + self.title = title # TextWithEntities + self.peers = peers # Vector + self.chats = chats # Vector + self.users = users # Vector + self.title_noanimate = title_noanimate # flags.1?true + self.emoticon = emoticon # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatlistInvite": + + flags = Int.read(b) + + title_noanimate = True if flags & (1 << 1) else False + title = TLObject.read(b) + + emoticon = String.read(b) if flags & (1 << 0) else None + peers = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChatlistInvite(title=title, peers=peers, chats=chats, users=users, title_noanimate=title_noanimate, emoticon=emoticon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.title_noanimate else 0 + flags |= (1 << 0) if self.emoticon is not None else 0 + b.write(Int(flags)) + + b.write(self.title.write()) + + if self.emoticon is not None: + b.write(String(self.emoticon)) + + b.write(Vector(self.peers)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chatlists/chatlist_invite_already.py b/pyrogram/raw/types/chatlists/chatlist_invite_already.py new file mode 100644 index 00000000..0d7db420 --- /dev/null +++ b/pyrogram/raw/types/chatlists/chatlist_invite_already.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatlistInviteAlready(TLObject): # type: ignore + """Updated info about a chat folder deep link » we already imported. + + Constructor of :obj:`~pyrogram.raw.base.chatlists.ChatlistInvite`. + + Details: + - Layer: ``224`` + - ID: ``FA87F659`` + + Parameters: + filter_id (``int`` ``32-bit``): + ID of the imported folder + + missing_peers (List of :obj:`Peer `): + New peers to be imported + + already_peers (List of :obj:`Peer `): + Peers that were already imported + + chats (List of :obj:`Chat `): + Related chat information + + users (List of :obj:`User `): + Related user information + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + chatlists.CheckChatlistInvite + """ + + __slots__: List[str] = ["filter_id", "missing_peers", "already_peers", "chats", "users"] + + ID = 0xfa87f659 + QUALNAME = "types.chatlists.ChatlistInviteAlready" + + def __init__(self, *, filter_id: int, missing_peers: List["raw.base.Peer"], already_peers: List["raw.base.Peer"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.filter_id = filter_id # int + self.missing_peers = missing_peers # Vector + self.already_peers = already_peers # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatlistInviteAlready": + # No flags + + filter_id = Int.read(b) + + missing_peers = TLObject.read(b) + + already_peers = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChatlistInviteAlready(filter_id=filter_id, missing_peers=missing_peers, already_peers=already_peers, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.filter_id)) + + b.write(Vector(self.missing_peers)) + + b.write(Vector(self.already_peers)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chatlists/chatlist_updates.py b/pyrogram/raw/types/chatlists/chatlist_updates.py new file mode 100644 index 00000000..3434c66b --- /dev/null +++ b/pyrogram/raw/types/chatlists/chatlist_updates.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatlistUpdates(TLObject): # type: ignore + """Updated information about a chat folder deep link ». + + Constructor of :obj:`~pyrogram.raw.base.chatlists.ChatlistUpdates`. + + Details: + - Layer: ``224`` + - ID: ``93BD878D`` + + Parameters: + missing_peers (List of :obj:`Peer `): + New peers to join + + chats (List of :obj:`Chat `): + Related chat information + + users (List of :obj:`User `): + Related user information + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + chatlists.GetChatlistUpdates + """ + + __slots__: List[str] = ["missing_peers", "chats", "users"] + + ID = 0x93bd878d + QUALNAME = "types.chatlists.ChatlistUpdates" + + def __init__(self, *, missing_peers: List["raw.base.Peer"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.missing_peers = missing_peers # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatlistUpdates": + # No flags + + missing_peers = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChatlistUpdates(missing_peers=missing_peers, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.missing_peers)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/chatlists/exported_chatlist_invite.py b/pyrogram/raw/types/chatlists/exported_chatlist_invite.py new file mode 100644 index 00000000..d9018b13 --- /dev/null +++ b/pyrogram/raw/types/chatlists/exported_chatlist_invite.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedChatlistInvite(TLObject): # type: ignore + """Info about an exported chat folder deep link ». + + Constructor of :obj:`~pyrogram.raw.base.chatlists.ExportedChatlistInvite`. + + Details: + - Layer: ``224`` + - ID: ``10E6E3A6`` + + Parameters: + filter (:obj:`DialogFilter `): + Folder ID + + invite (:obj:`ExportedChatlistInvite `): + The exported chat folder deep link ». + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + chatlists.ExportChatlistInvite + """ + + __slots__: List[str] = ["filter", "invite"] + + ID = 0x10e6e3a6 + QUALNAME = "types.chatlists.ExportedChatlistInvite" + + def __init__(self, *, filter: "raw.base.DialogFilter", invite: "raw.base.ExportedChatlistInvite") -> None: + self.filter = filter # DialogFilter + self.invite = invite # ExportedChatlistInvite + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedChatlistInvite": + # No flags + + filter = TLObject.read(b) + + invite = TLObject.read(b) + + return ExportedChatlistInvite(filter=filter, invite=invite) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.filter.write()) + + b.write(self.invite.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/chatlists/exported_invites.py b/pyrogram/raw/types/chatlists/exported_invites.py new file mode 100644 index 00000000..67013c2e --- /dev/null +++ b/pyrogram/raw/types/chatlists/exported_invites.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedInvites(TLObject): # type: ignore + """Info about multiple chat folder deep links ». + + Constructor of :obj:`~pyrogram.raw.base.chatlists.ExportedInvites`. + + Details: + - Layer: ``224`` + - ID: ``10AB6DC7`` + + Parameters: + invites (List of :obj:`ExportedChatlistInvite `): + The chat folder deep links ». + + chats (List of :obj:`Chat `): + Related chat information + + users (List of :obj:`User `): + Related user information + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + chatlists.GetExportedInvites + """ + + __slots__: List[str] = ["invites", "chats", "users"] + + ID = 0x10ab6dc7 + QUALNAME = "types.chatlists.ExportedInvites" + + def __init__(self, *, invites: List["raw.base.ExportedChatlistInvite"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.invites = invites # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedInvites": + # No flags + + invites = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ExportedInvites(invites=invites, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.invites)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/client_dh_inner_data.py b/pyrogram/raw/types/client_dh_inner_data.py new file mode 100644 index 00000000..a26a0d8e --- /dev/null +++ b/pyrogram/raw/types/client_dh_inner_data.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ClientDHInnerData(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ClientDHInnerData`. + + Details: + - Layer: ``224`` + - ID: ``6643B654`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + server_nonce (``int`` ``128-bit``): + N/A + + retry_id (``int`` ``64-bit``): + N/A + + g_b (``bytes``): + N/A + + """ + + __slots__: List[str] = ["nonce", "server_nonce", "retry_id", "g_b"] + + ID = 0x6643b654 + QUALNAME = "types.ClientDHInnerData" + + def __init__(self, *, nonce: int, server_nonce: int, retry_id: int, g_b: bytes) -> None: + self.nonce = nonce # int128 + self.server_nonce = server_nonce # int128 + self.retry_id = retry_id # long + self.g_b = g_b # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ClientDHInnerData": + # No flags + + nonce = Int128.read(b) + + server_nonce = Int128.read(b) + + retry_id = Long.read(b) + + g_b = Bytes.read(b) + + return ClientDHInnerData(nonce=nonce, server_nonce=server_nonce, retry_id=retry_id, g_b=g_b) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + b.write(Int128(self.server_nonce)) + + b.write(Long(self.retry_id)) + + b.write(Bytes(self.g_b)) + + return b.getvalue() diff --git a/pyrogram/raw/types/code_settings.py b/pyrogram/raw/types/code_settings.py new file mode 100644 index 00000000..8bc7d3b8 --- /dev/null +++ b/pyrogram/raw/types/code_settings.py @@ -0,0 +1,112 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CodeSettings(TLObject): # type: ignore + """Settings used by telegram servers for sending the confirm code. + + Constructor of :obj:`~pyrogram.raw.base.CodeSettings`. + + Details: + - Layer: ``224`` + - ID: ``AD253D78`` + + Parameters: + allow_flashcall (``bool``, *optional*): + Whether to allow phone verification via phone calls. + + current_number (``bool``, *optional*): + Pass true if the phone number is used on the current device. Ignored if allow_flashcall is not set. + + allow_app_hash (``bool``, *optional*): + If a token that will be included in eventually sent SMSs is required: required in newer versions of android, to use the android SMS receiver APIs + + allow_missed_call (``bool``, *optional*): + Whether this device supports receiving the code using the auth.codeTypeMissedCall method + + allow_firebase (``bool``, *optional*): + Whether Firebase auth is supported + + unknown_number (``bool``, *optional*): + + + logout_tokens (List of ``bytes``, *optional*): + Previously stored future auth tokens, see the documentation for more info » + + token (``str``, *optional*): + Used only by official iOS apps for Firebase auth: device token for apple push. + + app_sandbox (``bool``, *optional*): + Used only by official iOS apps for firebase auth: whether a sandbox-certificate will be used during transmission of the push notification. + + """ + + __slots__: List[str] = ["allow_flashcall", "current_number", "allow_app_hash", "allow_missed_call", "allow_firebase", "unknown_number", "logout_tokens", "token", "app_sandbox"] + + ID = 0xad253d78 + QUALNAME = "types.CodeSettings" + + def __init__(self, *, allow_flashcall: Optional[bool] = None, current_number: Optional[bool] = None, allow_app_hash: Optional[bool] = None, allow_missed_call: Optional[bool] = None, allow_firebase: Optional[bool] = None, unknown_number: Optional[bool] = None, logout_tokens: Optional[List[bytes]] = None, token: Optional[str] = None, app_sandbox: Optional[bool] = None) -> None: + self.allow_flashcall = allow_flashcall # flags.0?true + self.current_number = current_number # flags.1?true + self.allow_app_hash = allow_app_hash # flags.4?true + self.allow_missed_call = allow_missed_call # flags.5?true + self.allow_firebase = allow_firebase # flags.7?true + self.unknown_number = unknown_number # flags.9?true + self.logout_tokens = logout_tokens # flags.6?Vector + self.token = token # flags.8?string + self.app_sandbox = app_sandbox # flags.8?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CodeSettings": + + flags = Int.read(b) + + allow_flashcall = True if flags & (1 << 0) else False + current_number = True if flags & (1 << 1) else False + allow_app_hash = True if flags & (1 << 4) else False + allow_missed_call = True if flags & (1 << 5) else False + allow_firebase = True if flags & (1 << 7) else False + unknown_number = True if flags & (1 << 9) else False + logout_tokens = TLObject.read(b, Bytes) if flags & (1 << 6) else [] + + token = String.read(b) if flags & (1 << 8) else None + app_sandbox = Bool.read(b) if flags & (1 << 8) else None + return CodeSettings(allow_flashcall=allow_flashcall, current_number=current_number, allow_app_hash=allow_app_hash, allow_missed_call=allow_missed_call, allow_firebase=allow_firebase, unknown_number=unknown_number, logout_tokens=logout_tokens, token=token, app_sandbox=app_sandbox) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.allow_flashcall else 0 + flags |= (1 << 1) if self.current_number else 0 + flags |= (1 << 4) if self.allow_app_hash else 0 + flags |= (1 << 5) if self.allow_missed_call else 0 + flags |= (1 << 7) if self.allow_firebase else 0 + flags |= (1 << 9) if self.unknown_number else 0 + flags |= (1 << 6) if self.logout_tokens else 0 + flags |= (1 << 8) if self.token is not None else 0 + flags |= (1 << 8) if self.app_sandbox is not None else 0 + b.write(Int(flags)) + + if self.logout_tokens is not None: + b.write(Vector(self.logout_tokens, Bytes)) + + if self.token is not None: + b.write(String(self.token)) + + if self.app_sandbox is not None: + b.write(Bool(self.app_sandbox)) + + return b.getvalue() diff --git a/pyrogram/raw/types/config.py b/pyrogram/raw/types/config.py new file mode 100644 index 00000000..c1063583 --- /dev/null +++ b/pyrogram/raw/types/config.py @@ -0,0 +1,435 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Config(TLObject): # type: ignore + """Current configuration + + Constructor of :obj:`~pyrogram.raw.base.Config`. + + Details: + - Layer: ``224`` + - ID: ``CC1A241E`` + + Parameters: + date (``int`` ``32-bit``): + Current date at the server + + expires (``int`` ``32-bit``): + Expiration date of this config: when it expires it'll have to be refetched using help.getConfig + + test_mode (``bool``): + Whether we're connected to the test DCs + + this_dc (``int`` ``32-bit``): + ID of the DC that returned the reply + + dc_options (List of :obj:`DcOption `): + DC IP list + + dc_txt_domain_name (``str``): + Domain name for fetching encrypted DC list from DNS TXT record + + chat_size_max (``int`` ``32-bit``): + Maximum member count for normal groups + + megagroup_size_max (``int`` ``32-bit``): + Maximum member count for supergroups + + forwarded_count_max (``int`` ``32-bit``): + Maximum number of messages that can be forwarded at once using messages.forwardMessages. + + online_update_period_ms (``int`` ``32-bit``): + The client should update its online status every N milliseconds + + offline_blur_timeout_ms (``int`` ``32-bit``): + Delay before offline status needs to be sent to the server + + offline_idle_timeout_ms (``int`` ``32-bit``): + Time without any user activity after which it should be treated offline + + online_cloud_timeout_ms (``int`` ``32-bit``): + If we are offline, but were online from some other client in last online_cloud_timeout_ms milliseconds after we had gone offline, then delay offline notification for notify_cloud_delay_ms milliseconds. + + notify_cloud_delay_ms (``int`` ``32-bit``): + If we are offline, but online from some other client then delay sending the offline notification for notify_cloud_delay_ms milliseconds. + + notify_default_delay_ms (``int`` ``32-bit``): + If some other client is online, then delay notification for notification_default_delay_ms milliseconds + + push_chat_period_ms (``int`` ``32-bit``): + Not for client use + + push_chat_limit (``int`` ``32-bit``): + Not for client use + + edit_time_limit (``int`` ``32-bit``): + Only messages with age smaller than the one specified can be edited + + revoke_time_limit (``int`` ``32-bit``): + Only channel/supergroup messages with age smaller than the specified can be deleted + + revoke_pm_time_limit (``int`` ``32-bit``): + Only private messages with age smaller than the specified can be deleted + + rating_e_decay (``int`` ``32-bit``): + Exponential decay rate for computing top peer rating + + stickers_recent_limit (``int`` ``32-bit``): + Maximum number of recent stickers + + channels_read_media_period (``int`` ``32-bit``): + Indicates that round videos (video notes) and voice messages sent in channels and older than the specified period must be marked as read + + call_receive_timeout_ms (``int`` ``32-bit``): + Maximum allowed outgoing ring time in VoIP calls: if the user we're calling doesn't reply within the specified time (in milliseconds), we should hang up the call + + call_ring_timeout_ms (``int`` ``32-bit``): + Maximum allowed incoming ring time in VoIP calls: if the current user doesn't reply within the specified time (in milliseconds), the call will be automatically refused + + call_connect_timeout_ms (``int`` ``32-bit``): + VoIP connection timeout: if the instance of libtgvoip on the other side of the call doesn't connect to our instance of libtgvoip within the specified time (in milliseconds), the call must be aborted + + call_packet_timeout_ms (``int`` ``32-bit``): + If during a VoIP call a packet isn't received for the specified period of time, the call must be aborted + + me_url_prefix (``str``): + The domain to use to parse deep links ». + + caption_length_max (``int`` ``32-bit``): + Maximum length of caption (length in utf8 codepoints) + + message_length_max (``int`` ``32-bit``): + Maximum length of messages (length in utf8 codepoints) + + webfile_dc_id (``int`` ``32-bit``): + DC ID to use to download webfiles + + default_p2p_contacts (``bool``, *optional*): + Whether the client should use P2P by default for phone calls with contacts + + preload_featured_stickers (``bool``, *optional*): + Whether the client should preload featured stickers + + revoke_pm_inbox (``bool``, *optional*): + Whether incoming private messages can be deleted for both participants + + blocked_mode (``bool``, *optional*): + Indicates that telegram is probably censored by governments/ISPs in the current region + + force_try_ipv6 (``bool``, *optional*): + Whether to forcefully connect using IPv6 dcOptions, even if the client knows that IPv4 is available. + + tmp_sessions (``int`` ``32-bit``, *optional*): + Temporary passport sessions + + autoupdate_url_prefix (``str``, *optional*): + URL to use to auto-update the current app + + gif_search_username (``str``, *optional*): + Username of the bot to use to search for GIFs + + venue_search_username (``str``, *optional*): + Username of the bot to use to search for venues + + img_search_username (``str``, *optional*): + Username of the bot to use for image search + + static_maps_provider (``str``, *optional*): + ID of the map provider to use for venues + + suggested_lang_code (``str``, *optional*): + Suggested language code + + lang_pack_version (``int`` ``32-bit``, *optional*): + Language pack version + + base_lang_pack_version (``int`` ``32-bit``, *optional*): + Basic language pack version + + reactions_default (:obj:`Reaction `, *optional*): + Default message reaction + + autologin_token (``str``, *optional*): + Autologin token, click here for more info on URL authorization ». + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetConfig + """ + + __slots__: List[str] = ["date", "expires", "test_mode", "this_dc", "dc_options", "dc_txt_domain_name", "chat_size_max", "megagroup_size_max", "forwarded_count_max", "online_update_period_ms", "offline_blur_timeout_ms", "offline_idle_timeout_ms", "online_cloud_timeout_ms", "notify_cloud_delay_ms", "notify_default_delay_ms", "push_chat_period_ms", "push_chat_limit", "edit_time_limit", "revoke_time_limit", "revoke_pm_time_limit", "rating_e_decay", "stickers_recent_limit", "channels_read_media_period", "call_receive_timeout_ms", "call_ring_timeout_ms", "call_connect_timeout_ms", "call_packet_timeout_ms", "me_url_prefix", "caption_length_max", "message_length_max", "webfile_dc_id", "default_p2p_contacts", "preload_featured_stickers", "revoke_pm_inbox", "blocked_mode", "force_try_ipv6", "tmp_sessions", "autoupdate_url_prefix", "gif_search_username", "venue_search_username", "img_search_username", "static_maps_provider", "suggested_lang_code", "lang_pack_version", "base_lang_pack_version", "reactions_default", "autologin_token"] + + ID = 0xcc1a241e + QUALNAME = "types.Config" + + def __init__(self, *, date: int, expires: int, test_mode: bool, this_dc: int, dc_options: List["raw.base.DcOption"], dc_txt_domain_name: str, chat_size_max: int, megagroup_size_max: int, forwarded_count_max: int, online_update_period_ms: int, offline_blur_timeout_ms: int, offline_idle_timeout_ms: int, online_cloud_timeout_ms: int, notify_cloud_delay_ms: int, notify_default_delay_ms: int, push_chat_period_ms: int, push_chat_limit: int, edit_time_limit: int, revoke_time_limit: int, revoke_pm_time_limit: int, rating_e_decay: int, stickers_recent_limit: int, channels_read_media_period: int, call_receive_timeout_ms: int, call_ring_timeout_ms: int, call_connect_timeout_ms: int, call_packet_timeout_ms: int, me_url_prefix: str, caption_length_max: int, message_length_max: int, webfile_dc_id: int, default_p2p_contacts: Optional[bool] = None, preload_featured_stickers: Optional[bool] = None, revoke_pm_inbox: Optional[bool] = None, blocked_mode: Optional[bool] = None, force_try_ipv6: Optional[bool] = None, tmp_sessions: Optional[int] = None, autoupdate_url_prefix: Optional[str] = None, gif_search_username: Optional[str] = None, venue_search_username: Optional[str] = None, img_search_username: Optional[str] = None, static_maps_provider: Optional[str] = None, suggested_lang_code: Optional[str] = None, lang_pack_version: Optional[int] = None, base_lang_pack_version: Optional[int] = None, reactions_default: "raw.base.Reaction" = None, autologin_token: Optional[str] = None) -> None: + self.date = date # int + self.expires = expires # int + self.test_mode = test_mode # Bool + self.this_dc = this_dc # int + self.dc_options = dc_options # Vector + self.dc_txt_domain_name = dc_txt_domain_name # string + self.chat_size_max = chat_size_max # int + self.megagroup_size_max = megagroup_size_max # int + self.forwarded_count_max = forwarded_count_max # int + self.online_update_period_ms = online_update_period_ms # int + self.offline_blur_timeout_ms = offline_blur_timeout_ms # int + self.offline_idle_timeout_ms = offline_idle_timeout_ms # int + self.online_cloud_timeout_ms = online_cloud_timeout_ms # int + self.notify_cloud_delay_ms = notify_cloud_delay_ms # int + self.notify_default_delay_ms = notify_default_delay_ms # int + self.push_chat_period_ms = push_chat_period_ms # int + self.push_chat_limit = push_chat_limit # int + self.edit_time_limit = edit_time_limit # int + self.revoke_time_limit = revoke_time_limit # int + self.revoke_pm_time_limit = revoke_pm_time_limit # int + self.rating_e_decay = rating_e_decay # int + self.stickers_recent_limit = stickers_recent_limit # int + self.channels_read_media_period = channels_read_media_period # int + self.call_receive_timeout_ms = call_receive_timeout_ms # int + self.call_ring_timeout_ms = call_ring_timeout_ms # int + self.call_connect_timeout_ms = call_connect_timeout_ms # int + self.call_packet_timeout_ms = call_packet_timeout_ms # int + self.me_url_prefix = me_url_prefix # string + self.caption_length_max = caption_length_max # int + self.message_length_max = message_length_max # int + self.webfile_dc_id = webfile_dc_id # int + self.default_p2p_contacts = default_p2p_contacts # flags.3?true + self.preload_featured_stickers = preload_featured_stickers # flags.4?true + self.revoke_pm_inbox = revoke_pm_inbox # flags.6?true + self.blocked_mode = blocked_mode # flags.8?true + self.force_try_ipv6 = force_try_ipv6 # flags.14?true + self.tmp_sessions = tmp_sessions # flags.0?int + self.autoupdate_url_prefix = autoupdate_url_prefix # flags.7?string + self.gif_search_username = gif_search_username # flags.9?string + self.venue_search_username = venue_search_username # flags.10?string + self.img_search_username = img_search_username # flags.11?string + self.static_maps_provider = static_maps_provider # flags.12?string + self.suggested_lang_code = suggested_lang_code # flags.2?string + self.lang_pack_version = lang_pack_version # flags.2?int + self.base_lang_pack_version = base_lang_pack_version # flags.2?int + self.reactions_default = reactions_default # flags.15?Reaction + self.autologin_token = autologin_token # flags.16?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Config": + + flags = Int.read(b) + + default_p2p_contacts = True if flags & (1 << 3) else False + preload_featured_stickers = True if flags & (1 << 4) else False + revoke_pm_inbox = True if flags & (1 << 6) else False + blocked_mode = True if flags & (1 << 8) else False + force_try_ipv6 = True if flags & (1 << 14) else False + date = Int.read(b) + + expires = Int.read(b) + + test_mode = Bool.read(b) + + this_dc = Int.read(b) + + dc_options = TLObject.read(b) + + dc_txt_domain_name = String.read(b) + + chat_size_max = Int.read(b) + + megagroup_size_max = Int.read(b) + + forwarded_count_max = Int.read(b) + + online_update_period_ms = Int.read(b) + + offline_blur_timeout_ms = Int.read(b) + + offline_idle_timeout_ms = Int.read(b) + + online_cloud_timeout_ms = Int.read(b) + + notify_cloud_delay_ms = Int.read(b) + + notify_default_delay_ms = Int.read(b) + + push_chat_period_ms = Int.read(b) + + push_chat_limit = Int.read(b) + + edit_time_limit = Int.read(b) + + revoke_time_limit = Int.read(b) + + revoke_pm_time_limit = Int.read(b) + + rating_e_decay = Int.read(b) + + stickers_recent_limit = Int.read(b) + + channels_read_media_period = Int.read(b) + + tmp_sessions = Int.read(b) if flags & (1 << 0) else None + call_receive_timeout_ms = Int.read(b) + + call_ring_timeout_ms = Int.read(b) + + call_connect_timeout_ms = Int.read(b) + + call_packet_timeout_ms = Int.read(b) + + me_url_prefix = String.read(b) + + autoupdate_url_prefix = String.read(b) if flags & (1 << 7) else None + gif_search_username = String.read(b) if flags & (1 << 9) else None + venue_search_username = String.read(b) if flags & (1 << 10) else None + img_search_username = String.read(b) if flags & (1 << 11) else None + static_maps_provider = String.read(b) if flags & (1 << 12) else None + caption_length_max = Int.read(b) + + message_length_max = Int.read(b) + + webfile_dc_id = Int.read(b) + + suggested_lang_code = String.read(b) if flags & (1 << 2) else None + lang_pack_version = Int.read(b) if flags & (1 << 2) else None + base_lang_pack_version = Int.read(b) if flags & (1 << 2) else None + reactions_default = TLObject.read(b) if flags & (1 << 15) else None + + autologin_token = String.read(b) if flags & (1 << 16) else None + return Config(date=date, expires=expires, test_mode=test_mode, this_dc=this_dc, dc_options=dc_options, dc_txt_domain_name=dc_txt_domain_name, chat_size_max=chat_size_max, megagroup_size_max=megagroup_size_max, forwarded_count_max=forwarded_count_max, online_update_period_ms=online_update_period_ms, offline_blur_timeout_ms=offline_blur_timeout_ms, offline_idle_timeout_ms=offline_idle_timeout_ms, online_cloud_timeout_ms=online_cloud_timeout_ms, notify_cloud_delay_ms=notify_cloud_delay_ms, notify_default_delay_ms=notify_default_delay_ms, push_chat_period_ms=push_chat_period_ms, push_chat_limit=push_chat_limit, edit_time_limit=edit_time_limit, revoke_time_limit=revoke_time_limit, revoke_pm_time_limit=revoke_pm_time_limit, rating_e_decay=rating_e_decay, stickers_recent_limit=stickers_recent_limit, channels_read_media_period=channels_read_media_period, call_receive_timeout_ms=call_receive_timeout_ms, call_ring_timeout_ms=call_ring_timeout_ms, call_connect_timeout_ms=call_connect_timeout_ms, call_packet_timeout_ms=call_packet_timeout_ms, me_url_prefix=me_url_prefix, caption_length_max=caption_length_max, message_length_max=message_length_max, webfile_dc_id=webfile_dc_id, default_p2p_contacts=default_p2p_contacts, preload_featured_stickers=preload_featured_stickers, revoke_pm_inbox=revoke_pm_inbox, blocked_mode=blocked_mode, force_try_ipv6=force_try_ipv6, tmp_sessions=tmp_sessions, autoupdate_url_prefix=autoupdate_url_prefix, gif_search_username=gif_search_username, venue_search_username=venue_search_username, img_search_username=img_search_username, static_maps_provider=static_maps_provider, suggested_lang_code=suggested_lang_code, lang_pack_version=lang_pack_version, base_lang_pack_version=base_lang_pack_version, reactions_default=reactions_default, autologin_token=autologin_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.default_p2p_contacts else 0 + flags |= (1 << 4) if self.preload_featured_stickers else 0 + flags |= (1 << 6) if self.revoke_pm_inbox else 0 + flags |= (1 << 8) if self.blocked_mode else 0 + flags |= (1 << 14) if self.force_try_ipv6 else 0 + flags |= (1 << 0) if self.tmp_sessions is not None else 0 + flags |= (1 << 7) if self.autoupdate_url_prefix is not None else 0 + flags |= (1 << 9) if self.gif_search_username is not None else 0 + flags |= (1 << 10) if self.venue_search_username is not None else 0 + flags |= (1 << 11) if self.img_search_username is not None else 0 + flags |= (1 << 12) if self.static_maps_provider is not None else 0 + flags |= (1 << 2) if self.suggested_lang_code is not None else 0 + flags |= (1 << 2) if self.lang_pack_version is not None else 0 + flags |= (1 << 2) if self.base_lang_pack_version is not None else 0 + flags |= (1 << 15) if self.reactions_default is not None else 0 + flags |= (1 << 16) if self.autologin_token is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.date)) + + b.write(Int(self.expires)) + + b.write(Bool(self.test_mode)) + + b.write(Int(self.this_dc)) + + b.write(Vector(self.dc_options)) + + b.write(String(self.dc_txt_domain_name)) + + b.write(Int(self.chat_size_max)) + + b.write(Int(self.megagroup_size_max)) + + b.write(Int(self.forwarded_count_max)) + + b.write(Int(self.online_update_period_ms)) + + b.write(Int(self.offline_blur_timeout_ms)) + + b.write(Int(self.offline_idle_timeout_ms)) + + b.write(Int(self.online_cloud_timeout_ms)) + + b.write(Int(self.notify_cloud_delay_ms)) + + b.write(Int(self.notify_default_delay_ms)) + + b.write(Int(self.push_chat_period_ms)) + + b.write(Int(self.push_chat_limit)) + + b.write(Int(self.edit_time_limit)) + + b.write(Int(self.revoke_time_limit)) + + b.write(Int(self.revoke_pm_time_limit)) + + b.write(Int(self.rating_e_decay)) + + b.write(Int(self.stickers_recent_limit)) + + b.write(Int(self.channels_read_media_period)) + + if self.tmp_sessions is not None: + b.write(Int(self.tmp_sessions)) + + b.write(Int(self.call_receive_timeout_ms)) + + b.write(Int(self.call_ring_timeout_ms)) + + b.write(Int(self.call_connect_timeout_ms)) + + b.write(Int(self.call_packet_timeout_ms)) + + b.write(String(self.me_url_prefix)) + + if self.autoupdate_url_prefix is not None: + b.write(String(self.autoupdate_url_prefix)) + + if self.gif_search_username is not None: + b.write(String(self.gif_search_username)) + + if self.venue_search_username is not None: + b.write(String(self.venue_search_username)) + + if self.img_search_username is not None: + b.write(String(self.img_search_username)) + + if self.static_maps_provider is not None: + b.write(String(self.static_maps_provider)) + + b.write(Int(self.caption_length_max)) + + b.write(Int(self.message_length_max)) + + b.write(Int(self.webfile_dc_id)) + + if self.suggested_lang_code is not None: + b.write(String(self.suggested_lang_code)) + + if self.lang_pack_version is not None: + b.write(Int(self.lang_pack_version)) + + if self.base_lang_pack_version is not None: + b.write(Int(self.base_lang_pack_version)) + + if self.reactions_default is not None: + b.write(self.reactions_default.write()) + + if self.autologin_token is not None: + b.write(String(self.autologin_token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/connected_bot.py b/pyrogram/raw/types/connected_bot.py new file mode 100644 index 00000000..4f8acb20 --- /dev/null +++ b/pyrogram/raw/types/connected_bot.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConnectedBot(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.ConnectedBot`. + + Details: + - Layer: ``224`` + - ID: ``CD64636C`` + + Parameters: + bot_id (``int`` ``64-bit``): + + + recipients (:obj:`BusinessBotRecipients `): + + + rights (:obj:`BusinessBotRights `): + N/A + + """ + + __slots__: List[str] = ["bot_id", "recipients", "rights"] + + ID = 0xcd64636c + QUALNAME = "types.ConnectedBot" + + def __init__(self, *, bot_id: int, recipients: "raw.base.BusinessBotRecipients", rights: "raw.base.BusinessBotRights") -> None: + self.bot_id = bot_id # long + self.recipients = recipients # BusinessBotRecipients + self.rights = rights # BusinessBotRights + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConnectedBot": + + flags = Int.read(b) + + bot_id = Long.read(b) + + recipients = TLObject.read(b) + + rights = TLObject.read(b) + + return ConnectedBot(bot_id=bot_id, recipients=recipients, rights=rights) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + + b.write(Int(flags)) + + b.write(Long(self.bot_id)) + + b.write(self.recipients.write()) + + b.write(self.rights.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/connected_bot_star_ref.py b/pyrogram/raw/types/connected_bot_star_ref.py new file mode 100644 index 00000000..168d4d64 --- /dev/null +++ b/pyrogram/raw/types/connected_bot_star_ref.py @@ -0,0 +1,111 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConnectedBotStarRef(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.ConnectedBotStarRef`. + + Details: + - Layer: ``224`` + - ID: ``19A13F71`` + + Parameters: + url (``str``): + N/A + + date (``int`` ``32-bit``): + N/A + + bot_id (``int`` ``64-bit``): + N/A + + commission_permille (``int`` ``32-bit``): + N/A + + participants (``int`` ``64-bit``): + N/A + + revenue (``int`` ``64-bit``): + N/A + + revoked (``bool``, *optional*): + N/A + + duration_months (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["url", "date", "bot_id", "commission_permille", "participants", "revenue", "revoked", "duration_months"] + + ID = 0x19a13f71 + QUALNAME = "types.ConnectedBotStarRef" + + def __init__(self, *, url: str, date: int, bot_id: int, commission_permille: int, participants: int, revenue: int, revoked: Optional[bool] = None, duration_months: Optional[int] = None) -> None: + self.url = url # string + self.date = date # int + self.bot_id = bot_id # long + self.commission_permille = commission_permille # int + self.participants = participants # long + self.revenue = revenue # long + self.revoked = revoked # flags.1?true + self.duration_months = duration_months # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConnectedBotStarRef": + + flags = Int.read(b) + + revoked = True if flags & (1 << 1) else False + url = String.read(b) + + date = Int.read(b) + + bot_id = Long.read(b) + + commission_permille = Int.read(b) + + duration_months = Int.read(b) if flags & (1 << 0) else None + participants = Long.read(b) + + revenue = Long.read(b) + + return ConnectedBotStarRef(url=url, date=date, bot_id=bot_id, commission_permille=commission_permille, participants=participants, revenue=revenue, revoked=revoked, duration_months=duration_months) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.revoked else 0 + flags |= (1 << 0) if self.duration_months is not None else 0 + b.write(Int(flags)) + + b.write(String(self.url)) + + b.write(Int(self.date)) + + b.write(Long(self.bot_id)) + + b.write(Int(self.commission_permille)) + + if self.duration_months is not None: + b.write(Int(self.duration_months)) + + b.write(Long(self.participants)) + + b.write(Long(self.revenue)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contact.py b/pyrogram/raw/types/contact.py new file mode 100644 index 00000000..7756ca98 --- /dev/null +++ b/pyrogram/raw/types/contact.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Contact(TLObject): # type: ignore + """A contact of the current user that is registered in the system. + + Constructor of :obj:`~pyrogram.raw.base.Contact`. + + Details: + - Layer: ``224`` + - ID: ``145ADE0B`` + + Parameters: + user_id (``int`` ``64-bit``): + User identifier + + mutual (``bool``): + Current user is in the user's contact list + + """ + + __slots__: List[str] = ["user_id", "mutual"] + + ID = 0x145ade0b + QUALNAME = "types.Contact" + + def __init__(self, *, user_id: int, mutual: bool) -> None: + self.user_id = user_id # long + self.mutual = mutual # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Contact": + # No flags + + user_id = Long.read(b) + + mutual = Bool.read(b) + + return Contact(user_id=user_id, mutual=mutual) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(Bool(self.mutual)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contact_birthday.py b/pyrogram/raw/types/contact_birthday.py new file mode 100644 index 00000000..1f3d1ee5 --- /dev/null +++ b/pyrogram/raw/types/contact_birthday.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ContactBirthday(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.ContactBirthday`. + + Details: + - Layer: ``224`` + - ID: ``1D998733`` + + Parameters: + contact_id (``int`` ``64-bit``): + + + birthday (:obj:`Birthday `): + + + """ + + __slots__: List[str] = ["contact_id", "birthday"] + + ID = 0x1d998733 + QUALNAME = "types.ContactBirthday" + + def __init__(self, *, contact_id: int, birthday: "raw.base.Birthday") -> None: + self.contact_id = contact_id # long + self.birthday = birthday # Birthday + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ContactBirthday": + # No flags + + contact_id = Long.read(b) + + birthday = TLObject.read(b) + + return ContactBirthday(contact_id=contact_id, birthday=birthday) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.contact_id)) + + b.write(self.birthday.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/contact_status.py b/pyrogram/raw/types/contact_status.py new file mode 100644 index 00000000..19c95cf6 --- /dev/null +++ b/pyrogram/raw/types/contact_status.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ContactStatus(TLObject): # type: ignore + """Contact status: online / offline. + + Constructor of :obj:`~pyrogram.raw.base.ContactStatus`. + + Details: + - Layer: ``224`` + - ID: ``16D9703B`` + + Parameters: + user_id (``int`` ``64-bit``): + User identifier + + status (:obj:`UserStatus `): + Online status + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetStatuses + """ + + __slots__: List[str] = ["user_id", "status"] + + ID = 0x16d9703b + QUALNAME = "types.ContactStatus" + + def __init__(self, *, user_id: int, status: "raw.base.UserStatus") -> None: + self.user_id = user_id # long + self.status = status # UserStatus + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ContactStatus": + # No flags + + user_id = Long.read(b) + + status = TLObject.read(b) + + return ContactStatus(user_id=user_id, status=status) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(self.status.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/__init__.py b/pyrogram/raw/types/contacts/__init__.py new file mode 100644 index 00000000..a3c8d1f3 --- /dev/null +++ b/pyrogram/raw/types/contacts/__init__.py @@ -0,0 +1,57 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .contacts_not_modified import ContactsNotModified +from .contacts import Contacts +from .imported_contacts import ImportedContacts +from .blocked import Blocked +from .blocked_slice import BlockedSlice +from .found import Found +from .resolved_peer import ResolvedPeer +from .top_peers_not_modified import TopPeersNotModified +from .top_peers import TopPeers +from .top_peers_disabled import TopPeersDisabled +from .contact_birthdays import ContactBirthdays +from .sponsored_peers_empty import SponsoredPeersEmpty +from .sponsored_peers import SponsoredPeers + + +__all__ = [ + "ContactsNotModified", + "Contacts", + "ImportedContacts", + "Blocked", + "BlockedSlice", + "Found", + "ResolvedPeer", + "TopPeersNotModified", + "TopPeers", + "TopPeersDisabled", + "ContactBirthdays", + "SponsoredPeersEmpty", + "SponsoredPeers", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/contacts/blocked.py b/pyrogram/raw/types/contacts/blocked.py new file mode 100644 index 00000000..0c346e16 --- /dev/null +++ b/pyrogram/raw/types/contacts/blocked.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Blocked(TLObject): # type: ignore + """Full list of blocked users. + + Constructor of :obj:`~pyrogram.raw.base.contacts.Blocked`. + + Details: + - Layer: ``224`` + - ID: ``ADE1591`` + + Parameters: + blocked (List of :obj:`PeerBlocked `): + List of blocked users + + chats (List of :obj:`Chat `): + Blocked chats + + users (List of :obj:`User `): + List of users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetBlocked + """ + + __slots__: List[str] = ["blocked", "chats", "users"] + + ID = 0xade1591 + QUALNAME = "types.contacts.Blocked" + + def __init__(self, *, blocked: List["raw.base.PeerBlocked"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.blocked = blocked # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Blocked": + # No flags + + blocked = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return Blocked(blocked=blocked, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.blocked)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/blocked_slice.py b/pyrogram/raw/types/contacts/blocked_slice.py new file mode 100644 index 00000000..3550fade --- /dev/null +++ b/pyrogram/raw/types/contacts/blocked_slice.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BlockedSlice(TLObject): # type: ignore + """Incomplete list of blocked users. + + Constructor of :obj:`~pyrogram.raw.base.contacts.Blocked`. + + Details: + - Layer: ``224`` + - ID: ``E1664194`` + + Parameters: + count (``int`` ``32-bit``): + Total number of elements in the list + + blocked (List of :obj:`PeerBlocked `): + List of blocked users + + chats (List of :obj:`Chat `): + Blocked chats + + users (List of :obj:`User `): + List of users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetBlocked + """ + + __slots__: List[str] = ["count", "blocked", "chats", "users"] + + ID = 0xe1664194 + QUALNAME = "types.contacts.BlockedSlice" + + def __init__(self, *, count: int, blocked: List["raw.base.PeerBlocked"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.count = count # int + self.blocked = blocked # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BlockedSlice": + # No flags + + count = Int.read(b) + + blocked = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return BlockedSlice(count=count, blocked=blocked, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.blocked)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/contact_birthdays.py b/pyrogram/raw/types/contacts/contact_birthdays.py new file mode 100644 index 00000000..f63146d1 --- /dev/null +++ b/pyrogram/raw/types/contacts/contact_birthdays.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ContactBirthdays(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.contacts.ContactBirthdays`. + + Details: + - Layer: ``224`` + - ID: ``114FF30D`` + + Parameters: + contacts (List of :obj:`ContactBirthday `): + + + users (List of :obj:`User `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetBirthdays + """ + + __slots__: List[str] = ["contacts", "users"] + + ID = 0x114ff30d + QUALNAME = "types.contacts.ContactBirthdays" + + def __init__(self, *, contacts: List["raw.base.ContactBirthday"], users: List["raw.base.User"]) -> None: + self.contacts = contacts # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ContactBirthdays": + # No flags + + contacts = TLObject.read(b) + + users = TLObject.read(b) + + return ContactBirthdays(contacts=contacts, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.contacts)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/contacts.py b/pyrogram/raw/types/contacts/contacts.py new file mode 100644 index 00000000..836e015a --- /dev/null +++ b/pyrogram/raw/types/contacts/contacts.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Contacts(TLObject): # type: ignore + """The current user's contact list and info on users. + + Constructor of :obj:`~pyrogram.raw.base.contacts.Contacts`. + + Details: + - Layer: ``224`` + - ID: ``EAE87E42`` + + Parameters: + contacts (List of :obj:`Contact `): + Contact list + + saved_count (``int`` ``32-bit``): + Number of contacts that were saved successfully + + users (List of :obj:`User `): + User list + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetContacts + """ + + __slots__: List[str] = ["contacts", "saved_count", "users"] + + ID = 0xeae87e42 + QUALNAME = "types.contacts.Contacts" + + def __init__(self, *, contacts: List["raw.base.Contact"], saved_count: int, users: List["raw.base.User"]) -> None: + self.contacts = contacts # Vector + self.saved_count = saved_count # int + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Contacts": + # No flags + + contacts = TLObject.read(b) + + saved_count = Int.read(b) + + users = TLObject.read(b) + + return Contacts(contacts=contacts, saved_count=saved_count, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.contacts)) + + b.write(Int(self.saved_count)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/contacts_not_modified.py b/pyrogram/raw/types/contacts/contacts_not_modified.py new file mode 100644 index 00000000..f793199a --- /dev/null +++ b/pyrogram/raw/types/contacts/contacts_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ContactsNotModified(TLObject): # type: ignore + """Contact list on the server is the same as the list on the client. + + Constructor of :obj:`~pyrogram.raw.base.contacts.Contacts`. + + Details: + - Layer: ``224`` + - ID: ``B74BA9D2`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetContacts + """ + + __slots__: List[str] = [] + + ID = 0xb74ba9d2 + QUALNAME = "types.contacts.ContactsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ContactsNotModified": + # No flags + + return ContactsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/found.py b/pyrogram/raw/types/contacts/found.py new file mode 100644 index 00000000..b7341d8e --- /dev/null +++ b/pyrogram/raw/types/contacts/found.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Found(TLObject): # type: ignore + """Users found by name substring and auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.contacts.Found`. + + Details: + - Layer: ``224`` + - ID: ``B3134D9D`` + + Parameters: + my_results (List of :obj:`Peer `): + Personalized results + + results (List of :obj:`Peer `): + List of found user identifiers + + chats (List of :obj:`Chat `): + Found chats + + users (List of :obj:`User `): + List of users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.Search + """ + + __slots__: List[str] = ["my_results", "results", "chats", "users"] + + ID = 0xb3134d9d + QUALNAME = "types.contacts.Found" + + def __init__(self, *, my_results: List["raw.base.Peer"], results: List["raw.base.Peer"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.my_results = my_results # Vector + self.results = results # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Found": + # No flags + + my_results = TLObject.read(b) + + results = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return Found(my_results=my_results, results=results, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.my_results)) + + b.write(Vector(self.results)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/imported_contacts.py b/pyrogram/raw/types/contacts/imported_contacts.py new file mode 100644 index 00000000..5fe02bc2 --- /dev/null +++ b/pyrogram/raw/types/contacts/imported_contacts.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportedContacts(TLObject): # type: ignore + """Info on successfully imported contacts. + + Constructor of :obj:`~pyrogram.raw.base.contacts.ImportedContacts`. + + Details: + - Layer: ``224`` + - ID: ``77D01C3B`` + + Parameters: + imported (List of :obj:`ImportedContact `): + List of successfully imported contacts + + popular_invites (List of :obj:`PopularContact `): + Popular contacts + + retry_contacts (List of ``int`` ``64-bit``): + List of contact ids that could not be imported due to system limitation and will need to be imported at a later date. + + users (List of :obj:`User `): + List of users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.ImportContacts + """ + + __slots__: List[str] = ["imported", "popular_invites", "retry_contacts", "users"] + + ID = 0x77d01c3b + QUALNAME = "types.contacts.ImportedContacts" + + def __init__(self, *, imported: List["raw.base.ImportedContact"], popular_invites: List["raw.base.PopularContact"], retry_contacts: List[int], users: List["raw.base.User"]) -> None: + self.imported = imported # Vector + self.popular_invites = popular_invites # Vector + self.retry_contacts = retry_contacts # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportedContacts": + # No flags + + imported = TLObject.read(b) + + popular_invites = TLObject.read(b) + + retry_contacts = TLObject.read(b, Long) + + users = TLObject.read(b) + + return ImportedContacts(imported=imported, popular_invites=popular_invites, retry_contacts=retry_contacts, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.imported)) + + b.write(Vector(self.popular_invites)) + + b.write(Vector(self.retry_contacts, Long)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/resolved_peer.py b/pyrogram/raw/types/contacts/resolved_peer.py new file mode 100644 index 00000000..d3a5eeeb --- /dev/null +++ b/pyrogram/raw/types/contacts/resolved_peer.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ResolvedPeer(TLObject): # type: ignore + """Resolved peer + + Constructor of :obj:`~pyrogram.raw.base.contacts.ResolvedPeer`. + + Details: + - Layer: ``224`` + - ID: ``7F077AD9`` + + Parameters: + peer (:obj:`Peer `): + The peer + + chats (List of :obj:`Chat `): + Chats + + users (List of :obj:`User `): + Users + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.ResolveUsername + contacts.ResolvePhone + """ + + __slots__: List[str] = ["peer", "chats", "users"] + + ID = 0x7f077ad9 + QUALNAME = "types.contacts.ResolvedPeer" + + def __init__(self, *, peer: "raw.base.Peer", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.peer = peer # Peer + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ResolvedPeer": + # No flags + + peer = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ResolvedPeer(peer=peer, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/sponsored_peers.py b/pyrogram/raw/types/contacts/sponsored_peers.py new file mode 100644 index 00000000..52939f88 --- /dev/null +++ b/pyrogram/raw/types/contacts/sponsored_peers.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredPeers(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.contacts.SponsoredPeers`. + + Details: + - Layer: ``224`` + - ID: ``EB032884`` + + Parameters: + peers (List of :obj:`SponsoredPeer `): + N/A + + chats (List of :obj:`Chat `): + N/A + + users (List of :obj:`User `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetSponsoredPeers + """ + + __slots__: List[str] = ["peers", "chats", "users"] + + ID = 0xeb032884 + QUALNAME = "types.contacts.SponsoredPeers" + + def __init__(self, *, peers: List["raw.base.SponsoredPeer"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.peers = peers # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredPeers": + # No flags + + peers = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return SponsoredPeers(peers=peers, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.peers)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/sponsored_peers_empty.py b/pyrogram/raw/types/contacts/sponsored_peers_empty.py new file mode 100644 index 00000000..c7ff329c --- /dev/null +++ b/pyrogram/raw/types/contacts/sponsored_peers_empty.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredPeersEmpty(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.contacts.SponsoredPeers`. + + Details: + - Layer: ``224`` + - ID: ``EA32B4B1`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetSponsoredPeers + """ + + __slots__: List[str] = [] + + ID = 0xea32b4b1 + QUALNAME = "types.contacts.SponsoredPeersEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredPeersEmpty": + # No flags + + return SponsoredPeersEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/top_peers.py b/pyrogram/raw/types/contacts/top_peers.py new file mode 100644 index 00000000..0cf95d65 --- /dev/null +++ b/pyrogram/raw/types/contacts/top_peers.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TopPeers(TLObject): # type: ignore + """Top peers + + Constructor of :obj:`~pyrogram.raw.base.contacts.TopPeers`. + + Details: + - Layer: ``224`` + - ID: ``70B772A8`` + + Parameters: + categories (List of :obj:`TopPeerCategoryPeers `): + Top peers by top peer category + + chats (List of :obj:`Chat `): + Chats + + users (List of :obj:`User `): + Users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetTopPeers + """ + + __slots__: List[str] = ["categories", "chats", "users"] + + ID = 0x70b772a8 + QUALNAME = "types.contacts.TopPeers" + + def __init__(self, *, categories: List["raw.base.TopPeerCategoryPeers"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.categories = categories # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TopPeers": + # No flags + + categories = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return TopPeers(categories=categories, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.categories)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/top_peers_disabled.py b/pyrogram/raw/types/contacts/top_peers_disabled.py new file mode 100644 index 00000000..76e86e36 --- /dev/null +++ b/pyrogram/raw/types/contacts/top_peers_disabled.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TopPeersDisabled(TLObject): # type: ignore + """Top peers disabled + + Constructor of :obj:`~pyrogram.raw.base.contacts.TopPeers`. + + Details: + - Layer: ``224`` + - ID: ``B52C939D`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetTopPeers + """ + + __slots__: List[str] = [] + + ID = 0xb52c939d + QUALNAME = "types.contacts.TopPeersDisabled" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TopPeersDisabled": + # No flags + + return TopPeersDisabled() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/contacts/top_peers_not_modified.py b/pyrogram/raw/types/contacts/top_peers_not_modified.py new file mode 100644 index 00000000..b6e1aa5b --- /dev/null +++ b/pyrogram/raw/types/contacts/top_peers_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TopPeersNotModified(TLObject): # type: ignore + """Top peer info hasn't changed + + Constructor of :obj:`~pyrogram.raw.base.contacts.TopPeers`. + + Details: + - Layer: ``224`` + - ID: ``DE266EF5`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.GetTopPeers + """ + + __slots__: List[str] = [] + + ID = 0xde266ef5 + QUALNAME = "types.contacts.TopPeersNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TopPeersNotModified": + # No flags + + return TopPeersNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/data_json.py b/pyrogram/raw/types/data_json.py new file mode 100644 index 00000000..2a5284e4 --- /dev/null +++ b/pyrogram/raw/types/data_json.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DataJSON(TLObject): # type: ignore + """Represents a json-encoded object + + Constructor of :obj:`~pyrogram.raw.base.DataJSON`. + + Details: + - Layer: ``224`` + - ID: ``7D748D04`` + + Parameters: + data (``str``): + JSON-encoded object + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + bots.SendCustomRequest + bots.InvokeWebViewCustomMethod + phone.GetCallConfig + """ + + __slots__: List[str] = ["data"] + + ID = 0x7d748d04 + QUALNAME = "types.DataJSON" + + def __init__(self, *, data: str) -> None: + self.data = data # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DataJSON": + # No flags + + data = String.read(b) + + return DataJSON(data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dc_option.py b/pyrogram/raw/types/dc_option.py new file mode 100644 index 00000000..4f93954b --- /dev/null +++ b/pyrogram/raw/types/dc_option.py @@ -0,0 +1,117 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DcOption(TLObject): # type: ignore + """Data center + + Constructor of :obj:`~pyrogram.raw.base.DcOption`. + + Details: + - Layer: ``224`` + - ID: ``18B7A10D`` + + Parameters: + id (``int`` ``32-bit``): + DC ID + + ip_address (``str``): + IP address of DC + + port (``int`` ``32-bit``): + Port + + ipv6 (``bool``, *optional*): + Whether the specified IP is an IPv6 address + + media_only (``bool``, *optional*): + Whether this DC should only be used to download or upload files + + tcpo_only (``bool``, *optional*): + Whether this DC only supports connection with transport obfuscation + + cdn (``bool``, *optional*): + Whether this is a CDN DC. + + static (``bool``, *optional*): + If set, this IP should be used when connecting through a proxy + + this_port_only (``bool``, *optional*): + If set, clients must connect using only the specified port, without trying any other port. + + secret (``bytes``, *optional*): + If the tcpo_only flag is set, specifies the secret to use when connecting using transport obfuscation + + """ + + __slots__: List[str] = ["id", "ip_address", "port", "ipv6", "media_only", "tcpo_only", "cdn", "static", "this_port_only", "secret"] + + ID = 0x18b7a10d + QUALNAME = "types.DcOption" + + def __init__(self, *, id: int, ip_address: str, port: int, ipv6: Optional[bool] = None, media_only: Optional[bool] = None, tcpo_only: Optional[bool] = None, cdn: Optional[bool] = None, static: Optional[bool] = None, this_port_only: Optional[bool] = None, secret: Optional[bytes] = None) -> None: + self.id = id # int + self.ip_address = ip_address # string + self.port = port # int + self.ipv6 = ipv6 # flags.0?true + self.media_only = media_only # flags.1?true + self.tcpo_only = tcpo_only # flags.2?true + self.cdn = cdn # flags.3?true + self.static = static # flags.4?true + self.this_port_only = this_port_only # flags.5?true + self.secret = secret # flags.10?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DcOption": + + flags = Int.read(b) + + ipv6 = True if flags & (1 << 0) else False + media_only = True if flags & (1 << 1) else False + tcpo_only = True if flags & (1 << 2) else False + cdn = True if flags & (1 << 3) else False + static = True if flags & (1 << 4) else False + this_port_only = True if flags & (1 << 5) else False + id = Int.read(b) + + ip_address = String.read(b) + + port = Int.read(b) + + secret = Bytes.read(b) if flags & (1 << 10) else None + return DcOption(id=id, ip_address=ip_address, port=port, ipv6=ipv6, media_only=media_only, tcpo_only=tcpo_only, cdn=cdn, static=static, this_port_only=this_port_only, secret=secret) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.ipv6 else 0 + flags |= (1 << 1) if self.media_only else 0 + flags |= (1 << 2) if self.tcpo_only else 0 + flags |= (1 << 3) if self.cdn else 0 + flags |= (1 << 4) if self.static else 0 + flags |= (1 << 5) if self.this_port_only else 0 + flags |= (1 << 10) if self.secret is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + b.write(String(self.ip_address)) + + b.write(Int(self.port)) + + if self.secret is not None: + b.write(Bytes(self.secret)) + + return b.getvalue() diff --git a/pyrogram/raw/types/default_history_ttl.py b/pyrogram/raw/types/default_history_ttl.py new file mode 100644 index 00000000..c69f8989 --- /dev/null +++ b/pyrogram/raw/types/default_history_ttl.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DefaultHistoryTTL(TLObject): # type: ignore + """Contains info about the default value of the Time-To-Live setting, applied to all new chats. + + Constructor of :obj:`~pyrogram.raw.base.DefaultHistoryTTL`. + + Details: + - Layer: ``224`` + - ID: ``43B46B20`` + + Parameters: + period (``int`` ``32-bit``): + Time-To-Live setting applied to all new chats. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDefaultHistoryTTL + """ + + __slots__: List[str] = ["period"] + + ID = 0x43b46b20 + QUALNAME = "types.DefaultHistoryTTL" + + def __init__(self, *, period: int) -> None: + self.period = period # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DefaultHistoryTTL": + # No flags + + period = Int.read(b) + + return DefaultHistoryTTL(period=period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.period)) + + return b.getvalue() diff --git a/pyrogram/raw/types/destroy_auth_key_fail.py b/pyrogram/raw/types/destroy_auth_key_fail.py new file mode 100644 index 00000000..7443c6a3 --- /dev/null +++ b/pyrogram/raw/types/destroy_auth_key_fail.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroyAuthKeyFail(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.DestroyAuthKeyRes`. + + Details: + - Layer: ``224`` + - ID: ``EA109B13`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + DestroyAuthKey + """ + + __slots__: List[str] = [] + + ID = 0xea109b13 + QUALNAME = "types.DestroyAuthKeyFail" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroyAuthKeyFail": + # No flags + + return DestroyAuthKeyFail() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/destroy_auth_key_none.py b/pyrogram/raw/types/destroy_auth_key_none.py new file mode 100644 index 00000000..eee91cf9 --- /dev/null +++ b/pyrogram/raw/types/destroy_auth_key_none.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroyAuthKeyNone(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.DestroyAuthKeyRes`. + + Details: + - Layer: ``224`` + - ID: ``0A9F2259`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + DestroyAuthKey + """ + + __slots__: List[str] = [] + + ID = 0x0a9f2259 + QUALNAME = "types.DestroyAuthKeyNone" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroyAuthKeyNone": + # No flags + + return DestroyAuthKeyNone() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/destroy_auth_key_ok.py b/pyrogram/raw/types/destroy_auth_key_ok.py new file mode 100644 index 00000000..7e9473bc --- /dev/null +++ b/pyrogram/raw/types/destroy_auth_key_ok.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroyAuthKeyOk(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.DestroyAuthKeyRes`. + + Details: + - Layer: ``224`` + - ID: ``F660E1D4`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + DestroyAuthKey + """ + + __slots__: List[str] = [] + + ID = 0xf660e1d4 + QUALNAME = "types.DestroyAuthKeyOk" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroyAuthKeyOk": + # No flags + + return DestroyAuthKeyOk() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/destroy_session_none.py b/pyrogram/raw/types/destroy_session_none.py new file mode 100644 index 00000000..bd6044a5 --- /dev/null +++ b/pyrogram/raw/types/destroy_session_none.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroySessionNone(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.DestroySessionRes`. + + Details: + - Layer: ``224`` + - ID: ``62D350C9`` + + Parameters: + session_id (``int`` ``64-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + DestroySession + """ + + __slots__: List[str] = ["session_id"] + + ID = 0x62d350c9 + QUALNAME = "types.DestroySessionNone" + + def __init__(self, *, session_id: int) -> None: + self.session_id = session_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroySessionNone": + # No flags + + session_id = Long.read(b) + + return DestroySessionNone(session_id=session_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.session_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/destroy_session_ok.py b/pyrogram/raw/types/destroy_session_ok.py new file mode 100644 index 00000000..5988d983 --- /dev/null +++ b/pyrogram/raw/types/destroy_session_ok.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DestroySessionOk(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.DestroySessionRes`. + + Details: + - Layer: ``224`` + - ID: ``E22045FC`` + + Parameters: + session_id (``int`` ``64-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + DestroySession + """ + + __slots__: List[str] = ["session_id"] + + ID = 0xe22045fc + QUALNAME = "types.DestroySessionOk" + + def __init__(self, *, session_id: int) -> None: + self.session_id = session_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DestroySessionOk": + # No flags + + session_id = Long.read(b) + + return DestroySessionOk(session_id=session_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.session_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dh_gen_fail.py b/pyrogram/raw/types/dh_gen_fail.py new file mode 100644 index 00000000..132577eb --- /dev/null +++ b/pyrogram/raw/types/dh_gen_fail.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DhGenFail(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.SetClientDHParamsAnswer`. + + Details: + - Layer: ``224`` + - ID: ``A69DAE02`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + server_nonce (``int`` ``128-bit``): + N/A + + new_nonce_hash3 (``int`` ``128-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + SetClientDHParams + """ + + __slots__: List[str] = ["nonce", "server_nonce", "new_nonce_hash3"] + + ID = 0xa69dae02 + QUALNAME = "types.DhGenFail" + + def __init__(self, *, nonce: int, server_nonce: int, new_nonce_hash3: int) -> None: + self.nonce = nonce # int128 + self.server_nonce = server_nonce # int128 + self.new_nonce_hash3 = new_nonce_hash3 # int128 + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DhGenFail": + # No flags + + nonce = Int128.read(b) + + server_nonce = Int128.read(b) + + new_nonce_hash3 = Int128.read(b) + + return DhGenFail(nonce=nonce, server_nonce=server_nonce, new_nonce_hash3=new_nonce_hash3) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + b.write(Int128(self.server_nonce)) + + b.write(Int128(self.new_nonce_hash3)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dh_gen_ok.py b/pyrogram/raw/types/dh_gen_ok.py new file mode 100644 index 00000000..6955461a --- /dev/null +++ b/pyrogram/raw/types/dh_gen_ok.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DhGenOk(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.SetClientDHParamsAnswer`. + + Details: + - Layer: ``224`` + - ID: ``3BCBF734`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + server_nonce (``int`` ``128-bit``): + N/A + + new_nonce_hash1 (``int`` ``128-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + SetClientDHParams + """ + + __slots__: List[str] = ["nonce", "server_nonce", "new_nonce_hash1"] + + ID = 0x3bcbf734 + QUALNAME = "types.DhGenOk" + + def __init__(self, *, nonce: int, server_nonce: int, new_nonce_hash1: int) -> None: + self.nonce = nonce # int128 + self.server_nonce = server_nonce # int128 + self.new_nonce_hash1 = new_nonce_hash1 # int128 + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DhGenOk": + # No flags + + nonce = Int128.read(b) + + server_nonce = Int128.read(b) + + new_nonce_hash1 = Int128.read(b) + + return DhGenOk(nonce=nonce, server_nonce=server_nonce, new_nonce_hash1=new_nonce_hash1) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + b.write(Int128(self.server_nonce)) + + b.write(Int128(self.new_nonce_hash1)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dh_gen_retry.py b/pyrogram/raw/types/dh_gen_retry.py new file mode 100644 index 00000000..1de2176e --- /dev/null +++ b/pyrogram/raw/types/dh_gen_retry.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DhGenRetry(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.SetClientDHParamsAnswer`. + + Details: + - Layer: ``224`` + - ID: ``46DC1FB9`` + + Parameters: + nonce (``int`` ``128-bit``): + N/A + + server_nonce (``int`` ``128-bit``): + N/A + + new_nonce_hash2 (``int`` ``128-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + SetClientDHParams + """ + + __slots__: List[str] = ["nonce", "server_nonce", "new_nonce_hash2"] + + ID = 0x46dc1fb9 + QUALNAME = "types.DhGenRetry" + + def __init__(self, *, nonce: int, server_nonce: int, new_nonce_hash2: int) -> None: + self.nonce = nonce # int128 + self.server_nonce = server_nonce # int128 + self.new_nonce_hash2 = new_nonce_hash2 # int128 + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DhGenRetry": + # No flags + + nonce = Int128.read(b) + + server_nonce = Int128.read(b) + + new_nonce_hash2 = Int128.read(b) + + return DhGenRetry(nonce=nonce, server_nonce=server_nonce, new_nonce_hash2=new_nonce_hash2) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int128(self.nonce)) + + b.write(Int128(self.server_nonce)) + + b.write(Int128(self.new_nonce_hash2)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog.py b/pyrogram/raw/types/dialog.py new file mode 100644 index 00000000..08822b51 --- /dev/null +++ b/pyrogram/raw/types/dialog.py @@ -0,0 +1,167 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Dialog(TLObject): # type: ignore + """Chat + + Constructor of :obj:`~pyrogram.raw.base.Dialog`. + + Details: + - Layer: ``224`` + - ID: ``D58A08C6`` + + Parameters: + peer (:obj:`Peer `): + The chat + + top_message (``int`` ``32-bit``): + The latest message ID + + read_inbox_max_id (``int`` ``32-bit``): + Position up to which all incoming messages are read. + + read_outbox_max_id (``int`` ``32-bit``): + Position up to which all outgoing messages are read. + + unread_count (``int`` ``32-bit``): + Number of unread messages + + unread_mentions_count (``int`` ``32-bit``): + Number of unread mentions + + unread_reactions_count (``int`` ``32-bit``): + Number of unread reactions to messages you sent + + notify_settings (:obj:`PeerNotifySettings `): + Notification settings + + pinned (``bool``, *optional*): + Is the dialog pinned + + unread_mark (``bool``, *optional*): + Whether the chat was manually marked as unread + + view_forum_as_messages (``bool``, *optional*): + Users may also choose to display messages from all topics of a forum as if they were sent to a normal group, using a "View as messages" setting in the local client. This setting only affects the current account, and is synced to other logged in sessions using the channels.toggleViewForumAsMessages method; invoking this method will update the value of this flag. + + pts (``int`` ``32-bit``, *optional*): + PTS + + draft (:obj:`DraftMessage `, *optional*): + Message draft + + folder_id (``int`` ``32-bit``, *optional*): + Peer folder ID, for more info click here + + ttl_period (``int`` ``32-bit``, *optional*): + Time-to-live of all messages sent in this dialog + + """ + + __slots__: List[str] = ["peer", "top_message", "read_inbox_max_id", "read_outbox_max_id", "unread_count", "unread_mentions_count", "unread_reactions_count", "notify_settings", "pinned", "unread_mark", "view_forum_as_messages", "pts", "draft", "folder_id", "ttl_period"] + + ID = 0xd58a08c6 + QUALNAME = "types.Dialog" + + def __init__(self, *, peer: "raw.base.Peer", top_message: int, read_inbox_max_id: int, read_outbox_max_id: int, unread_count: int, unread_mentions_count: int, unread_reactions_count: int, notify_settings: "raw.base.PeerNotifySettings", pinned: Optional[bool] = None, unread_mark: Optional[bool] = None, view_forum_as_messages: Optional[bool] = None, pts: Optional[int] = None, draft: "raw.base.DraftMessage" = None, folder_id: Optional[int] = None, ttl_period: Optional[int] = None) -> None: + self.peer = peer # Peer + self.top_message = top_message # int + self.read_inbox_max_id = read_inbox_max_id # int + self.read_outbox_max_id = read_outbox_max_id # int + self.unread_count = unread_count # int + self.unread_mentions_count = unread_mentions_count # int + self.unread_reactions_count = unread_reactions_count # int + self.notify_settings = notify_settings # PeerNotifySettings + self.pinned = pinned # flags.2?true + self.unread_mark = unread_mark # flags.3?true + self.view_forum_as_messages = view_forum_as_messages # flags.6?true + self.pts = pts # flags.0?int + self.draft = draft # flags.1?DraftMessage + self.folder_id = folder_id # flags.4?int + self.ttl_period = ttl_period # flags.5?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Dialog": + + flags = Int.read(b) + + pinned = True if flags & (1 << 2) else False + unread_mark = True if flags & (1 << 3) else False + view_forum_as_messages = True if flags & (1 << 6) else False + peer = TLObject.read(b) + + top_message = Int.read(b) + + read_inbox_max_id = Int.read(b) + + read_outbox_max_id = Int.read(b) + + unread_count = Int.read(b) + + unread_mentions_count = Int.read(b) + + unread_reactions_count = Int.read(b) + + notify_settings = TLObject.read(b) + + pts = Int.read(b) if flags & (1 << 0) else None + draft = TLObject.read(b) if flags & (1 << 1) else None + + folder_id = Int.read(b) if flags & (1 << 4) else None + ttl_period = Int.read(b) if flags & (1 << 5) else None + return Dialog(peer=peer, top_message=top_message, read_inbox_max_id=read_inbox_max_id, read_outbox_max_id=read_outbox_max_id, unread_count=unread_count, unread_mentions_count=unread_mentions_count, unread_reactions_count=unread_reactions_count, notify_settings=notify_settings, pinned=pinned, unread_mark=unread_mark, view_forum_as_messages=view_forum_as_messages, pts=pts, draft=draft, folder_id=folder_id, ttl_period=ttl_period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.pinned else 0 + flags |= (1 << 3) if self.unread_mark else 0 + flags |= (1 << 6) if self.view_forum_as_messages else 0 + flags |= (1 << 0) if self.pts is not None else 0 + flags |= (1 << 1) if self.draft is not None else 0 + flags |= (1 << 4) if self.folder_id is not None else 0 + flags |= (1 << 5) if self.ttl_period is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.top_message)) + + b.write(Int(self.read_inbox_max_id)) + + b.write(Int(self.read_outbox_max_id)) + + b.write(Int(self.unread_count)) + + b.write(Int(self.unread_mentions_count)) + + b.write(Int(self.unread_reactions_count)) + + b.write(self.notify_settings.write()) + + if self.pts is not None: + b.write(Int(self.pts)) + + if self.draft is not None: + b.write(self.draft.write()) + + if self.folder_id is not None: + b.write(Int(self.folder_id)) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_filter.py b/pyrogram/raw/types/dialog_filter.py new file mode 100644 index 00000000..c0adafda --- /dev/null +++ b/pyrogram/raw/types/dialog_filter.py @@ -0,0 +1,160 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogFilter(TLObject): # type: ignore + """Dialog filter AKA folder + + Constructor of :obj:`~pyrogram.raw.base.DialogFilter`. + + Details: + - Layer: ``224`` + - ID: ``AA472651`` + + Parameters: + id (``int`` ``32-bit``): + Folder ID + + title (:obj:`TextWithEntities `): + Folder name (max 12 UTF-8 chars) + + pinned_peers (List of :obj:`InputPeer `): + Pinned chats, folders can have unlimited pinned chats + + include_peers (List of :obj:`InputPeer `): + Include the following chats in this folder + + exclude_peers (List of :obj:`InputPeer `): + Exclude the following chats from this folder + + contacts (``bool``, *optional*): + Whether to include all contacts in this folder + + non_contacts (``bool``, *optional*): + Whether to include all non-contacts in this folder + + groups (``bool``, *optional*): + Whether to include all groups in this folder + + broadcasts (``bool``, *optional*): + Whether to include all channels in this folder + + bots (``bool``, *optional*): + Whether to include all bots in this folder + + exclude_muted (``bool``, *optional*): + Whether to exclude muted chats from this folder + + exclude_read (``bool``, *optional*): + Whether to exclude read chats from this folder + + exclude_archived (``bool``, *optional*): + Whether to exclude archived chats from this folder + + title_noanimate (``bool``, *optional*): + N/A + + emoticon (``str``, *optional*): + Emoji to use as icon for the folder. + + color (``int`` ``32-bit``, *optional*): + + + """ + + __slots__: List[str] = ["id", "title", "pinned_peers", "include_peers", "exclude_peers", "contacts", "non_contacts", "groups", "broadcasts", "bots", "exclude_muted", "exclude_read", "exclude_archived", "title_noanimate", "emoticon", "color"] + + ID = 0xaa472651 + QUALNAME = "types.DialogFilter" + + def __init__(self, *, id: int, title: "raw.base.TextWithEntities", pinned_peers: List["raw.base.InputPeer"], include_peers: List["raw.base.InputPeer"], exclude_peers: List["raw.base.InputPeer"], contacts: Optional[bool] = None, non_contacts: Optional[bool] = None, groups: Optional[bool] = None, broadcasts: Optional[bool] = None, bots: Optional[bool] = None, exclude_muted: Optional[bool] = None, exclude_read: Optional[bool] = None, exclude_archived: Optional[bool] = None, title_noanimate: Optional[bool] = None, emoticon: Optional[str] = None, color: Optional[int] = None) -> None: + self.id = id # int + self.title = title # TextWithEntities + self.pinned_peers = pinned_peers # Vector + self.include_peers = include_peers # Vector + self.exclude_peers = exclude_peers # Vector + self.contacts = contacts # flags.0?true + self.non_contacts = non_contacts # flags.1?true + self.groups = groups # flags.2?true + self.broadcasts = broadcasts # flags.3?true + self.bots = bots # flags.4?true + self.exclude_muted = exclude_muted # flags.11?true + self.exclude_read = exclude_read # flags.12?true + self.exclude_archived = exclude_archived # flags.13?true + self.title_noanimate = title_noanimate # flags.28?true + self.emoticon = emoticon # flags.25?string + self.color = color # flags.27?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogFilter": + + flags = Int.read(b) + + contacts = True if flags & (1 << 0) else False + non_contacts = True if flags & (1 << 1) else False + groups = True if flags & (1 << 2) else False + broadcasts = True if flags & (1 << 3) else False + bots = True if flags & (1 << 4) else False + exclude_muted = True if flags & (1 << 11) else False + exclude_read = True if flags & (1 << 12) else False + exclude_archived = True if flags & (1 << 13) else False + title_noanimate = True if flags & (1 << 28) else False + id = Int.read(b) + + title = TLObject.read(b) + + emoticon = String.read(b) if flags & (1 << 25) else None + color = Int.read(b) if flags & (1 << 27) else None + pinned_peers = TLObject.read(b) + + include_peers = TLObject.read(b) + + exclude_peers = TLObject.read(b) + + return DialogFilter(id=id, title=title, pinned_peers=pinned_peers, include_peers=include_peers, exclude_peers=exclude_peers, contacts=contacts, non_contacts=non_contacts, groups=groups, broadcasts=broadcasts, bots=bots, exclude_muted=exclude_muted, exclude_read=exclude_read, exclude_archived=exclude_archived, title_noanimate=title_noanimate, emoticon=emoticon, color=color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.contacts else 0 + flags |= (1 << 1) if self.non_contacts else 0 + flags |= (1 << 2) if self.groups else 0 + flags |= (1 << 3) if self.broadcasts else 0 + flags |= (1 << 4) if self.bots else 0 + flags |= (1 << 11) if self.exclude_muted else 0 + flags |= (1 << 12) if self.exclude_read else 0 + flags |= (1 << 13) if self.exclude_archived else 0 + flags |= (1 << 28) if self.title_noanimate else 0 + flags |= (1 << 25) if self.emoticon is not None else 0 + flags |= (1 << 27) if self.color is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + b.write(self.title.write()) + + if self.emoticon is not None: + b.write(String(self.emoticon)) + + if self.color is not None: + b.write(Int(self.color)) + + b.write(Vector(self.pinned_peers)) + + b.write(Vector(self.include_peers)) + + b.write(Vector(self.exclude_peers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_filter_chatlist.py b/pyrogram/raw/types/dialog_filter_chatlist.py new file mode 100644 index 00000000..30703e60 --- /dev/null +++ b/pyrogram/raw/types/dialog_filter_chatlist.py @@ -0,0 +1,110 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogFilterChatlist(TLObject): # type: ignore + """A folder imported using a chat folder deep link ». + + Constructor of :obj:`~pyrogram.raw.base.DialogFilter`. + + Details: + - Layer: ``224`` + - ID: ``96537BD7`` + + Parameters: + id (``int`` ``32-bit``): + ID of the folder + + title (:obj:`TextWithEntities `): + Name of the folder (max 12 UTF-8 chars) + + pinned_peers (List of :obj:`InputPeer `): + Pinned chats, folders can have unlimited pinned chats + + include_peers (List of :obj:`InputPeer `): + Chats to include in the folder + + has_my_invites (``bool``, *optional*): + Whether the current user has created some chat folder deep links » to share the folder as well. + + title_noanimate (``bool``, *optional*): + N/A + + emoticon (``str``, *optional*): + Emoji to use as icon for the folder. + + color (``int`` ``32-bit``, *optional*): + + + """ + + __slots__: List[str] = ["id", "title", "pinned_peers", "include_peers", "has_my_invites", "title_noanimate", "emoticon", "color"] + + ID = 0x96537bd7 + QUALNAME = "types.DialogFilterChatlist" + + def __init__(self, *, id: int, title: "raw.base.TextWithEntities", pinned_peers: List["raw.base.InputPeer"], include_peers: List["raw.base.InputPeer"], has_my_invites: Optional[bool] = None, title_noanimate: Optional[bool] = None, emoticon: Optional[str] = None, color: Optional[int] = None) -> None: + self.id = id # int + self.title = title # TextWithEntities + self.pinned_peers = pinned_peers # Vector + self.include_peers = include_peers # Vector + self.has_my_invites = has_my_invites # flags.26?true + self.title_noanimate = title_noanimate # flags.28?true + self.emoticon = emoticon # flags.25?string + self.color = color # flags.27?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogFilterChatlist": + + flags = Int.read(b) + + has_my_invites = True if flags & (1 << 26) else False + title_noanimate = True if flags & (1 << 28) else False + id = Int.read(b) + + title = TLObject.read(b) + + emoticon = String.read(b) if flags & (1 << 25) else None + color = Int.read(b) if flags & (1 << 27) else None + pinned_peers = TLObject.read(b) + + include_peers = TLObject.read(b) + + return DialogFilterChatlist(id=id, title=title, pinned_peers=pinned_peers, include_peers=include_peers, has_my_invites=has_my_invites, title_noanimate=title_noanimate, emoticon=emoticon, color=color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 26) if self.has_my_invites else 0 + flags |= (1 << 28) if self.title_noanimate else 0 + flags |= (1 << 25) if self.emoticon is not None else 0 + flags |= (1 << 27) if self.color is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + b.write(self.title.write()) + + if self.emoticon is not None: + b.write(String(self.emoticon)) + + if self.color is not None: + b.write(Int(self.color)) + + b.write(Vector(self.pinned_peers)) + + b.write(Vector(self.include_peers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_filter_default.py b/pyrogram/raw/types/dialog_filter_default.py new file mode 100644 index 00000000..720febde --- /dev/null +++ b/pyrogram/raw/types/dialog_filter_default.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogFilterDefault(TLObject): # type: ignore + """Used only when reordering folders to indicate the default (all chats) folder. + + Constructor of :obj:`~pyrogram.raw.base.DialogFilter`. + + Details: + - Layer: ``224`` + - ID: ``363293AE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x363293ae + QUALNAME = "types.DialogFilterDefault" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogFilterDefault": + # No flags + + return DialogFilterDefault() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_filter_suggested.py b/pyrogram/raw/types/dialog_filter_suggested.py new file mode 100644 index 00000000..1eadd492 --- /dev/null +++ b/pyrogram/raw/types/dialog_filter_suggested.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogFilterSuggested(TLObject): # type: ignore + """Suggested folders + + Constructor of :obj:`~pyrogram.raw.base.DialogFilterSuggested`. + + Details: + - Layer: ``224`` + - ID: ``77744D4A`` + + Parameters: + filter (:obj:`DialogFilter `): + Folder info + + description (``str``): + Folder description + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSuggestedDialogFilters + """ + + __slots__: List[str] = ["filter", "description"] + + ID = 0x77744d4a + QUALNAME = "types.DialogFilterSuggested" + + def __init__(self, *, filter: "raw.base.DialogFilter", description: str) -> None: + self.filter = filter # DialogFilter + self.description = description # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogFilterSuggested": + # No flags + + filter = TLObject.read(b) + + description = String.read(b) + + return DialogFilterSuggested(filter=filter, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.filter.write()) + + b.write(String(self.description)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_folder.py b/pyrogram/raw/types/dialog_folder.py new file mode 100644 index 00000000..4434bb49 --- /dev/null +++ b/pyrogram/raw/types/dialog_folder.py @@ -0,0 +1,110 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogFolder(TLObject): # type: ignore + """Dialog in folder + + Constructor of :obj:`~pyrogram.raw.base.Dialog`. + + Details: + - Layer: ``224`` + - ID: ``71BD134C`` + + Parameters: + folder (:obj:`Folder `): + The folder + + peer (:obj:`Peer `): + Peer in folder + + top_message (``int`` ``32-bit``): + Latest message ID of dialog + + unread_muted_peers_count (``int`` ``32-bit``): + Number of unread muted peers in folder + + unread_unmuted_peers_count (``int`` ``32-bit``): + Number of unread unmuted peers in folder + + unread_muted_messages_count (``int`` ``32-bit``): + Number of unread messages from muted peers in folder + + unread_unmuted_messages_count (``int`` ``32-bit``): + Number of unread messages from unmuted peers in folder + + pinned (``bool``, *optional*): + Is this folder pinned + + """ + + __slots__: List[str] = ["folder", "peer", "top_message", "unread_muted_peers_count", "unread_unmuted_peers_count", "unread_muted_messages_count", "unread_unmuted_messages_count", "pinned"] + + ID = 0x71bd134c + QUALNAME = "types.DialogFolder" + + def __init__(self, *, folder: "raw.base.Folder", peer: "raw.base.Peer", top_message: int, unread_muted_peers_count: int, unread_unmuted_peers_count: int, unread_muted_messages_count: int, unread_unmuted_messages_count: int, pinned: Optional[bool] = None) -> None: + self.folder = folder # Folder + self.peer = peer # Peer + self.top_message = top_message # int + self.unread_muted_peers_count = unread_muted_peers_count # int + self.unread_unmuted_peers_count = unread_unmuted_peers_count # int + self.unread_muted_messages_count = unread_muted_messages_count # int + self.unread_unmuted_messages_count = unread_unmuted_messages_count # int + self.pinned = pinned # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogFolder": + + flags = Int.read(b) + + pinned = True if flags & (1 << 2) else False + folder = TLObject.read(b) + + peer = TLObject.read(b) + + top_message = Int.read(b) + + unread_muted_peers_count = Int.read(b) + + unread_unmuted_peers_count = Int.read(b) + + unread_muted_messages_count = Int.read(b) + + unread_unmuted_messages_count = Int.read(b) + + return DialogFolder(folder=folder, peer=peer, top_message=top_message, unread_muted_peers_count=unread_muted_peers_count, unread_unmuted_peers_count=unread_unmuted_peers_count, unread_muted_messages_count=unread_muted_messages_count, unread_unmuted_messages_count=unread_unmuted_messages_count, pinned=pinned) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.pinned else 0 + b.write(Int(flags)) + + b.write(self.folder.write()) + + b.write(self.peer.write()) + + b.write(Int(self.top_message)) + + b.write(Int(self.unread_muted_peers_count)) + + b.write(Int(self.unread_unmuted_peers_count)) + + b.write(Int(self.unread_muted_messages_count)) + + b.write(Int(self.unread_unmuted_messages_count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_peer.py b/pyrogram/raw/types/dialog_peer.py new file mode 100644 index 00000000..c4cb94c0 --- /dev/null +++ b/pyrogram/raw/types/dialog_peer.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogPeer(TLObject): # type: ignore + """Peer + + Constructor of :obj:`~pyrogram.raw.base.DialogPeer`. + + Details: + - Layer: ``224`` + - ID: ``E56DBF05`` + + Parameters: + peer (:obj:`Peer `): + Peer + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDialogUnreadMarks + """ + + __slots__: List[str] = ["peer"] + + ID = 0xe56dbf05 + QUALNAME = "types.DialogPeer" + + def __init__(self, *, peer: "raw.base.Peer") -> None: + self.peer = peer # Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogPeer": + # No flags + + peer = TLObject.read(b) + + return DialogPeer(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/dialog_peer_folder.py b/pyrogram/raw/types/dialog_peer_folder.py new file mode 100644 index 00000000..7ac5fe91 --- /dev/null +++ b/pyrogram/raw/types/dialog_peer_folder.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogPeerFolder(TLObject): # type: ignore + """Peer folder + + Constructor of :obj:`~pyrogram.raw.base.DialogPeer`. + + Details: + - Layer: ``224`` + - ID: ``514519E2`` + + Parameters: + folder_id (``int`` ``32-bit``): + Peer folder ID, for more info click here + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDialogUnreadMarks + """ + + __slots__: List[str] = ["folder_id"] + + ID = 0x514519e2 + QUALNAME = "types.DialogPeerFolder" + + def __init__(self, *, folder_id: int) -> None: + self.folder_id = folder_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogPeerFolder": + # No flags + + folder_id = Int.read(b) + + return DialogPeerFolder(folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.folder_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/disallowed_gifts_settings.py b/pyrogram/raw/types/disallowed_gifts_settings.py new file mode 100644 index 00000000..5a024397 --- /dev/null +++ b/pyrogram/raw/types/disallowed_gifts_settings.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DisallowedGiftsSettings(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.DisallowedGiftsSettings`. + + Details: + - Layer: ``224`` + - ID: ``71F276C4`` + + Parameters: + disallow_unlimited_stargifts (``bool``, *optional*): + N/A + + disallow_limited_stargifts (``bool``, *optional*): + N/A + + disallow_unique_stargifts (``bool``, *optional*): + N/A + + disallow_premium_gifts (``bool``, *optional*): + N/A + + disallow_stargifts_from_channels (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["disallow_unlimited_stargifts", "disallow_limited_stargifts", "disallow_unique_stargifts", "disallow_premium_gifts", "disallow_stargifts_from_channels"] + + ID = 0x71f276c4 + QUALNAME = "types.DisallowedGiftsSettings" + + def __init__(self, *, disallow_unlimited_stargifts: Optional[bool] = None, disallow_limited_stargifts: Optional[bool] = None, disallow_unique_stargifts: Optional[bool] = None, disallow_premium_gifts: Optional[bool] = None, disallow_stargifts_from_channels: Optional[bool] = None) -> None: + self.disallow_unlimited_stargifts = disallow_unlimited_stargifts # flags.0?true + self.disallow_limited_stargifts = disallow_limited_stargifts # flags.1?true + self.disallow_unique_stargifts = disallow_unique_stargifts # flags.2?true + self.disallow_premium_gifts = disallow_premium_gifts # flags.3?true + self.disallow_stargifts_from_channels = disallow_stargifts_from_channels # flags.4?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DisallowedGiftsSettings": + + flags = Int.read(b) + + disallow_unlimited_stargifts = True if flags & (1 << 0) else False + disallow_limited_stargifts = True if flags & (1 << 1) else False + disallow_unique_stargifts = True if flags & (1 << 2) else False + disallow_premium_gifts = True if flags & (1 << 3) else False + disallow_stargifts_from_channels = True if flags & (1 << 4) else False + return DisallowedGiftsSettings(disallow_unlimited_stargifts=disallow_unlimited_stargifts, disallow_limited_stargifts=disallow_limited_stargifts, disallow_unique_stargifts=disallow_unique_stargifts, disallow_premium_gifts=disallow_premium_gifts, disallow_stargifts_from_channels=disallow_stargifts_from_channels) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.disallow_unlimited_stargifts else 0 + flags |= (1 << 1) if self.disallow_limited_stargifts else 0 + flags |= (1 << 2) if self.disallow_unique_stargifts else 0 + flags |= (1 << 3) if self.disallow_premium_gifts else 0 + flags |= (1 << 4) if self.disallow_stargifts_from_channels else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/document.py b/pyrogram/raw/types/document.py new file mode 100644 index 00000000..44ba0232 --- /dev/null +++ b/pyrogram/raw/types/document.py @@ -0,0 +1,144 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Document(TLObject): # type: ignore + """Document + + Constructor of :obj:`~pyrogram.raw.base.Document`. + + Details: + - Layer: ``224`` + - ID: ``8FD4C4D8`` + + Parameters: + id (``int`` ``64-bit``): + Document ID + + access_hash (``int`` ``64-bit``): + Check sum, dependent on document ID + + file_reference (``bytes``): + File reference + + date (``int`` ``32-bit``): + Creation date + + mime_type (``str``): + MIME type + + size (``int`` ``64-bit``): + Size + + dc_id (``int`` ``32-bit``): + DC ID + + attributes (List of :obj:`DocumentAttribute `): + Attributes + + thumbs (List of :obj:`PhotoSize `, *optional*): + Thumbnails + + video_thumbs (List of :obj:`VideoSize `, *optional*): + Video thumbnails + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.UploadTheme + account.UploadRingtone + messages.GetDocumentByHash + messages.GetCustomEmojiDocuments + """ + + __slots__: List[str] = ["id", "access_hash", "file_reference", "date", "mime_type", "size", "dc_id", "attributes", "thumbs", "video_thumbs"] + + ID = 0x8fd4c4d8 + QUALNAME = "types.Document" + + def __init__(self, *, id: int, access_hash: int, file_reference: bytes, date: int, mime_type: str, size: int, dc_id: int, attributes: List["raw.base.DocumentAttribute"], thumbs: Optional[List["raw.base.PhotoSize"]] = None, video_thumbs: Optional[List["raw.base.VideoSize"]] = None) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.file_reference = file_reference # bytes + self.date = date # int + self.mime_type = mime_type # string + self.size = size # long + self.dc_id = dc_id # int + self.attributes = attributes # Vector + self.thumbs = thumbs # flags.0?Vector + self.video_thumbs = video_thumbs # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Document": + + flags = Int.read(b) + + id = Long.read(b) + + access_hash = Long.read(b) + + file_reference = Bytes.read(b) + + date = Int.read(b) + + mime_type = String.read(b) + + size = Long.read(b) + + thumbs = TLObject.read(b) if flags & (1 << 0) else [] + + video_thumbs = TLObject.read(b) if flags & (1 << 1) else [] + + dc_id = Int.read(b) + + attributes = TLObject.read(b) + + return Document(id=id, access_hash=access_hash, file_reference=file_reference, date=date, mime_type=mime_type, size=size, dc_id=dc_id, attributes=attributes, thumbs=thumbs, video_thumbs=video_thumbs) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.thumbs else 0 + flags |= (1 << 1) if self.video_thumbs else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Bytes(self.file_reference)) + + b.write(Int(self.date)) + + b.write(String(self.mime_type)) + + b.write(Long(self.size)) + + if self.thumbs is not None: + b.write(Vector(self.thumbs)) + + if self.video_thumbs is not None: + b.write(Vector(self.video_thumbs)) + + b.write(Int(self.dc_id)) + + b.write(Vector(self.attributes)) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_animated.py b/pyrogram/raw/types/document_attribute_animated.py new file mode 100644 index 00000000..6d1b8d1f --- /dev/null +++ b/pyrogram/raw/types/document_attribute_animated.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeAnimated(TLObject): # type: ignore + """Defines an animated GIF + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``11B58939`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x11b58939 + QUALNAME = "types.DocumentAttributeAnimated" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeAnimated": + # No flags + + return DocumentAttributeAnimated() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_audio.py b/pyrogram/raw/types/document_attribute_audio.py new file mode 100644 index 00000000..3dec8d49 --- /dev/null +++ b/pyrogram/raw/types/document_attribute_audio.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeAudio(TLObject): # type: ignore + """Represents an audio file + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``9852F9C6`` + + Parameters: + duration (``int`` ``32-bit``): + Duration in seconds + + voice (``bool``, *optional*): + Whether this is a voice message + + title (``str``, *optional*): + Name of song + + performer (``str``, *optional*): + Performer + + waveform (``bytes``, *optional*): + Waveform: consists in a series of bitpacked 5-bit values. Example implementation: android. + + """ + + __slots__: List[str] = ["duration", "voice", "title", "performer", "waveform"] + + ID = 0x9852f9c6 + QUALNAME = "types.DocumentAttributeAudio" + + def __init__(self, *, duration: int, voice: Optional[bool] = None, title: Optional[str] = None, performer: Optional[str] = None, waveform: Optional[bytes] = None) -> None: + self.duration = duration # int + self.voice = voice # flags.10?true + self.title = title # flags.0?string + self.performer = performer # flags.1?string + self.waveform = waveform # flags.2?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeAudio": + + flags = Int.read(b) + + voice = True if flags & (1 << 10) else False + duration = Int.read(b) + + title = String.read(b) if flags & (1 << 0) else None + performer = String.read(b) if flags & (1 << 1) else None + waveform = Bytes.read(b) if flags & (1 << 2) else None + return DocumentAttributeAudio(duration=duration, voice=voice, title=title, performer=performer, waveform=waveform) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.voice else 0 + flags |= (1 << 0) if self.title is not None else 0 + flags |= (1 << 1) if self.performer is not None else 0 + flags |= (1 << 2) if self.waveform is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.duration)) + + if self.title is not None: + b.write(String(self.title)) + + if self.performer is not None: + b.write(String(self.performer)) + + if self.waveform is not None: + b.write(Bytes(self.waveform)) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_custom_emoji.py b/pyrogram/raw/types/document_attribute_custom_emoji.py new file mode 100644 index 00000000..79fc7a17 --- /dev/null +++ b/pyrogram/raw/types/document_attribute_custom_emoji.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeCustomEmoji(TLObject): # type: ignore + """Info about a custom emoji + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``FD149899`` + + Parameters: + alt (``str``): + The actual emoji + + stickerset (:obj:`InputStickerSet `): + The emoji stickerset to which this emoji belongs. + + free (``bool``, *optional*): + Whether this custom emoji can be sent by non-Premium users + + text_color (``bool``, *optional*): + Whether the color of this TGS custom emoji should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context. + + """ + + __slots__: List[str] = ["alt", "stickerset", "free", "text_color"] + + ID = 0xfd149899 + QUALNAME = "types.DocumentAttributeCustomEmoji" + + def __init__(self, *, alt: str, stickerset: "raw.base.InputStickerSet", free: Optional[bool] = None, text_color: Optional[bool] = None) -> None: + self.alt = alt # string + self.stickerset = stickerset # InputStickerSet + self.free = free # flags.0?true + self.text_color = text_color # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeCustomEmoji": + + flags = Int.read(b) + + free = True if flags & (1 << 0) else False + text_color = True if flags & (1 << 1) else False + alt = String.read(b) + + stickerset = TLObject.read(b) + + return DocumentAttributeCustomEmoji(alt=alt, stickerset=stickerset, free=free, text_color=text_color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.free else 0 + flags |= (1 << 1) if self.text_color else 0 + b.write(Int(flags)) + + b.write(String(self.alt)) + + b.write(self.stickerset.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_filename.py b/pyrogram/raw/types/document_attribute_filename.py new file mode 100644 index 00000000..8380684a --- /dev/null +++ b/pyrogram/raw/types/document_attribute_filename.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeFilename(TLObject): # type: ignore + """A simple document with a file name + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``15590068`` + + Parameters: + file_name (``str``): + The file name + + """ + + __slots__: List[str] = ["file_name"] + + ID = 0x15590068 + QUALNAME = "types.DocumentAttributeFilename" + + def __init__(self, *, file_name: str) -> None: + self.file_name = file_name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeFilename": + # No flags + + file_name = String.read(b) + + return DocumentAttributeFilename(file_name=file_name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.file_name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_has_stickers.py b/pyrogram/raw/types/document_attribute_has_stickers.py new file mode 100644 index 00000000..063b0baa --- /dev/null +++ b/pyrogram/raw/types/document_attribute_has_stickers.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeHasStickers(TLObject): # type: ignore + """Whether the current document has stickers attached + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``9801D2F7`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9801d2f7 + QUALNAME = "types.DocumentAttributeHasStickers" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeHasStickers": + # No flags + + return DocumentAttributeHasStickers() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_image_size.py b/pyrogram/raw/types/document_attribute_image_size.py new file mode 100644 index 00000000..be834e5c --- /dev/null +++ b/pyrogram/raw/types/document_attribute_image_size.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeImageSize(TLObject): # type: ignore + """Defines the width and height of an image uploaded as document + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``6C37C15C`` + + Parameters: + w (``int`` ``32-bit``): + Width of image + + h (``int`` ``32-bit``): + Height of image + + """ + + __slots__: List[str] = ["w", "h"] + + ID = 0x6c37c15c + QUALNAME = "types.DocumentAttributeImageSize" + + def __init__(self, *, w: int, h: int) -> None: + self.w = w # int + self.h = h # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeImageSize": + # No flags + + w = Int.read(b) + + h = Int.read(b) + + return DocumentAttributeImageSize(w=w, h=h) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.w)) + + b.write(Int(self.h)) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_sticker.py b/pyrogram/raw/types/document_attribute_sticker.py new file mode 100644 index 00000000..72be0c50 --- /dev/null +++ b/pyrogram/raw/types/document_attribute_sticker.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeSticker(TLObject): # type: ignore + """Defines a sticker + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``6319D612`` + + Parameters: + alt (``str``): + Alternative emoji representation of sticker + + stickerset (:obj:`InputStickerSet `): + Associated stickerset + + mask (``bool``, *optional*): + Whether this is a mask sticker + + mask_coords (:obj:`MaskCoords `, *optional*): + Mask coordinates (if this is a mask sticker, attached to a photo) + + """ + + __slots__: List[str] = ["alt", "stickerset", "mask", "mask_coords"] + + ID = 0x6319d612 + QUALNAME = "types.DocumentAttributeSticker" + + def __init__(self, *, alt: str, stickerset: "raw.base.InputStickerSet", mask: Optional[bool] = None, mask_coords: "raw.base.MaskCoords" = None) -> None: + self.alt = alt # string + self.stickerset = stickerset # InputStickerSet + self.mask = mask # flags.1?true + self.mask_coords = mask_coords # flags.0?MaskCoords + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeSticker": + + flags = Int.read(b) + + mask = True if flags & (1 << 1) else False + alt = String.read(b) + + stickerset = TLObject.read(b) + + mask_coords = TLObject.read(b) if flags & (1 << 0) else None + + return DocumentAttributeSticker(alt=alt, stickerset=stickerset, mask=mask, mask_coords=mask_coords) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.mask else 0 + flags |= (1 << 0) if self.mask_coords is not None else 0 + b.write(Int(flags)) + + b.write(String(self.alt)) + + b.write(self.stickerset.write()) + + if self.mask_coords is not None: + b.write(self.mask_coords.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_attribute_video.py b/pyrogram/raw/types/document_attribute_video.py new file mode 100644 index 00000000..7b77853d --- /dev/null +++ b/pyrogram/raw/types/document_attribute_video.py @@ -0,0 +1,117 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentAttributeVideo(TLObject): # type: ignore + """Defines a video + + Constructor of :obj:`~pyrogram.raw.base.DocumentAttribute`. + + Details: + - Layer: ``224`` + - ID: ``43C57C48`` + + Parameters: + duration (``float`` ``64-bit``): + Duration in seconds + + w (``int`` ``32-bit``): + Video width + + h (``int`` ``32-bit``): + Video height + + round_message (``bool``, *optional*): + Whether this is a round video + + supports_streaming (``bool``, *optional*): + Whether the video supports streaming + + nosound (``bool``, *optional*): + Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) + + preload_prefix_size (``int`` ``32-bit``, *optional*): + Number of bytes to preload when preloading videos (particularly video stories). + + video_start_ts (``float`` ``64-bit``, *optional*): + N/A + + video_codec (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["duration", "w", "h", "round_message", "supports_streaming", "nosound", "preload_prefix_size", "video_start_ts", "video_codec"] + + ID = 0x43c57c48 + QUALNAME = "types.DocumentAttributeVideo" + + def __init__(self, *, duration: float, w: int, h: int, round_message: Optional[bool] = None, supports_streaming: Optional[bool] = None, nosound: Optional[bool] = None, preload_prefix_size: Optional[int] = None, video_start_ts: Optional[float] = None, video_codec: Optional[str] = None) -> None: + self.duration = duration # double + self.w = w # int + self.h = h # int + self.round_message = round_message # flags.0?true + self.supports_streaming = supports_streaming # flags.1?true + self.nosound = nosound # flags.3?true + self.preload_prefix_size = preload_prefix_size # flags.2?int + self.video_start_ts = video_start_ts # flags.4?double + self.video_codec = video_codec # flags.5?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentAttributeVideo": + + flags = Int.read(b) + + round_message = True if flags & (1 << 0) else False + supports_streaming = True if flags & (1 << 1) else False + nosound = True if flags & (1 << 3) else False + duration = Double.read(b) + + w = Int.read(b) + + h = Int.read(b) + + preload_prefix_size = Int.read(b) if flags & (1 << 2) else None + video_start_ts = Double.read(b) if flags & (1 << 4) else None + video_codec = String.read(b) if flags & (1 << 5) else None + return DocumentAttributeVideo(duration=duration, w=w, h=h, round_message=round_message, supports_streaming=supports_streaming, nosound=nosound, preload_prefix_size=preload_prefix_size, video_start_ts=video_start_ts, video_codec=video_codec) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.round_message else 0 + flags |= (1 << 1) if self.supports_streaming else 0 + flags |= (1 << 3) if self.nosound else 0 + flags |= (1 << 2) if self.preload_prefix_size is not None else 0 + flags |= (1 << 4) if self.video_start_ts is not None else 0 + flags |= (1 << 5) if self.video_codec is not None else 0 + b.write(Int(flags)) + + b.write(Double(self.duration)) + + b.write(Int(self.w)) + + b.write(Int(self.h)) + + if self.preload_prefix_size is not None: + b.write(Int(self.preload_prefix_size)) + + if self.video_start_ts is not None: + b.write(Double(self.video_start_ts)) + + if self.video_codec is not None: + b.write(String(self.video_codec)) + + return b.getvalue() diff --git a/pyrogram/raw/types/document_empty.py b/pyrogram/raw/types/document_empty.py new file mode 100644 index 00000000..6708d98e --- /dev/null +++ b/pyrogram/raw/types/document_empty.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DocumentEmpty(TLObject): # type: ignore + """Empty constructor, document doesn't exist. + + Constructor of :obj:`~pyrogram.raw.base.Document`. + + Details: + - Layer: ``224`` + - ID: ``36F8C871`` + + Parameters: + id (``int`` ``64-bit``): + Document ID or 0 + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.UploadTheme + account.UploadRingtone + messages.GetDocumentByHash + messages.GetCustomEmojiDocuments + """ + + __slots__: List[str] = ["id"] + + ID = 0x36f8c871 + QUALNAME = "types.DocumentEmpty" + + def __init__(self, *, id: int) -> None: + self.id = id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DocumentEmpty": + # No flags + + id = Long.read(b) + + return DocumentEmpty(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/draft_message.py b/pyrogram/raw/types/draft_message.py new file mode 100644 index 00000000..eb341b02 --- /dev/null +++ b/pyrogram/raw/types/draft_message.py @@ -0,0 +1,125 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DraftMessage(TLObject): # type: ignore + """Represents a message draft. + + Constructor of :obj:`~pyrogram.raw.base.DraftMessage`. + + Details: + - Layer: ``224`` + - ID: ``96EAA5EB`` + + Parameters: + message (``str``): + The draft + + date (``int`` ``32-bit``): + Date of last update of the draft. + + no_webpage (``bool``, *optional*): + Whether no webpage preview will be generated + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + reply_to (:obj:`InputReplyTo `, *optional*): + If set, indicates that the message should be sent in reply to the specified message or story. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text. + + media (:obj:`InputMedia `, *optional*): + Media. + + effect (``int`` ``64-bit``, *optional*): + N/A + + suggested_post (:obj:`SuggestedPost `, *optional*): + N/A + + """ + + __slots__: List[str] = ["message", "date", "no_webpage", "invert_media", "reply_to", "entities", "media", "effect", "suggested_post"] + + ID = 0x96eaa5eb + QUALNAME = "types.DraftMessage" + + def __init__(self, *, message: str, date: int, no_webpage: Optional[bool] = None, invert_media: Optional[bool] = None, reply_to: "raw.base.InputReplyTo" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, media: "raw.base.InputMedia" = None, effect: Optional[int] = None, suggested_post: "raw.base.SuggestedPost" = None) -> None: + self.message = message # string + self.date = date # int + self.no_webpage = no_webpage # flags.1?true + self.invert_media = invert_media # flags.6?true + self.reply_to = reply_to # flags.4?InputReplyTo + self.entities = entities # flags.3?Vector + self.media = media # flags.5?InputMedia + self.effect = effect # flags.7?long + self.suggested_post = suggested_post # flags.8?SuggestedPost + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DraftMessage": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 1) else False + invert_media = True if flags & (1 << 6) else False + reply_to = TLObject.read(b) if flags & (1 << 4) else None + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 3) else [] + + media = TLObject.read(b) if flags & (1 << 5) else None + + date = Int.read(b) + + effect = Long.read(b) if flags & (1 << 7) else None + suggested_post = TLObject.read(b) if flags & (1 << 8) else None + + return DraftMessage(message=message, date=date, no_webpage=no_webpage, invert_media=invert_media, reply_to=reply_to, entities=entities, media=media, effect=effect, suggested_post=suggested_post) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.no_webpage else 0 + flags |= (1 << 6) if self.invert_media else 0 + flags |= (1 << 4) if self.reply_to is not None else 0 + flags |= (1 << 3) if self.entities else 0 + flags |= (1 << 5) if self.media is not None else 0 + flags |= (1 << 7) if self.effect is not None else 0 + flags |= (1 << 8) if self.suggested_post is not None else 0 + b.write(Int(flags)) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.media is not None: + b.write(self.media.write()) + + b.write(Int(self.date)) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.suggested_post is not None: + b.write(self.suggested_post.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/draft_message_empty.py b/pyrogram/raw/types/draft_message_empty.py new file mode 100644 index 00000000..0dcb847a --- /dev/null +++ b/pyrogram/raw/types/draft_message_empty.py @@ -0,0 +1,57 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DraftMessageEmpty(TLObject): # type: ignore + """Empty draft + + Constructor of :obj:`~pyrogram.raw.base.DraftMessage`. + + Details: + - Layer: ``224`` + - ID: ``1B0C841A`` + + Parameters: + date (``int`` ``32-bit``, *optional*): + When was the draft last updated + + """ + + __slots__: List[str] = ["date"] + + ID = 0x1b0c841a + QUALNAME = "types.DraftMessageEmpty" + + def __init__(self, *, date: Optional[int] = None) -> None: + self.date = date # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DraftMessageEmpty": + + flags = Int.read(b) + + date = Int.read(b) if flags & (1 << 0) else None + return DraftMessageEmpty(date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.date is not None else 0 + b.write(Int(flags)) + + if self.date is not None: + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/email_verification_apple.py b/pyrogram/raw/types/email_verification_apple.py new file mode 100644 index 00000000..eca284d8 --- /dev/null +++ b/pyrogram/raw/types/email_verification_apple.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerificationApple(TLObject): # type: ignore + """Apple ID email verification token + + Constructor of :obj:`~pyrogram.raw.base.EmailVerification`. + + Details: + - Layer: ``224`` + - ID: ``96D074FD`` + + Parameters: + token (``str``): + Token + + """ + + __slots__: List[str] = ["token"] + + ID = 0x96d074fd + QUALNAME = "types.EmailVerificationApple" + + def __init__(self, *, token: str) -> None: + self.token = token # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerificationApple": + # No flags + + token = String.read(b) + + return EmailVerificationApple(token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/email_verification_code.py b/pyrogram/raw/types/email_verification_code.py new file mode 100644 index 00000000..3d621a23 --- /dev/null +++ b/pyrogram/raw/types/email_verification_code.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerificationCode(TLObject): # type: ignore + """Email verification code + + Constructor of :obj:`~pyrogram.raw.base.EmailVerification`. + + Details: + - Layer: ``224`` + - ID: ``922E55A9`` + + Parameters: + code (``str``): + Received verification code + + """ + + __slots__: List[str] = ["code"] + + ID = 0x922e55a9 + QUALNAME = "types.EmailVerificationCode" + + def __init__(self, *, code: str) -> None: + self.code = code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerificationCode": + # No flags + + code = String.read(b) + + return EmailVerificationCode(code=code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.code)) + + return b.getvalue() diff --git a/pyrogram/raw/types/email_verification_google.py b/pyrogram/raw/types/email_verification_google.py new file mode 100644 index 00000000..10f85dfa --- /dev/null +++ b/pyrogram/raw/types/email_verification_google.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerificationGoogle(TLObject): # type: ignore + """Google ID email verification token + + Constructor of :obj:`~pyrogram.raw.base.EmailVerification`. + + Details: + - Layer: ``224`` + - ID: ``DB909EC2`` + + Parameters: + token (``str``): + Token + + """ + + __slots__: List[str] = ["token"] + + ID = 0xdb909ec2 + QUALNAME = "types.EmailVerificationGoogle" + + def __init__(self, *, token: str) -> None: + self.token = token # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerificationGoogle": + # No flags + + token = String.read(b) + + return EmailVerificationGoogle(token=token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/email_verify_purpose_login_change.py b/pyrogram/raw/types/email_verify_purpose_login_change.py new file mode 100644 index 00000000..66682416 --- /dev/null +++ b/pyrogram/raw/types/email_verify_purpose_login_change.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerifyPurposeLoginChange(TLObject): # type: ignore + """Email verification purpose: change login email + + Constructor of :obj:`~pyrogram.raw.base.EmailVerifyPurpose`. + + Details: + - Layer: ``224`` + - ID: ``527D22EB`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x527d22eb + QUALNAME = "types.EmailVerifyPurposeLoginChange" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerifyPurposeLoginChange": + # No flags + + return EmailVerifyPurposeLoginChange() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/email_verify_purpose_login_setup.py b/pyrogram/raw/types/email_verify_purpose_login_setup.py new file mode 100644 index 00000000..2fb5e57a --- /dev/null +++ b/pyrogram/raw/types/email_verify_purpose_login_setup.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerifyPurposeLoginSetup(TLObject): # type: ignore + """Email verification purpose: setup login email + + Constructor of :obj:`~pyrogram.raw.base.EmailVerifyPurpose`. + + Details: + - Layer: ``224`` + - ID: ``4345BE73`` + + Parameters: + phone_number (``str``): + Phone number + + phone_code_hash (``str``): + Phone code hash as specified by the documentation + + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash"] + + ID = 0x4345be73 + QUALNAME = "types.EmailVerifyPurposeLoginSetup" + + def __init__(self, *, phone_number: str, phone_code_hash: str) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerifyPurposeLoginSetup": + # No flags + + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + return EmailVerifyPurposeLoginSetup(phone_number=phone_number, phone_code_hash=phone_code_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/email_verify_purpose_passport.py b/pyrogram/raw/types/email_verify_purpose_passport.py new file mode 100644 index 00000000..a7bb0de8 --- /dev/null +++ b/pyrogram/raw/types/email_verify_purpose_passport.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmailVerifyPurposePassport(TLObject): # type: ignore + """Verify an email for use in telegram passport + + Constructor of :obj:`~pyrogram.raw.base.EmailVerifyPurpose`. + + Details: + - Layer: ``224`` + - ID: ``BBF51685`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xbbf51685 + QUALNAME = "types.EmailVerifyPurposePassport" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmailVerifyPurposePassport": + # No flags + + return EmailVerifyPurposePassport() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_group.py b/pyrogram/raw/types/emoji_group.py new file mode 100644 index 00000000..4d1aca64 --- /dev/null +++ b/pyrogram/raw/types/emoji_group.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGroup(TLObject): # type: ignore + """Represents an emoji category. + + Constructor of :obj:`~pyrogram.raw.base.EmojiGroup`. + + Details: + - Layer: ``224`` + - ID: ``7A9ABDA9`` + + Parameters: + title (``str``): + Category name, i.e. "Animals", "Flags", "Faces" and so on... + + icon_emoji_id (``int`` ``64-bit``): + A single custom emoji used as preview for the category. + + emoticons (List of ``str``): + A list of UTF-8 emojis, matching the category. + + """ + + __slots__: List[str] = ["title", "icon_emoji_id", "emoticons"] + + ID = 0x7a9abda9 + QUALNAME = "types.EmojiGroup" + + def __init__(self, *, title: str, icon_emoji_id: int, emoticons: List[str]) -> None: + self.title = title # string + self.icon_emoji_id = icon_emoji_id # long + self.emoticons = emoticons # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGroup": + # No flags + + title = String.read(b) + + icon_emoji_id = Long.read(b) + + emoticons = TLObject.read(b, String) + + return EmojiGroup(title=title, icon_emoji_id=icon_emoji_id, emoticons=emoticons) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(Long(self.icon_emoji_id)) + + b.write(Vector(self.emoticons, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_group_greeting.py b/pyrogram/raw/types/emoji_group_greeting.py new file mode 100644 index 00000000..9c21a156 --- /dev/null +++ b/pyrogram/raw/types/emoji_group_greeting.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGroupGreeting(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.EmojiGroup`. + + Details: + - Layer: ``224`` + - ID: ``80D26CC7`` + + Parameters: + title (``str``): + + + icon_emoji_id (``int`` ``64-bit``): + + + emoticons (List of ``str``): + + + """ + + __slots__: List[str] = ["title", "icon_emoji_id", "emoticons"] + + ID = 0x80d26cc7 + QUALNAME = "types.EmojiGroupGreeting" + + def __init__(self, *, title: str, icon_emoji_id: int, emoticons: List[str]) -> None: + self.title = title # string + self.icon_emoji_id = icon_emoji_id # long + self.emoticons = emoticons # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGroupGreeting": + # No flags + + title = String.read(b) + + icon_emoji_id = Long.read(b) + + emoticons = TLObject.read(b, String) + + return EmojiGroupGreeting(title=title, icon_emoji_id=icon_emoji_id, emoticons=emoticons) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(Long(self.icon_emoji_id)) + + b.write(Vector(self.emoticons, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_group_premium.py b/pyrogram/raw/types/emoji_group_premium.py new file mode 100644 index 00000000..c9399993 --- /dev/null +++ b/pyrogram/raw/types/emoji_group_premium.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGroupPremium(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.EmojiGroup`. + + Details: + - Layer: ``224`` + - ID: ``93BCF34`` + + Parameters: + title (``str``): + + + icon_emoji_id (``int`` ``64-bit``): + + + """ + + __slots__: List[str] = ["title", "icon_emoji_id"] + + ID = 0x93bcf34 + QUALNAME = "types.EmojiGroupPremium" + + def __init__(self, *, title: str, icon_emoji_id: int) -> None: + self.title = title # string + self.icon_emoji_id = icon_emoji_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGroupPremium": + # No flags + + title = String.read(b) + + icon_emoji_id = Long.read(b) + + return EmojiGroupPremium(title=title, icon_emoji_id=icon_emoji_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(Long(self.icon_emoji_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_keyword.py b/pyrogram/raw/types/emoji_keyword.py new file mode 100644 index 00000000..de515269 --- /dev/null +++ b/pyrogram/raw/types/emoji_keyword.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiKeyword(TLObject): # type: ignore + """Emoji keyword + + Constructor of :obj:`~pyrogram.raw.base.EmojiKeyword`. + + Details: + - Layer: ``224`` + - ID: ``D5B3B9F9`` + + Parameters: + keyword (``str``): + Keyword + + emoticons (List of ``str``): + Emojis associated to keyword + + """ + + __slots__: List[str] = ["keyword", "emoticons"] + + ID = 0xd5b3b9f9 + QUALNAME = "types.EmojiKeyword" + + def __init__(self, *, keyword: str, emoticons: List[str]) -> None: + self.keyword = keyword # string + self.emoticons = emoticons # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiKeyword": + # No flags + + keyword = String.read(b) + + emoticons = TLObject.read(b, String) + + return EmojiKeyword(keyword=keyword, emoticons=emoticons) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.keyword)) + + b.write(Vector(self.emoticons, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_keyword_deleted.py b/pyrogram/raw/types/emoji_keyword_deleted.py new file mode 100644 index 00000000..c379d3d2 --- /dev/null +++ b/pyrogram/raw/types/emoji_keyword_deleted.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiKeywordDeleted(TLObject): # type: ignore + """Deleted emoji keyword + + Constructor of :obj:`~pyrogram.raw.base.EmojiKeyword`. + + Details: + - Layer: ``224`` + - ID: ``236DF622`` + + Parameters: + keyword (``str``): + Keyword + + emoticons (List of ``str``): + Emojis that were associated to keyword + + """ + + __slots__: List[str] = ["keyword", "emoticons"] + + ID = 0x236df622 + QUALNAME = "types.EmojiKeywordDeleted" + + def __init__(self, *, keyword: str, emoticons: List[str]) -> None: + self.keyword = keyword # string + self.emoticons = emoticons # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiKeywordDeleted": + # No flags + + keyword = String.read(b) + + emoticons = TLObject.read(b, String) + + return EmojiKeywordDeleted(keyword=keyword, emoticons=emoticons) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.keyword)) + + b.write(Vector(self.emoticons, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_keywords_difference.py b/pyrogram/raw/types/emoji_keywords_difference.py new file mode 100644 index 00000000..2a8a2bca --- /dev/null +++ b/pyrogram/raw/types/emoji_keywords_difference.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiKeywordsDifference(TLObject): # type: ignore + """Changes to emoji keywords + + Constructor of :obj:`~pyrogram.raw.base.EmojiKeywordsDifference`. + + Details: + - Layer: ``224`` + - ID: ``5CC761BD`` + + Parameters: + lang_code (``str``): + Language code for keywords + + from_version (``int`` ``32-bit``): + Previous emoji keyword list version + + version (``int`` ``32-bit``): + Current version of emoji keyword list + + keywords (List of :obj:`EmojiKeyword `): + Emojis associated to keywords + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiKeywords + messages.GetEmojiKeywordsDifference + """ + + __slots__: List[str] = ["lang_code", "from_version", "version", "keywords"] + + ID = 0x5cc761bd + QUALNAME = "types.EmojiKeywordsDifference" + + def __init__(self, *, lang_code: str, from_version: int, version: int, keywords: List["raw.base.EmojiKeyword"]) -> None: + self.lang_code = lang_code # string + self.from_version = from_version # int + self.version = version # int + self.keywords = keywords # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiKeywordsDifference": + # No flags + + lang_code = String.read(b) + + from_version = Int.read(b) + + version = Int.read(b) + + keywords = TLObject.read(b) + + return EmojiKeywordsDifference(lang_code=lang_code, from_version=from_version, version=version, keywords=keywords) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + b.write(Int(self.from_version)) + + b.write(Int(self.version)) + + b.write(Vector(self.keywords)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_language.py b/pyrogram/raw/types/emoji_language.py new file mode 100644 index 00000000..dac644e1 --- /dev/null +++ b/pyrogram/raw/types/emoji_language.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiLanguage(TLObject): # type: ignore + """Emoji language + + Constructor of :obj:`~pyrogram.raw.base.EmojiLanguage`. + + Details: + - Layer: ``224`` + - ID: ``B3FB5361`` + + Parameters: + lang_code (``str``): + Language code + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiKeywordsLanguages + """ + + __slots__: List[str] = ["lang_code"] + + ID = 0xb3fb5361 + QUALNAME = "types.EmojiLanguage" + + def __init__(self, *, lang_code: str) -> None: + self.lang_code = lang_code # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiLanguage": + # No flags + + lang_code = String.read(b) + + return EmojiLanguage(lang_code=lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_list.py b/pyrogram/raw/types/emoji_list.py new file mode 100644 index 00000000..0117d5f2 --- /dev/null +++ b/pyrogram/raw/types/emoji_list.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiList(TLObject): # type: ignore + """Represents a list of custom emojis. + + Constructor of :obj:`~pyrogram.raw.base.EmojiList`. + + Details: + - Layer: ``224`` + - ID: ``7A1E11D1`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + document_id (List of ``int`` ``64-bit``): + Custom emoji IDs + + Functions: + This object can be returned by 5 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetDefaultProfilePhotoEmojis + account.GetDefaultGroupPhotoEmojis + account.GetDefaultBackgroundEmojis + account.GetChannelRestrictedStatusEmojis + messages.SearchCustomEmoji + """ + + __slots__: List[str] = ["hash", "document_id"] + + ID = 0x7a1e11d1 + QUALNAME = "types.EmojiList" + + def __init__(self, *, hash: int, document_id: List[int]) -> None: + self.hash = hash # long + self.document_id = document_id # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiList": + # No flags + + hash = Long.read(b) + + document_id = TLObject.read(b, Long) + + return EmojiList(hash=hash, document_id=document_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.document_id, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_list_not_modified.py b/pyrogram/raw/types/emoji_list_not_modified.py new file mode 100644 index 00000000..a6d33940 --- /dev/null +++ b/pyrogram/raw/types/emoji_list_not_modified.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiListNotModified(TLObject): # type: ignore + """The list of custom emojis hasn't changed. + + Constructor of :obj:`~pyrogram.raw.base.EmojiList`. + + Details: + - Layer: ``224`` + - ID: ``481EADFA`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 5 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetDefaultProfilePhotoEmojis + account.GetDefaultGroupPhotoEmojis + account.GetDefaultBackgroundEmojis + account.GetChannelRestrictedStatusEmojis + messages.SearchCustomEmoji + """ + + __slots__: List[str] = [] + + ID = 0x481eadfa + QUALNAME = "types.EmojiListNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiListNotModified": + # No flags + + return EmojiListNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_status.py b/pyrogram/raw/types/emoji_status.py new file mode 100644 index 00000000..1cff7b8f --- /dev/null +++ b/pyrogram/raw/types/emoji_status.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiStatus(TLObject): # type: ignore + """An emoji status + + Constructor of :obj:`~pyrogram.raw.base.EmojiStatus`. + + Details: + - Layer: ``224`` + - ID: ``E7FF068A`` + + Parameters: + document_id (``int`` ``64-bit``): + Custom emoji document ID + + until (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["document_id", "until"] + + ID = 0xe7ff068a + QUALNAME = "types.EmojiStatus" + + def __init__(self, *, document_id: int, until: Optional[int] = None) -> None: + self.document_id = document_id # long + self.until = until # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiStatus": + + flags = Int.read(b) + + document_id = Long.read(b) + + until = Int.read(b) if flags & (1 << 0) else None + return EmojiStatus(document_id=document_id, until=until) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.until is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.document_id)) + + if self.until is not None: + b.write(Int(self.until)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_status_collectible.py b/pyrogram/raw/types/emoji_status_collectible.py new file mode 100644 index 00000000..a3f47c41 --- /dev/null +++ b/pyrogram/raw/types/emoji_status_collectible.py @@ -0,0 +1,129 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiStatusCollectible(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.EmojiStatus`. + + Details: + - Layer: ``224`` + - ID: ``7184603B`` + + Parameters: + collectible_id (``int`` ``64-bit``): + N/A + + document_id (``int`` ``64-bit``): + N/A + + title (``str``): + N/A + + slug (``str``): + N/A + + pattern_document_id (``int`` ``64-bit``): + N/A + + center_color (``int`` ``32-bit``): + N/A + + edge_color (``int`` ``32-bit``): + N/A + + pattern_color (``int`` ``32-bit``): + N/A + + text_color (``int`` ``32-bit``): + N/A + + until (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["collectible_id", "document_id", "title", "slug", "pattern_document_id", "center_color", "edge_color", "pattern_color", "text_color", "until"] + + ID = 0x7184603b + QUALNAME = "types.EmojiStatusCollectible" + + def __init__(self, *, collectible_id: int, document_id: int, title: str, slug: str, pattern_document_id: int, center_color: int, edge_color: int, pattern_color: int, text_color: int, until: Optional[int] = None) -> None: + self.collectible_id = collectible_id # long + self.document_id = document_id # long + self.title = title # string + self.slug = slug # string + self.pattern_document_id = pattern_document_id # long + self.center_color = center_color # int + self.edge_color = edge_color # int + self.pattern_color = pattern_color # int + self.text_color = text_color # int + self.until = until # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiStatusCollectible": + + flags = Int.read(b) + + collectible_id = Long.read(b) + + document_id = Long.read(b) + + title = String.read(b) + + slug = String.read(b) + + pattern_document_id = Long.read(b) + + center_color = Int.read(b) + + edge_color = Int.read(b) + + pattern_color = Int.read(b) + + text_color = Int.read(b) + + until = Int.read(b) if flags & (1 << 0) else None + return EmojiStatusCollectible(collectible_id=collectible_id, document_id=document_id, title=title, slug=slug, pattern_document_id=pattern_document_id, center_color=center_color, edge_color=edge_color, pattern_color=pattern_color, text_color=text_color, until=until) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.until is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.collectible_id)) + + b.write(Long(self.document_id)) + + b.write(String(self.title)) + + b.write(String(self.slug)) + + b.write(Long(self.pattern_document_id)) + + b.write(Int(self.center_color)) + + b.write(Int(self.edge_color)) + + b.write(Int(self.pattern_color)) + + b.write(Int(self.text_color)) + + if self.until is not None: + b.write(Int(self.until)) + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_status_empty.py b/pyrogram/raw/types/emoji_status_empty.py new file mode 100644 index 00000000..3cbf3d25 --- /dev/null +++ b/pyrogram/raw/types/emoji_status_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiStatusEmpty(TLObject): # type: ignore + """No emoji status is set + + Constructor of :obj:`~pyrogram.raw.base.EmojiStatus`. + + Details: + - Layer: ``224`` + - ID: ``2DE11AAE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x2de11aae + QUALNAME = "types.EmojiStatusEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiStatusEmpty": + # No flags + + return EmojiStatusEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/emoji_url.py b/pyrogram/raw/types/emoji_url.py new file mode 100644 index 00000000..4ba41354 --- /dev/null +++ b/pyrogram/raw/types/emoji_url.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiURL(TLObject): # type: ignore + """An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation + + Constructor of :obj:`~pyrogram.raw.base.EmojiURL`. + + Details: + - Layer: ``224`` + - ID: ``A575739D`` + + Parameters: + url (``str``): + An HTTP URL which can be used to automatically log in into translation platform and suggest new emoji replacements. The URL will be valid for 30 seconds after generation + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiURL + """ + + __slots__: List[str] = ["url"] + + ID = 0xa575739d + QUALNAME = "types.EmojiURL" + + def __init__(self, *, url: str) -> None: + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiURL": + # No flags + + url = String.read(b) + + return EmojiURL(url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_chat.py b/pyrogram/raw/types/encrypted_chat.py new file mode 100644 index 00000000..db3ed868 --- /dev/null +++ b/pyrogram/raw/types/encrypted_chat.py @@ -0,0 +1,112 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedChat(TLObject): # type: ignore + """Encrypted chat + + Constructor of :obj:`~pyrogram.raw.base.EncryptedChat`. + + Details: + - Layer: ``224`` + - ID: ``61F0D4C7`` + + Parameters: + id (``int`` ``32-bit``): + Chat ID + + access_hash (``int`` ``64-bit``): + Check sum dependent on the user ID + + date (``int`` ``32-bit``): + Date chat was created + + admin_id (``int`` ``64-bit``): + Chat creator ID + + participant_id (``int`` ``64-bit``): + ID of the second chat participant + + g_a_or_b (``bytes``): + B = g ^ b mod p, if the currently authorized user is the chat's creator,or A = g ^ a mod p otherwiseSee Wikipedia for more info + + key_fingerprint (``int`` ``64-bit``): + 64-bit fingerprint of received key + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.RequestEncryption + messages.AcceptEncryption + """ + + __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id", "g_a_or_b", "key_fingerprint"] + + ID = 0x61f0d4c7 + QUALNAME = "types.EncryptedChat" + + def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int, g_a_or_b: bytes, key_fingerprint: int) -> None: + self.id = id # int + self.access_hash = access_hash # long + self.date = date # int + self.admin_id = admin_id # long + self.participant_id = participant_id # long + self.g_a_or_b = g_a_or_b # bytes + self.key_fingerprint = key_fingerprint # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedChat": + # No flags + + id = Int.read(b) + + access_hash = Long.read(b) + + date = Int.read(b) + + admin_id = Long.read(b) + + participant_id = Long.read(b) + + g_a_or_b = Bytes.read(b) + + key_fingerprint = Long.read(b) + + return EncryptedChat(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id, g_a_or_b=g_a_or_b, key_fingerprint=key_fingerprint) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Int(self.date)) + + b.write(Long(self.admin_id)) + + b.write(Long(self.participant_id)) + + b.write(Bytes(self.g_a_or_b)) + + b.write(Long(self.key_fingerprint)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_chat_discarded.py b/pyrogram/raw/types/encrypted_chat_discarded.py new file mode 100644 index 00000000..84adaef9 --- /dev/null +++ b/pyrogram/raw/types/encrypted_chat_discarded.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedChatDiscarded(TLObject): # type: ignore + """Discarded or deleted chat. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedChat`. + + Details: + - Layer: ``224`` + - ID: ``1E1C7C45`` + + Parameters: + id (``int`` ``32-bit``): + Chat ID + + history_deleted (``bool``, *optional*): + Whether both users of this secret chat should also remove all of its messages + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.RequestEncryption + messages.AcceptEncryption + """ + + __slots__: List[str] = ["id", "history_deleted"] + + ID = 0x1e1c7c45 + QUALNAME = "types.EncryptedChatDiscarded" + + def __init__(self, *, id: int, history_deleted: Optional[bool] = None) -> None: + self.id = id # int + self.history_deleted = history_deleted # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedChatDiscarded": + + flags = Int.read(b) + + history_deleted = True if flags & (1 << 0) else False + id = Int.read(b) + + return EncryptedChatDiscarded(id=id, history_deleted=history_deleted) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.history_deleted else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_chat_empty.py b/pyrogram/raw/types/encrypted_chat_empty.py new file mode 100644 index 00000000..5c10e91f --- /dev/null +++ b/pyrogram/raw/types/encrypted_chat_empty.py @@ -0,0 +1,64 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedChatEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedChat`. + + Details: + - Layer: ``224`` + - ID: ``AB7EC0A0`` + + Parameters: + id (``int`` ``32-bit``): + Chat ID + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.RequestEncryption + messages.AcceptEncryption + """ + + __slots__: List[str] = ["id"] + + ID = 0xab7ec0a0 + QUALNAME = "types.EncryptedChatEmpty" + + def __init__(self, *, id: int) -> None: + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedChatEmpty": + # No flags + + id = Int.read(b) + + return EncryptedChatEmpty(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_chat_requested.py b/pyrogram/raw/types/encrypted_chat_requested.py new file mode 100644 index 00000000..dd7bb379 --- /dev/null +++ b/pyrogram/raw/types/encrypted_chat_requested.py @@ -0,0 +1,115 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedChatRequested(TLObject): # type: ignore + """Request to create an encrypted chat. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedChat`. + + Details: + - Layer: ``224`` + - ID: ``48F1D94C`` + + Parameters: + id (``int`` ``32-bit``): + Chat ID + + access_hash (``int`` ``64-bit``): + Check sum depending on user ID + + date (``int`` ``32-bit``): + Chat creation date + + admin_id (``int`` ``64-bit``): + Chat creator ID + + participant_id (``int`` ``64-bit``): + ID of second chat participant + + g_a (``bytes``): + A = g ^ a mod p, see Wikipedia + + folder_id (``int`` ``32-bit``, *optional*): + Peer folder ID, for more info click here + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.RequestEncryption + messages.AcceptEncryption + """ + + __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id", "g_a", "folder_id"] + + ID = 0x48f1d94c + QUALNAME = "types.EncryptedChatRequested" + + def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int, g_a: bytes, folder_id: Optional[int] = None) -> None: + self.id = id # int + self.access_hash = access_hash # long + self.date = date # int + self.admin_id = admin_id # long + self.participant_id = participant_id # long + self.g_a = g_a # bytes + self.folder_id = folder_id # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedChatRequested": + + flags = Int.read(b) + + folder_id = Int.read(b) if flags & (1 << 0) else None + id = Int.read(b) + + access_hash = Long.read(b) + + date = Int.read(b) + + admin_id = Long.read(b) + + participant_id = Long.read(b) + + g_a = Bytes.read(b) + + return EncryptedChatRequested(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id, g_a=g_a, folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.folder_id is not None else 0 + b.write(Int(flags)) + + if self.folder_id is not None: + b.write(Int(self.folder_id)) + + b.write(Int(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Int(self.date)) + + b.write(Long(self.admin_id)) + + b.write(Long(self.participant_id)) + + b.write(Bytes(self.g_a)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_chat_waiting.py b/pyrogram/raw/types/encrypted_chat_waiting.py new file mode 100644 index 00000000..2e52748b --- /dev/null +++ b/pyrogram/raw/types/encrypted_chat_waiting.py @@ -0,0 +1,96 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedChatWaiting(TLObject): # type: ignore + """Chat waiting for approval of second participant. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedChat`. + + Details: + - Layer: ``224`` + - ID: ``66B25953`` + + Parameters: + id (``int`` ``32-bit``): + Chat ID + + access_hash (``int`` ``64-bit``): + Checking sum depending on user ID + + date (``int`` ``32-bit``): + Date of chat creation + + admin_id (``int`` ``64-bit``): + Chat creator ID + + participant_id (``int`` ``64-bit``): + ID of second chat participant + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.RequestEncryption + messages.AcceptEncryption + """ + + __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id"] + + ID = 0x66b25953 + QUALNAME = "types.EncryptedChatWaiting" + + def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int) -> None: + self.id = id # int + self.access_hash = access_hash # long + self.date = date # int + self.admin_id = admin_id # long + self.participant_id = participant_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedChatWaiting": + # No flags + + id = Int.read(b) + + access_hash = Long.read(b) + + date = Int.read(b) + + admin_id = Long.read(b) + + participant_id = Long.read(b) + + return EncryptedChatWaiting(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Int(self.date)) + + b.write(Long(self.admin_id)) + + b.write(Long(self.participant_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_file.py b/pyrogram/raw/types/encrypted_file.py new file mode 100644 index 00000000..d7089226 --- /dev/null +++ b/pyrogram/raw/types/encrypted_file.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedFile(TLObject): # type: ignore + """Encrypted file. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedFile`. + + Details: + - Layer: ``224`` + - ID: ``A8008CD8`` + + Parameters: + id (``int`` ``64-bit``): + File ID + + access_hash (``int`` ``64-bit``): + Checking sum depending on user ID + + size (``int`` ``64-bit``): + File size in bytes + + dc_id (``int`` ``32-bit``): + Number of data center + + key_fingerprint (``int`` ``32-bit``): + 32-bit fingerprint of key used for file encryption + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadEncryptedFile + """ + + __slots__: List[str] = ["id", "access_hash", "size", "dc_id", "key_fingerprint"] + + ID = 0xa8008cd8 + QUALNAME = "types.EncryptedFile" + + def __init__(self, *, id: int, access_hash: int, size: int, dc_id: int, key_fingerprint: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.size = size # long + self.dc_id = dc_id # int + self.key_fingerprint = key_fingerprint # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedFile": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + size = Long.read(b) + + dc_id = Int.read(b) + + key_fingerprint = Int.read(b) + + return EncryptedFile(id=id, access_hash=access_hash, size=size, dc_id=dc_id, key_fingerprint=key_fingerprint) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Long(self.size)) + + b.write(Int(self.dc_id)) + + b.write(Int(self.key_fingerprint)) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_file_empty.py b/pyrogram/raw/types/encrypted_file_empty.py new file mode 100644 index 00000000..e8acd8fc --- /dev/null +++ b/pyrogram/raw/types/encrypted_file_empty.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedFileEmpty(TLObject): # type: ignore + """Empty constructor, non-existing file. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedFile`. + + Details: + - Layer: ``224`` + - ID: ``C21F497E`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadEncryptedFile + """ + + __slots__: List[str] = [] + + ID = 0xc21f497e + QUALNAME = "types.EncryptedFileEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedFileEmpty": + # No flags + + return EncryptedFileEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_message.py b/pyrogram/raw/types/encrypted_message.py new file mode 100644 index 00000000..4e8e1c02 --- /dev/null +++ b/pyrogram/raw/types/encrypted_message.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedMessage(TLObject): # type: ignore + """Encrypted message. + + Constructor of :obj:`~pyrogram.raw.base.EncryptedMessage`. + + Details: + - Layer: ``224`` + - ID: ``ED18C118`` + + Parameters: + random_id (``int`` ``64-bit``): + Random message ID, assigned by the author of message + + chat_id (``int`` ``32-bit``): + ID of encrypted chat + + date (``int`` ``32-bit``): + Date of sending + + bytes (``bytes``): + TL-serialization of DecryptedMessage type, encrypted with the key created at chat initialization + + file (:obj:`EncryptedFile `): + Attached encrypted file + + """ + + __slots__: List[str] = ["random_id", "chat_id", "date", "bytes", "file"] + + ID = 0xed18c118 + QUALNAME = "types.EncryptedMessage" + + def __init__(self, *, random_id: int, chat_id: int, date: int, bytes: bytes, file: "raw.base.EncryptedFile") -> None: + self.random_id = random_id # long + self.chat_id = chat_id # int + self.date = date # int + self.bytes = bytes # bytes + self.file = file # EncryptedFile + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedMessage": + # No flags + + random_id = Long.read(b) + + chat_id = Int.read(b) + + date = Int.read(b) + + bytes = Bytes.read(b) + + file = TLObject.read(b) + + return EncryptedMessage(random_id=random_id, chat_id=chat_id, date=date, bytes=bytes, file=file) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.random_id)) + + b.write(Int(self.chat_id)) + + b.write(Int(self.date)) + + b.write(Bytes(self.bytes)) + + b.write(self.file.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/encrypted_message_service.py b/pyrogram/raw/types/encrypted_message_service.py new file mode 100644 index 00000000..e3384dad --- /dev/null +++ b/pyrogram/raw/types/encrypted_message_service.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EncryptedMessageService(TLObject): # type: ignore + """Encrypted service message + + Constructor of :obj:`~pyrogram.raw.base.EncryptedMessage`. + + Details: + - Layer: ``224`` + - ID: ``23734B06`` + + Parameters: + random_id (``int`` ``64-bit``): + Random message ID, assigned by the author of message + + chat_id (``int`` ``32-bit``): + ID of encrypted chat + + date (``int`` ``32-bit``): + Date of sending + + bytes (``bytes``): + TL-serialization of the DecryptedMessage type, encrypted with the key created at chat initialization + + """ + + __slots__: List[str] = ["random_id", "chat_id", "date", "bytes"] + + ID = 0x23734b06 + QUALNAME = "types.EncryptedMessageService" + + def __init__(self, *, random_id: int, chat_id: int, date: int, bytes: bytes) -> None: + self.random_id = random_id # long + self.chat_id = chat_id # int + self.date = date # int + self.bytes = bytes # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EncryptedMessageService": + # No flags + + random_id = Long.read(b) + + chat_id = Int.read(b) + + date = Int.read(b) + + bytes = Bytes.read(b) + + return EncryptedMessageService(random_id=random_id, chat_id=chat_id, date=date, bytes=bytes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.random_id)) + + b.write(Int(self.chat_id)) + + b.write(Int(self.date)) + + b.write(Bytes(self.bytes)) + + return b.getvalue() diff --git a/pyrogram/raw/types/exported_chatlist_invite.py b/pyrogram/raw/types/exported_chatlist_invite.py new file mode 100644 index 00000000..8c8c46b4 --- /dev/null +++ b/pyrogram/raw/types/exported_chatlist_invite.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedChatlistInvite(TLObject): # type: ignore + """Exported chat folder deep link ». + + Constructor of :obj:`~pyrogram.raw.base.ExportedChatlistInvite`. + + Details: + - Layer: ``224`` + - ID: ``C5181AC`` + + Parameters: + title (``str``): + Name of the link + + url (``str``): + The chat folder deep link ». + + peers (List of :obj:`Peer `): + Peers to import + + revoked (``bool``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + chatlists.EditExportedInvite + """ + + __slots__: List[str] = ["title", "url", "peers", "revoked"] + + ID = 0xc5181ac + QUALNAME = "types.ExportedChatlistInvite" + + def __init__(self, *, title: str, url: str, peers: List["raw.base.Peer"], revoked: Optional[bool] = None) -> None: + self.title = title # string + self.url = url # string + self.peers = peers # Vector + self.revoked = revoked # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedChatlistInvite": + + flags = Int.read(b) + + revoked = True if flags & (1 << 0) else False + title = String.read(b) + + url = String.read(b) + + peers = TLObject.read(b) + + return ExportedChatlistInvite(title=title, url=url, peers=peers, revoked=revoked) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.revoked else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.url)) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/exported_contact_token.py b/pyrogram/raw/types/exported_contact_token.py new file mode 100644 index 00000000..52774273 --- /dev/null +++ b/pyrogram/raw/types/exported_contact_token.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedContactToken(TLObject): # type: ignore + """Describes a temporary profile link. + + Constructor of :obj:`~pyrogram.raw.base.ExportedContactToken`. + + Details: + - Layer: ``224`` + - ID: ``41BF109B`` + + Parameters: + url (``str``): + The temporary profile link. + + expires (``int`` ``32-bit``): + Its expiration date + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + contacts.ExportContactToken + """ + + __slots__: List[str] = ["url", "expires"] + + ID = 0x41bf109b + QUALNAME = "types.ExportedContactToken" + + def __init__(self, *, url: str, expires: int) -> None: + self.url = url # string + self.expires = expires # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedContactToken": + # No flags + + url = String.read(b) + + expires = Int.read(b) + + return ExportedContactToken(url=url, expires=expires) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(Int(self.expires)) + + return b.getvalue() diff --git a/pyrogram/raw/types/exported_message_link.py b/pyrogram/raw/types/exported_message_link.py new file mode 100644 index 00000000..cde1a39a --- /dev/null +++ b/pyrogram/raw/types/exported_message_link.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedMessageLink(TLObject): # type: ignore + """Link to a message in a supergroup/channel + + Constructor of :obj:`~pyrogram.raw.base.ExportedMessageLink`. + + Details: + - Layer: ``224`` + - ID: ``5DAB1AF4`` + + Parameters: + link (``str``): + URL + + html (``str``): + Embed code + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.ExportMessageLink + """ + + __slots__: List[str] = ["link", "html"] + + ID = 0x5dab1af4 + QUALNAME = "types.ExportedMessageLink" + + def __init__(self, *, link: str, html: str) -> None: + self.link = link # string + self.html = html # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedMessageLink": + # No flags + + link = String.read(b) + + html = String.read(b) + + return ExportedMessageLink(link=link, html=html) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.link)) + + b.write(String(self.html)) + + return b.getvalue() diff --git a/pyrogram/raw/types/exported_story_link.py b/pyrogram/raw/types/exported_story_link.py new file mode 100644 index 00000000..c39313e3 --- /dev/null +++ b/pyrogram/raw/types/exported_story_link.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedStoryLink(TLObject): # type: ignore + """Represents a story deep link. + + Constructor of :obj:`~pyrogram.raw.base.ExportedStoryLink`. + + Details: + - Layer: ``224`` + - ID: ``3FC9053B`` + + Parameters: + link (``str``): + The story deep link. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + stories.ExportStoryLink + """ + + __slots__: List[str] = ["link"] + + ID = 0x3fc9053b + QUALNAME = "types.ExportedStoryLink" + + def __init__(self, *, link: str) -> None: + self.link = link # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedStoryLink": + # No flags + + link = String.read(b) + + return ExportedStoryLink(link=link) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.link)) + + return b.getvalue() diff --git a/pyrogram/raw/types/fact_check.py b/pyrogram/raw/types/fact_check.py new file mode 100644 index 00000000..c68b7344 --- /dev/null +++ b/pyrogram/raw/types/fact_check.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FactCheck(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.FactCheck`. + + Details: + - Layer: ``224`` + - ID: ``B89BFCCF`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + need_check (``bool``, *optional*): + + + country (``str``, *optional*): + + + text (:obj:`TextWithEntities `, *optional*): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetFactCheck + """ + + __slots__: List[str] = ["hash", "need_check", "country", "text"] + + ID = 0xb89bfccf + QUALNAME = "types.FactCheck" + + def __init__(self, *, hash: int, need_check: Optional[bool] = None, country: Optional[str] = None, text: "raw.base.TextWithEntities" = None) -> None: + self.hash = hash # long + self.need_check = need_check # flags.0?true + self.country = country # flags.1?string + self.text = text # flags.1?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FactCheck": + + flags = Int.read(b) + + need_check = True if flags & (1 << 0) else False + country = String.read(b) if flags & (1 << 1) else None + text = TLObject.read(b) if flags & (1 << 1) else None + + hash = Long.read(b) + + return FactCheck(hash=hash, need_check=need_check, country=country, text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.need_check else 0 + flags |= (1 << 1) if self.country is not None else 0 + flags |= (1 << 1) if self.text is not None else 0 + b.write(Int(flags)) + + if self.country is not None: + b.write(String(self.country)) + + if self.text is not None: + b.write(self.text.write()) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/file_hash.py b/pyrogram/raw/types/file_hash.py new file mode 100644 index 00000000..f545f88d --- /dev/null +++ b/pyrogram/raw/types/file_hash.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FileHash(TLObject): # type: ignore + """SHA256 Hash of an uploaded file, to be checked for validity after download + + Constructor of :obj:`~pyrogram.raw.base.FileHash`. + + Details: + - Layer: ``224`` + - ID: ``F39B035C`` + + Parameters: + offset (``int`` ``64-bit``): + Offset from where to start computing SHA-256 hash + + limit (``int`` ``32-bit``): + Length + + hash (``bytes``): + SHA-256 Hash of file chunk, to be checked for validity after download + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + upload.ReuploadCdnFile + upload.GetCdnFileHashes + upload.GetFileHashes + """ + + __slots__: List[str] = ["offset", "limit", "hash"] + + ID = 0xf39b035c + QUALNAME = "types.FileHash" + + def __init__(self, *, offset: int, limit: int, hash: bytes) -> None: + self.offset = offset # long + self.limit = limit # int + self.hash = hash # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FileHash": + # No flags + + offset = Long.read(b) + + limit = Int.read(b) + + hash = Bytes.read(b) + + return FileHash(offset=offset, limit=limit, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.offset)) + + b.write(Int(self.limit)) + + b.write(Bytes(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/folder.py b/pyrogram/raw/types/folder.py new file mode 100644 index 00000000..09761320 --- /dev/null +++ b/pyrogram/raw/types/folder.py @@ -0,0 +1,92 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Folder(TLObject): # type: ignore + """Folder + + Constructor of :obj:`~pyrogram.raw.base.Folder`. + + Details: + - Layer: ``224`` + - ID: ``FF544E65`` + + Parameters: + id (``int`` ``32-bit``): + Folder ID + + title (``str``): + Folder title + + autofill_new_broadcasts (``bool``, *optional*): + Automatically add new channels to this folder + + autofill_public_groups (``bool``, *optional*): + Automatically add joined new public supergroups to this folder + + autofill_new_correspondents (``bool``, *optional*): + Automatically add new private chats to this folder + + photo (:obj:`ChatPhoto `, *optional*): + Folder picture + + """ + + __slots__: List[str] = ["id", "title", "autofill_new_broadcasts", "autofill_public_groups", "autofill_new_correspondents", "photo"] + + ID = 0xff544e65 + QUALNAME = "types.Folder" + + def __init__(self, *, id: int, title: str, autofill_new_broadcasts: Optional[bool] = None, autofill_public_groups: Optional[bool] = None, autofill_new_correspondents: Optional[bool] = None, photo: "raw.base.ChatPhoto" = None) -> None: + self.id = id # int + self.title = title # string + self.autofill_new_broadcasts = autofill_new_broadcasts # flags.0?true + self.autofill_public_groups = autofill_public_groups # flags.1?true + self.autofill_new_correspondents = autofill_new_correspondents # flags.2?true + self.photo = photo # flags.3?ChatPhoto + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Folder": + + flags = Int.read(b) + + autofill_new_broadcasts = True if flags & (1 << 0) else False + autofill_public_groups = True if flags & (1 << 1) else False + autofill_new_correspondents = True if flags & (1 << 2) else False + id = Int.read(b) + + title = String.read(b) + + photo = TLObject.read(b) if flags & (1 << 3) else None + + return Folder(id=id, title=title, autofill_new_broadcasts=autofill_new_broadcasts, autofill_public_groups=autofill_public_groups, autofill_new_correspondents=autofill_new_correspondents, photo=photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.autofill_new_broadcasts else 0 + flags |= (1 << 1) if self.autofill_public_groups else 0 + flags |= (1 << 2) if self.autofill_new_correspondents else 0 + flags |= (1 << 3) if self.photo is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + b.write(String(self.title)) + + if self.photo is not None: + b.write(self.photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/folder_peer.py b/pyrogram/raw/types/folder_peer.py new file mode 100644 index 00000000..9d1dcf89 --- /dev/null +++ b/pyrogram/raw/types/folder_peer.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FolderPeer(TLObject): # type: ignore + """Peer in a folder + + Constructor of :obj:`~pyrogram.raw.base.FolderPeer`. + + Details: + - Layer: ``224`` + - ID: ``E9BAA668`` + + Parameters: + peer (:obj:`Peer `): + Folder peer info + + folder_id (``int`` ``32-bit``): + Peer folder ID, for more info click here + + """ + + __slots__: List[str] = ["peer", "folder_id"] + + ID = 0xe9baa668 + QUALNAME = "types.FolderPeer" + + def __init__(self, *, peer: "raw.base.Peer", folder_id: int) -> None: + self.peer = peer # Peer + self.folder_id = folder_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FolderPeer": + # No flags + + peer = TLObject.read(b) + + folder_id = Int.read(b) + + return FolderPeer(peer=peer, folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.folder_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/forum_topic.py b/pyrogram/raw/types/forum_topic.py new file mode 100644 index 00000000..bed85621 --- /dev/null +++ b/pyrogram/raw/types/forum_topic.py @@ -0,0 +1,208 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ForumTopic(TLObject): # type: ignore + """Represents a forum topic. + + Constructor of :obj:`~pyrogram.raw.base.ForumTopic`. + + Details: + - Layer: ``224`` + - ID: ``CDFF0ECA`` + + Parameters: + date (``int`` ``32-bit``): + Topic creation date + + peer (:obj:`Peer `): + N/A + + title (``str``): + Topic title + + icon_color (``int`` ``32-bit``): + If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. + + top_message (``int`` ``32-bit``): + ID of the last message that was sent to this topic + + read_inbox_max_id (``int`` ``32-bit``): + Position up to which all incoming messages are read. + + read_outbox_max_id (``int`` ``32-bit``): + Position up to which all outgoing messages are read. + + unread_count (``int`` ``32-bit``): + Number of unread messages + + unread_mentions_count (``int`` ``32-bit``): + Number of unread mentions + + unread_reactions_count (``int`` ``32-bit``): + Number of unread reactions to messages you sent + + from_id (:obj:`Peer `): + ID of the peer that created the topic + + notify_settings (:obj:`PeerNotifySettings `): + Notification settings + + my (``bool``, *optional*): + Whether the topic was created by the current user + + closed (``bool``, *optional*): + Whether the topic is closed (no messages can be sent to it) + + pinned (``bool``, *optional*): + Whether the topic is pinned + + short (``bool``, *optional*): + Whether this constructor is a reduced version of the full topic information. If set, only the my, closed, id, date, title, icon_color, icon_emoji_id and from_id parameters will contain valid information. Reduced info is usually only returned in topic-related admin log events » and in the messages.channelMessages constructor: if needed, full information can be fetched using channels.getForumTopicsByID. + + hidden (``bool``, *optional*): + Whether the topic is hidden (only valid for the "General" topic, id=1) + + title_missing (``bool``, *optional*): + N/A + + id (``int`` ``32-bit``, *optional*): + Topic ID + + icon_emoji_id (``int`` ``64-bit``, *optional*): + ID of the custom emoji used as topic icon. + + draft (:obj:`DraftMessage `, *optional*): + Message draft + + """ + + __slots__: List[str] = ["date", "peer", "title", "icon_color", "top_message", "read_inbox_max_id", "read_outbox_max_id", "unread_count", "unread_mentions_count", "unread_reactions_count", "from_id", "notify_settings", "my", "closed", "pinned", "short", "hidden", "title_missing", "id", "icon_emoji_id", "draft"] + + ID = 0xcdff0eca + QUALNAME = "types.ForumTopic" + + def __init__(self, *, date: int, peer: "raw.base.Peer", title: str, icon_color: int, top_message: int, read_inbox_max_id: int, read_outbox_max_id: int, unread_count: int, unread_mentions_count: int, unread_reactions_count: int, from_id: "raw.base.Peer", notify_settings: "raw.base.PeerNotifySettings", my: Optional[bool] = None, closed: Optional[bool] = None, pinned: Optional[bool] = None, short: Optional[bool] = None, hidden: Optional[bool] = None, title_missing: Optional[bool] = None, id: Optional[int] = None, icon_emoji_id: Optional[int] = None, draft: "raw.base.DraftMessage" = None) -> None: + self.date = date # int + self.peer = peer # Peer + self.title = title # string + self.icon_color = icon_color # int + self.top_message = top_message # int + self.read_inbox_max_id = read_inbox_max_id # int + self.read_outbox_max_id = read_outbox_max_id # int + self.unread_count = unread_count # int + self.unread_mentions_count = unread_mentions_count # int + self.unread_reactions_count = unread_reactions_count # int + self.from_id = from_id # Peer + self.notify_settings = notify_settings # PeerNotifySettings + self.my = my # flags.1?true + self.closed = closed # flags.2?true + self.pinned = pinned # flags.3?true + self.short = short # flags.5?true + self.hidden = hidden # flags.6?true + self.title_missing = title_missing # flags.7?true + self.id = id # flags.7?int + self.icon_emoji_id = icon_emoji_id # flags.0?long + self.draft = draft # flags.4?DraftMessage + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ForumTopic": + + flags = Int.read(b) + + my = True if flags & (1 << 1) else False + closed = True if flags & (1 << 2) else False + pinned = True if flags & (1 << 3) else False + short = True if flags & (1 << 5) else False + hidden = True if flags & (1 << 6) else False + title_missing = True if flags & (1 << 7) else False + id = Int.read(b) if flags & (1 << 7) else None + date = Int.read(b) + + peer = TLObject.read(b) + + title = String.read(b) + + icon_color = Int.read(b) + + icon_emoji_id = Long.read(b) if flags & (1 << 0) else None + top_message = Int.read(b) + + read_inbox_max_id = Int.read(b) + + read_outbox_max_id = Int.read(b) + + unread_count = Int.read(b) + + unread_mentions_count = Int.read(b) + + unread_reactions_count = Int.read(b) + + from_id = TLObject.read(b) + + notify_settings = TLObject.read(b) + + draft = TLObject.read(b) if flags & (1 << 4) else None + + return ForumTopic(date=date, peer=peer, title=title, icon_color=icon_color, top_message=top_message, read_inbox_max_id=read_inbox_max_id, read_outbox_max_id=read_outbox_max_id, unread_count=unread_count, unread_mentions_count=unread_mentions_count, unread_reactions_count=unread_reactions_count, from_id=from_id, notify_settings=notify_settings, my=my, closed=closed, pinned=pinned, short=short, hidden=hidden, title_missing=title_missing, id=id, icon_emoji_id=icon_emoji_id, draft=draft) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.my else 0 + flags |= (1 << 2) if self.closed else 0 + flags |= (1 << 3) if self.pinned else 0 + flags |= (1 << 5) if self.short else 0 + flags |= (1 << 6) if self.hidden else 0 + flags |= (1 << 7) if self.title_missing else 0 + flags |= (1 << 7) if self.id is not None else 0 + flags |= (1 << 0) if self.icon_emoji_id is not None else 0 + flags |= (1 << 4) if self.draft is not None else 0 + b.write(Int(flags)) + + if self.id is not None: + b.write(Int(self.id)) + + b.write(Int(self.date)) + + b.write(self.peer.write()) + + b.write(String(self.title)) + + b.write(Int(self.icon_color)) + + if self.icon_emoji_id is not None: + b.write(Long(self.icon_emoji_id)) + + b.write(Int(self.top_message)) + + b.write(Int(self.read_inbox_max_id)) + + b.write(Int(self.read_outbox_max_id)) + + b.write(Int(self.unread_count)) + + b.write(Int(self.unread_mentions_count)) + + b.write(Int(self.unread_reactions_count)) + + b.write(self.from_id.write()) + + b.write(self.notify_settings.write()) + + if self.draft is not None: + b.write(self.draft.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/forum_topic_deleted.py b/pyrogram/raw/types/forum_topic_deleted.py new file mode 100644 index 00000000..0014cd1e --- /dev/null +++ b/pyrogram/raw/types/forum_topic_deleted.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ForumTopicDeleted(TLObject): # type: ignore + """Represents a deleted forum topic. + + Constructor of :obj:`~pyrogram.raw.base.ForumTopic`. + + Details: + - Layer: ``224`` + - ID: ``23F109B`` + + Parameters: + id (``int`` ``32-bit``): + The ID of the deleted forum topic. + + """ + + __slots__: List[str] = ["id"] + + ID = 0x23f109b + QUALNAME = "types.ForumTopicDeleted" + + def __init__(self, *, id: int) -> None: + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ForumTopicDeleted": + # No flags + + id = Int.read(b) + + return ForumTopicDeleted(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/found_story.py b/pyrogram/raw/types/found_story.py new file mode 100644 index 00000000..a90632b7 --- /dev/null +++ b/pyrogram/raw/types/found_story.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FoundStory(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.FoundStory`. + + Details: + - Layer: ``224`` + - ID: ``E87ACBC0`` + + Parameters: + peer (:obj:`Peer `): + N/A + + story (:obj:`StoryItem `): + N/A + + """ + + __slots__: List[str] = ["peer", "story"] + + ID = 0xe87acbc0 + QUALNAME = "types.FoundStory" + + def __init__(self, *, peer: "raw.base.Peer", story: "raw.base.StoryItem") -> None: + self.peer = peer # Peer + self.story = story # StoryItem + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FoundStory": + # No flags + + peer = TLObject.read(b) + + story = TLObject.read(b) + + return FoundStory(peer=peer, story=story) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(self.story.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/fragment/__init__.py b/pyrogram/raw/types/fragment/__init__.py new file mode 100644 index 00000000..ff4a3ee0 --- /dev/null +++ b/pyrogram/raw/types/fragment/__init__.py @@ -0,0 +1,33 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .collectible_info import CollectibleInfo + + +__all__ = [ + "CollectibleInfo", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/fragment/collectible_info.py b/pyrogram/raw/types/fragment/collectible_info.py new file mode 100644 index 00000000..3d195dcd --- /dev/null +++ b/pyrogram/raw/types/fragment/collectible_info.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CollectibleInfo(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.fragment.CollectibleInfo`. + + Details: + - Layer: ``224`` + - ID: ``6EBDFF91`` + + Parameters: + purchase_date (``int`` ``32-bit``): + + + currency (``str``): + + + amount (``int`` ``64-bit``): + + + crypto_currency (``str``): + + + crypto_amount (``int`` ``64-bit``): + + + url (``str``): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + fragment.GetCollectibleInfo + """ + + __slots__: List[str] = ["purchase_date", "currency", "amount", "crypto_currency", "crypto_amount", "url"] + + ID = 0x6ebdff91 + QUALNAME = "types.fragment.CollectibleInfo" + + def __init__(self, *, purchase_date: int, currency: str, amount: int, crypto_currency: str, crypto_amount: int, url: str) -> None: + self.purchase_date = purchase_date # int + self.currency = currency # string + self.amount = amount # long + self.crypto_currency = crypto_currency # string + self.crypto_amount = crypto_amount # long + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CollectibleInfo": + # No flags + + purchase_date = Int.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + crypto_currency = String.read(b) + + crypto_amount = Long.read(b) + + url = String.read(b) + + return CollectibleInfo(purchase_date=purchase_date, currency=currency, amount=amount, crypto_currency=crypto_currency, crypto_amount=crypto_amount, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.purchase_date)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + b.write(String(self.crypto_currency)) + + b.write(Long(self.crypto_amount)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/game.py b/pyrogram/raw/types/game.py new file mode 100644 index 00000000..0ea7f48f --- /dev/null +++ b/pyrogram/raw/types/game.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Game(TLObject): # type: ignore + """Indicates an already sent game + + Constructor of :obj:`~pyrogram.raw.base.Game`. + + Details: + - Layer: ``224`` + - ID: ``BDF9653B`` + + Parameters: + id (``int`` ``64-bit``): + ID of the game + + access_hash (``int`` ``64-bit``): + Access hash of the game + + short_name (``str``): + Short name for the game + + title (``str``): + Title of the game + + description (``str``): + Game description + + photo (:obj:`Photo `): + Game preview + + document (:obj:`Document `, *optional*): + Optional attached document + + """ + + __slots__: List[str] = ["id", "access_hash", "short_name", "title", "description", "photo", "document"] + + ID = 0xbdf9653b + QUALNAME = "types.Game" + + def __init__(self, *, id: int, access_hash: int, short_name: str, title: str, description: str, photo: "raw.base.Photo", document: "raw.base.Document" = None) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.short_name = short_name # string + self.title = title # string + self.description = description # string + self.photo = photo # Photo + self.document = document # flags.0?Document + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Game": + + flags = Int.read(b) + + id = Long.read(b) + + access_hash = Long.read(b) + + short_name = String.read(b) + + title = String.read(b) + + description = String.read(b) + + photo = TLObject.read(b) + + document = TLObject.read(b) if flags & (1 << 0) else None + + return Game(id=id, access_hash=access_hash, short_name=short_name, title=title, description=description, photo=photo, document=document) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.document is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(String(self.short_name)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + b.write(self.photo.write()) + + if self.document is not None: + b.write(self.document.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/geo_point.py b/pyrogram/raw/types/geo_point.py new file mode 100644 index 00000000..bef3cd45 --- /dev/null +++ b/pyrogram/raw/types/geo_point.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GeoPoint(TLObject): # type: ignore + """GeoPoint. + + Constructor of :obj:`~pyrogram.raw.base.GeoPoint`. + + Details: + - Layer: ``224`` + - ID: ``B2A2F663`` + + Parameters: + long (``float`` ``64-bit``): + Longitude + + lat (``float`` ``64-bit``): + Latitude + + access_hash (``int`` ``64-bit``): + Access hash + + accuracy_radius (``int`` ``32-bit``, *optional*): + The estimated horizontal accuracy of the location, in meters; as defined by the sender. + + """ + + __slots__: List[str] = ["long", "lat", "access_hash", "accuracy_radius"] + + ID = 0xb2a2f663 + QUALNAME = "types.GeoPoint" + + def __init__(self, *, long: float, lat: float, access_hash: int, accuracy_radius: Optional[int] = None) -> None: + self.long = long # double + self.lat = lat # double + self.access_hash = access_hash # long + self.accuracy_radius = accuracy_radius # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GeoPoint": + + flags = Int.read(b) + + long = Double.read(b) + + lat = Double.read(b) + + access_hash = Long.read(b) + + accuracy_radius = Int.read(b) if flags & (1 << 0) else None + return GeoPoint(long=long, lat=lat, access_hash=access_hash, accuracy_radius=accuracy_radius) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.accuracy_radius is not None else 0 + b.write(Int(flags)) + + b.write(Double(self.long)) + + b.write(Double(self.lat)) + + b.write(Long(self.access_hash)) + + if self.accuracy_radius is not None: + b.write(Int(self.accuracy_radius)) + + return b.getvalue() diff --git a/pyrogram/raw/types/geo_point_address.py b/pyrogram/raw/types/geo_point_address.py new file mode 100644 index 00000000..f435890b --- /dev/null +++ b/pyrogram/raw/types/geo_point_address.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GeoPointAddress(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.GeoPointAddress`. + + Details: + - Layer: ``224`` + - ID: ``DE4C5D93`` + + Parameters: + country_iso2 (``str``): + N/A + + state (``str``, *optional*): + N/A + + city (``str``, *optional*): + N/A + + street (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["country_iso2", "state", "city", "street"] + + ID = 0xde4c5d93 + QUALNAME = "types.GeoPointAddress" + + def __init__(self, *, country_iso2: str, state: Optional[str] = None, city: Optional[str] = None, street: Optional[str] = None) -> None: + self.country_iso2 = country_iso2 # string + self.state = state # flags.0?string + self.city = city # flags.1?string + self.street = street # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GeoPointAddress": + + flags = Int.read(b) + + country_iso2 = String.read(b) + + state = String.read(b) if flags & (1 << 0) else None + city = String.read(b) if flags & (1 << 1) else None + street = String.read(b) if flags & (1 << 2) else None + return GeoPointAddress(country_iso2=country_iso2, state=state, city=city, street=street) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.state is not None else 0 + flags |= (1 << 1) if self.city is not None else 0 + flags |= (1 << 2) if self.street is not None else 0 + b.write(Int(flags)) + + b.write(String(self.country_iso2)) + + if self.state is not None: + b.write(String(self.state)) + + if self.city is not None: + b.write(String(self.city)) + + if self.street is not None: + b.write(String(self.street)) + + return b.getvalue() diff --git a/pyrogram/raw/types/geo_point_empty.py b/pyrogram/raw/types/geo_point_empty.py new file mode 100644 index 00000000..dc72947d --- /dev/null +++ b/pyrogram/raw/types/geo_point_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GeoPointEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.GeoPoint`. + + Details: + - Layer: ``224`` + - ID: ``1117DD5F`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1117dd5f + QUALNAME = "types.GeoPointEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GeoPointEmpty": + # No flags + + return GeoPointEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/global_privacy_settings.py b/pyrogram/raw/types/global_privacy_settings.py new file mode 100644 index 00000000..d44b65cd --- /dev/null +++ b/pyrogram/raw/types/global_privacy_settings.py @@ -0,0 +1,113 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GlobalPrivacySettings(TLObject): # type: ignore + """Global privacy settings + + Constructor of :obj:`~pyrogram.raw.base.GlobalPrivacySettings`. + + Details: + - Layer: ``224`` + - ID: ``FE41B34F`` + + Parameters: + archive_and_mute_new_noncontact_peers (``bool``, *optional*): + Whether to archive and mute new chats from non-contacts + + keep_archived_unmuted (``bool``, *optional*): + Whether unmuted chats will be kept in the Archive chat list when they get a new message. + + keep_archived_folders (``bool``, *optional*): + Whether unmuted chats that are always included or pinned in a folder, will be kept in the Archive chat list when they get a new message. Ignored if keep_archived_unmuted is set. + + hide_read_marks (``bool``, *optional*): + + + new_noncontact_peers_require_premium (``bool``, *optional*): + + + display_gifts_button (``bool``, *optional*): + N/A + + noncontact_peers_paid_stars (``int`` ``64-bit``, *optional*): + N/A + + disallowed_gifts (:obj:`DisallowedGiftsSettings `, *optional*): + N/A + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + account.GetGlobalPrivacySettings + account.SetGlobalPrivacySettings + """ + + __slots__: List[str] = ["archive_and_mute_new_noncontact_peers", "keep_archived_unmuted", "keep_archived_folders", "hide_read_marks", "new_noncontact_peers_require_premium", "display_gifts_button", "noncontact_peers_paid_stars", "disallowed_gifts"] + + ID = 0xfe41b34f + QUALNAME = "types.GlobalPrivacySettings" + + def __init__(self, *, archive_and_mute_new_noncontact_peers: Optional[bool] = None, keep_archived_unmuted: Optional[bool] = None, keep_archived_folders: Optional[bool] = None, hide_read_marks: Optional[bool] = None, new_noncontact_peers_require_premium: Optional[bool] = None, display_gifts_button: Optional[bool] = None, noncontact_peers_paid_stars: Optional[int] = None, disallowed_gifts: "raw.base.DisallowedGiftsSettings" = None) -> None: + self.archive_and_mute_new_noncontact_peers = archive_and_mute_new_noncontact_peers # flags.0?true + self.keep_archived_unmuted = keep_archived_unmuted # flags.1?true + self.keep_archived_folders = keep_archived_folders # flags.2?true + self.hide_read_marks = hide_read_marks # flags.3?true + self.new_noncontact_peers_require_premium = new_noncontact_peers_require_premium # flags.4?true + self.display_gifts_button = display_gifts_button # flags.7?true + self.noncontact_peers_paid_stars = noncontact_peers_paid_stars # flags.5?long + self.disallowed_gifts = disallowed_gifts # flags.6?DisallowedGiftsSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GlobalPrivacySettings": + + flags = Int.read(b) + + archive_and_mute_new_noncontact_peers = True if flags & (1 << 0) else False + keep_archived_unmuted = True if flags & (1 << 1) else False + keep_archived_folders = True if flags & (1 << 2) else False + hide_read_marks = True if flags & (1 << 3) else False + new_noncontact_peers_require_premium = True if flags & (1 << 4) else False + display_gifts_button = True if flags & (1 << 7) else False + noncontact_peers_paid_stars = Long.read(b) if flags & (1 << 5) else None + disallowed_gifts = TLObject.read(b) if flags & (1 << 6) else None + + return GlobalPrivacySettings(archive_and_mute_new_noncontact_peers=archive_and_mute_new_noncontact_peers, keep_archived_unmuted=keep_archived_unmuted, keep_archived_folders=keep_archived_folders, hide_read_marks=hide_read_marks, new_noncontact_peers_require_premium=new_noncontact_peers_require_premium, display_gifts_button=display_gifts_button, noncontact_peers_paid_stars=noncontact_peers_paid_stars, disallowed_gifts=disallowed_gifts) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.archive_and_mute_new_noncontact_peers else 0 + flags |= (1 << 1) if self.keep_archived_unmuted else 0 + flags |= (1 << 2) if self.keep_archived_folders else 0 + flags |= (1 << 3) if self.hide_read_marks else 0 + flags |= (1 << 4) if self.new_noncontact_peers_require_premium else 0 + flags |= (1 << 7) if self.display_gifts_button else 0 + flags |= (1 << 5) if self.noncontact_peers_paid_stars is not None else 0 + flags |= (1 << 6) if self.disallowed_gifts is not None else 0 + b.write(Int(flags)) + + if self.noncontact_peers_paid_stars is not None: + b.write(Long(self.noncontact_peers_paid_stars)) + + if self.disallowed_gifts is not None: + b.write(self.disallowed_gifts.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call.py b/pyrogram/raw/types/group_call.py new file mode 100644 index 00000000..dd177e99 --- /dev/null +++ b/pyrogram/raw/types/group_call.py @@ -0,0 +1,239 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCall(TLObject): # type: ignore + """Info about a group call or livestream + + Constructor of :obj:`~pyrogram.raw.base.GroupCall`. + + Details: + - Layer: ``224`` + - ID: ``EFB2B617`` + + Parameters: + id (``int`` ``64-bit``): + Group call ID + + access_hash (``int`` ``64-bit``): + Group call access hash + + participants_count (``int`` ``32-bit``): + Participant count + + unmuted_video_limit (``int`` ``32-bit``): + Maximum number of people allowed to stream video into the call + + version (``int`` ``32-bit``): + Version + + join_muted (``bool``, *optional*): + Whether the user should be muted upon joining the call + + can_change_join_muted (``bool``, *optional*): + Whether the current user can change the value of the join_muted flag using phone.toggleGroupCallSettings + + join_date_asc (``bool``, *optional*): + Specifies the ordering to use when locally sorting by date and displaying in the UI group call participants. + + schedule_start_subscribed (``bool``, *optional*): + Whether we subscribed to the scheduled call + + can_start_video (``bool``, *optional*): + Whether you can start streaming video into the call + + record_video_active (``bool``, *optional*): + Whether the group call is currently being recorded + + rtmp_stream (``bool``, *optional*): + Whether RTMP streams are allowed + + listeners_hidden (``bool``, *optional*): + Whether the listeners list is hidden and cannot be fetched using phone.getGroupParticipants. The phone.groupParticipants.count and groupCall.participants_count counters will still include listeners. + + conference (``bool``, *optional*): + N/A + + creator (``bool``, *optional*): + N/A + + messages_enabled (``bool``, *optional*): + N/A + + can_change_messages_enabled (``bool``, *optional*): + N/A + + min (``bool``, *optional*): + N/A + + title (``str``, *optional*): + Group call title + + stream_dc_id (``int`` ``32-bit``, *optional*): + DC ID to be used for livestream chunks + + record_start_date (``int`` ``32-bit``, *optional*): + When was the recording started + + schedule_date (``int`` ``32-bit``, *optional*): + When is the call scheduled to start + + unmuted_video_count (``int`` ``32-bit``, *optional*): + Number of people currently streaming video into the call + + invite_link (``str``, *optional*): + N/A + + send_paid_messages_stars (``int`` ``64-bit``, *optional*): + N/A + + default_send_as (:obj:`Peer `, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "access_hash", "participants_count", "unmuted_video_limit", "version", "join_muted", "can_change_join_muted", "join_date_asc", "schedule_start_subscribed", "can_start_video", "record_video_active", "rtmp_stream", "listeners_hidden", "conference", "creator", "messages_enabled", "can_change_messages_enabled", "min", "title", "stream_dc_id", "record_start_date", "schedule_date", "unmuted_video_count", "invite_link", "send_paid_messages_stars", "default_send_as"] + + ID = 0xefb2b617 + QUALNAME = "types.GroupCall" + + def __init__(self, *, id: int, access_hash: int, participants_count: int, unmuted_video_limit: int, version: int, join_muted: Optional[bool] = None, can_change_join_muted: Optional[bool] = None, join_date_asc: Optional[bool] = None, schedule_start_subscribed: Optional[bool] = None, can_start_video: Optional[bool] = None, record_video_active: Optional[bool] = None, rtmp_stream: Optional[bool] = None, listeners_hidden: Optional[bool] = None, conference: Optional[bool] = None, creator: Optional[bool] = None, messages_enabled: Optional[bool] = None, can_change_messages_enabled: Optional[bool] = None, min: Optional[bool] = None, title: Optional[str] = None, stream_dc_id: Optional[int] = None, record_start_date: Optional[int] = None, schedule_date: Optional[int] = None, unmuted_video_count: Optional[int] = None, invite_link: Optional[str] = None, send_paid_messages_stars: Optional[int] = None, default_send_as: "raw.base.Peer" = None) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.participants_count = participants_count # int + self.unmuted_video_limit = unmuted_video_limit # int + self.version = version # int + self.join_muted = join_muted # flags.1?true + self.can_change_join_muted = can_change_join_muted # flags.2?true + self.join_date_asc = join_date_asc # flags.6?true + self.schedule_start_subscribed = schedule_start_subscribed # flags.8?true + self.can_start_video = can_start_video # flags.9?true + self.record_video_active = record_video_active # flags.11?true + self.rtmp_stream = rtmp_stream # flags.12?true + self.listeners_hidden = listeners_hidden # flags.13?true + self.conference = conference # flags.14?true + self.creator = creator # flags.15?true + self.messages_enabled = messages_enabled # flags.17?true + self.can_change_messages_enabled = can_change_messages_enabled # flags.18?true + self.min = min # flags.19?true + self.title = title # flags.3?string + self.stream_dc_id = stream_dc_id # flags.4?int + self.record_start_date = record_start_date # flags.5?int + self.schedule_date = schedule_date # flags.7?int + self.unmuted_video_count = unmuted_video_count # flags.10?int + self.invite_link = invite_link # flags.16?string + self.send_paid_messages_stars = send_paid_messages_stars # flags.20?long + self.default_send_as = default_send_as # flags.21?Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCall": + + flags = Int.read(b) + + join_muted = True if flags & (1 << 1) else False + can_change_join_muted = True if flags & (1 << 2) else False + join_date_asc = True if flags & (1 << 6) else False + schedule_start_subscribed = True if flags & (1 << 8) else False + can_start_video = True if flags & (1 << 9) else False + record_video_active = True if flags & (1 << 11) else False + rtmp_stream = True if flags & (1 << 12) else False + listeners_hidden = True if flags & (1 << 13) else False + conference = True if flags & (1 << 14) else False + creator = True if flags & (1 << 15) else False + messages_enabled = True if flags & (1 << 17) else False + can_change_messages_enabled = True if flags & (1 << 18) else False + min = True if flags & (1 << 19) else False + id = Long.read(b) + + access_hash = Long.read(b) + + participants_count = Int.read(b) + + title = String.read(b) if flags & (1 << 3) else None + stream_dc_id = Int.read(b) if flags & (1 << 4) else None + record_start_date = Int.read(b) if flags & (1 << 5) else None + schedule_date = Int.read(b) if flags & (1 << 7) else None + unmuted_video_count = Int.read(b) if flags & (1 << 10) else None + unmuted_video_limit = Int.read(b) + + version = Int.read(b) + + invite_link = String.read(b) if flags & (1 << 16) else None + send_paid_messages_stars = Long.read(b) if flags & (1 << 20) else None + default_send_as = TLObject.read(b) if flags & (1 << 21) else None + + return GroupCall(id=id, access_hash=access_hash, participants_count=participants_count, unmuted_video_limit=unmuted_video_limit, version=version, join_muted=join_muted, can_change_join_muted=can_change_join_muted, join_date_asc=join_date_asc, schedule_start_subscribed=schedule_start_subscribed, can_start_video=can_start_video, record_video_active=record_video_active, rtmp_stream=rtmp_stream, listeners_hidden=listeners_hidden, conference=conference, creator=creator, messages_enabled=messages_enabled, can_change_messages_enabled=can_change_messages_enabled, min=min, title=title, stream_dc_id=stream_dc_id, record_start_date=record_start_date, schedule_date=schedule_date, unmuted_video_count=unmuted_video_count, invite_link=invite_link, send_paid_messages_stars=send_paid_messages_stars, default_send_as=default_send_as) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.join_muted else 0 + flags |= (1 << 2) if self.can_change_join_muted else 0 + flags |= (1 << 6) if self.join_date_asc else 0 + flags |= (1 << 8) if self.schedule_start_subscribed else 0 + flags |= (1 << 9) if self.can_start_video else 0 + flags |= (1 << 11) if self.record_video_active else 0 + flags |= (1 << 12) if self.rtmp_stream else 0 + flags |= (1 << 13) if self.listeners_hidden else 0 + flags |= (1 << 14) if self.conference else 0 + flags |= (1 << 15) if self.creator else 0 + flags |= (1 << 17) if self.messages_enabled else 0 + flags |= (1 << 18) if self.can_change_messages_enabled else 0 + flags |= (1 << 19) if self.min else 0 + flags |= (1 << 3) if self.title is not None else 0 + flags |= (1 << 4) if self.stream_dc_id is not None else 0 + flags |= (1 << 5) if self.record_start_date is not None else 0 + flags |= (1 << 7) if self.schedule_date is not None else 0 + flags |= (1 << 10) if self.unmuted_video_count is not None else 0 + flags |= (1 << 16) if self.invite_link is not None else 0 + flags |= (1 << 20) if self.send_paid_messages_stars is not None else 0 + flags |= (1 << 21) if self.default_send_as is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Int(self.participants_count)) + + if self.title is not None: + b.write(String(self.title)) + + if self.stream_dc_id is not None: + b.write(Int(self.stream_dc_id)) + + if self.record_start_date is not None: + b.write(Int(self.record_start_date)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.unmuted_video_count is not None: + b.write(Int(self.unmuted_video_count)) + + b.write(Int(self.unmuted_video_limit)) + + b.write(Int(self.version)) + + if self.invite_link is not None: + b.write(String(self.invite_link)) + + if self.send_paid_messages_stars is not None: + b.write(Long(self.send_paid_messages_stars)) + + if self.default_send_as is not None: + b.write(self.default_send_as.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_discarded.py b/pyrogram/raw/types/group_call_discarded.py new file mode 100644 index 00000000..f273248b --- /dev/null +++ b/pyrogram/raw/types/group_call_discarded.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallDiscarded(TLObject): # type: ignore + """An ended group call + + Constructor of :obj:`~pyrogram.raw.base.GroupCall`. + + Details: + - Layer: ``224`` + - ID: ``7780BCB4`` + + Parameters: + id (``int`` ``64-bit``): + Group call ID + + access_hash (``int`` ``64-bit``): + Group call access hash + + duration (``int`` ``32-bit``): + Group call duration + + """ + + __slots__: List[str] = ["id", "access_hash", "duration"] + + ID = 0x7780bcb4 + QUALNAME = "types.GroupCallDiscarded" + + def __init__(self, *, id: int, access_hash: int, duration: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.duration = duration # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallDiscarded": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + duration = Int.read(b) + + return GroupCallDiscarded(id=id, access_hash=access_hash, duration=duration) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Int(self.duration)) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_donor.py b/pyrogram/raw/types/group_call_donor.py new file mode 100644 index 00000000..33979785 --- /dev/null +++ b/pyrogram/raw/types/group_call_donor.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallDonor(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.GroupCallDonor`. + + Details: + - Layer: ``224`` + - ID: ``EE430C85`` + + Parameters: + stars (``int`` ``64-bit``): + N/A + + top (``bool``, *optional*): + N/A + + my (``bool``, *optional*): + N/A + + anonymous (``bool``, *optional*): + N/A + + peer_id (:obj:`Peer `, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars", "top", "my", "anonymous", "peer_id"] + + ID = 0xee430c85 + QUALNAME = "types.GroupCallDonor" + + def __init__(self, *, stars: int, top: Optional[bool] = None, my: Optional[bool] = None, anonymous: Optional[bool] = None, peer_id: "raw.base.Peer" = None) -> None: + self.stars = stars # long + self.top = top # flags.0?true + self.my = my # flags.1?true + self.anonymous = anonymous # flags.2?true + self.peer_id = peer_id # flags.3?Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallDonor": + + flags = Int.read(b) + + top = True if flags & (1 << 0) else False + my = True if flags & (1 << 1) else False + anonymous = True if flags & (1 << 2) else False + peer_id = TLObject.read(b) if flags & (1 << 3) else None + + stars = Long.read(b) + + return GroupCallDonor(stars=stars, top=top, my=my, anonymous=anonymous, peer_id=peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top else 0 + flags |= (1 << 1) if self.my else 0 + flags |= (1 << 2) if self.anonymous else 0 + flags |= (1 << 3) if self.peer_id is not None else 0 + b.write(Int(flags)) + + if self.peer_id is not None: + b.write(self.peer_id.write()) + + b.write(Long(self.stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_message.py b/pyrogram/raw/types/group_call_message.py new file mode 100644 index 00000000..104a5169 --- /dev/null +++ b/pyrogram/raw/types/group_call_message.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallMessage(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.GroupCallMessage`. + + Details: + - Layer: ``224`` + - ID: ``1A8AFC7E`` + + Parameters: + id (``int`` ``32-bit``): + N/A + + from_id (:obj:`Peer `): + N/A + + date (``int`` ``32-bit``): + N/A + + message (:obj:`TextWithEntities `): + N/A + + from_admin (``bool``, *optional*): + N/A + + paid_message_stars (``int`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "from_id", "date", "message", "from_admin", "paid_message_stars"] + + ID = 0x1a8afc7e + QUALNAME = "types.GroupCallMessage" + + def __init__(self, *, id: int, from_id: "raw.base.Peer", date: int, message: "raw.base.TextWithEntities", from_admin: Optional[bool] = None, paid_message_stars: Optional[int] = None) -> None: + self.id = id # int + self.from_id = from_id # Peer + self.date = date # int + self.message = message # TextWithEntities + self.from_admin = from_admin # flags.1?true + self.paid_message_stars = paid_message_stars # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallMessage": + + flags = Int.read(b) + + from_admin = True if flags & (1 << 1) else False + id = Int.read(b) + + from_id = TLObject.read(b) + + date = Int.read(b) + + message = TLObject.read(b) + + paid_message_stars = Long.read(b) if flags & (1 << 0) else None + return GroupCallMessage(id=id, from_id=from_id, date=date, message=message, from_admin=from_admin, paid_message_stars=paid_message_stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.from_admin else 0 + flags |= (1 << 0) if self.paid_message_stars is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + b.write(self.from_id.write()) + + b.write(Int(self.date)) + + b.write(self.message.write()) + + if self.paid_message_stars is not None: + b.write(Long(self.paid_message_stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_participant.py b/pyrogram/raw/types/group_call_participant.py new file mode 100644 index 00000000..19bfc7f1 --- /dev/null +++ b/pyrogram/raw/types/group_call_participant.py @@ -0,0 +1,197 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallParticipant(TLObject): # type: ignore + """Info about a group call participant + + Constructor of :obj:`~pyrogram.raw.base.GroupCallParticipant`. + + Details: + - Layer: ``224`` + - ID: ``2A3DC7AC`` + + Parameters: + peer (:obj:`Peer `): + Peer information + + date (``int`` ``32-bit``): + When did this participant join the group call + + source (``int`` ``32-bit``): + Source ID + + muted (``bool``, *optional*): + Whether the participant is muted + + left (``bool``, *optional*): + Whether the participant has left + + can_self_unmute (``bool``, *optional*): + Whether the participant can unmute themselves + + just_joined (``bool``, *optional*): + Whether the participant has just joined + + versioned (``bool``, *optional*): + If set, and updateGroupCallParticipants.version < locally stored call.version, info about this participant should be ignored. If (...), and updateGroupCallParticipants.version > call.version+1, the participant list should be refetched using phone.getGroupParticipants. + + min (``bool``, *optional*): + If not set, the volume and muted_by_you fields can be safely used to overwrite locally cached information; otherwise, volume will contain valid information only if volume_by_admin is set both in the cache and in the received constructor. + + muted_by_you (``bool``, *optional*): + Whether this participant was muted by the current user + + volume_by_admin (``bool``, *optional*): + Whether our volume can only changed by an admin + + is_self (``bool``, *optional*): + N/A + + video_joined (``bool``, *optional*): + Whether this participant is currently broadcasting video + + active_date (``int`` ``32-bit``, *optional*): + When was this participant last active in the group call + + volume (``int`` ``32-bit``, *optional*): + Volume, if not set the volume is set to 100%. + + about (``str``, *optional*): + Info about this participant + + raise_hand_rating (``int`` ``64-bit``, *optional*): + Specifies the UI visualization order of peers with raised hands: peers with a higher rating should be showed first in the list. + + video (:obj:`GroupCallParticipantVideo `, *optional*): + Info about the video stream the participant is currently broadcasting + + presentation (:obj:`GroupCallParticipantVideo `, *optional*): + Info about the screen sharing stream the participant is currently broadcasting + + paid_stars_total (``int`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["peer", "date", "source", "muted", "left", "can_self_unmute", "just_joined", "versioned", "min", "muted_by_you", "volume_by_admin", "is_self", "video_joined", "active_date", "volume", "about", "raise_hand_rating", "video", "presentation", "paid_stars_total"] + + ID = 0x2a3dc7ac + QUALNAME = "types.GroupCallParticipant" + + def __init__(self, *, peer: "raw.base.Peer", date: int, source: int, muted: Optional[bool] = None, left: Optional[bool] = None, can_self_unmute: Optional[bool] = None, just_joined: Optional[bool] = None, versioned: Optional[bool] = None, min: Optional[bool] = None, muted_by_you: Optional[bool] = None, volume_by_admin: Optional[bool] = None, is_self: Optional[bool] = None, video_joined: Optional[bool] = None, active_date: Optional[int] = None, volume: Optional[int] = None, about: Optional[str] = None, raise_hand_rating: Optional[int] = None, video: "raw.base.GroupCallParticipantVideo" = None, presentation: "raw.base.GroupCallParticipantVideo" = None, paid_stars_total: Optional[int] = None) -> None: + self.peer = peer # Peer + self.date = date # int + self.source = source # int + self.muted = muted # flags.0?true + self.left = left # flags.1?true + self.can_self_unmute = can_self_unmute # flags.2?true + self.just_joined = just_joined # flags.4?true + self.versioned = versioned # flags.5?true + self.min = min # flags.8?true + self.muted_by_you = muted_by_you # flags.9?true + self.volume_by_admin = volume_by_admin # flags.10?true + self.is_self = is_self # flags.12?true + self.video_joined = video_joined # flags.15?true + self.active_date = active_date # flags.3?int + self.volume = volume # flags.7?int + self.about = about # flags.11?string + self.raise_hand_rating = raise_hand_rating # flags.13?long + self.video = video # flags.6?GroupCallParticipantVideo + self.presentation = presentation # flags.14?GroupCallParticipantVideo + self.paid_stars_total = paid_stars_total # flags.16?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallParticipant": + + flags = Int.read(b) + + muted = True if flags & (1 << 0) else False + left = True if flags & (1 << 1) else False + can_self_unmute = True if flags & (1 << 2) else False + just_joined = True if flags & (1 << 4) else False + versioned = True if flags & (1 << 5) else False + min = True if flags & (1 << 8) else False + muted_by_you = True if flags & (1 << 9) else False + volume_by_admin = True if flags & (1 << 10) else False + is_self = True if flags & (1 << 12) else False + video_joined = True if flags & (1 << 15) else False + peer = TLObject.read(b) + + date = Int.read(b) + + active_date = Int.read(b) if flags & (1 << 3) else None + source = Int.read(b) + + volume = Int.read(b) if flags & (1 << 7) else None + about = String.read(b) if flags & (1 << 11) else None + raise_hand_rating = Long.read(b) if flags & (1 << 13) else None + video = TLObject.read(b) if flags & (1 << 6) else None + + presentation = TLObject.read(b) if flags & (1 << 14) else None + + paid_stars_total = Long.read(b) if flags & (1 << 16) else None + return GroupCallParticipant(peer=peer, date=date, source=source, muted=muted, left=left, can_self_unmute=can_self_unmute, just_joined=just_joined, versioned=versioned, min=min, muted_by_you=muted_by_you, volume_by_admin=volume_by_admin, is_self=is_self, video_joined=video_joined, active_date=active_date, volume=volume, about=about, raise_hand_rating=raise_hand_rating, video=video, presentation=presentation, paid_stars_total=paid_stars_total) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.muted else 0 + flags |= (1 << 1) if self.left else 0 + flags |= (1 << 2) if self.can_self_unmute else 0 + flags |= (1 << 4) if self.just_joined else 0 + flags |= (1 << 5) if self.versioned else 0 + flags |= (1 << 8) if self.min else 0 + flags |= (1 << 9) if self.muted_by_you else 0 + flags |= (1 << 10) if self.volume_by_admin else 0 + flags |= (1 << 12) if self.is_self else 0 + flags |= (1 << 15) if self.video_joined else 0 + flags |= (1 << 3) if self.active_date is not None else 0 + flags |= (1 << 7) if self.volume is not None else 0 + flags |= (1 << 11) if self.about is not None else 0 + flags |= (1 << 13) if self.raise_hand_rating is not None else 0 + flags |= (1 << 6) if self.video is not None else 0 + flags |= (1 << 14) if self.presentation is not None else 0 + flags |= (1 << 16) if self.paid_stars_total is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.date)) + + if self.active_date is not None: + b.write(Int(self.active_date)) + + b.write(Int(self.source)) + + if self.volume is not None: + b.write(Int(self.volume)) + + if self.about is not None: + b.write(String(self.about)) + + if self.raise_hand_rating is not None: + b.write(Long(self.raise_hand_rating)) + + if self.video is not None: + b.write(self.video.write()) + + if self.presentation is not None: + b.write(self.presentation.write()) + + if self.paid_stars_total is not None: + b.write(Long(self.paid_stars_total)) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_participant_video.py b/pyrogram/raw/types/group_call_participant_video.py new file mode 100644 index 00000000..fb2f91d7 --- /dev/null +++ b/pyrogram/raw/types/group_call_participant_video.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallParticipantVideo(TLObject): # type: ignore + """Info about a video stream + + Constructor of :obj:`~pyrogram.raw.base.GroupCallParticipantVideo`. + + Details: + - Layer: ``224`` + - ID: ``67753AC8`` + + Parameters: + endpoint (``str``): + Endpoint + + source_groups (List of :obj:`GroupCallParticipantVideoSourceGroup `): + Source groups + + paused (``bool``, *optional*): + Whether the stream is currently paused + + audio_source (``int`` ``32-bit``, *optional*): + Audio source ID + + """ + + __slots__: List[str] = ["endpoint", "source_groups", "paused", "audio_source"] + + ID = 0x67753ac8 + QUALNAME = "types.GroupCallParticipantVideo" + + def __init__(self, *, endpoint: str, source_groups: List["raw.base.GroupCallParticipantVideoSourceGroup"], paused: Optional[bool] = None, audio_source: Optional[int] = None) -> None: + self.endpoint = endpoint # string + self.source_groups = source_groups # Vector + self.paused = paused # flags.0?true + self.audio_source = audio_source # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallParticipantVideo": + + flags = Int.read(b) + + paused = True if flags & (1 << 0) else False + endpoint = String.read(b) + + source_groups = TLObject.read(b) + + audio_source = Int.read(b) if flags & (1 << 1) else None + return GroupCallParticipantVideo(endpoint=endpoint, source_groups=source_groups, paused=paused, audio_source=audio_source) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.paused else 0 + flags |= (1 << 1) if self.audio_source is not None else 0 + b.write(Int(flags)) + + b.write(String(self.endpoint)) + + b.write(Vector(self.source_groups)) + + if self.audio_source is not None: + b.write(Int(self.audio_source)) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_participant_video_source_group.py b/pyrogram/raw/types/group_call_participant_video_source_group.py new file mode 100644 index 00000000..547f451a --- /dev/null +++ b/pyrogram/raw/types/group_call_participant_video_source_group.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallParticipantVideoSourceGroup(TLObject): # type: ignore + """Describes a group of video synchronization source identifiers + + Constructor of :obj:`~pyrogram.raw.base.GroupCallParticipantVideoSourceGroup`. + + Details: + - Layer: ``224`` + - ID: ``DCB118B7`` + + Parameters: + semantics (``str``): + SDP semantics + + sources (List of ``int`` ``32-bit``): + Source IDs + + """ + + __slots__: List[str] = ["semantics", "sources"] + + ID = 0xdcb118b7 + QUALNAME = "types.GroupCallParticipantVideoSourceGroup" + + def __init__(self, *, semantics: str, sources: List[int]) -> None: + self.semantics = semantics # string + self.sources = sources # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallParticipantVideoSourceGroup": + # No flags + + semantics = String.read(b) + + sources = TLObject.read(b, Int) + + return GroupCallParticipantVideoSourceGroup(semantics=semantics, sources=sources) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.semantics)) + + b.write(Vector(self.sources, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/types/group_call_stream_channel.py b/pyrogram/raw/types/group_call_stream_channel.py new file mode 100644 index 00000000..13170f5d --- /dev/null +++ b/pyrogram/raw/types/group_call_stream_channel.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class GroupCallStreamChannel(TLObject): # type: ignore + """Info about an RTMP stream in a group call or livestream + + Constructor of :obj:`~pyrogram.raw.base.GroupCallStreamChannel`. + + Details: + - Layer: ``224`` + - ID: ``80EB48AF`` + + Parameters: + channel (``int`` ``32-bit``): + Channel ID + + scale (``int`` ``32-bit``): + Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale. + + last_timestamp_ms (``int`` ``64-bit``): + Last seen timestamp to easily start fetching livestream chunks using inputGroupCallStream + + """ + + __slots__: List[str] = ["channel", "scale", "last_timestamp_ms"] + + ID = 0x80eb48af + QUALNAME = "types.GroupCallStreamChannel" + + def __init__(self, *, channel: int, scale: int, last_timestamp_ms: int) -> None: + self.channel = channel # int + self.scale = scale # int + self.last_timestamp_ms = last_timestamp_ms # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "GroupCallStreamChannel": + # No flags + + channel = Int.read(b) + + scale = Int.read(b) + + last_timestamp_ms = Long.read(b) + + return GroupCallStreamChannel(channel=channel, scale=scale, last_timestamp_ms=last_timestamp_ms) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.channel)) + + b.write(Int(self.scale)) + + b.write(Long(self.last_timestamp_ms)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/__init__.py b/pyrogram/raw/types/help/__init__.py new file mode 100644 index 00000000..f26ed4e8 --- /dev/null +++ b/pyrogram/raw/types/help/__init__.py @@ -0,0 +1,95 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .config_simple import ConfigSimple +from .app_update import AppUpdate +from .no_app_update import NoAppUpdate +from .invite_text import InviteText +from .support import Support +from .terms_of_service import TermsOfService +from .recent_me_urls import RecentMeUrls +from .terms_of_service_update_empty import TermsOfServiceUpdateEmpty +from .terms_of_service_update import TermsOfServiceUpdate +from .deep_link_info_empty import DeepLinkInfoEmpty +from .deep_link_info import DeepLinkInfo +from .passport_config_not_modified import PassportConfigNotModified +from .passport_config import PassportConfig +from .support_name import SupportName +from .user_info_empty import UserInfoEmpty +from .user_info import UserInfo +from .promo_data_empty import PromoDataEmpty +from .promo_data import PromoData +from .country_code import CountryCode +from .country import Country +from .countries_list_not_modified import CountriesListNotModified +from .countries_list import CountriesList +from .premium_promo import PremiumPromo +from .app_config_not_modified import AppConfigNotModified +from .app_config import AppConfig +from .peer_color_set import PeerColorSet +from .peer_color_profile_set import PeerColorProfileSet +from .peer_color_option import PeerColorOption +from .peer_colors_not_modified import PeerColorsNotModified +from .peer_colors import PeerColors +from .timezones_list_not_modified import TimezonesListNotModified +from .timezones_list import TimezonesList + + +__all__ = [ + "ConfigSimple", + "AppUpdate", + "NoAppUpdate", + "InviteText", + "Support", + "TermsOfService", + "RecentMeUrls", + "TermsOfServiceUpdateEmpty", + "TermsOfServiceUpdate", + "DeepLinkInfoEmpty", + "DeepLinkInfo", + "PassportConfigNotModified", + "PassportConfig", + "SupportName", + "UserInfoEmpty", + "UserInfo", + "PromoDataEmpty", + "PromoData", + "CountryCode", + "Country", + "CountriesListNotModified", + "CountriesList", + "PremiumPromo", + "AppConfigNotModified", + "AppConfig", + "PeerColorSet", + "PeerColorProfileSet", + "PeerColorOption", + "PeerColorsNotModified", + "PeerColors", + "TimezonesListNotModified", + "TimezonesList", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/help/app_config.py b/pyrogram/raw/types/help/app_config.py new file mode 100644 index 00000000..21d165eb --- /dev/null +++ b/pyrogram/raw/types/help/app_config.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AppConfig(TLObject): # type: ignore + """Contains various client configuration parameters + + Constructor of :obj:`~pyrogram.raw.base.help.AppConfig`. + + Details: + - Layer: ``224`` + - ID: ``DD18782E`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + config (:obj:`JSONValue `): + Client configuration parameters + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetAppConfig + """ + + __slots__: List[str] = ["hash", "config"] + + ID = 0xdd18782e + QUALNAME = "types.help.AppConfig" + + def __init__(self, *, hash: int, config: "raw.base.JSONValue") -> None: + self.hash = hash # int + self.config = config # JSONValue + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AppConfig": + # No flags + + hash = Int.read(b) + + config = TLObject.read(b) + + return AppConfig(hash=hash, config=config) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + b.write(self.config.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/app_config_not_modified.py b/pyrogram/raw/types/help/app_config_not_modified.py new file mode 100644 index 00000000..4059e9dd --- /dev/null +++ b/pyrogram/raw/types/help/app_config_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AppConfigNotModified(TLObject): # type: ignore + """The client configuration parameters haven't changed + + Constructor of :obj:`~pyrogram.raw.base.help.AppConfig`. + + Details: + - Layer: ``224`` + - ID: ``7CDE641D`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetAppConfig + """ + + __slots__: List[str] = [] + + ID = 0x7cde641d + QUALNAME = "types.help.AppConfigNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AppConfigNotModified": + # No flags + + return AppConfigNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/app_update.py b/pyrogram/raw/types/help/app_update.py new file mode 100644 index 00000000..d9d939d7 --- /dev/null +++ b/pyrogram/raw/types/help/app_update.py @@ -0,0 +1,124 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AppUpdate(TLObject): # type: ignore + """An update is available for the application. + + Constructor of :obj:`~pyrogram.raw.base.help.AppUpdate`. + + Details: + - Layer: ``224`` + - ID: ``CCBBCE30`` + + Parameters: + id (``int`` ``32-bit``): + Update ID + + version (``str``): + New version name + + text (``str``): + Text description of the update + + entities (List of :obj:`MessageEntity `): + Message entities for styled text + + can_not_skip (``bool``, *optional*): + Unskippable, the new info must be shown to the user (with a popup or something else) + + document (:obj:`Document `, *optional*): + Application binary + + url (``str``, *optional*): + Application download URL + + sticker (:obj:`Document `, *optional*): + Associated sticker + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetAppUpdate + """ + + __slots__: List[str] = ["id", "version", "text", "entities", "can_not_skip", "document", "url", "sticker"] + + ID = 0xccbbce30 + QUALNAME = "types.help.AppUpdate" + + def __init__(self, *, id: int, version: str, text: str, entities: List["raw.base.MessageEntity"], can_not_skip: Optional[bool] = None, document: "raw.base.Document" = None, url: Optional[str] = None, sticker: "raw.base.Document" = None) -> None: + self.id = id # int + self.version = version # string + self.text = text # string + self.entities = entities # Vector + self.can_not_skip = can_not_skip # flags.0?true + self.document = document # flags.1?Document + self.url = url # flags.2?string + self.sticker = sticker # flags.3?Document + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AppUpdate": + + flags = Int.read(b) + + can_not_skip = True if flags & (1 << 0) else False + id = Int.read(b) + + version = String.read(b) + + text = String.read(b) + + entities = TLObject.read(b) + + document = TLObject.read(b) if flags & (1 << 1) else None + + url = String.read(b) if flags & (1 << 2) else None + sticker = TLObject.read(b) if flags & (1 << 3) else None + + return AppUpdate(id=id, version=version, text=text, entities=entities, can_not_skip=can_not_skip, document=document, url=url, sticker=sticker) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.can_not_skip else 0 + flags |= (1 << 1) if self.document is not None else 0 + flags |= (1 << 2) if self.url is not None else 0 + flags |= (1 << 3) if self.sticker is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + b.write(String(self.version)) + + b.write(String(self.text)) + + b.write(Vector(self.entities)) + + if self.document is not None: + b.write(self.document.write()) + + if self.url is not None: + b.write(String(self.url)) + + if self.sticker is not None: + b.write(self.sticker.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/config_simple.py b/pyrogram/raw/types/help/config_simple.py new file mode 100644 index 00000000..de238664 --- /dev/null +++ b/pyrogram/raw/types/help/config_simple.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ConfigSimple(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.help.ConfigSimple`. + + Details: + - Layer: ``224`` + - ID: ``5A592A6C`` + + Parameters: + date (``int`` ``32-bit``): + N/A + + expires (``int`` ``32-bit``): + N/A + + rules (List of :obj:`AccessPointRule `): + N/A + + """ + + __slots__: List[str] = ["date", "expires", "rules"] + + ID = 0x5a592a6c + QUALNAME = "types.help.ConfigSimple" + + def __init__(self, *, date: int, expires: int, rules: List["raw.base.AccessPointRule"]) -> None: + self.date = date # int + self.expires = expires # int + self.rules = rules # vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ConfigSimple": + # No flags + + date = Int.read(b) + + expires = Int.read(b) + + rules = TLObject.read(b) + + return ConfigSimple(date=date, expires=expires, rules=rules) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.date)) + + b.write(Int(self.expires)) + + b.write(Vector(self.rules)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/countries_list.py b/pyrogram/raw/types/help/countries_list.py new file mode 100644 index 00000000..7d357adc --- /dev/null +++ b/pyrogram/raw/types/help/countries_list.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CountriesList(TLObject): # type: ignore + """Name, ISO code, localized name and phone codes/patterns of all available countries + + Constructor of :obj:`~pyrogram.raw.base.help.CountriesList`. + + Details: + - Layer: ``224`` + - ID: ``87D0759E`` + + Parameters: + countries (List of :obj:`help.Country `): + Name, ISO code, localized name and phone codes/patterns of all available countries + + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetCountriesList + """ + + __slots__: List[str] = ["countries", "hash"] + + ID = 0x87d0759e + QUALNAME = "types.help.CountriesList" + + def __init__(self, *, countries: List["raw.base.help.Country"], hash: int) -> None: + self.countries = countries # Vector + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CountriesList": + # No flags + + countries = TLObject.read(b) + + hash = Int.read(b) + + return CountriesList(countries=countries, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.countries)) + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/countries_list_not_modified.py b/pyrogram/raw/types/help/countries_list_not_modified.py new file mode 100644 index 00000000..5527838e --- /dev/null +++ b/pyrogram/raw/types/help/countries_list_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CountriesListNotModified(TLObject): # type: ignore + """The country list has not changed + + Constructor of :obj:`~pyrogram.raw.base.help.CountriesList`. + + Details: + - Layer: ``224`` + - ID: ``93CC1F32`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetCountriesList + """ + + __slots__: List[str] = [] + + ID = 0x93cc1f32 + QUALNAME = "types.help.CountriesListNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CountriesListNotModified": + # No flags + + return CountriesListNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/country.py b/pyrogram/raw/types/help/country.py new file mode 100644 index 00000000..fd897343 --- /dev/null +++ b/pyrogram/raw/types/help/country.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Country(TLObject): # type: ignore + """Name, ISO code, localized name and phone codes/patterns of a specific country + + Constructor of :obj:`~pyrogram.raw.base.help.Country`. + + Details: + - Layer: ``224`` + - ID: ``C3878E23`` + + Parameters: + iso2 (``str``): + ISO code of country + + default_name (``str``): + Name of the country in the country's language + + country_codes (List of :obj:`help.CountryCode `): + Phone codes/patterns + + hidden (``bool``, *optional*): + Whether this country should not be shown in the list + + name (``str``, *optional*): + Name of the country in the user's language, if different from the original name + + """ + + __slots__: List[str] = ["iso2", "default_name", "country_codes", "hidden", "name"] + + ID = 0xc3878e23 + QUALNAME = "types.help.Country" + + def __init__(self, *, iso2: str, default_name: str, country_codes: List["raw.base.help.CountryCode"], hidden: Optional[bool] = None, name: Optional[str] = None) -> None: + self.iso2 = iso2 # string + self.default_name = default_name # string + self.country_codes = country_codes # Vector + self.hidden = hidden # flags.0?true + self.name = name # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Country": + + flags = Int.read(b) + + hidden = True if flags & (1 << 0) else False + iso2 = String.read(b) + + default_name = String.read(b) + + name = String.read(b) if flags & (1 << 1) else None + country_codes = TLObject.read(b) + + return Country(iso2=iso2, default_name=default_name, country_codes=country_codes, hidden=hidden, name=name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.hidden else 0 + flags |= (1 << 1) if self.name is not None else 0 + b.write(Int(flags)) + + b.write(String(self.iso2)) + + b.write(String(self.default_name)) + + if self.name is not None: + b.write(String(self.name)) + + b.write(Vector(self.country_codes)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/country_code.py b/pyrogram/raw/types/help/country_code.py new file mode 100644 index 00000000..3a474e69 --- /dev/null +++ b/pyrogram/raw/types/help/country_code.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CountryCode(TLObject): # type: ignore + """Country code and phone number pattern of a specific country + + Constructor of :obj:`~pyrogram.raw.base.help.CountryCode`. + + Details: + - Layer: ``224`` + - ID: ``4203C5EF`` + + Parameters: + country_code (``str``): + ISO country code + + prefixes (List of ``str``, *optional*): + Possible phone prefixes + + patterns (List of ``str``, *optional*): + Phone patterns: for example, XXX XXX XXX + + """ + + __slots__: List[str] = ["country_code", "prefixes", "patterns"] + + ID = 0x4203c5ef + QUALNAME = "types.help.CountryCode" + + def __init__(self, *, country_code: str, prefixes: Optional[List[str]] = None, patterns: Optional[List[str]] = None) -> None: + self.country_code = country_code # string + self.prefixes = prefixes # flags.0?Vector + self.patterns = patterns # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CountryCode": + + flags = Int.read(b) + + country_code = String.read(b) + + prefixes = TLObject.read(b, String) if flags & (1 << 0) else [] + + patterns = TLObject.read(b, String) if flags & (1 << 1) else [] + + return CountryCode(country_code=country_code, prefixes=prefixes, patterns=patterns) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.prefixes else 0 + flags |= (1 << 1) if self.patterns else 0 + b.write(Int(flags)) + + b.write(String(self.country_code)) + + if self.prefixes is not None: + b.write(Vector(self.prefixes, String)) + + if self.patterns is not None: + b.write(Vector(self.patterns, String)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/deep_link_info.py b/pyrogram/raw/types/help/deep_link_info.py new file mode 100644 index 00000000..6e6246d8 --- /dev/null +++ b/pyrogram/raw/types/help/deep_link_info.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeepLinkInfo(TLObject): # type: ignore + """Deep link info, see the here for more details + + Constructor of :obj:`~pyrogram.raw.base.help.DeepLinkInfo`. + + Details: + - Layer: ``224`` + - ID: ``6A4EE832`` + + Parameters: + message (``str``): + Message to show to the user + + update_app (``bool``, *optional*): + An update of the app is required to parse this link + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetDeepLinkInfo + """ + + __slots__: List[str] = ["message", "update_app", "entities"] + + ID = 0x6a4ee832 + QUALNAME = "types.help.DeepLinkInfo" + + def __init__(self, *, message: str, update_app: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None) -> None: + self.message = message # string + self.update_app = update_app # flags.0?true + self.entities = entities # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeepLinkInfo": + + flags = Int.read(b) + + update_app = True if flags & (1 << 0) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + return DeepLinkInfo(message=message, update_app=update_app, entities=entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.update_app else 0 + flags |= (1 << 1) if self.entities else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/deep_link_info_empty.py b/pyrogram/raw/types/help/deep_link_info_empty.py new file mode 100644 index 00000000..44b1fcb8 --- /dev/null +++ b/pyrogram/raw/types/help/deep_link_info_empty.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DeepLinkInfoEmpty(TLObject): # type: ignore + """Deep link info empty + + Constructor of :obj:`~pyrogram.raw.base.help.DeepLinkInfo`. + + Details: + - Layer: ``224`` + - ID: ``66AFA166`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetDeepLinkInfo + """ + + __slots__: List[str] = [] + + ID = 0x66afa166 + QUALNAME = "types.help.DeepLinkInfoEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DeepLinkInfoEmpty": + # No flags + + return DeepLinkInfoEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/invite_text.py b/pyrogram/raw/types/help/invite_text.py new file mode 100644 index 00000000..b3a8df64 --- /dev/null +++ b/pyrogram/raw/types/help/invite_text.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InviteText(TLObject): # type: ignore + """Text of a text message with an invitation to install Telegram. + + Constructor of :obj:`~pyrogram.raw.base.help.InviteText`. + + Details: + - Layer: ``224`` + - ID: ``18CB9F78`` + + Parameters: + message (``str``): + Text of the message + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetInviteText + """ + + __slots__: List[str] = ["message"] + + ID = 0x18cb9f78 + QUALNAME = "types.help.InviteText" + + def __init__(self, *, message: str) -> None: + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InviteText": + # No flags + + message = String.read(b) + + return InviteText(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/no_app_update.py b/pyrogram/raw/types/help/no_app_update.py new file mode 100644 index 00000000..992e56fb --- /dev/null +++ b/pyrogram/raw/types/help/no_app_update.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NoAppUpdate(TLObject): # type: ignore + """No updates are available for the application. + + Constructor of :obj:`~pyrogram.raw.base.help.AppUpdate`. + + Details: + - Layer: ``224`` + - ID: ``C45A6536`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetAppUpdate + """ + + __slots__: List[str] = [] + + ID = 0xc45a6536 + QUALNAME = "types.help.NoAppUpdate" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NoAppUpdate": + # No flags + + return NoAppUpdate() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/passport_config.py b/pyrogram/raw/types/help/passport_config.py new file mode 100644 index 00000000..e1e50698 --- /dev/null +++ b/pyrogram/raw/types/help/passport_config.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PassportConfig(TLObject): # type: ignore + """Telegram passport configuration + + Constructor of :obj:`~pyrogram.raw.base.help.PassportConfig`. + + Details: + - Layer: ``224`` + - ID: ``A098D6AF`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + countries_langs (:obj:`DataJSON `): + Localization + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPassportConfig + """ + + __slots__: List[str] = ["hash", "countries_langs"] + + ID = 0xa098d6af + QUALNAME = "types.help.PassportConfig" + + def __init__(self, *, hash: int, countries_langs: "raw.base.DataJSON") -> None: + self.hash = hash # int + self.countries_langs = countries_langs # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PassportConfig": + # No flags + + hash = Int.read(b) + + countries_langs = TLObject.read(b) + + return PassportConfig(hash=hash, countries_langs=countries_langs) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + b.write(self.countries_langs.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/passport_config_not_modified.py b/pyrogram/raw/types/help/passport_config_not_modified.py new file mode 100644 index 00000000..1f225f25 --- /dev/null +++ b/pyrogram/raw/types/help/passport_config_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PassportConfigNotModified(TLObject): # type: ignore + """Password configuration not modified + + Constructor of :obj:`~pyrogram.raw.base.help.PassportConfig`. + + Details: + - Layer: ``224`` + - ID: ``BFB9F457`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPassportConfig + """ + + __slots__: List[str] = [] + + ID = 0xbfb9f457 + QUALNAME = "types.help.PassportConfigNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PassportConfigNotModified": + # No flags + + return PassportConfigNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/peer_color_option.py b/pyrogram/raw/types/help/peer_color_option.py new file mode 100644 index 00000000..93b41c92 --- /dev/null +++ b/pyrogram/raw/types/help/peer_color_option.py @@ -0,0 +1,100 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerColorOption(TLObject): # type: ignore + """Contains info about a color palette ». + + Constructor of :obj:`~pyrogram.raw.base.help.PeerColorOption`. + + Details: + - Layer: ``224`` + - ID: ``ADEC6EBE`` + + Parameters: + color_id (``int`` ``32-bit``): + Palette ID. + + hidden (``bool``, *optional*): + Whether this palette should not be displayed as an option to the user when choosing a palette to apply to profile pages or message accents. + + colors (:obj:`help.PeerColorSet `, *optional*): + Light mode palette. Will be empty for IDs 0 to 6 inclusive, in which case a palette containing a single color from the following colors should be used: red, orange, violet, green, cyan, blue, pink for indexes 0 to 6. + + dark_colors (:obj:`help.PeerColorSet `, *optional*): + Dark mode palette. Optional, defaults to the palette in colors (or the autogenerated palette for IDs 0 to 6) if absent. + + channel_min_level (``int`` ``32-bit``, *optional*): + Channels can use this palette only after reaching at least the boost level specified in this field. + + group_min_level (``int`` ``32-bit``, *optional*): + + + """ + + __slots__: List[str] = ["color_id", "hidden", "colors", "dark_colors", "channel_min_level", "group_min_level"] + + ID = 0xadec6ebe + QUALNAME = "types.help.PeerColorOption" + + def __init__(self, *, color_id: int, hidden: Optional[bool] = None, colors: "raw.base.help.PeerColorSet" = None, dark_colors: "raw.base.help.PeerColorSet" = None, channel_min_level: Optional[int] = None, group_min_level: Optional[int] = None) -> None: + self.color_id = color_id # int + self.hidden = hidden # flags.0?true + self.colors = colors # flags.1?help.PeerColorSet + self.dark_colors = dark_colors # flags.2?help.PeerColorSet + self.channel_min_level = channel_min_level # flags.3?int + self.group_min_level = group_min_level # flags.4?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerColorOption": + + flags = Int.read(b) + + hidden = True if flags & (1 << 0) else False + color_id = Int.read(b) + + colors = TLObject.read(b) if flags & (1 << 1) else None + + dark_colors = TLObject.read(b) if flags & (1 << 2) else None + + channel_min_level = Int.read(b) if flags & (1 << 3) else None + group_min_level = Int.read(b) if flags & (1 << 4) else None + return PeerColorOption(color_id=color_id, hidden=hidden, colors=colors, dark_colors=dark_colors, channel_min_level=channel_min_level, group_min_level=group_min_level) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.hidden else 0 + flags |= (1 << 1) if self.colors is not None else 0 + flags |= (1 << 2) if self.dark_colors is not None else 0 + flags |= (1 << 3) if self.channel_min_level is not None else 0 + flags |= (1 << 4) if self.group_min_level is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.color_id)) + + if self.colors is not None: + b.write(self.colors.write()) + + if self.dark_colors is not None: + b.write(self.dark_colors.write()) + + if self.channel_min_level is not None: + b.write(Int(self.channel_min_level)) + + if self.group_min_level is not None: + b.write(Int(self.group_min_level)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/peer_color_profile_set.py b/pyrogram/raw/types/help/peer_color_profile_set.py new file mode 100644 index 00000000..6da1c713 --- /dev/null +++ b/pyrogram/raw/types/help/peer_color_profile_set.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerColorProfileSet(TLObject): # type: ignore + """Represents a color palette that can be used in profile pages ». + + Constructor of :obj:`~pyrogram.raw.base.help.PeerColorSet`. + + Details: + - Layer: ``224`` + - ID: ``767D61EB`` + + Parameters: + palette_colors (List of ``int`` ``32-bit``): + A list of 1-2 colors in RGB format, shown in the color palette settings to describe the current palette. + + bg_colors (List of ``int`` ``32-bit``): + A list of 1-2 colors in RGB format describing the colors used to generate the actual background used in the profile page. + + story_colors (List of ``int`` ``32-bit``): + A list of 2 colors in RGB format describing the colors of the gradient used for the unread active story indicator around the profile photo. + + """ + + __slots__: List[str] = ["palette_colors", "bg_colors", "story_colors"] + + ID = 0x767d61eb + QUALNAME = "types.help.PeerColorProfileSet" + + def __init__(self, *, palette_colors: List[int], bg_colors: List[int], story_colors: List[int]) -> None: + self.palette_colors = palette_colors # Vector + self.bg_colors = bg_colors # Vector + self.story_colors = story_colors # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerColorProfileSet": + # No flags + + palette_colors = TLObject.read(b, Int) + + bg_colors = TLObject.read(b, Int) + + story_colors = TLObject.read(b, Int) + + return PeerColorProfileSet(palette_colors=palette_colors, bg_colors=bg_colors, story_colors=story_colors) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.palette_colors, Int)) + + b.write(Vector(self.bg_colors, Int)) + + b.write(Vector(self.story_colors, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/peer_color_set.py b/pyrogram/raw/types/help/peer_color_set.py new file mode 100644 index 00000000..6bf195e3 --- /dev/null +++ b/pyrogram/raw/types/help/peer_color_set.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerColorSet(TLObject): # type: ignore + """Represents a color palette that can be used in message accents ». + + Constructor of :obj:`~pyrogram.raw.base.help.PeerColorSet`. + + Details: + - Layer: ``224`` + - ID: ``26219A58`` + + Parameters: + colors (List of ``int`` ``32-bit``): + A list of 1-3 colors in RGB format, describing the accent color. + + """ + + __slots__: List[str] = ["colors"] + + ID = 0x26219a58 + QUALNAME = "types.help.PeerColorSet" + + def __init__(self, *, colors: List[int]) -> None: + self.colors = colors # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerColorSet": + # No flags + + colors = TLObject.read(b, Int) + + return PeerColorSet(colors=colors) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.colors, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/peer_colors.py b/pyrogram/raw/types/help/peer_colors.py new file mode 100644 index 00000000..8e4b4ca6 --- /dev/null +++ b/pyrogram/raw/types/help/peer_colors.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerColors(TLObject): # type: ignore + """Contains info about multiple color palettes ». + + Constructor of :obj:`~pyrogram.raw.base.help.PeerColors`. + + Details: + - Layer: ``224`` + - ID: ``F8ED08`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + colors (List of :obj:`help.PeerColorOption `): + Usable color palettes. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPeerColors + help.GetPeerProfileColors + """ + + __slots__: List[str] = ["hash", "colors"] + + ID = 0xf8ed08 + QUALNAME = "types.help.PeerColors" + + def __init__(self, *, hash: int, colors: List["raw.base.help.PeerColorOption"]) -> None: + self.hash = hash # int + self.colors = colors # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerColors": + # No flags + + hash = Int.read(b) + + colors = TLObject.read(b) + + return PeerColors(hash=hash, colors=colors) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + b.write(Vector(self.colors)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/peer_colors_not_modified.py b/pyrogram/raw/types/help/peer_colors_not_modified.py new file mode 100644 index 00000000..c03c77d9 --- /dev/null +++ b/pyrogram/raw/types/help/peer_colors_not_modified.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerColorsNotModified(TLObject): # type: ignore + """The list of color palettes has not changed. + + Constructor of :obj:`~pyrogram.raw.base.help.PeerColors`. + + Details: + - Layer: ``224`` + - ID: ``2BA1F5CE`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPeerColors + help.GetPeerProfileColors + """ + + __slots__: List[str] = [] + + ID = 0x2ba1f5ce + QUALNAME = "types.help.PeerColorsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerColorsNotModified": + # No flags + + return PeerColorsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/premium_promo.py b/pyrogram/raw/types/help/premium_promo.py new file mode 100644 index 00000000..8ead038f --- /dev/null +++ b/pyrogram/raw/types/help/premium_promo.py @@ -0,0 +1,103 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PremiumPromo(TLObject): # type: ignore + """Telegram Premium promotion information + + Constructor of :obj:`~pyrogram.raw.base.help.PremiumPromo`. + + Details: + - Layer: ``224`` + - ID: ``5334759C`` + + Parameters: + status_text (``str``): + Description of the current state of the user's Telegram Premium subscription + + status_entities (List of :obj:`MessageEntity `): + Message entities for styled text + + video_sections (List of ``str``): + A list of premium feature identifiers », associated to each video + + videos (List of :obj:`Document `): + A list of videos + + period_options (List of :obj:`PremiumSubscriptionOption `): + Telegram Premium subscription options + + users (List of :obj:`User `): + Related user information + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPremiumPromo + """ + + __slots__: List[str] = ["status_text", "status_entities", "video_sections", "videos", "period_options", "users"] + + ID = 0x5334759c + QUALNAME = "types.help.PremiumPromo" + + def __init__(self, *, status_text: str, status_entities: List["raw.base.MessageEntity"], video_sections: List[str], videos: List["raw.base.Document"], period_options: List["raw.base.PremiumSubscriptionOption"], users: List["raw.base.User"]) -> None: + self.status_text = status_text # string + self.status_entities = status_entities # Vector + self.video_sections = video_sections # Vector + self.videos = videos # Vector + self.period_options = period_options # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PremiumPromo": + # No flags + + status_text = String.read(b) + + status_entities = TLObject.read(b) + + video_sections = TLObject.read(b, String) + + videos = TLObject.read(b) + + period_options = TLObject.read(b) + + users = TLObject.read(b) + + return PremiumPromo(status_text=status_text, status_entities=status_entities, video_sections=video_sections, videos=videos, period_options=period_options, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.status_text)) + + b.write(Vector(self.status_entities)) + + b.write(Vector(self.video_sections, String)) + + b.write(Vector(self.videos)) + + b.write(Vector(self.period_options)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/promo_data.py b/pyrogram/raw/types/help/promo_data.py new file mode 100644 index 00000000..0afd92c6 --- /dev/null +++ b/pyrogram/raw/types/help/promo_data.py @@ -0,0 +1,141 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PromoData(TLObject): # type: ignore + """MTProxy/Public Service Announcement information + + Constructor of :obj:`~pyrogram.raw.base.help.PromoData`. + + Details: + - Layer: ``224`` + - ID: ``8A4D87A`` + + Parameters: + expires (``int`` ``32-bit``): + Expiry of PSA/MTProxy info + + pending_suggestions (List of ``str``): + N/A + + dismissed_suggestions (List of ``str``): + N/A + + chats (List of :obj:`Chat `): + Chat info + + users (List of :obj:`User `): + User info + + proxy (``bool``, *optional*): + MTProxy-related channel + + peer (:obj:`Peer `, *optional*): + MTProxy/PSA peer + + psa_type (``str``, *optional*): + PSA type + + psa_message (``str``, *optional*): + PSA message + + custom_pending_suggestion (:obj:`PendingSuggestion `, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPromoData + """ + + __slots__: List[str] = ["expires", "pending_suggestions", "dismissed_suggestions", "chats", "users", "proxy", "peer", "psa_type", "psa_message", "custom_pending_suggestion"] + + ID = 0x8a4d87a + QUALNAME = "types.help.PromoData" + + def __init__(self, *, expires: int, pending_suggestions: List[str], dismissed_suggestions: List[str], chats: List["raw.base.Chat"], users: List["raw.base.User"], proxy: Optional[bool] = None, peer: "raw.base.Peer" = None, psa_type: Optional[str] = None, psa_message: Optional[str] = None, custom_pending_suggestion: "raw.base.PendingSuggestion" = None) -> None: + self.expires = expires # int + self.pending_suggestions = pending_suggestions # Vector + self.dismissed_suggestions = dismissed_suggestions # Vector + self.chats = chats # Vector + self.users = users # Vector + self.proxy = proxy # flags.0?true + self.peer = peer # flags.3?Peer + self.psa_type = psa_type # flags.1?string + self.psa_message = psa_message # flags.2?string + self.custom_pending_suggestion = custom_pending_suggestion # flags.4?PendingSuggestion + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PromoData": + + flags = Int.read(b) + + proxy = True if flags & (1 << 0) else False + expires = Int.read(b) + + peer = TLObject.read(b) if flags & (1 << 3) else None + + psa_type = String.read(b) if flags & (1 << 1) else None + psa_message = String.read(b) if flags & (1 << 2) else None + pending_suggestions = TLObject.read(b, String) + + dismissed_suggestions = TLObject.read(b, String) + + custom_pending_suggestion = TLObject.read(b) if flags & (1 << 4) else None + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return PromoData(expires=expires, pending_suggestions=pending_suggestions, dismissed_suggestions=dismissed_suggestions, chats=chats, users=users, proxy=proxy, peer=peer, psa_type=psa_type, psa_message=psa_message, custom_pending_suggestion=custom_pending_suggestion) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.proxy else 0 + flags |= (1 << 3) if self.peer is not None else 0 + flags |= (1 << 1) if self.psa_type is not None else 0 + flags |= (1 << 2) if self.psa_message is not None else 0 + flags |= (1 << 4) if self.custom_pending_suggestion is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.expires)) + + if self.peer is not None: + b.write(self.peer.write()) + + if self.psa_type is not None: + b.write(String(self.psa_type)) + + if self.psa_message is not None: + b.write(String(self.psa_message)) + + b.write(Vector(self.pending_suggestions, String)) + + b.write(Vector(self.dismissed_suggestions, String)) + + if self.custom_pending_suggestion is not None: + b.write(self.custom_pending_suggestion.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/promo_data_empty.py b/pyrogram/raw/types/help/promo_data_empty.py new file mode 100644 index 00000000..a551d0e5 --- /dev/null +++ b/pyrogram/raw/types/help/promo_data_empty.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PromoDataEmpty(TLObject): # type: ignore + """No PSA/MTProxy info is available + + Constructor of :obj:`~pyrogram.raw.base.help.PromoData`. + + Details: + - Layer: ``224`` + - ID: ``98F6AC75`` + + Parameters: + expires (``int`` ``32-bit``): + Re-fetch PSA/MTProxy info after the specified number of seconds + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetPromoData + """ + + __slots__: List[str] = ["expires"] + + ID = 0x98f6ac75 + QUALNAME = "types.help.PromoDataEmpty" + + def __init__(self, *, expires: int) -> None: + self.expires = expires # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PromoDataEmpty": + # No flags + + expires = Int.read(b) + + return PromoDataEmpty(expires=expires) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.expires)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/recent_me_urls.py b/pyrogram/raw/types/help/recent_me_urls.py new file mode 100644 index 00000000..4b9fca57 --- /dev/null +++ b/pyrogram/raw/types/help/recent_me_urls.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RecentMeUrls(TLObject): # type: ignore + """Recent t.me URLs + + Constructor of :obj:`~pyrogram.raw.base.help.RecentMeUrls`. + + Details: + - Layer: ``224`` + - ID: ``E0310D7`` + + Parameters: + urls (List of :obj:`RecentMeUrl `): + URLs + + chats (List of :obj:`Chat `): + Chats + + users (List of :obj:`User `): + Users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetRecentMeUrls + """ + + __slots__: List[str] = ["urls", "chats", "users"] + + ID = 0xe0310d7 + QUALNAME = "types.help.RecentMeUrls" + + def __init__(self, *, urls: List["raw.base.RecentMeUrl"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.urls = urls # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RecentMeUrls": + # No flags + + urls = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return RecentMeUrls(urls=urls, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.urls)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/support.py b/pyrogram/raw/types/help/support.py new file mode 100644 index 00000000..aaa558f0 --- /dev/null +++ b/pyrogram/raw/types/help/support.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Support(TLObject): # type: ignore + """Info on support user. + + Constructor of :obj:`~pyrogram.raw.base.help.Support`. + + Details: + - Layer: ``224`` + - ID: ``17C6B5F6`` + + Parameters: + phone_number (``str``): + Phone number + + user (:obj:`User `): + User + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetSupport + """ + + __slots__: List[str] = ["phone_number", "user"] + + ID = 0x17c6b5f6 + QUALNAME = "types.help.Support" + + def __init__(self, *, phone_number: str, user: "raw.base.User") -> None: + self.phone_number = phone_number # string + self.user = user # User + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Support": + # No flags + + phone_number = String.read(b) + + user = TLObject.read(b) + + return Support(phone_number=phone_number, user=user) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(self.user.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/support_name.py b/pyrogram/raw/types/help/support_name.py new file mode 100644 index 00000000..4d1fc651 --- /dev/null +++ b/pyrogram/raw/types/help/support_name.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SupportName(TLObject): # type: ignore + """Localized name for telegram support + + Constructor of :obj:`~pyrogram.raw.base.help.SupportName`. + + Details: + - Layer: ``224`` + - ID: ``8C05F1C9`` + + Parameters: + name (``str``): + Localized name + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetSupportName + """ + + __slots__: List[str] = ["name"] + + ID = 0x8c05f1c9 + QUALNAME = "types.help.SupportName" + + def __init__(self, *, name: str) -> None: + self.name = name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SupportName": + # No flags + + name = String.read(b) + + return SupportName(name=name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/terms_of_service.py b/pyrogram/raw/types/help/terms_of_service.py new file mode 100644 index 00000000..ff903c5d --- /dev/null +++ b/pyrogram/raw/types/help/terms_of_service.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TermsOfService(TLObject): # type: ignore + """Info about the latest telegram Terms Of Service + + Constructor of :obj:`~pyrogram.raw.base.help.TermsOfService`. + + Details: + - Layer: ``224`` + - ID: ``780A0310`` + + Parameters: + id (:obj:`DataJSON `): + ID of the new terms + + text (``str``): + Text of the new terms + + entities (List of :obj:`MessageEntity `): + Message entities for styled text + + popup (``bool``, *optional*): + Whether a prompt must be showed to the user, in order to accept the new terms. + + min_age_confirm (``int`` ``32-bit``, *optional*): + Minimum age required to sign up to telegram, the user must confirm that they is older than the minimum age. + + """ + + __slots__: List[str] = ["id", "text", "entities", "popup", "min_age_confirm"] + + ID = 0x780a0310 + QUALNAME = "types.help.TermsOfService" + + def __init__(self, *, id: "raw.base.DataJSON", text: str, entities: List["raw.base.MessageEntity"], popup: Optional[bool] = None, min_age_confirm: Optional[int] = None) -> None: + self.id = id # DataJSON + self.text = text # string + self.entities = entities # Vector + self.popup = popup # flags.0?true + self.min_age_confirm = min_age_confirm # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TermsOfService": + + flags = Int.read(b) + + popup = True if flags & (1 << 0) else False + id = TLObject.read(b) + + text = String.read(b) + + entities = TLObject.read(b) + + min_age_confirm = Int.read(b) if flags & (1 << 1) else None + return TermsOfService(id=id, text=text, entities=entities, popup=popup, min_age_confirm=min_age_confirm) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.popup else 0 + flags |= (1 << 1) if self.min_age_confirm is not None else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + b.write(String(self.text)) + + b.write(Vector(self.entities)) + + if self.min_age_confirm is not None: + b.write(Int(self.min_age_confirm)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/terms_of_service_update.py b/pyrogram/raw/types/help/terms_of_service_update.py new file mode 100644 index 00000000..94ab44d2 --- /dev/null +++ b/pyrogram/raw/types/help/terms_of_service_update.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TermsOfServiceUpdate(TLObject): # type: ignore + """Info about an update of telegram's terms of service. If the terms of service are declined, then the account.deleteAccount method should be called with the reason "Decline ToS update" + + Constructor of :obj:`~pyrogram.raw.base.help.TermsOfServiceUpdate`. + + Details: + - Layer: ``224`` + - ID: ``28ECF961`` + + Parameters: + expires (``int`` ``32-bit``): + New TOS updates will have to be queried using help.getTermsOfServiceUpdate in expires seconds + + terms_of_service (:obj:`help.TermsOfService `): + New terms of service + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetTermsOfServiceUpdate + """ + + __slots__: List[str] = ["expires", "terms_of_service"] + + ID = 0x28ecf961 + QUALNAME = "types.help.TermsOfServiceUpdate" + + def __init__(self, *, expires: int, terms_of_service: "raw.base.help.TermsOfService") -> None: + self.expires = expires # int + self.terms_of_service = terms_of_service # help.TermsOfService + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TermsOfServiceUpdate": + # No flags + + expires = Int.read(b) + + terms_of_service = TLObject.read(b) + + return TermsOfServiceUpdate(expires=expires, terms_of_service=terms_of_service) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.expires)) + + b.write(self.terms_of_service.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/terms_of_service_update_empty.py b/pyrogram/raw/types/help/terms_of_service_update_empty.py new file mode 100644 index 00000000..9225464d --- /dev/null +++ b/pyrogram/raw/types/help/terms_of_service_update_empty.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TermsOfServiceUpdateEmpty(TLObject): # type: ignore + """No changes were made to telegram's terms of service + + Constructor of :obj:`~pyrogram.raw.base.help.TermsOfServiceUpdate`. + + Details: + - Layer: ``224`` + - ID: ``E3309F7F`` + + Parameters: + expires (``int`` ``32-bit``): + New TOS updates will have to be queried using help.getTermsOfServiceUpdate in expires seconds + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetTermsOfServiceUpdate + """ + + __slots__: List[str] = ["expires"] + + ID = 0xe3309f7f + QUALNAME = "types.help.TermsOfServiceUpdateEmpty" + + def __init__(self, *, expires: int) -> None: + self.expires = expires # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TermsOfServiceUpdateEmpty": + # No flags + + expires = Int.read(b) + + return TermsOfServiceUpdateEmpty(expires=expires) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.expires)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/timezones_list.py b/pyrogram/raw/types/help/timezones_list.py new file mode 100644 index 00000000..eba99f59 --- /dev/null +++ b/pyrogram/raw/types/help/timezones_list.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TimezonesList(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.help.TimezonesList`. + + Details: + - Layer: ``224`` + - ID: ``7B74ED71`` + + Parameters: + timezones (List of :obj:`Timezone `): + + + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetTimezonesList + """ + + __slots__: List[str] = ["timezones", "hash"] + + ID = 0x7b74ed71 + QUALNAME = "types.help.TimezonesList" + + def __init__(self, *, timezones: List["raw.base.Timezone"], hash: int) -> None: + self.timezones = timezones # Vector + self.hash = hash # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TimezonesList": + # No flags + + timezones = TLObject.read(b) + + hash = Int.read(b) + + return TimezonesList(timezones=timezones, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.timezones)) + + b.write(Int(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/timezones_list_not_modified.py b/pyrogram/raw/types/help/timezones_list_not_modified.py new file mode 100644 index 00000000..b021b071 --- /dev/null +++ b/pyrogram/raw/types/help/timezones_list_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TimezonesListNotModified(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.help.TimezonesList`. + + Details: + - Layer: ``224`` + - ID: ``970708CC`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetTimezonesList + """ + + __slots__: List[str] = [] + + ID = 0x970708cc + QUALNAME = "types.help.TimezonesListNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TimezonesListNotModified": + # No flags + + return TimezonesListNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/help/user_info.py b/pyrogram/raw/types/help/user_info.py new file mode 100644 index 00000000..b6c1ccf1 --- /dev/null +++ b/pyrogram/raw/types/help/user_info.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UserInfo(TLObject): # type: ignore + """Internal use + + Constructor of :obj:`~pyrogram.raw.base.help.UserInfo`. + + Details: + - Layer: ``224`` + - ID: ``1EB3758`` + + Parameters: + message (``str``): + Info + + entities (List of :obj:`MessageEntity `): + Message entities for styled text + + author (``str``): + Author + + date (``int`` ``32-bit``): + Date + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetUserInfo + help.EditUserInfo + """ + + __slots__: List[str] = ["message", "entities", "author", "date"] + + ID = 0x1eb3758 + QUALNAME = "types.help.UserInfo" + + def __init__(self, *, message: str, entities: List["raw.base.MessageEntity"], author: str, date: int) -> None: + self.message = message # string + self.entities = entities # Vector + self.author = author # string + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UserInfo": + # No flags + + message = String.read(b) + + entities = TLObject.read(b) + + author = String.read(b) + + date = Int.read(b) + + return UserInfo(message=message, entities=entities, author=author, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.message)) + + b.write(Vector(self.entities)) + + b.write(String(self.author)) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/help/user_info_empty.py b/pyrogram/raw/types/help/user_info_empty.py new file mode 100644 index 00000000..e3359452 --- /dev/null +++ b/pyrogram/raw/types/help/user_info_empty.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class UserInfoEmpty(TLObject): # type: ignore + """Internal use + + Constructor of :obj:`~pyrogram.raw.base.help.UserInfo`. + + Details: + - Layer: ``224`` + - ID: ``F3AE2EED`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetUserInfo + help.EditUserInfo + """ + + __slots__: List[str] = [] + + ID = 0xf3ae2eed + QUALNAME = "types.help.UserInfoEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "UserInfoEmpty": + # No flags + + return UserInfoEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/high_score.py b/pyrogram/raw/types/high_score.py new file mode 100644 index 00000000..5f491c7c --- /dev/null +++ b/pyrogram/raw/types/high_score.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HighScore(TLObject): # type: ignore + """Game highscore + + Constructor of :obj:`~pyrogram.raw.base.HighScore`. + + Details: + - Layer: ``224`` + - ID: ``73A379EB`` + + Parameters: + pos (``int`` ``32-bit``): + Position in highscore list + + user_id (``int`` ``64-bit``): + User ID + + score (``int`` ``32-bit``): + Score + + """ + + __slots__: List[str] = ["pos", "user_id", "score"] + + ID = 0x73a379eb + QUALNAME = "types.HighScore" + + def __init__(self, *, pos: int, user_id: int, score: int) -> None: + self.pos = pos # int + self.user_id = user_id # long + self.score = score # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HighScore": + # No flags + + pos = Int.read(b) + + user_id = Long.read(b) + + score = Int.read(b) + + return HighScore(pos=pos, user_id=user_id, score=score) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.pos)) + + b.write(Long(self.user_id)) + + b.write(Int(self.score)) + + return b.getvalue() diff --git a/pyrogram/raw/types/http_wait.py b/pyrogram/raw/types/http_wait.py new file mode 100644 index 00000000..4f8f5207 --- /dev/null +++ b/pyrogram/raw/types/http_wait.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HttpWait(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.HttpWait`. + + Details: + - Layer: ``224`` + - ID: ``9299359F`` + + Parameters: + max_delay (``int`` ``32-bit``): + N/A + + wait_after (``int`` ``32-bit``): + N/A + + max_wait (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["max_delay", "wait_after", "max_wait"] + + ID = 0x9299359f + QUALNAME = "types.HttpWait" + + def __init__(self, *, max_delay: int, wait_after: int, max_wait: int) -> None: + self.max_delay = max_delay # int + self.wait_after = wait_after # int + self.max_wait = max_wait # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HttpWait": + # No flags + + max_delay = Int.read(b) + + wait_after = Int.read(b) + + max_wait = Int.read(b) + + return HttpWait(max_delay=max_delay, wait_after=wait_after, max_wait=max_wait) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.max_delay)) + + b.write(Int(self.wait_after)) + + b.write(Int(self.max_wait)) + + return b.getvalue() diff --git a/pyrogram/raw/types/imported_contact.py b/pyrogram/raw/types/imported_contact.py new file mode 100644 index 00000000..241f1a0b --- /dev/null +++ b/pyrogram/raw/types/imported_contact.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ImportedContact(TLObject): # type: ignore + """Successfully imported contact. + + Constructor of :obj:`~pyrogram.raw.base.ImportedContact`. + + Details: + - Layer: ``224`` + - ID: ``C13E3C50`` + + Parameters: + user_id (``int`` ``64-bit``): + User identifier + + client_id (``int`` ``64-bit``): + The contact's client identifier (passed to one of the InputContact constructors) + + """ + + __slots__: List[str] = ["user_id", "client_id"] + + ID = 0xc13e3c50 + QUALNAME = "types.ImportedContact" + + def __init__(self, *, user_id: int, client_id: int) -> None: + self.user_id = user_id # long + self.client_id = client_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ImportedContact": + # No flags + + user_id = Long.read(b) + + client_id = Long.read(b) + + return ImportedContact(user_id=user_id, client_id=client_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(Long(self.client_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_bot_switch_pm.py b/pyrogram/raw/types/inline_bot_switch_pm.py new file mode 100644 index 00000000..72283b3a --- /dev/null +++ b/pyrogram/raw/types/inline_bot_switch_pm.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineBotSwitchPM(TLObject): # type: ignore + """The bot requested the user to message them in private + + Constructor of :obj:`~pyrogram.raw.base.InlineBotSwitchPM`. + + Details: + - Layer: ``224`` + - ID: ``3C20629F`` + + Parameters: + text (``str``): + Text for the button that switches the user to a private chat with the bot and sends the bot a start message with the parameter start_parameter (can be empty) + + start_param (``str``): + The parameter for the /start parameter + + """ + + __slots__: List[str] = ["text", "start_param"] + + ID = 0x3c20629f + QUALNAME = "types.InlineBotSwitchPM" + + def __init__(self, *, text: str, start_param: str) -> None: + self.text = text # string + self.start_param = start_param # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineBotSwitchPM": + # No flags + + text = String.read(b) + + start_param = String.read(b) + + return InlineBotSwitchPM(text=text, start_param=start_param) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.text)) + + b.write(String(self.start_param)) + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_bot_web_view.py b/pyrogram/raw/types/inline_bot_web_view.py new file mode 100644 index 00000000..e3028f90 --- /dev/null +++ b/pyrogram/raw/types/inline_bot_web_view.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineBotWebView(TLObject): # type: ignore + """Specifies an inline mode mini app button, shown on top of the inline query results list. + + Constructor of :obj:`~pyrogram.raw.base.InlineBotWebView`. + + Details: + - Layer: ``224`` + - ID: ``B57295D5`` + + Parameters: + text (``str``): + Text of the button + + url (``str``): + Webapp URL + + """ + + __slots__: List[str] = ["text", "url"] + + ID = 0xb57295d5 + QUALNAME = "types.InlineBotWebView" + + def __init__(self, *, text: str, url: str) -> None: + self.text = text # string + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineBotWebView": + # No flags + + text = String.read(b) + + url = String.read(b) + + return InlineBotWebView(text=text, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.text)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_query_peer_type_bot_pm.py b/pyrogram/raw/types/inline_query_peer_type_bot_pm.py new file mode 100644 index 00000000..93fe097c --- /dev/null +++ b/pyrogram/raw/types/inline_query_peer_type_bot_pm.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineQueryPeerTypeBotPM(TLObject): # type: ignore + """Peer type: private chat with a bot. + + Constructor of :obj:`~pyrogram.raw.base.InlineQueryPeerType`. + + Details: + - Layer: ``224`` + - ID: ``E3B2D0C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xe3b2d0c + QUALNAME = "types.InlineQueryPeerTypeBotPM" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineQueryPeerTypeBotPM": + # No flags + + return InlineQueryPeerTypeBotPM() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_query_peer_type_broadcast.py b/pyrogram/raw/types/inline_query_peer_type_broadcast.py new file mode 100644 index 00000000..7b9d7d17 --- /dev/null +++ b/pyrogram/raw/types/inline_query_peer_type_broadcast.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineQueryPeerTypeBroadcast(TLObject): # type: ignore + """Peer type: channel + + Constructor of :obj:`~pyrogram.raw.base.InlineQueryPeerType`. + + Details: + - Layer: ``224`` + - ID: ``6334EE9A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x6334ee9a + QUALNAME = "types.InlineQueryPeerTypeBroadcast" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineQueryPeerTypeBroadcast": + # No flags + + return InlineQueryPeerTypeBroadcast() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_query_peer_type_chat.py b/pyrogram/raw/types/inline_query_peer_type_chat.py new file mode 100644 index 00000000..8ebd06fd --- /dev/null +++ b/pyrogram/raw/types/inline_query_peer_type_chat.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineQueryPeerTypeChat(TLObject): # type: ignore + """Peer type: chat + + Constructor of :obj:`~pyrogram.raw.base.InlineQueryPeerType`. + + Details: + - Layer: ``224`` + - ID: ``D766C50A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd766c50a + QUALNAME = "types.InlineQueryPeerTypeChat" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineQueryPeerTypeChat": + # No flags + + return InlineQueryPeerTypeChat() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_query_peer_type_megagroup.py b/pyrogram/raw/types/inline_query_peer_type_megagroup.py new file mode 100644 index 00000000..7b72dfec --- /dev/null +++ b/pyrogram/raw/types/inline_query_peer_type_megagroup.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineQueryPeerTypeMegagroup(TLObject): # type: ignore + """Peer type: supergroup + + Constructor of :obj:`~pyrogram.raw.base.InlineQueryPeerType`. + + Details: + - Layer: ``224`` + - ID: ``5EC4BE43`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x5ec4be43 + QUALNAME = "types.InlineQueryPeerTypeMegagroup" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineQueryPeerTypeMegagroup": + # No flags + + return InlineQueryPeerTypeMegagroup() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_query_peer_type_pm.py b/pyrogram/raw/types/inline_query_peer_type_pm.py new file mode 100644 index 00000000..9f84c40e --- /dev/null +++ b/pyrogram/raw/types/inline_query_peer_type_pm.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineQueryPeerTypePM(TLObject): # type: ignore + """Peer type: private chat + + Constructor of :obj:`~pyrogram.raw.base.InlineQueryPeerType`. + + Details: + - Layer: ``224`` + - ID: ``833C0FAC`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x833c0fac + QUALNAME = "types.InlineQueryPeerTypePM" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineQueryPeerTypePM": + # No flags + + return InlineQueryPeerTypePM() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/inline_query_peer_type_same_bot_pm.py b/pyrogram/raw/types/inline_query_peer_type_same_bot_pm.py new file mode 100644 index 00000000..673d2e14 --- /dev/null +++ b/pyrogram/raw/types/inline_query_peer_type_same_bot_pm.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InlineQueryPeerTypeSameBotPM(TLObject): # type: ignore + """Peer type: private chat with the bot itself + + Constructor of :obj:`~pyrogram.raw.base.InlineQueryPeerType`. + + Details: + - Layer: ``224`` + - ID: ``3081ED9D`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3081ed9d + QUALNAME = "types.InlineQueryPeerTypeSameBotPM" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InlineQueryPeerTypeSameBotPM": + # No flags + + return InlineQueryPeerTypeSameBotPM() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_app_event.py b/pyrogram/raw/types/input_app_event.py new file mode 100644 index 00000000..9c1787b2 --- /dev/null +++ b/pyrogram/raw/types/input_app_event.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputAppEvent(TLObject): # type: ignore + """Event that occurred in the application. + + Constructor of :obj:`~pyrogram.raw.base.InputAppEvent`. + + Details: + - Layer: ``224`` + - ID: ``1D1B1245`` + + Parameters: + time (``float`` ``64-bit``): + Client's exact timestamp for the event + + type (``str``): + Type of event + + peer (``int`` ``64-bit``): + Arbitrary numeric value for more convenient selection of certain event types, or events referring to a certain object + + data (:obj:`JSONValue `): + Details of the event + + """ + + __slots__: List[str] = ["time", "type", "peer", "data"] + + ID = 0x1d1b1245 + QUALNAME = "types.InputAppEvent" + + def __init__(self, *, time: float, type: str, peer: int, data: "raw.base.JSONValue") -> None: + self.time = time # double + self.type = type # string + self.peer = peer # long + self.data = data # JSONValue + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputAppEvent": + # No flags + + time = Double.read(b) + + type = String.read(b) + + peer = Long.read(b) + + data = TLObject.read(b) + + return InputAppEvent(time=time, type=type, peer=peer, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Double(self.time)) + + b.write(String(self.type)) + + b.write(Long(self.peer)) + + b.write(self.data.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_app_id.py b/pyrogram/raw/types/input_bot_app_id.py new file mode 100644 index 00000000..93ca001e --- /dev/null +++ b/pyrogram/raw/types/input_bot_app_id.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotAppID(TLObject): # type: ignore + """Used to fetch information about a direct link Mini App by its ID + + Constructor of :obj:`~pyrogram.raw.base.InputBotApp`. + + Details: + - Layer: ``224`` + - ID: ``A920BD7A`` + + Parameters: + id (``int`` ``64-bit``): + direct link Mini App ID. + + access_hash (``int`` ``64-bit``): + Access hash, obtained from the botApp constructor. + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0xa920bd7a + QUALNAME = "types.InputBotAppID" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotAppID": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputBotAppID(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_app_short_name.py b/pyrogram/raw/types/input_bot_app_short_name.py new file mode 100644 index 00000000..1387826a --- /dev/null +++ b/pyrogram/raw/types/input_bot_app_short_name.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotAppShortName(TLObject): # type: ignore + """Used to fetch information about a direct link Mini App by its short name + + Constructor of :obj:`~pyrogram.raw.base.InputBotApp`. + + Details: + - Layer: ``224`` + - ID: ``908C0407`` + + Parameters: + bot_id (:obj:`InputUser `): + ID of the bot that owns the bot mini app + + short_name (``str``): + Short name, obtained from a Direct Mini App deep link + + """ + + __slots__: List[str] = ["bot_id", "short_name"] + + ID = 0x908c0407 + QUALNAME = "types.InputBotAppShortName" + + def __init__(self, *, bot_id: "raw.base.InputUser", short_name: str) -> None: + self.bot_id = bot_id # InputUser + self.short_name = short_name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotAppShortName": + # No flags + + bot_id = TLObject.read(b) + + short_name = String.read(b) + + return InputBotAppShortName(bot_id=bot_id, short_name=short_name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot_id.write()) + + b.write(String(self.short_name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_game.py b/pyrogram/raw/types/input_bot_inline_message_game.py new file mode 100644 index 00000000..ea099722 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_game.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageGame(TLObject): # type: ignore + """A game + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``4B425864`` + + Parameters: + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["reply_markup"] + + ID = 0x4b425864 + QUALNAME = "types.InputBotInlineMessageGame" + + def __init__(self, *, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageGame": + + flags = Int.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageGame(reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_id.py b/pyrogram/raw/types/input_bot_inline_message_id.py new file mode 100644 index 00000000..f612174e --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_id.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageID(TLObject): # type: ignore + """Represents a sent inline message from the perspective of a bot (legacy constructor) + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessageID`. + + Details: + - Layer: ``224`` + - ID: ``890C3D89`` + + Parameters: + dc_id (``int`` ``32-bit``): + DC ID to use when working with this inline message + + id (``int`` ``64-bit``): + ID of message, contains both the (32-bit, legacy) owner ID and the message ID, used only for Bot API backwards compatibility with 32-bit user ID. + + access_hash (``int`` ``64-bit``): + Access hash of message + + """ + + __slots__: List[str] = ["dc_id", "id", "access_hash"] + + ID = 0x890c3d89 + QUALNAME = "types.InputBotInlineMessageID" + + def __init__(self, *, dc_id: int, id: int, access_hash: int) -> None: + self.dc_id = dc_id # int + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageID": + # No flags + + dc_id = Int.read(b) + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputBotInlineMessageID(dc_id=dc_id, id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.dc_id)) + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_id64.py b/pyrogram/raw/types/input_bot_inline_message_id64.py new file mode 100644 index 00000000..9106ae98 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_id64.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageID64(TLObject): # type: ignore + """Represents a sent inline message from the perspective of a bot + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessageID`. + + Details: + - Layer: ``224`` + - ID: ``B6D915D7`` + + Parameters: + dc_id (``int`` ``32-bit``): + DC ID to use when working with this inline message + + owner_id (``int`` ``64-bit``): + ID of the owner of this message + + id (``int`` ``32-bit``): + ID of message + + access_hash (``int`` ``64-bit``): + Access hash of message + + """ + + __slots__: List[str] = ["dc_id", "owner_id", "id", "access_hash"] + + ID = 0xb6d915d7 + QUALNAME = "types.InputBotInlineMessageID64" + + def __init__(self, *, dc_id: int, owner_id: int, id: int, access_hash: int) -> None: + self.dc_id = dc_id # int + self.owner_id = owner_id # long + self.id = id # int + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageID64": + # No flags + + dc_id = Int.read(b) + + owner_id = Long.read(b) + + id = Int.read(b) + + access_hash = Long.read(b) + + return InputBotInlineMessageID64(dc_id=dc_id, owner_id=owner_id, id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.dc_id)) + + b.write(Long(self.owner_id)) + + b.write(Int(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_media_auto.py b/pyrogram/raw/types/input_bot_inline_message_media_auto.py new file mode 100644 index 00000000..bfe04371 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_media_auto.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageMediaAuto(TLObject): # type: ignore + """A media + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``3380C786`` + + Parameters: + message (``str``): + Caption + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["message", "invert_media", "entities", "reply_markup"] + + ID = 0x3380c786 + QUALNAME = "types.InputBotInlineMessageMediaAuto" + + def __init__(self, *, message: str, invert_media: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.message = message # string + self.invert_media = invert_media # flags.3?true + self.entities = entities # flags.1?Vector + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageMediaAuto": + + flags = Int.read(b) + + invert_media = True if flags & (1 << 3) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageMediaAuto(message=message, invert_media=invert_media, entities=entities, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.invert_media else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_media_contact.py b/pyrogram/raw/types/input_bot_inline_message_media_contact.py new file mode 100644 index 00000000..920f6d36 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_media_contact.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageMediaContact(TLObject): # type: ignore + """A contact + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``A6EDBFFD`` + + Parameters: + phone_number (``str``): + Phone number + + first_name (``str``): + First name + + last_name (``str``): + Last name + + vcard (``str``): + VCard info + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["phone_number", "first_name", "last_name", "vcard", "reply_markup"] + + ID = 0xa6edbffd + QUALNAME = "types.InputBotInlineMessageMediaContact" + + def __init__(self, *, phone_number: str, first_name: str, last_name: str, vcard: str, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.phone_number = phone_number # string + self.first_name = first_name # string + self.last_name = last_name # string + self.vcard = vcard # string + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageMediaContact": + + flags = Int.read(b) + + phone_number = String.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + vcard = String.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageMediaContact(phone_number=phone_number, first_name=first_name, last_name=last_name, vcard=vcard, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + b.write(String(self.vcard)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_media_geo.py b/pyrogram/raw/types/input_bot_inline_message_media_geo.py new file mode 100644 index 00000000..b9d478d1 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_media_geo.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageMediaGeo(TLObject): # type: ignore + """Geolocation + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``96929A85`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + Geolocation + + heading (``int`` ``32-bit``, *optional*): + For live locations, a direction in which the location moves, in degrees; 1-360 + + period (``int`` ``32-bit``, *optional*): + Validity period + + proximity_notification_radius (``int`` ``32-bit``, *optional*): + For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000) + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup for bot/inline keyboards + + """ + + __slots__: List[str] = ["geo_point", "heading", "period", "proximity_notification_radius", "reply_markup"] + + ID = 0x96929a85 + QUALNAME = "types.InputBotInlineMessageMediaGeo" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint", heading: Optional[int] = None, period: Optional[int] = None, proximity_notification_radius: Optional[int] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.geo_point = geo_point # InputGeoPoint + self.heading = heading # flags.0?int + self.period = period # flags.1?int + self.proximity_notification_radius = proximity_notification_radius # flags.3?int + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageMediaGeo": + + flags = Int.read(b) + + geo_point = TLObject.read(b) + + heading = Int.read(b) if flags & (1 << 0) else None + period = Int.read(b) if flags & (1 << 1) else None + proximity_notification_radius = Int.read(b) if flags & (1 << 3) else None + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageMediaGeo(geo_point=geo_point, heading=heading, period=period, proximity_notification_radius=proximity_notification_radius, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.heading is not None else 0 + flags |= (1 << 1) if self.period is not None else 0 + flags |= (1 << 3) if self.proximity_notification_radius is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(self.geo_point.write()) + + if self.heading is not None: + b.write(Int(self.heading)) + + if self.period is not None: + b.write(Int(self.period)) + + if self.proximity_notification_radius is not None: + b.write(Int(self.proximity_notification_radius)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_media_invoice.py b/pyrogram/raw/types/input_bot_inline_message_media_invoice.py new file mode 100644 index 00000000..c4fc6822 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_media_invoice.py @@ -0,0 +1,116 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageMediaInvoice(TLObject): # type: ignore + """An invoice + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``D7E78225`` + + Parameters: + title (``str``): + Product name, 1-32 characters + + description (``str``): + Product description, 1-255 characters + + invoice (:obj:`Invoice `): + The invoice + + payload (``bytes``): + Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + + provider (``str``): + Payments provider token, obtained via Botfather + + provider_data (:obj:`DataJSON `): + A JSON-serialized object for data about the invoice, which will be shared with the payment provider. A detailed description of the required fields should be provided by the payment provider. + + photo (:obj:`InputWebDocument `, *optional*): + Invoice photo + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["title", "description", "invoice", "payload", "provider", "provider_data", "photo", "reply_markup"] + + ID = 0xd7e78225 + QUALNAME = "types.InputBotInlineMessageMediaInvoice" + + def __init__(self, *, title: str, description: str, invoice: "raw.base.Invoice", payload: bytes, provider: str, provider_data: "raw.base.DataJSON", photo: "raw.base.InputWebDocument" = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.title = title # string + self.description = description # string + self.invoice = invoice # Invoice + self.payload = payload # bytes + self.provider = provider # string + self.provider_data = provider_data # DataJSON + self.photo = photo # flags.0?InputWebDocument + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageMediaInvoice": + + flags = Int.read(b) + + title = String.read(b) + + description = String.read(b) + + photo = TLObject.read(b) if flags & (1 << 0) else None + + invoice = TLObject.read(b) + + payload = Bytes.read(b) + + provider = String.read(b) + + provider_data = TLObject.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageMediaInvoice(title=title, description=description, invoice=invoice, payload=payload, provider=provider, provider_data=provider_data, photo=photo, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.photo is not None else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + if self.photo is not None: + b.write(self.photo.write()) + + b.write(self.invoice.write()) + + b.write(Bytes(self.payload)) + + b.write(String(self.provider)) + + b.write(self.provider_data.write()) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_media_venue.py b/pyrogram/raw/types/input_bot_inline_message_media_venue.py new file mode 100644 index 00000000..45c0ff39 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_media_venue.py @@ -0,0 +1,106 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageMediaVenue(TLObject): # type: ignore + """Venue + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``417BBF11`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + Geolocation + + title (``str``): + Venue name + + address (``str``): + Address + + provider (``str``): + Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported + + venue_id (``str``): + Venue ID in the provider's database + + venue_type (``str``): + Venue type in the provider's database + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["geo_point", "title", "address", "provider", "venue_id", "venue_type", "reply_markup"] + + ID = 0x417bbf11 + QUALNAME = "types.InputBotInlineMessageMediaVenue" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint", title: str, address: str, provider: str, venue_id: str, venue_type: str, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.geo_point = geo_point # InputGeoPoint + self.title = title # string + self.address = address # string + self.provider = provider # string + self.venue_id = venue_id # string + self.venue_type = venue_type # string + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageMediaVenue": + + flags = Int.read(b) + + geo_point = TLObject.read(b) + + title = String.read(b) + + address = String.read(b) + + provider = String.read(b) + + venue_id = String.read(b) + + venue_type = String.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageMediaVenue(geo_point=geo_point, title=title, address=address, provider=provider, venue_id=venue_id, venue_type=venue_type, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(self.geo_point.write()) + + b.write(String(self.title)) + + b.write(String(self.address)) + + b.write(String(self.provider)) + + b.write(String(self.venue_id)) + + b.write(String(self.venue_type)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_media_web_page.py b/pyrogram/raw/types/input_bot_inline_message_media_web_page.py new file mode 100644 index 00000000..f975d534 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_media_web_page.py @@ -0,0 +1,108 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageMediaWebPage(TLObject): # type: ignore + """Specifies options that will be used to generate the link preview for the message, or even a standalone link preview without an attached message. + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``BDDCC510`` + + Parameters: + message (``str``): + The message, can be empty. + + url (``str``): + The URL to use for the link preview. + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + force_large_media (``bool``, *optional*): + If set, specifies that a large media preview should be used. + + force_small_media (``bool``, *optional*): + If set, specifies that a small media preview should be used. + + optional (``bool``, *optional*): + If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead). + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["message", "url", "invert_media", "force_large_media", "force_small_media", "optional", "entities", "reply_markup"] + + ID = 0xbddcc510 + QUALNAME = "types.InputBotInlineMessageMediaWebPage" + + def __init__(self, *, message: str, url: str, invert_media: Optional[bool] = None, force_large_media: Optional[bool] = None, force_small_media: Optional[bool] = None, optional: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.message = message # string + self.url = url # string + self.invert_media = invert_media # flags.3?true + self.force_large_media = force_large_media # flags.4?true + self.force_small_media = force_small_media # flags.5?true + self.optional = optional # flags.6?true + self.entities = entities # flags.1?Vector + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageMediaWebPage": + + flags = Int.read(b) + + invert_media = True if flags & (1 << 3) else False + force_large_media = True if flags & (1 << 4) else False + force_small_media = True if flags & (1 << 5) else False + optional = True if flags & (1 << 6) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + url = String.read(b) + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageMediaWebPage(message=message, url=url, invert_media=invert_media, force_large_media=force_large_media, force_small_media=force_small_media, optional=optional, entities=entities, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.invert_media else 0 + flags |= (1 << 4) if self.force_large_media else 0 + flags |= (1 << 5) if self.force_small_media else 0 + flags |= (1 << 6) if self.optional else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + b.write(String(self.url)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_message_text.py b/pyrogram/raw/types/input_bot_inline_message_text.py new file mode 100644 index 00000000..d1b46965 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_message_text.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineMessageText(TLObject): # type: ignore + """Simple text message + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``3DCD7A87`` + + Parameters: + message (``str``): + Message + + no_webpage (``bool``, *optional*): + Disable webpage preview + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Inline keyboard + + """ + + __slots__: List[str] = ["message", "no_webpage", "invert_media", "entities", "reply_markup"] + + ID = 0x3dcd7a87 + QUALNAME = "types.InputBotInlineMessageText" + + def __init__(self, *, message: str, no_webpage: Optional[bool] = None, invert_media: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, reply_markup: "raw.base.ReplyMarkup" = None) -> None: + self.message = message # string + self.no_webpage = no_webpage # flags.0?true + self.invert_media = invert_media # flags.3?true + self.entities = entities # flags.1?Vector + self.reply_markup = reply_markup # flags.2?ReplyMarkup + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineMessageText": + + flags = Int.read(b) + + no_webpage = True if flags & (1 << 0) else False + invert_media = True if flags & (1 << 3) else False + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 1) else [] + + reply_markup = TLObject.read(b) if flags & (1 << 2) else None + + return InputBotInlineMessageText(message=message, no_webpage=no_webpage, invert_media=invert_media, entities=entities, reply_markup=reply_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.no_webpage else 0 + flags |= (1 << 3) if self.invert_media else 0 + flags |= (1 << 1) if self.entities else 0 + flags |= (1 << 2) if self.reply_markup is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_result.py b/pyrogram/raw/types/input_bot_inline_result.py new file mode 100644 index 00000000..7d80d917 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_result.py @@ -0,0 +1,119 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineResult(TLObject): # type: ignore + """An inline bot result + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineResult`. + + Details: + - Layer: ``224`` + - ID: ``88BF9319`` + + Parameters: + id (``str``): + ID of result + + type (``str``): + Result type (see bot API docs) + + send_message (:obj:`InputBotInlineMessage `): + Message to send when the result is selected + + title (``str``, *optional*): + Result title + + description (``str``, *optional*): + Result description + + url (``str``, *optional*): + URL of result + + thumb (:obj:`InputWebDocument `, *optional*): + Thumbnail for result + + content (:obj:`InputWebDocument `, *optional*): + Result contents + + """ + + __slots__: List[str] = ["id", "type", "send_message", "title", "description", "url", "thumb", "content"] + + ID = 0x88bf9319 + QUALNAME = "types.InputBotInlineResult" + + def __init__(self, *, id: str, type: str, send_message: "raw.base.InputBotInlineMessage", title: Optional[str] = None, description: Optional[str] = None, url: Optional[str] = None, thumb: "raw.base.InputWebDocument" = None, content: "raw.base.InputWebDocument" = None) -> None: + self.id = id # string + self.type = type # string + self.send_message = send_message # InputBotInlineMessage + self.title = title # flags.1?string + self.description = description # flags.2?string + self.url = url # flags.3?string + self.thumb = thumb # flags.4?InputWebDocument + self.content = content # flags.5?InputWebDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineResult": + + flags = Int.read(b) + + id = String.read(b) + + type = String.read(b) + + title = String.read(b) if flags & (1 << 1) else None + description = String.read(b) if flags & (1 << 2) else None + url = String.read(b) if flags & (1 << 3) else None + thumb = TLObject.read(b) if flags & (1 << 4) else None + + content = TLObject.read(b) if flags & (1 << 5) else None + + send_message = TLObject.read(b) + + return InputBotInlineResult(id=id, type=type, send_message=send_message, title=title, description=description, url=url, thumb=thumb, content=content) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 2) if self.description is not None else 0 + flags |= (1 << 3) if self.url is not None else 0 + flags |= (1 << 4) if self.thumb is not None else 0 + flags |= (1 << 5) if self.content is not None else 0 + b.write(Int(flags)) + + b.write(String(self.id)) + + b.write(String(self.type)) + + if self.title is not None: + b.write(String(self.title)) + + if self.description is not None: + b.write(String(self.description)) + + if self.url is not None: + b.write(String(self.url)) + + if self.thumb is not None: + b.write(self.thumb.write()) + + if self.content is not None: + b.write(self.content.write()) + + b.write(self.send_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_result_document.py b/pyrogram/raw/types/input_bot_inline_result_document.py new file mode 100644 index 00000000..84e90839 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_result_document.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineResultDocument(TLObject): # type: ignore + """Document (media of any type except for photos) + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineResult`. + + Details: + - Layer: ``224`` + - ID: ``FFF8FDC4`` + + Parameters: + id (``str``): + Result ID + + type (``str``): + Result type (see bot API docs) + + document (:obj:`InputDocument `): + Document to send + + send_message (:obj:`InputBotInlineMessage `): + Message to send when the result is selected + + title (``str``, *optional*): + Result title + + description (``str``, *optional*): + Result description + + """ + + __slots__: List[str] = ["id", "type", "document", "send_message", "title", "description"] + + ID = 0xfff8fdc4 + QUALNAME = "types.InputBotInlineResultDocument" + + def __init__(self, *, id: str, type: str, document: "raw.base.InputDocument", send_message: "raw.base.InputBotInlineMessage", title: Optional[str] = None, description: Optional[str] = None) -> None: + self.id = id # string + self.type = type # string + self.document = document # InputDocument + self.send_message = send_message # InputBotInlineMessage + self.title = title # flags.1?string + self.description = description # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineResultDocument": + + flags = Int.read(b) + + id = String.read(b) + + type = String.read(b) + + title = String.read(b) if flags & (1 << 1) else None + description = String.read(b) if flags & (1 << 2) else None + document = TLObject.read(b) + + send_message = TLObject.read(b) + + return InputBotInlineResultDocument(id=id, type=type, document=document, send_message=send_message, title=title, description=description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 2) if self.description is not None else 0 + b.write(Int(flags)) + + b.write(String(self.id)) + + b.write(String(self.type)) + + if self.title is not None: + b.write(String(self.title)) + + if self.description is not None: + b.write(String(self.description)) + + b.write(self.document.write()) + + b.write(self.send_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_result_game.py b/pyrogram/raw/types/input_bot_inline_result_game.py new file mode 100644 index 00000000..70c9fe38 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_result_game.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineResultGame(TLObject): # type: ignore + """Game + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineResult`. + + Details: + - Layer: ``224`` + - ID: ``4FA417F2`` + + Parameters: + id (``str``): + Result ID + + short_name (``str``): + Game short name + + send_message (:obj:`InputBotInlineMessage `): + Message to send when the result is selected + + """ + + __slots__: List[str] = ["id", "short_name", "send_message"] + + ID = 0x4fa417f2 + QUALNAME = "types.InputBotInlineResultGame" + + def __init__(self, *, id: str, short_name: str, send_message: "raw.base.InputBotInlineMessage") -> None: + self.id = id # string + self.short_name = short_name # string + self.send_message = send_message # InputBotInlineMessage + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineResultGame": + # No flags + + id = String.read(b) + + short_name = String.read(b) + + send_message = TLObject.read(b) + + return InputBotInlineResultGame(id=id, short_name=short_name, send_message=send_message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.id)) + + b.write(String(self.short_name)) + + b.write(self.send_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_bot_inline_result_photo.py b/pyrogram/raw/types/input_bot_inline_result_photo.py new file mode 100644 index 00000000..828038a3 --- /dev/null +++ b/pyrogram/raw/types/input_bot_inline_result_photo.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBotInlineResultPhoto(TLObject): # type: ignore + """Photo + + Constructor of :obj:`~pyrogram.raw.base.InputBotInlineResult`. + + Details: + - Layer: ``224`` + - ID: ``A8D864A7`` + + Parameters: + id (``str``): + Result ID + + type (``str``): + Result type (see bot API docs) + + photo (:obj:`InputPhoto `): + Photo to send + + send_message (:obj:`InputBotInlineMessage `): + Message to send when the result is selected + + """ + + __slots__: List[str] = ["id", "type", "photo", "send_message"] + + ID = 0xa8d864a7 + QUALNAME = "types.InputBotInlineResultPhoto" + + def __init__(self, *, id: str, type: str, photo: "raw.base.InputPhoto", send_message: "raw.base.InputBotInlineMessage") -> None: + self.id = id # string + self.type = type # string + self.photo = photo # InputPhoto + self.send_message = send_message # InputBotInlineMessage + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBotInlineResultPhoto": + # No flags + + id = String.read(b) + + type = String.read(b) + + photo = TLObject.read(b) + + send_message = TLObject.read(b) + + return InputBotInlineResultPhoto(id=id, type=type, photo=photo, send_message=send_message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.id)) + + b.write(String(self.type)) + + b.write(self.photo.write()) + + b.write(self.send_message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_business_away_message.py b/pyrogram/raw/types/input_business_away_message.py new file mode 100644 index 00000000..1dd053fa --- /dev/null +++ b/pyrogram/raw/types/input_business_away_message.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBusinessAwayMessage(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputBusinessAwayMessage`. + + Details: + - Layer: ``224`` + - ID: ``832175E0`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + schedule (:obj:`BusinessAwayMessageSchedule `): + + + recipients (:obj:`InputBusinessRecipients `): + + + offline_only (``bool``, *optional*): + + + """ + + __slots__: List[str] = ["shortcut_id", "schedule", "recipients", "offline_only"] + + ID = 0x832175e0 + QUALNAME = "types.InputBusinessAwayMessage" + + def __init__(self, *, shortcut_id: int, schedule: "raw.base.BusinessAwayMessageSchedule", recipients: "raw.base.InputBusinessRecipients", offline_only: Optional[bool] = None) -> None: + self.shortcut_id = shortcut_id # int + self.schedule = schedule # BusinessAwayMessageSchedule + self.recipients = recipients # InputBusinessRecipients + self.offline_only = offline_only # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBusinessAwayMessage": + + flags = Int.read(b) + + offline_only = True if flags & (1 << 0) else False + shortcut_id = Int.read(b) + + schedule = TLObject.read(b) + + recipients = TLObject.read(b) + + return InputBusinessAwayMessage(shortcut_id=shortcut_id, schedule=schedule, recipients=recipients, offline_only=offline_only) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.offline_only else 0 + b.write(Int(flags)) + + b.write(Int(self.shortcut_id)) + + b.write(self.schedule.write()) + + b.write(self.recipients.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_business_bot_recipients.py b/pyrogram/raw/types/input_business_bot_recipients.py new file mode 100644 index 00000000..b768de3a --- /dev/null +++ b/pyrogram/raw/types/input_business_bot_recipients.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBusinessBotRecipients(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputBusinessBotRecipients`. + + Details: + - Layer: ``224`` + - ID: ``C4E5921E`` + + Parameters: + existing_chats (``bool``, *optional*): + + + new_chats (``bool``, *optional*): + + + contacts (``bool``, *optional*): + + + non_contacts (``bool``, *optional*): + + + exclude_selected (``bool``, *optional*): + + + users (List of :obj:`InputUser `, *optional*): + + + exclude_users (List of :obj:`InputUser `, *optional*): + + + """ + + __slots__: List[str] = ["existing_chats", "new_chats", "contacts", "non_contacts", "exclude_selected", "users", "exclude_users"] + + ID = 0xc4e5921e + QUALNAME = "types.InputBusinessBotRecipients" + + def __init__(self, *, existing_chats: Optional[bool] = None, new_chats: Optional[bool] = None, contacts: Optional[bool] = None, non_contacts: Optional[bool] = None, exclude_selected: Optional[bool] = None, users: Optional[List["raw.base.InputUser"]] = None, exclude_users: Optional[List["raw.base.InputUser"]] = None) -> None: + self.existing_chats = existing_chats # flags.0?true + self.new_chats = new_chats # flags.1?true + self.contacts = contacts # flags.2?true + self.non_contacts = non_contacts # flags.3?true + self.exclude_selected = exclude_selected # flags.5?true + self.users = users # flags.4?Vector + self.exclude_users = exclude_users # flags.6?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBusinessBotRecipients": + + flags = Int.read(b) + + existing_chats = True if flags & (1 << 0) else False + new_chats = True if flags & (1 << 1) else False + contacts = True if flags & (1 << 2) else False + non_contacts = True if flags & (1 << 3) else False + exclude_selected = True if flags & (1 << 5) else False + users = TLObject.read(b) if flags & (1 << 4) else [] + + exclude_users = TLObject.read(b) if flags & (1 << 6) else [] + + return InputBusinessBotRecipients(existing_chats=existing_chats, new_chats=new_chats, contacts=contacts, non_contacts=non_contacts, exclude_selected=exclude_selected, users=users, exclude_users=exclude_users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.existing_chats else 0 + flags |= (1 << 1) if self.new_chats else 0 + flags |= (1 << 2) if self.contacts else 0 + flags |= (1 << 3) if self.non_contacts else 0 + flags |= (1 << 5) if self.exclude_selected else 0 + flags |= (1 << 4) if self.users else 0 + flags |= (1 << 6) if self.exclude_users else 0 + b.write(Int(flags)) + + if self.users is not None: + b.write(Vector(self.users)) + + if self.exclude_users is not None: + b.write(Vector(self.exclude_users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_business_chat_link.py b/pyrogram/raw/types/input_business_chat_link.py new file mode 100644 index 00000000..772d7f59 --- /dev/null +++ b/pyrogram/raw/types/input_business_chat_link.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBusinessChatLink(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputBusinessChatLink`. + + Details: + - Layer: ``224`` + - ID: ``11679FA7`` + + Parameters: + message (``str``): + + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + title (``str``, *optional*): + + + """ + + __slots__: List[str] = ["message", "entities", "title"] + + ID = 0x11679fa7 + QUALNAME = "types.InputBusinessChatLink" + + def __init__(self, *, message: str, entities: Optional[List["raw.base.MessageEntity"]] = None, title: Optional[str] = None) -> None: + self.message = message # string + self.entities = entities # flags.0?Vector + self.title = title # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBusinessChatLink": + + flags = Int.read(b) + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 0) else [] + + title = String.read(b) if flags & (1 << 1) else None + return InputBusinessChatLink(message=message, entities=entities, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.entities else 0 + flags |= (1 << 1) if self.title is not None else 0 + b.write(Int(flags)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.title is not None: + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_business_greeting_message.py b/pyrogram/raw/types/input_business_greeting_message.py new file mode 100644 index 00000000..9cefc929 --- /dev/null +++ b/pyrogram/raw/types/input_business_greeting_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBusinessGreetingMessage(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputBusinessGreetingMessage`. + + Details: + - Layer: ``224`` + - ID: ``194CB3B`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + recipients (:obj:`InputBusinessRecipients `): + + + no_activity_days (``int`` ``32-bit``): + + + """ + + __slots__: List[str] = ["shortcut_id", "recipients", "no_activity_days"] + + ID = 0x194cb3b + QUALNAME = "types.InputBusinessGreetingMessage" + + def __init__(self, *, shortcut_id: int, recipients: "raw.base.InputBusinessRecipients", no_activity_days: int) -> None: + self.shortcut_id = shortcut_id # int + self.recipients = recipients # InputBusinessRecipients + self.no_activity_days = no_activity_days # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBusinessGreetingMessage": + # No flags + + shortcut_id = Int.read(b) + + recipients = TLObject.read(b) + + no_activity_days = Int.read(b) + + return InputBusinessGreetingMessage(shortcut_id=shortcut_id, recipients=recipients, no_activity_days=no_activity_days) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.shortcut_id)) + + b.write(self.recipients.write()) + + b.write(Int(self.no_activity_days)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_business_intro.py b/pyrogram/raw/types/input_business_intro.py new file mode 100644 index 00000000..9514980b --- /dev/null +++ b/pyrogram/raw/types/input_business_intro.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBusinessIntro(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputBusinessIntro`. + + Details: + - Layer: ``224`` + - ID: ``9C469CD`` + + Parameters: + title (``str``): + + + description (``str``): + + + sticker (:obj:`InputDocument `, *optional*): + + + """ + + __slots__: List[str] = ["title", "description", "sticker"] + + ID = 0x9c469cd + QUALNAME = "types.InputBusinessIntro" + + def __init__(self, *, title: str, description: str, sticker: "raw.base.InputDocument" = None) -> None: + self.title = title # string + self.description = description # string + self.sticker = sticker # flags.0?InputDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBusinessIntro": + + flags = Int.read(b) + + title = String.read(b) + + description = String.read(b) + + sticker = TLObject.read(b) if flags & (1 << 0) else None + + return InputBusinessIntro(title=title, description=description, sticker=sticker) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.sticker is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + if self.sticker is not None: + b.write(self.sticker.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_business_recipients.py b/pyrogram/raw/types/input_business_recipients.py new file mode 100644 index 00000000..626b54b3 --- /dev/null +++ b/pyrogram/raw/types/input_business_recipients.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputBusinessRecipients(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputBusinessRecipients`. + + Details: + - Layer: ``224`` + - ID: ``6F8B32AA`` + + Parameters: + existing_chats (``bool``, *optional*): + + + new_chats (``bool``, *optional*): + + + contacts (``bool``, *optional*): + + + non_contacts (``bool``, *optional*): + + + exclude_selected (``bool``, *optional*): + + + users (List of :obj:`InputUser `, *optional*): + + + """ + + __slots__: List[str] = ["existing_chats", "new_chats", "contacts", "non_contacts", "exclude_selected", "users"] + + ID = 0x6f8b32aa + QUALNAME = "types.InputBusinessRecipients" + + def __init__(self, *, existing_chats: Optional[bool] = None, new_chats: Optional[bool] = None, contacts: Optional[bool] = None, non_contacts: Optional[bool] = None, exclude_selected: Optional[bool] = None, users: Optional[List["raw.base.InputUser"]] = None) -> None: + self.existing_chats = existing_chats # flags.0?true + self.new_chats = new_chats # flags.1?true + self.contacts = contacts # flags.2?true + self.non_contacts = non_contacts # flags.3?true + self.exclude_selected = exclude_selected # flags.5?true + self.users = users # flags.4?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputBusinessRecipients": + + flags = Int.read(b) + + existing_chats = True if flags & (1 << 0) else False + new_chats = True if flags & (1 << 1) else False + contacts = True if flags & (1 << 2) else False + non_contacts = True if flags & (1 << 3) else False + exclude_selected = True if flags & (1 << 5) else False + users = TLObject.read(b) if flags & (1 << 4) else [] + + return InputBusinessRecipients(existing_chats=existing_chats, new_chats=new_chats, contacts=contacts, non_contacts=non_contacts, exclude_selected=exclude_selected, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.existing_chats else 0 + flags |= (1 << 1) if self.new_chats else 0 + flags |= (1 << 2) if self.contacts else 0 + flags |= (1 << 3) if self.non_contacts else 0 + flags |= (1 << 5) if self.exclude_selected else 0 + flags |= (1 << 4) if self.users else 0 + b.write(Int(flags)) + + if self.users is not None: + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_channel.py b/pyrogram/raw/types/input_channel.py new file mode 100644 index 00000000..befb2499 --- /dev/null +++ b/pyrogram/raw/types/input_channel.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChannel(TLObject): # type: ignore + """Represents a channel + + Constructor of :obj:`~pyrogram.raw.base.InputChannel`. + + Details: + - Layer: ``224`` + - ID: ``F35AEC28`` + + Parameters: + channel_id (``int`` ``64-bit``): + Channel ID + + access_hash (``int`` ``64-bit``): + Access hash taken from the channel constructor + + """ + + __slots__: List[str] = ["channel_id", "access_hash"] + + ID = 0xf35aec28 + QUALNAME = "types.InputChannel" + + def __init__(self, *, channel_id: int, access_hash: int) -> None: + self.channel_id = channel_id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChannel": + # No flags + + channel_id = Long.read(b) + + access_hash = Long.read(b) + + return InputChannel(channel_id=channel_id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.channel_id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_channel_empty.py b/pyrogram/raw/types/input_channel_empty.py new file mode 100644 index 00000000..e36af432 --- /dev/null +++ b/pyrogram/raw/types/input_channel_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChannelEmpty(TLObject): # type: ignore + """Represents the absence of a channel + + Constructor of :obj:`~pyrogram.raw.base.InputChannel`. + + Details: + - Layer: ``224`` + - ID: ``EE8C1E86`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xee8c1e86 + QUALNAME = "types.InputChannelEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChannelEmpty": + # No flags + + return InputChannelEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_channel_from_message.py b/pyrogram/raw/types/input_channel_from_message.py new file mode 100644 index 00000000..ab585533 --- /dev/null +++ b/pyrogram/raw/types/input_channel_from_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChannelFromMessage(TLObject): # type: ignore + """Defines a min channel that was seen in a certain message of a certain chat. + + Constructor of :obj:`~pyrogram.raw.base.InputChannel`. + + Details: + - Layer: ``224`` + - ID: ``5B934F9D`` + + Parameters: + peer (:obj:`InputPeer `): + The chat where the channel was seen + + msg_id (``int`` ``32-bit``): + The message ID in the chat where the channel was seen + + channel_id (``int`` ``64-bit``): + The channel ID + + """ + + __slots__: List[str] = ["peer", "msg_id", "channel_id"] + + ID = 0x5b934f9d + QUALNAME = "types.InputChannelFromMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, channel_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.channel_id = channel_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChannelFromMessage": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + channel_id = Long.read(b) + + return InputChannelFromMessage(peer=peer, msg_id=msg_id, channel_id=channel_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Long(self.channel_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chat_photo.py b/pyrogram/raw/types/input_chat_photo.py new file mode 100644 index 00000000..83e567cb --- /dev/null +++ b/pyrogram/raw/types/input_chat_photo.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatPhoto(TLObject): # type: ignore + """Existing photo to be set as a chat profile photo. + + Constructor of :obj:`~pyrogram.raw.base.InputChatPhoto`. + + Details: + - Layer: ``224`` + - ID: ``8953AD37`` + + Parameters: + id (:obj:`InputPhoto `): + Existing photo + + """ + + __slots__: List[str] = ["id"] + + ID = 0x8953ad37 + QUALNAME = "types.InputChatPhoto" + + def __init__(self, *, id: "raw.base.InputPhoto") -> None: + self.id = id # InputPhoto + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatPhoto": + # No flags + + id = TLObject.read(b) + + return InputChatPhoto(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chat_photo_empty.py b/pyrogram/raw/types/input_chat_photo_empty.py new file mode 100644 index 00000000..b13b304a --- /dev/null +++ b/pyrogram/raw/types/input_chat_photo_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatPhotoEmpty(TLObject): # type: ignore + """Empty constructor, remove group photo. + + Constructor of :obj:`~pyrogram.raw.base.InputChatPhoto`. + + Details: + - Layer: ``224`` + - ID: ``1CA48F57`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1ca48f57 + QUALNAME = "types.InputChatPhotoEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatPhotoEmpty": + # No flags + + return InputChatPhotoEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chat_theme.py b/pyrogram/raw/types/input_chat_theme.py new file mode 100644 index 00000000..fd9bfa3d --- /dev/null +++ b/pyrogram/raw/types/input_chat_theme.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatTheme(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputChatTheme`. + + Details: + - Layer: ``224`` + - ID: ``C93DE95C`` + + Parameters: + emoticon (``str``): + N/A + + """ + + __slots__: List[str] = ["emoticon"] + + ID = 0xc93de95c + QUALNAME = "types.InputChatTheme" + + def __init__(self, *, emoticon: str) -> None: + self.emoticon = emoticon # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatTheme": + # No flags + + emoticon = String.read(b) + + return InputChatTheme(emoticon=emoticon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.emoticon)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chat_theme_empty.py b/pyrogram/raw/types/input_chat_theme_empty.py new file mode 100644 index 00000000..1da5d061 --- /dev/null +++ b/pyrogram/raw/types/input_chat_theme_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatThemeEmpty(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputChatTheme`. + + Details: + - Layer: ``224`` + - ID: ``83268483`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x83268483 + QUALNAME = "types.InputChatThemeEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatThemeEmpty": + # No flags + + return InputChatThemeEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chat_theme_unique_gift.py b/pyrogram/raw/types/input_chat_theme_unique_gift.py new file mode 100644 index 00000000..e7ac9018 --- /dev/null +++ b/pyrogram/raw/types/input_chat_theme_unique_gift.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatThemeUniqueGift(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputChatTheme`. + + Details: + - Layer: ``224`` + - ID: ``87E5DFE4`` + + Parameters: + slug (``str``): + N/A + + """ + + __slots__: List[str] = ["slug"] + + ID = 0x87e5dfe4 + QUALNAME = "types.InputChatThemeUniqueGift" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatThemeUniqueGift": + # No flags + + slug = String.read(b) + + return InputChatThemeUniqueGift(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chat_uploaded_photo.py b/pyrogram/raw/types/input_chat_uploaded_photo.py new file mode 100644 index 00000000..d8f122dc --- /dev/null +++ b/pyrogram/raw/types/input_chat_uploaded_photo.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatUploadedPhoto(TLObject): # type: ignore + """New photo to be set as group profile photo. + + Constructor of :obj:`~pyrogram.raw.base.InputChatPhoto`. + + Details: + - Layer: ``224`` + - ID: ``BDCDAEC0`` + + Parameters: + file (:obj:`InputFile `, *optional*): + File saved in parts using the method upload.saveFilePart + + video (:obj:`InputFile `, *optional*): + Square video for animated profile picture + + video_start_ts (``float`` ``64-bit``, *optional*): + Floating point UNIX timestamp in seconds, indicating the frame of the video/sticker that should be used as static preview; can only be used if video or video_emoji_markup is set. + + video_emoji_markup (:obj:`VideoSize `, *optional*): + Animated sticker profile picture, must contain either a videoSizeEmojiMarkup or a videoSizeStickerMarkup constructor. + + """ + + __slots__: List[str] = ["file", "video", "video_start_ts", "video_emoji_markup"] + + ID = 0xbdcdaec0 + QUALNAME = "types.InputChatUploadedPhoto" + + def __init__(self, *, file: "raw.base.InputFile" = None, video: "raw.base.InputFile" = None, video_start_ts: Optional[float] = None, video_emoji_markup: "raw.base.VideoSize" = None) -> None: + self.file = file # flags.0?InputFile + self.video = video # flags.1?InputFile + self.video_start_ts = video_start_ts # flags.2?double + self.video_emoji_markup = video_emoji_markup # flags.3?VideoSize + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatUploadedPhoto": + + flags = Int.read(b) + + file = TLObject.read(b) if flags & (1 << 0) else None + + video = TLObject.read(b) if flags & (1 << 1) else None + + video_start_ts = Double.read(b) if flags & (1 << 2) else None + video_emoji_markup = TLObject.read(b) if flags & (1 << 3) else None + + return InputChatUploadedPhoto(file=file, video=video, video_start_ts=video_start_ts, video_emoji_markup=video_emoji_markup) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.file is not None else 0 + flags |= (1 << 1) if self.video is not None else 0 + flags |= (1 << 2) if self.video_start_ts is not None else 0 + flags |= (1 << 3) if self.video_emoji_markup is not None else 0 + b.write(Int(flags)) + + if self.file is not None: + b.write(self.file.write()) + + if self.video is not None: + b.write(self.video.write()) + + if self.video_start_ts is not None: + b.write(Double(self.video_start_ts)) + + if self.video_emoji_markup is not None: + b.write(self.video_emoji_markup.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_chatlist_dialog_filter.py b/pyrogram/raw/types/input_chatlist_dialog_filter.py new file mode 100644 index 00000000..cd935c26 --- /dev/null +++ b/pyrogram/raw/types/input_chatlist_dialog_filter.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputChatlistDialogFilter(TLObject): # type: ignore + """Folder ID + + Constructor of :obj:`~pyrogram.raw.base.InputChatlist`. + + Details: + - Layer: ``224`` + - ID: ``F3E0DA33`` + + Parameters: + filter_id (``int`` ``32-bit``): + Folder ID + + """ + + __slots__: List[str] = ["filter_id"] + + ID = 0xf3e0da33 + QUALNAME = "types.InputChatlistDialogFilter" + + def __init__(self, *, filter_id: int) -> None: + self.filter_id = filter_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputChatlistDialogFilter": + # No flags + + filter_id = Int.read(b) + + return InputChatlistDialogFilter(filter_id=filter_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.filter_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_check_password_empty.py b/pyrogram/raw/types/input_check_password_empty.py new file mode 100644 index 00000000..12551ece --- /dev/null +++ b/pyrogram/raw/types/input_check_password_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputCheckPasswordEmpty(TLObject): # type: ignore + """There is no password + + Constructor of :obj:`~pyrogram.raw.base.InputCheckPasswordSRP`. + + Details: + - Layer: ``224`` + - ID: ``9880F658`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9880f658 + QUALNAME = "types.InputCheckPasswordEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputCheckPasswordEmpty": + # No flags + + return InputCheckPasswordEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_check_password_srp.py b/pyrogram/raw/types/input_check_password_srp.py new file mode 100644 index 00000000..ec18c34d --- /dev/null +++ b/pyrogram/raw/types/input_check_password_srp.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputCheckPasswordSRP(TLObject): # type: ignore + """Constructor for checking the validity of a 2FA SRP password (see SRP) + + Constructor of :obj:`~pyrogram.raw.base.InputCheckPasswordSRP`. + + Details: + - Layer: ``224`` + - ID: ``D27FF082`` + + Parameters: + srp_id (``int`` ``64-bit``): + SRP ID + + A (``bytes``): + A parameter (see SRP) + + M1 (``bytes``): + M1 parameter (see SRP) + + """ + + __slots__: List[str] = ["srp_id", "A", "M1"] + + ID = 0xd27ff082 + QUALNAME = "types.InputCheckPasswordSRP" + + def __init__(self, *, srp_id: int, A: bytes, M1: bytes) -> None: + self.srp_id = srp_id # long + self.A = A # bytes + self.M1 = M1 # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputCheckPasswordSRP": + # No flags + + srp_id = Long.read(b) + + A = Bytes.read(b) + + M1 = Bytes.read(b) + + return InputCheckPasswordSRP(srp_id=srp_id, A=A, M1=M1) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.srp_id)) + + b.write(Bytes(self.A)) + + b.write(Bytes(self.M1)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_client_proxy.py b/pyrogram/raw/types/input_client_proxy.py new file mode 100644 index 00000000..3d9d5127 --- /dev/null +++ b/pyrogram/raw/types/input_client_proxy.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputClientProxy(TLObject): # type: ignore + """Info about an MTProxy used to connect. + + Constructor of :obj:`~pyrogram.raw.base.InputClientProxy`. + + Details: + - Layer: ``224`` + - ID: ``75588B3F`` + + Parameters: + address (``str``): + Proxy address + + port (``int`` ``32-bit``): + Proxy port + + """ + + __slots__: List[str] = ["address", "port"] + + ID = 0x75588b3f + QUALNAME = "types.InputClientProxy" + + def __init__(self, *, address: str, port: int) -> None: + self.address = address # string + self.port = port # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputClientProxy": + # No flags + + address = String.read(b) + + port = Int.read(b) + + return InputClientProxy(address=address, port=port) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.address)) + + b.write(Int(self.port)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_collectible_phone.py b/pyrogram/raw/types/input_collectible_phone.py new file mode 100644 index 00000000..758b3a4d --- /dev/null +++ b/pyrogram/raw/types/input_collectible_phone.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputCollectiblePhone(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputCollectible`. + + Details: + - Layer: ``224`` + - ID: ``A2E214A4`` + + Parameters: + phone (``str``): + + + """ + + __slots__: List[str] = ["phone"] + + ID = 0xa2e214a4 + QUALNAME = "types.InputCollectiblePhone" + + def __init__(self, *, phone: str) -> None: + self.phone = phone # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputCollectiblePhone": + # No flags + + phone = String.read(b) + + return InputCollectiblePhone(phone=phone) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_collectible_username.py b/pyrogram/raw/types/input_collectible_username.py new file mode 100644 index 00000000..ccd5bb39 --- /dev/null +++ b/pyrogram/raw/types/input_collectible_username.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputCollectibleUsername(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputCollectible`. + + Details: + - Layer: ``224`` + - ID: ``E39460A9`` + + Parameters: + username (``str``): + + + """ + + __slots__: List[str] = ["username"] + + ID = 0xe39460a9 + QUALNAME = "types.InputCollectibleUsername" + + def __init__(self, *, username: str) -> None: + self.username = username # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputCollectibleUsername": + # No flags + + username = String.read(b) + + return InputCollectibleUsername(username=username) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.username)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_dialog_peer.py b/pyrogram/raw/types/input_dialog_peer.py new file mode 100644 index 00000000..66a3f0e2 --- /dev/null +++ b/pyrogram/raw/types/input_dialog_peer.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputDialogPeer(TLObject): # type: ignore + """A peer + + Constructor of :obj:`~pyrogram.raw.base.InputDialogPeer`. + + Details: + - Layer: ``224`` + - ID: ``FCAAFEB7`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + """ + + __slots__: List[str] = ["peer"] + + ID = 0xfcaafeb7 + QUALNAME = "types.InputDialogPeer" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputDialogPeer": + # No flags + + peer = TLObject.read(b) + + return InputDialogPeer(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_dialog_peer_folder.py b/pyrogram/raw/types/input_dialog_peer_folder.py new file mode 100644 index 00000000..c4c76855 --- /dev/null +++ b/pyrogram/raw/types/input_dialog_peer_folder.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputDialogPeerFolder(TLObject): # type: ignore + """All peers in a peer folder + + Constructor of :obj:`~pyrogram.raw.base.InputDialogPeer`. + + Details: + - Layer: ``224`` + - ID: ``64600527`` + + Parameters: + folder_id (``int`` ``32-bit``): + Peer folder ID, for more info click here + + """ + + __slots__: List[str] = ["folder_id"] + + ID = 0x64600527 + QUALNAME = "types.InputDialogPeerFolder" + + def __init__(self, *, folder_id: int) -> None: + self.folder_id = folder_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputDialogPeerFolder": + # No flags + + folder_id = Int.read(b) + + return InputDialogPeerFolder(folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.folder_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_document.py b/pyrogram/raw/types/input_document.py new file mode 100644 index 00000000..7e08a34b --- /dev/null +++ b/pyrogram/raw/types/input_document.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputDocument(TLObject): # type: ignore + """Defines a document for subsequent interaction. + + Constructor of :obj:`~pyrogram.raw.base.InputDocument`. + + Details: + - Layer: ``224`` + - ID: ``1ABFB575`` + + Parameters: + id (``int`` ``64-bit``): + Document ID + + access_hash (``int`` ``64-bit``): + access_hash parameter from the document constructor + + file_reference (``bytes``): + File reference + + """ + + __slots__: List[str] = ["id", "access_hash", "file_reference"] + + ID = 0x1abfb575 + QUALNAME = "types.InputDocument" + + def __init__(self, *, id: int, access_hash: int, file_reference: bytes) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.file_reference = file_reference # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputDocument": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + file_reference = Bytes.read(b) + + return InputDocument(id=id, access_hash=access_hash, file_reference=file_reference) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Bytes(self.file_reference)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_document_empty.py b/pyrogram/raw/types/input_document_empty.py new file mode 100644 index 00000000..2a842756 --- /dev/null +++ b/pyrogram/raw/types/input_document_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputDocumentEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.InputDocument`. + + Details: + - Layer: ``224`` + - ID: ``72F0EAAE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x72f0eaae + QUALNAME = "types.InputDocumentEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputDocumentEmpty": + # No flags + + return InputDocumentEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_document_file_location.py b/pyrogram/raw/types/input_document_file_location.py new file mode 100644 index 00000000..b18c8227 --- /dev/null +++ b/pyrogram/raw/types/input_document_file_location.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputDocumentFileLocation(TLObject): # type: ignore + """Document location (video, voice, audio, basically every type except photo) + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``BAD07584`` + + Parameters: + id (``int`` ``64-bit``): + Document ID + + access_hash (``int`` ``64-bit``): + access_hash parameter from the document constructor + + file_reference (``bytes``): + File reference + + thumb_size (``str``): + Thumbnail size to download the thumbnail + + """ + + __slots__: List[str] = ["id", "access_hash", "file_reference", "thumb_size"] + + ID = 0xbad07584 + QUALNAME = "types.InputDocumentFileLocation" + + def __init__(self, *, id: int, access_hash: int, file_reference: bytes, thumb_size: str) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.file_reference = file_reference # bytes + self.thumb_size = thumb_size # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputDocumentFileLocation": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + file_reference = Bytes.read(b) + + thumb_size = String.read(b) + + return InputDocumentFileLocation(id=id, access_hash=access_hash, file_reference=file_reference, thumb_size=thumb_size) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Bytes(self.file_reference)) + + b.write(String(self.thumb_size)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_emoji_status_collectible.py b/pyrogram/raw/types/input_emoji_status_collectible.py new file mode 100644 index 00000000..e83c2c64 --- /dev/null +++ b/pyrogram/raw/types/input_emoji_status_collectible.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEmojiStatusCollectible(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.EmojiStatus`. + + Details: + - Layer: ``224`` + - ID: ``7141DBF`` + + Parameters: + collectible_id (``int`` ``64-bit``): + N/A + + until (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["collectible_id", "until"] + + ID = 0x7141dbf + QUALNAME = "types.InputEmojiStatusCollectible" + + def __init__(self, *, collectible_id: int, until: Optional[int] = None) -> None: + self.collectible_id = collectible_id # long + self.until = until # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEmojiStatusCollectible": + + flags = Int.read(b) + + collectible_id = Long.read(b) + + until = Int.read(b) if flags & (1 << 0) else None + return InputEmojiStatusCollectible(collectible_id=collectible_id, until=until) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.until is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.collectible_id)) + + if self.until is not None: + b.write(Int(self.until)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_encrypted_chat.py b/pyrogram/raw/types/input_encrypted_chat.py new file mode 100644 index 00000000..d46ca005 --- /dev/null +++ b/pyrogram/raw/types/input_encrypted_chat.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEncryptedChat(TLObject): # type: ignore + """Creates an encrypted chat. + + Constructor of :obj:`~pyrogram.raw.base.InputEncryptedChat`. + + Details: + - Layer: ``224`` + - ID: ``F141B5E1`` + + Parameters: + chat_id (``int`` ``32-bit``): + Chat ID + + access_hash (``int`` ``64-bit``): + Checking sum from constructor encryptedChat, encryptedChatWaiting or encryptedChatRequested + + """ + + __slots__: List[str] = ["chat_id", "access_hash"] + + ID = 0xf141b5e1 + QUALNAME = "types.InputEncryptedChat" + + def __init__(self, *, chat_id: int, access_hash: int) -> None: + self.chat_id = chat_id # int + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEncryptedChat": + # No flags + + chat_id = Int.read(b) + + access_hash = Long.read(b) + + return InputEncryptedChat(chat_id=chat_id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.chat_id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_encrypted_file.py b/pyrogram/raw/types/input_encrypted_file.py new file mode 100644 index 00000000..d8c28918 --- /dev/null +++ b/pyrogram/raw/types/input_encrypted_file.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEncryptedFile(TLObject): # type: ignore + """Sets forwarded encrypted file for attachment. + + Constructor of :obj:`~pyrogram.raw.base.InputEncryptedFile`. + + Details: + - Layer: ``224`` + - ID: ``5A17B5E5`` + + Parameters: + id (``int`` ``64-bit``): + File ID, value of id parameter from encryptedFile + + access_hash (``int`` ``64-bit``): + Checking sum, value of access_hash parameter from encryptedFile + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0x5a17b5e5 + QUALNAME = "types.InputEncryptedFile" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEncryptedFile": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputEncryptedFile(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_encrypted_file_big_uploaded.py b/pyrogram/raw/types/input_encrypted_file_big_uploaded.py new file mode 100644 index 00000000..1806fdd6 --- /dev/null +++ b/pyrogram/raw/types/input_encrypted_file_big_uploaded.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEncryptedFileBigUploaded(TLObject): # type: ignore + """Assigns a new big encrypted file (over 10 MB in size), saved in parts using the method upload.saveBigFilePart. + + Constructor of :obj:`~pyrogram.raw.base.InputEncryptedFile`. + + Details: + - Layer: ``224`` + - ID: ``2DC173C8`` + + Parameters: + id (``int`` ``64-bit``): + Random file id, created by the client + + parts (``int`` ``32-bit``): + Number of saved parts + + key_fingerprint (``int`` ``32-bit``): + 32-bit imprint of the key used to encrypt the file + + """ + + __slots__: List[str] = ["id", "parts", "key_fingerprint"] + + ID = 0x2dc173c8 + QUALNAME = "types.InputEncryptedFileBigUploaded" + + def __init__(self, *, id: int, parts: int, key_fingerprint: int) -> None: + self.id = id # long + self.parts = parts # int + self.key_fingerprint = key_fingerprint # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEncryptedFileBigUploaded": + # No flags + + id = Long.read(b) + + parts = Int.read(b) + + key_fingerprint = Int.read(b) + + return InputEncryptedFileBigUploaded(id=id, parts=parts, key_fingerprint=key_fingerprint) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Int(self.parts)) + + b.write(Int(self.key_fingerprint)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_encrypted_file_empty.py b/pyrogram/raw/types/input_encrypted_file_empty.py new file mode 100644 index 00000000..f24a2246 --- /dev/null +++ b/pyrogram/raw/types/input_encrypted_file_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEncryptedFileEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.InputEncryptedFile`. + + Details: + - Layer: ``224`` + - ID: ``1837C364`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1837c364 + QUALNAME = "types.InputEncryptedFileEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEncryptedFileEmpty": + # No flags + + return InputEncryptedFileEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_encrypted_file_location.py b/pyrogram/raw/types/input_encrypted_file_location.py new file mode 100644 index 00000000..c5ea8c41 --- /dev/null +++ b/pyrogram/raw/types/input_encrypted_file_location.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEncryptedFileLocation(TLObject): # type: ignore + """Location of encrypted secret chat file. + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``F5235D55`` + + Parameters: + id (``int`` ``64-bit``): + File ID, id parameter value from encryptedFile + + access_hash (``int`` ``64-bit``): + Checksum, access_hash parameter value from encryptedFile + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0xf5235d55 + QUALNAME = "types.InputEncryptedFileLocation" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEncryptedFileLocation": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputEncryptedFileLocation(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_encrypted_file_uploaded.py b/pyrogram/raw/types/input_encrypted_file_uploaded.py new file mode 100644 index 00000000..76dccaf9 --- /dev/null +++ b/pyrogram/raw/types/input_encrypted_file_uploaded.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputEncryptedFileUploaded(TLObject): # type: ignore + """Sets new encrypted file saved by parts using upload.saveFilePart method. + + Constructor of :obj:`~pyrogram.raw.base.InputEncryptedFile`. + + Details: + - Layer: ``224`` + - ID: ``64BD0306`` + + Parameters: + id (``int`` ``64-bit``): + Random file ID created by client + + parts (``int`` ``32-bit``): + Number of saved parts + + md5_checksum (``str``): + In case md5-HASH of the (already encrypted) file was transmitted, file content will be checked prior to use + + key_fingerprint (``int`` ``32-bit``): + 32-bit fingerprint of the key used to encrypt a file + + """ + + __slots__: List[str] = ["id", "parts", "md5_checksum", "key_fingerprint"] + + ID = 0x64bd0306 + QUALNAME = "types.InputEncryptedFileUploaded" + + def __init__(self, *, id: int, parts: int, md5_checksum: str, key_fingerprint: int) -> None: + self.id = id # long + self.parts = parts # int + self.md5_checksum = md5_checksum # string + self.key_fingerprint = key_fingerprint # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputEncryptedFileUploaded": + # No flags + + id = Long.read(b) + + parts = Int.read(b) + + md5_checksum = String.read(b) + + key_fingerprint = Int.read(b) + + return InputEncryptedFileUploaded(id=id, parts=parts, md5_checksum=md5_checksum, key_fingerprint=key_fingerprint) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Int(self.parts)) + + b.write(String(self.md5_checksum)) + + b.write(Int(self.key_fingerprint)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_file.py b/pyrogram/raw/types/input_file.py new file mode 100644 index 00000000..2a85318d --- /dev/null +++ b/pyrogram/raw/types/input_file.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputFile(TLObject): # type: ignore + """Defines a file saved in parts using the method upload.saveFilePart. + + Constructor of :obj:`~pyrogram.raw.base.InputFile`. + + Details: + - Layer: ``224`` + - ID: ``F52FF27F`` + + Parameters: + id (``int`` ``64-bit``): + Random file identifier created by the client + + parts (``int`` ``32-bit``): + Number of parts saved + + name (``str``): + Full name of the file + + md5_checksum (``str``): + In case the file's md5-hash was passed, contents of the file will be checked prior to use + + """ + + __slots__: List[str] = ["id", "parts", "name", "md5_checksum"] + + ID = 0xf52ff27f + QUALNAME = "types.InputFile" + + def __init__(self, *, id: int, parts: int, name: str, md5_checksum: str) -> None: + self.id = id # long + self.parts = parts # int + self.name = name # string + self.md5_checksum = md5_checksum # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputFile": + # No flags + + id = Long.read(b) + + parts = Int.read(b) + + name = String.read(b) + + md5_checksum = String.read(b) + + return InputFile(id=id, parts=parts, name=name, md5_checksum=md5_checksum) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Int(self.parts)) + + b.write(String(self.name)) + + b.write(String(self.md5_checksum)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_file_big.py b/pyrogram/raw/types/input_file_big.py new file mode 100644 index 00000000..306f4236 --- /dev/null +++ b/pyrogram/raw/types/input_file_big.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputFileBig(TLObject): # type: ignore + """Assigns a big file (over 10 MB in size), saved in part using the method upload.saveBigFilePart. + + Constructor of :obj:`~pyrogram.raw.base.InputFile`. + + Details: + - Layer: ``224`` + - ID: ``FA4F0BB5`` + + Parameters: + id (``int`` ``64-bit``): + Random file id, created by the client + + parts (``int`` ``32-bit``): + Number of parts saved + + name (``str``): + Full file name + + """ + + __slots__: List[str] = ["id", "parts", "name"] + + ID = 0xfa4f0bb5 + QUALNAME = "types.InputFileBig" + + def __init__(self, *, id: int, parts: int, name: str) -> None: + self.id = id # long + self.parts = parts # int + self.name = name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputFileBig": + # No flags + + id = Long.read(b) + + parts = Int.read(b) + + name = String.read(b) + + return InputFileBig(id=id, parts=parts, name=name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Int(self.parts)) + + b.write(String(self.name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_file_location.py b/pyrogram/raw/types/input_file_location.py new file mode 100644 index 00000000..4cacec3c --- /dev/null +++ b/pyrogram/raw/types/input_file_location.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputFileLocation(TLObject): # type: ignore + """DEPRECATED location of a photo + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``DFDAABE1`` + + Parameters: + volume_id (``int`` ``64-bit``): + Server volume + + local_id (``int`` ``32-bit``): + File identifier + + secret (``int`` ``64-bit``): + Check sum to access the file + + file_reference (``bytes``): + File reference + + """ + + __slots__: List[str] = ["volume_id", "local_id", "secret", "file_reference"] + + ID = 0xdfdaabe1 + QUALNAME = "types.InputFileLocation" + + def __init__(self, *, volume_id: int, local_id: int, secret: int, file_reference: bytes) -> None: + self.volume_id = volume_id # long + self.local_id = local_id # int + self.secret = secret # long + self.file_reference = file_reference # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputFileLocation": + # No flags + + volume_id = Long.read(b) + + local_id = Int.read(b) + + secret = Long.read(b) + + file_reference = Bytes.read(b) + + return InputFileLocation(volume_id=volume_id, local_id=local_id, secret=secret, file_reference=file_reference) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.volume_id)) + + b.write(Int(self.local_id)) + + b.write(Long(self.secret)) + + b.write(Bytes(self.file_reference)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_file_story_document.py b/pyrogram/raw/types/input_file_story_document.py new file mode 100644 index 00000000..371751e3 --- /dev/null +++ b/pyrogram/raw/types/input_file_story_document.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputFileStoryDocument(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputFile`. + + Details: + - Layer: ``224`` + - ID: ``62DC8B48`` + + Parameters: + id (:obj:`InputDocument `): + N/A + + """ + + __slots__: List[str] = ["id"] + + ID = 0x62dc8b48 + QUALNAME = "types.InputFileStoryDocument" + + def __init__(self, *, id: "raw.base.InputDocument") -> None: + self.id = id # InputDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputFileStoryDocument": + # No flags + + id = TLObject.read(b) + + return InputFileStoryDocument(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_folder_peer.py b/pyrogram/raw/types/input_folder_peer.py new file mode 100644 index 00000000..80119e4b --- /dev/null +++ b/pyrogram/raw/types/input_folder_peer.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputFolderPeer(TLObject): # type: ignore + """Peer in a folder + + Constructor of :obj:`~pyrogram.raw.base.InputFolderPeer`. + + Details: + - Layer: ``224`` + - ID: ``FBD2C296`` + + Parameters: + peer (:obj:`InputPeer `): + Peer + + folder_id (``int`` ``32-bit``): + Peer folder ID, for more info click here + + """ + + __slots__: List[str] = ["peer", "folder_id"] + + ID = 0xfbd2c296 + QUALNAME = "types.InputFolderPeer" + + def __init__(self, *, peer: "raw.base.InputPeer", folder_id: int) -> None: + self.peer = peer # InputPeer + self.folder_id = folder_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputFolderPeer": + # No flags + + peer = TLObject.read(b) + + folder_id = Int.read(b) + + return InputFolderPeer(peer=peer, folder_id=folder_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.folder_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_game_id.py b/pyrogram/raw/types/input_game_id.py new file mode 100644 index 00000000..539935a4 --- /dev/null +++ b/pyrogram/raw/types/input_game_id.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGameID(TLObject): # type: ignore + """Indicates an already sent game + + Constructor of :obj:`~pyrogram.raw.base.InputGame`. + + Details: + - Layer: ``224`` + - ID: ``32C3E77`` + + Parameters: + id (``int`` ``64-bit``): + game ID from Game constructor + + access_hash (``int`` ``64-bit``): + access hash from Game constructor + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0x32c3e77 + QUALNAME = "types.InputGameID" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGameID": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputGameID(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_game_short_name.py b/pyrogram/raw/types/input_game_short_name.py new file mode 100644 index 00000000..abe8de8f --- /dev/null +++ b/pyrogram/raw/types/input_game_short_name.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGameShortName(TLObject): # type: ignore + """Game by short name + + Constructor of :obj:`~pyrogram.raw.base.InputGame`. + + Details: + - Layer: ``224`` + - ID: ``C331E80A`` + + Parameters: + bot_id (:obj:`InputUser `): + The bot that provides the game + + short_name (``str``): + The game's short name, usually obtained from a game link » + + """ + + __slots__: List[str] = ["bot_id", "short_name"] + + ID = 0xc331e80a + QUALNAME = "types.InputGameShortName" + + def __init__(self, *, bot_id: "raw.base.InputUser", short_name: str) -> None: + self.bot_id = bot_id # InputUser + self.short_name = short_name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGameShortName": + # No flags + + bot_id = TLObject.read(b) + + short_name = String.read(b) + + return InputGameShortName(bot_id=bot_id, short_name=short_name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot_id.write()) + + b.write(String(self.short_name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_geo_point.py b/pyrogram/raw/types/input_geo_point.py new file mode 100644 index 00000000..bfb14dec --- /dev/null +++ b/pyrogram/raw/types/input_geo_point.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGeoPoint(TLObject): # type: ignore + """Defines a GeoPoint by its coordinates. + + Constructor of :obj:`~pyrogram.raw.base.InputGeoPoint`. + + Details: + - Layer: ``224`` + - ID: ``48222FAF`` + + Parameters: + lat (``float`` ``64-bit``): + Latitude + + long (``float`` ``64-bit``): + Longitude + + accuracy_radius (``int`` ``32-bit``, *optional*): + The estimated horizontal accuracy of the location, in meters; as defined by the sender. + + """ + + __slots__: List[str] = ["lat", "long", "accuracy_radius"] + + ID = 0x48222faf + QUALNAME = "types.InputGeoPoint" + + def __init__(self, *, lat: float, long: float, accuracy_radius: Optional[int] = None) -> None: + self.lat = lat # double + self.long = long # double + self.accuracy_radius = accuracy_radius # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGeoPoint": + + flags = Int.read(b) + + lat = Double.read(b) + + long = Double.read(b) + + accuracy_radius = Int.read(b) if flags & (1 << 0) else None + return InputGeoPoint(lat=lat, long=long, accuracy_radius=accuracy_radius) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.accuracy_radius is not None else 0 + b.write(Int(flags)) + + b.write(Double(self.lat)) + + b.write(Double(self.long)) + + if self.accuracy_radius is not None: + b.write(Int(self.accuracy_radius)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_geo_point_empty.py b/pyrogram/raw/types/input_geo_point_empty.py new file mode 100644 index 00000000..197212df --- /dev/null +++ b/pyrogram/raw/types/input_geo_point_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGeoPointEmpty(TLObject): # type: ignore + """Empty GeoPoint constructor. + + Constructor of :obj:`~pyrogram.raw.base.InputGeoPoint`. + + Details: + - Layer: ``224`` + - ID: ``E4C123D6`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xe4c123d6 + QUALNAME = "types.InputGeoPointEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGeoPointEmpty": + # No flags + + return InputGeoPointEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_group_call.py b/pyrogram/raw/types/input_group_call.py new file mode 100644 index 00000000..97acb18b --- /dev/null +++ b/pyrogram/raw/types/input_group_call.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGroupCall(TLObject): # type: ignore + """Points to a specific group call + + Constructor of :obj:`~pyrogram.raw.base.InputGroupCall`. + + Details: + - Layer: ``224`` + - ID: ``D8AA840F`` + + Parameters: + id (``int`` ``64-bit``): + Group call ID + + access_hash (``int`` ``64-bit``): + Group call access hash + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0xd8aa840f + QUALNAME = "types.InputGroupCall" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGroupCall": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputGroupCall(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_group_call_invite_message.py b/pyrogram/raw/types/input_group_call_invite_message.py new file mode 100644 index 00000000..e9ecf09a --- /dev/null +++ b/pyrogram/raw/types/input_group_call_invite_message.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGroupCallInviteMessage(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputGroupCall`. + + Details: + - Layer: ``224`` + - ID: ``8C10603F`` + + Parameters: + msg_id (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_id"] + + ID = 0x8c10603f + QUALNAME = "types.InputGroupCallInviteMessage" + + def __init__(self, *, msg_id: int) -> None: + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGroupCallInviteMessage": + # No flags + + msg_id = Int.read(b) + + return InputGroupCallInviteMessage(msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_group_call_slug.py b/pyrogram/raw/types/input_group_call_slug.py new file mode 100644 index 00000000..103c4ba8 --- /dev/null +++ b/pyrogram/raw/types/input_group_call_slug.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGroupCallSlug(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputGroupCall`. + + Details: + - Layer: ``224`` + - ID: ``FE06823F`` + + Parameters: + slug (``str``): + N/A + + """ + + __slots__: List[str] = ["slug"] + + ID = 0xfe06823f + QUALNAME = "types.InputGroupCallSlug" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGroupCallSlug": + # No flags + + slug = String.read(b) + + return InputGroupCallSlug(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_group_call_stream.py b/pyrogram/raw/types/input_group_call_stream.py new file mode 100644 index 00000000..81d86596 --- /dev/null +++ b/pyrogram/raw/types/input_group_call_stream.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputGroupCallStream(TLObject): # type: ignore + """Chunk of a livestream + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``598A92A`` + + Parameters: + call (:obj:`InputGroupCall `): + Livestream info + + time_ms (``int`` ``64-bit``): + Timestamp in milliseconds + + scale (``int`` ``32-bit``): + Specifies the duration of the video segment to fetch in milliseconds, by bitshifting 1000 to the right scale times: duration_ms := 1000 >> scale + + video_channel (``int`` ``32-bit``, *optional*): + Selected video channel + + video_quality (``int`` ``32-bit``, *optional*): + Selected video quality (0 = lowest, 1 = medium, 2 = best) + + """ + + __slots__: List[str] = ["call", "time_ms", "scale", "video_channel", "video_quality"] + + ID = 0x598a92a + QUALNAME = "types.InputGroupCallStream" + + def __init__(self, *, call: "raw.base.InputGroupCall", time_ms: int, scale: int, video_channel: Optional[int] = None, video_quality: Optional[int] = None) -> None: + self.call = call # InputGroupCall + self.time_ms = time_ms # long + self.scale = scale # int + self.video_channel = video_channel # flags.0?int + self.video_quality = video_quality # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputGroupCallStream": + + flags = Int.read(b) + + call = TLObject.read(b) + + time_ms = Long.read(b) + + scale = Int.read(b) + + video_channel = Int.read(b) if flags & (1 << 0) else None + video_quality = Int.read(b) if flags & (1 << 0) else None + return InputGroupCallStream(call=call, time_ms=time_ms, scale=scale, video_channel=video_channel, video_quality=video_quality) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.video_channel is not None else 0 + flags |= (1 << 0) if self.video_quality is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + b.write(Long(self.time_ms)) + + b.write(Int(self.scale)) + + if self.video_channel is not None: + b.write(Int(self.video_channel)) + + if self.video_quality is not None: + b.write(Int(self.video_quality)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_business_bot_transfer_stars.py b/pyrogram/raw/types/input_invoice_business_bot_transfer_stars.py new file mode 100644 index 00000000..5dc83d0b --- /dev/null +++ b/pyrogram/raw/types/input_invoice_business_bot_transfer_stars.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceBusinessBotTransferStars(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``F4997E42`` + + Parameters: + bot (:obj:`InputUser `): + N/A + + stars (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["bot", "stars"] + + ID = 0xf4997e42 + QUALNAME = "types.InputInvoiceBusinessBotTransferStars" + + def __init__(self, *, bot: "raw.base.InputUser", stars: int) -> None: + self.bot = bot # InputUser + self.stars = stars # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceBusinessBotTransferStars": + # No flags + + bot = TLObject.read(b) + + stars = Long.read(b) + + return InputInvoiceBusinessBotTransferStars(bot=bot, stars=stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.bot.write()) + + b.write(Long(self.stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_chat_invite_subscription.py b/pyrogram/raw/types/input_invoice_chat_invite_subscription.py new file mode 100644 index 00000000..0a841468 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_chat_invite_subscription.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceChatInviteSubscription(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``34E793F1`` + + Parameters: + hash (``str``): + N/A + + """ + + __slots__: List[str] = ["hash"] + + ID = 0x34e793f1 + QUALNAME = "types.InputInvoiceChatInviteSubscription" + + def __init__(self, *, hash: str) -> None: + self.hash = hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceChatInviteSubscription": + # No flags + + hash = String.read(b) + + return InputInvoiceChatInviteSubscription(hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_message.py b/pyrogram/raw/types/input_invoice_message.py new file mode 100644 index 00000000..33554e59 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_message.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceMessage(TLObject): # type: ignore + """An invoice contained in a messageMediaInvoice message. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``C5B56859`` + + Parameters: + peer (:obj:`InputPeer `): + Chat where the invoice was sent + + msg_id (``int`` ``32-bit``): + Message ID + + """ + + __slots__: List[str] = ["peer", "msg_id"] + + ID = 0xc5b56859 + QUALNAME = "types.InputInvoiceMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceMessage": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + return InputInvoiceMessage(peer=peer, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_premium_auth_code.py b/pyrogram/raw/types/input_invoice_premium_auth_code.py new file mode 100644 index 00000000..9a189bb2 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_premium_auth_code.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoicePremiumAuthCode(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``3E77F614`` + + Parameters: + purpose (:obj:`InputStorePaymentPurpose `): + N/A + + """ + + __slots__: List[str] = ["purpose"] + + ID = 0x3e77f614 + QUALNAME = "types.InputInvoicePremiumAuthCode" + + def __init__(self, *, purpose: "raw.base.InputStorePaymentPurpose") -> None: + self.purpose = purpose # InputStorePaymentPurpose + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoicePremiumAuthCode": + # No flags + + purpose = TLObject.read(b) + + return InputInvoicePremiumAuthCode(purpose=purpose) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.purpose.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_premium_gift_code.py b/pyrogram/raw/types/input_invoice_premium_gift_code.py new file mode 100644 index 00000000..94b3e986 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_premium_gift_code.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoicePremiumGiftCode(TLObject): # type: ignore + """Used if the user wishes to start a channel giveaway or send some giftcodes to members of a channel, in exchange for boosts. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``98986C0D`` + + Parameters: + purpose (:obj:`InputStorePaymentPurpose `): + Should be populated with inputStorePaymentPremiumGiveaway for giveaways and inputStorePaymentPremiumGiftCode for gifts. + + option (:obj:`PremiumGiftCodeOption `): + Should be populated with one of the giveaway options returned by payments.getPremiumGiftCodeOptions, see the giveaways » documentation for more info. + + """ + + __slots__: List[str] = ["purpose", "option"] + + ID = 0x98986c0d + QUALNAME = "types.InputInvoicePremiumGiftCode" + + def __init__(self, *, purpose: "raw.base.InputStorePaymentPurpose", option: "raw.base.PremiumGiftCodeOption") -> None: + self.purpose = purpose # InputStorePaymentPurpose + self.option = option # PremiumGiftCodeOption + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoicePremiumGiftCode": + # No flags + + purpose = TLObject.read(b) + + option = TLObject.read(b) + + return InputInvoicePremiumGiftCode(purpose=purpose, option=option) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.purpose.write()) + + b.write(self.option.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_premium_gift_stars.py b/pyrogram/raw/types/input_invoice_premium_gift_stars.py new file mode 100644 index 00000000..0c809f95 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_premium_gift_stars.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoicePremiumGiftStars(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``DABAB2EF`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + months (``int`` ``32-bit``): + N/A + + message (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["user_id", "months", "message"] + + ID = 0xdabab2ef + QUALNAME = "types.InputInvoicePremiumGiftStars" + + def __init__(self, *, user_id: "raw.base.InputUser", months: int, message: "raw.base.TextWithEntities" = None) -> None: + self.user_id = user_id # InputUser + self.months = months # int + self.message = message # flags.0?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoicePremiumGiftStars": + + flags = Int.read(b) + + user_id = TLObject.read(b) + + months = Int.read(b) + + message = TLObject.read(b) if flags & (1 << 0) else None + + return InputInvoicePremiumGiftStars(user_id=user_id, months=months, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.message is not None else 0 + b.write(Int(flags)) + + b.write(self.user_id.write()) + + b.write(Int(self.months)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_slug.py b/pyrogram/raw/types/input_invoice_slug.py new file mode 100644 index 00000000..39ca34f0 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_slug.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceSlug(TLObject): # type: ignore + """An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter » + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``C326CAEF`` + + Parameters: + slug (``str``): + The invoice slug + + """ + + __slots__: List[str] = ["slug"] + + ID = 0xc326caef + QUALNAME = "types.InputInvoiceSlug" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceSlug": + # No flags + + slug = String.read(b) + + return InputInvoiceSlug(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift.py b/pyrogram/raw/types/input_invoice_star_gift.py new file mode 100644 index 00000000..8caabdda --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGift(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``E8625E92`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + gift_id (``int`` ``64-bit``): + N/A + + hide_name (``bool``, *optional*): + N/A + + include_upgrade (``bool``, *optional*): + N/A + + message (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["peer", "gift_id", "hide_name", "include_upgrade", "message"] + + ID = 0xe8625e92 + QUALNAME = "types.InputInvoiceStarGift" + + def __init__(self, *, peer: "raw.base.InputPeer", gift_id: int, hide_name: Optional[bool] = None, include_upgrade: Optional[bool] = None, message: "raw.base.TextWithEntities" = None) -> None: + self.peer = peer # InputPeer + self.gift_id = gift_id # long + self.hide_name = hide_name # flags.0?true + self.include_upgrade = include_upgrade # flags.2?true + self.message = message # flags.1?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGift": + + flags = Int.read(b) + + hide_name = True if flags & (1 << 0) else False + include_upgrade = True if flags & (1 << 2) else False + peer = TLObject.read(b) + + gift_id = Long.read(b) + + message = TLObject.read(b) if flags & (1 << 1) else None + + return InputInvoiceStarGift(peer=peer, gift_id=gift_id, hide_name=hide_name, include_upgrade=include_upgrade, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.hide_name else 0 + flags |= (1 << 2) if self.include_upgrade else 0 + flags |= (1 << 1) if self.message is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Long(self.gift_id)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift_auction_bid.py b/pyrogram/raw/types/input_invoice_star_gift_auction_bid.py new file mode 100644 index 00000000..0e1c4fd6 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift_auction_bid.py @@ -0,0 +1,96 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGiftAuctionBid(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``1ECAFA10`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + bid_amount (``int`` ``64-bit``): + N/A + + hide_name (``bool``, *optional*): + N/A + + update_bid (``bool``, *optional*): + N/A + + peer (:obj:`InputPeer `, *optional*): + N/A + + message (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["gift_id", "bid_amount", "hide_name", "update_bid", "peer", "message"] + + ID = 0x1ecafa10 + QUALNAME = "types.InputInvoiceStarGiftAuctionBid" + + def __init__(self, *, gift_id: int, bid_amount: int, hide_name: Optional[bool] = None, update_bid: Optional[bool] = None, peer: "raw.base.InputPeer" = None, message: "raw.base.TextWithEntities" = None) -> None: + self.gift_id = gift_id # long + self.bid_amount = bid_amount # long + self.hide_name = hide_name # flags.0?true + self.update_bid = update_bid # flags.2?true + self.peer = peer # flags.3?InputPeer + self.message = message # flags.1?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGiftAuctionBid": + + flags = Int.read(b) + + hide_name = True if flags & (1 << 0) else False + update_bid = True if flags & (1 << 2) else False + peer = TLObject.read(b) if flags & (1 << 3) else None + + gift_id = Long.read(b) + + bid_amount = Long.read(b) + + message = TLObject.read(b) if flags & (1 << 1) else None + + return InputInvoiceStarGiftAuctionBid(gift_id=gift_id, bid_amount=bid_amount, hide_name=hide_name, update_bid=update_bid, peer=peer, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.hide_name else 0 + flags |= (1 << 2) if self.update_bid else 0 + flags |= (1 << 3) if self.peer is not None else 0 + flags |= (1 << 1) if self.message is not None else 0 + b.write(Int(flags)) + + if self.peer is not None: + b.write(self.peer.write()) + + b.write(Long(self.gift_id)) + + b.write(Long(self.bid_amount)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift_drop_original_details.py b/pyrogram/raw/types/input_invoice_star_gift_drop_original_details.py new file mode 100644 index 00000000..dafb3493 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift_drop_original_details.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGiftDropOriginalDetails(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``923D8D1`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + """ + + __slots__: List[str] = ["stargift"] + + ID = 0x923d8d1 + QUALNAME = "types.InputInvoiceStarGiftDropOriginalDetails" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift") -> None: + self.stargift = stargift # InputSavedStarGift + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGiftDropOriginalDetails": + # No flags + + stargift = TLObject.read(b) + + return InputInvoiceStarGiftDropOriginalDetails(stargift=stargift) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stargift.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift_prepaid_upgrade.py b/pyrogram/raw/types/input_invoice_star_gift_prepaid_upgrade.py new file mode 100644 index 00000000..ff0cc698 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift_prepaid_upgrade.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGiftPrepaidUpgrade(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``9A0B48B8`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + hash (``str``): + N/A + + """ + + __slots__: List[str] = ["peer", "hash"] + + ID = 0x9a0b48b8 + QUALNAME = "types.InputInvoiceStarGiftPrepaidUpgrade" + + def __init__(self, *, peer: "raw.base.InputPeer", hash: str) -> None: + self.peer = peer # InputPeer + self.hash = hash # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGiftPrepaidUpgrade": + # No flags + + peer = TLObject.read(b) + + hash = String.read(b) + + return InputInvoiceStarGiftPrepaidUpgrade(peer=peer, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(String(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift_resale.py b/pyrogram/raw/types/input_invoice_star_gift_resale.py new file mode 100644 index 00000000..f9127e9e --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift_resale.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGiftResale(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``C39F5324`` + + Parameters: + slug (``str``): + N/A + + to_id (:obj:`InputPeer `): + N/A + + ton (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["slug", "to_id", "ton"] + + ID = 0xc39f5324 + QUALNAME = "types.InputInvoiceStarGiftResale" + + def __init__(self, *, slug: str, to_id: "raw.base.InputPeer", ton: Optional[bool] = None) -> None: + self.slug = slug # string + self.to_id = to_id # InputPeer + self.ton = ton # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGiftResale": + + flags = Int.read(b) + + ton = True if flags & (1 << 0) else False + slug = String.read(b) + + to_id = TLObject.read(b) + + return InputInvoiceStarGiftResale(slug=slug, to_id=to_id, ton=ton) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.ton else 0 + b.write(Int(flags)) + + b.write(String(self.slug)) + + b.write(self.to_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift_transfer.py b/pyrogram/raw/types/input_invoice_star_gift_transfer.py new file mode 100644 index 00000000..ffeadac2 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift_transfer.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGiftTransfer(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``4A5F5BD9`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + to_id (:obj:`InputPeer `): + N/A + + """ + + __slots__: List[str] = ["stargift", "to_id"] + + ID = 0x4a5f5bd9 + QUALNAME = "types.InputInvoiceStarGiftTransfer" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", to_id: "raw.base.InputPeer") -> None: + self.stargift = stargift # InputSavedStarGift + self.to_id = to_id # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGiftTransfer": + # No flags + + stargift = TLObject.read(b) + + to_id = TLObject.read(b) + + return InputInvoiceStarGiftTransfer(stargift=stargift, to_id=to_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stargift.write()) + + b.write(self.to_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_star_gift_upgrade.py b/pyrogram/raw/types/input_invoice_star_gift_upgrade.py new file mode 100644 index 00000000..79d2090f --- /dev/null +++ b/pyrogram/raw/types/input_invoice_star_gift_upgrade.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStarGiftUpgrade(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``4D818D5D`` + + Parameters: + stargift (:obj:`InputSavedStarGift `): + N/A + + keep_original_details (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["stargift", "keep_original_details"] + + ID = 0x4d818d5d + QUALNAME = "types.InputInvoiceStarGiftUpgrade" + + def __init__(self, *, stargift: "raw.base.InputSavedStarGift", keep_original_details: Optional[bool] = None) -> None: + self.stargift = stargift # InputSavedStarGift + self.keep_original_details = keep_original_details # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStarGiftUpgrade": + + flags = Int.read(b) + + keep_original_details = True if flags & (1 << 0) else False + stargift = TLObject.read(b) + + return InputInvoiceStarGiftUpgrade(stargift=stargift, keep_original_details=keep_original_details) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.keep_original_details else 0 + b.write(Int(flags)) + + b.write(self.stargift.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_invoice_stars.py b/pyrogram/raw/types/input_invoice_stars.py new file mode 100644 index 00000000..7f48b829 --- /dev/null +++ b/pyrogram/raw/types/input_invoice_stars.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputInvoiceStars(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputInvoice`. + + Details: + - Layer: ``224`` + - ID: ``65F00CE3`` + + Parameters: + purpose (:obj:`InputStorePaymentPurpose `): + N/A + + """ + + __slots__: List[str] = ["purpose"] + + ID = 0x65f00ce3 + QUALNAME = "types.InputInvoiceStars" + + def __init__(self, *, purpose: "raw.base.InputStorePaymentPurpose") -> None: + self.purpose = purpose # InputStorePaymentPurpose + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputInvoiceStars": + # No flags + + purpose = TLObject.read(b) + + return InputInvoiceStars(purpose=purpose) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.purpose.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_keyboard_button_request_peer.py b/pyrogram/raw/types/input_keyboard_button_request_peer.py new file mode 100644 index 00000000..99b4ac74 --- /dev/null +++ b/pyrogram/raw/types/input_keyboard_button_request_peer.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputKeyboardButtonRequestPeer(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``C9662D05`` + + Parameters: + text (``str``): + + + button_id (``int`` ``32-bit``): + + + peer_type (:obj:`RequestPeerType `): + + + max_quantity (``int`` ``32-bit``): + + + name_requested (``bool``, *optional*): + + + username_requested (``bool``, *optional*): + + + photo_requested (``bool``, *optional*): + + + """ + + __slots__: List[str] = ["text", "button_id", "peer_type", "max_quantity", "name_requested", "username_requested", "photo_requested"] + + ID = 0xc9662d05 + QUALNAME = "types.InputKeyboardButtonRequestPeer" + + def __init__(self, *, text: str, button_id: int, peer_type: "raw.base.RequestPeerType", max_quantity: int, name_requested: Optional[bool] = None, username_requested: Optional[bool] = None, photo_requested: Optional[bool] = None) -> None: + self.text = text # string + self.button_id = button_id # int + self.peer_type = peer_type # RequestPeerType + self.max_quantity = max_quantity # int + self.name_requested = name_requested # flags.0?true + self.username_requested = username_requested # flags.1?true + self.photo_requested = photo_requested # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputKeyboardButtonRequestPeer": + + flags = Int.read(b) + + name_requested = True if flags & (1 << 0) else False + username_requested = True if flags & (1 << 1) else False + photo_requested = True if flags & (1 << 2) else False + text = String.read(b) + + button_id = Int.read(b) + + peer_type = TLObject.read(b) + + max_quantity = Int.read(b) + + return InputKeyboardButtonRequestPeer(text=text, button_id=button_id, peer_type=peer_type, max_quantity=max_quantity, name_requested=name_requested, username_requested=username_requested, photo_requested=photo_requested) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.name_requested else 0 + flags |= (1 << 1) if self.username_requested else 0 + flags |= (1 << 2) if self.photo_requested else 0 + b.write(Int(flags)) + + b.write(String(self.text)) + + b.write(Int(self.button_id)) + + b.write(self.peer_type.write()) + + b.write(Int(self.max_quantity)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_keyboard_button_url_auth.py b/pyrogram/raw/types/input_keyboard_button_url_auth.py new file mode 100644 index 00000000..622ee3ca --- /dev/null +++ b/pyrogram/raw/types/input_keyboard_button_url_auth.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputKeyboardButtonUrlAuth(TLObject): # type: ignore + """Button to request a user to authorize via URL using Seamless Telegram Login. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``68013E72`` + + Parameters: + text (``str``): + Button text + + url (``str``): + An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.NOTE: You must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization. + + bot (:obj:`InputUser `): + Username of a bot, which will be used for user authorization. See Setting up a bot for more details. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details. + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + request_write_access (``bool``, *optional*): + Set this flag to request the permission for your bot to send messages to the user. + + fwd_text (``str``, *optional*): + New text of the button in forwarded messages. + + """ + + __slots__: List[str] = ["text", "url", "bot", "style", "request_write_access", "fwd_text"] + + ID = 0x68013e72 + QUALNAME = "types.InputKeyboardButtonUrlAuth" + + def __init__(self, *, text: str, url: str, bot: "raw.base.InputUser", style: "raw.base.KeyboardButtonStyle" = None, request_write_access: Optional[bool] = None, fwd_text: Optional[str] = None) -> None: + self.text = text # string + self.url = url # string + self.bot = bot # InputUser + self.style = style # flags.10?KeyboardButtonStyle + self.request_write_access = request_write_access # flags.0?true + self.fwd_text = fwd_text # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputKeyboardButtonUrlAuth": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + request_write_access = True if flags & (1 << 0) else False + text = String.read(b) + + fwd_text = String.read(b) if flags & (1 << 1) else None + url = String.read(b) + + bot = TLObject.read(b) + + return InputKeyboardButtonUrlAuth(text=text, url=url, bot=bot, style=style, request_write_access=request_write_access, fwd_text=fwd_text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + flags |= (1 << 0) if self.request_write_access else 0 + flags |= (1 << 1) if self.fwd_text is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + if self.fwd_text is not None: + b.write(String(self.fwd_text)) + + b.write(String(self.url)) + + b.write(self.bot.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_keyboard_button_user_profile.py b/pyrogram/raw/types/input_keyboard_button_user_profile.py new file mode 100644 index 00000000..4b405fe9 --- /dev/null +++ b/pyrogram/raw/types/input_keyboard_button_user_profile.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputKeyboardButtonUserProfile(TLObject): # type: ignore + """Button that links directly to a user profile + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``7D5E07C7`` + + Parameters: + text (``str``): + Button text + + input_user (:obj:`InputUser `): + N/A + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "input_user", "style"] + + ID = 0x7d5e07c7 + QUALNAME = "types.InputKeyboardButtonUserProfile" + + def __init__(self, *, text: str, input_user: "raw.base.InputUser", style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.input_user = input_user # InputUser + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputKeyboardButtonUserProfile": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + input_user = TLObject.read(b) + + return InputKeyboardButtonUserProfile(text=text, input_user=input_user, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(self.input_user.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_area_channel_post.py b/pyrogram/raw/types/input_media_area_channel_post.py new file mode 100644 index 00000000..bee229d4 --- /dev/null +++ b/pyrogram/raw/types/input_media_area_channel_post.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaAreaChannelPost(TLObject): # type: ignore + """Represents a channel post + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``2271F2BF`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + The size and location of the media area corresponding to the location sticker on top of the story media. + + channel (:obj:`InputChannel `): + The channel that posted the message + + msg_id (``int`` ``32-bit``): + ID of the channel message + + """ + + __slots__: List[str] = ["coordinates", "channel", "msg_id"] + + ID = 0x2271f2bf + QUALNAME = "types.InputMediaAreaChannelPost" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", channel: "raw.base.InputChannel", msg_id: int) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.channel = channel # InputChannel + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaAreaChannelPost": + # No flags + + coordinates = TLObject.read(b) + + channel = TLObject.read(b) + + msg_id = Int.read(b) + + return InputMediaAreaChannelPost(coordinates=coordinates, channel=channel, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(self.channel.write()) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_area_venue.py b/pyrogram/raw/types/input_media_area_venue.py new file mode 100644 index 00000000..1bccc0c2 --- /dev/null +++ b/pyrogram/raw/types/input_media_area_venue.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaAreaVenue(TLObject): # type: ignore + """Represents a location tag attached to a story, with additional venue information. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``B282217F`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + The size and location of the media area corresponding to the location sticker on top of the story media. + + query_id (``int`` ``64-bit``): + The query_id from messages.botResults, see here » for more info. + + result_id (``str``): + The id of the chosen result, see here » for more info. + + """ + + __slots__: List[str] = ["coordinates", "query_id", "result_id"] + + ID = 0xb282217f + QUALNAME = "types.InputMediaAreaVenue" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", query_id: int, result_id: str) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.query_id = query_id # long + self.result_id = result_id # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaAreaVenue": + # No flags + + coordinates = TLObject.read(b) + + query_id = Long.read(b) + + result_id = String.read(b) + + return InputMediaAreaVenue(coordinates=coordinates, query_id=query_id, result_id=result_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(Long(self.query_id)) + + b.write(String(self.result_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_contact.py b/pyrogram/raw/types/input_media_contact.py new file mode 100644 index 00000000..140a6d91 --- /dev/null +++ b/pyrogram/raw/types/input_media_contact.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaContact(TLObject): # type: ignore + """Phone book contact + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``F8AB7DFB`` + + Parameters: + phone_number (``str``): + Phone number + + first_name (``str``): + Contact's first name + + last_name (``str``): + Contact's last name + + vcard (``str``): + Contact vcard + + """ + + __slots__: List[str] = ["phone_number", "first_name", "last_name", "vcard"] + + ID = 0xf8ab7dfb + QUALNAME = "types.InputMediaContact" + + def __init__(self, *, phone_number: str, first_name: str, last_name: str, vcard: str) -> None: + self.phone_number = phone_number # string + self.first_name = first_name # string + self.last_name = last_name # string + self.vcard = vcard # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaContact": + # No flags + + phone_number = String.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + vcard = String.read(b) + + return InputMediaContact(phone_number=phone_number, first_name=first_name, last_name=last_name, vcard=vcard) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + b.write(String(self.vcard)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_dice.py b/pyrogram/raw/types/input_media_dice.py new file mode 100644 index 00000000..83c76334 --- /dev/null +++ b/pyrogram/raw/types/input_media_dice.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaDice(TLObject): # type: ignore + """Send a dice-based animated sticker + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``E66FBF7B`` + + Parameters: + emoticon (``str``): + The emoji, for now , and are supported + + """ + + __slots__: List[str] = ["emoticon"] + + ID = 0xe66fbf7b + QUALNAME = "types.InputMediaDice" + + def __init__(self, *, emoticon: str) -> None: + self.emoticon = emoticon # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaDice": + # No flags + + emoticon = String.read(b) + + return InputMediaDice(emoticon=emoticon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.emoticon)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_document.py b/pyrogram/raw/types/input_media_document.py new file mode 100644 index 00000000..aef4a3c1 --- /dev/null +++ b/pyrogram/raw/types/input_media_document.py @@ -0,0 +1,99 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaDocument(TLObject): # type: ignore + """Forwarded document + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``A8763AB5`` + + Parameters: + id (:obj:`InputDocument `): + The document to be forwarded. + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + video_cover (:obj:`InputPhoto `, *optional*): + N/A + + video_timestamp (``int`` ``32-bit``, *optional*): + N/A + + ttl_seconds (``int`` ``32-bit``, *optional*): + Time to live of self-destructing document + + query (``str``, *optional*): + Text query or emoji that was used by the user to find this sticker or GIF: used to improve search result relevance. + + """ + + __slots__: List[str] = ["id", "spoiler", "video_cover", "video_timestamp", "ttl_seconds", "query"] + + ID = 0xa8763ab5 + QUALNAME = "types.InputMediaDocument" + + def __init__(self, *, id: "raw.base.InputDocument", spoiler: Optional[bool] = None, video_cover: "raw.base.InputPhoto" = None, video_timestamp: Optional[int] = None, ttl_seconds: Optional[int] = None, query: Optional[str] = None) -> None: + self.id = id # InputDocument + self.spoiler = spoiler # flags.2?true + self.video_cover = video_cover # flags.3?InputPhoto + self.video_timestamp = video_timestamp # flags.4?int + self.ttl_seconds = ttl_seconds # flags.0?int + self.query = query # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaDocument": + + flags = Int.read(b) + + spoiler = True if flags & (1 << 2) else False + id = TLObject.read(b) + + video_cover = TLObject.read(b) if flags & (1 << 3) else None + + video_timestamp = Int.read(b) if flags & (1 << 4) else None + ttl_seconds = Int.read(b) if flags & (1 << 0) else None + query = String.read(b) if flags & (1 << 1) else None + return InputMediaDocument(id=id, spoiler=spoiler, video_cover=video_cover, video_timestamp=video_timestamp, ttl_seconds=ttl_seconds, query=query) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.spoiler else 0 + flags |= (1 << 3) if self.video_cover is not None else 0 + flags |= (1 << 4) if self.video_timestamp is not None else 0 + flags |= (1 << 0) if self.ttl_seconds is not None else 0 + flags |= (1 << 1) if self.query is not None else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + if self.video_cover is not None: + b.write(self.video_cover.write()) + + if self.video_timestamp is not None: + b.write(Int(self.video_timestamp)) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + if self.query is not None: + b.write(String(self.query)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_document_external.py b/pyrogram/raw/types/input_media_document_external.py new file mode 100644 index 00000000..6c3ef07d --- /dev/null +++ b/pyrogram/raw/types/input_media_document_external.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaDocumentExternal(TLObject): # type: ignore + """Document that will be downloaded by the telegram servers + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``779600F9`` + + Parameters: + url (``str``): + URL of the document + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + ttl_seconds (``int`` ``32-bit``, *optional*): + Self-destruct time to live of document + + video_cover (:obj:`InputPhoto `, *optional*): + N/A + + video_timestamp (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["url", "spoiler", "ttl_seconds", "video_cover", "video_timestamp"] + + ID = 0x779600f9 + QUALNAME = "types.InputMediaDocumentExternal" + + def __init__(self, *, url: str, spoiler: Optional[bool] = None, ttl_seconds: Optional[int] = None, video_cover: "raw.base.InputPhoto" = None, video_timestamp: Optional[int] = None) -> None: + self.url = url # string + self.spoiler = spoiler # flags.1?true + self.ttl_seconds = ttl_seconds # flags.0?int + self.video_cover = video_cover # flags.2?InputPhoto + self.video_timestamp = video_timestamp # flags.3?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaDocumentExternal": + + flags = Int.read(b) + + spoiler = True if flags & (1 << 1) else False + url = String.read(b) + + ttl_seconds = Int.read(b) if flags & (1 << 0) else None + video_cover = TLObject.read(b) if flags & (1 << 2) else None + + video_timestamp = Int.read(b) if flags & (1 << 3) else None + return InputMediaDocumentExternal(url=url, spoiler=spoiler, ttl_seconds=ttl_seconds, video_cover=video_cover, video_timestamp=video_timestamp) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.spoiler else 0 + flags |= (1 << 0) if self.ttl_seconds is not None else 0 + flags |= (1 << 2) if self.video_cover is not None else 0 + flags |= (1 << 3) if self.video_timestamp is not None else 0 + b.write(Int(flags)) + + b.write(String(self.url)) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + if self.video_cover is not None: + b.write(self.video_cover.write()) + + if self.video_timestamp is not None: + b.write(Int(self.video_timestamp)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_empty.py b/pyrogram/raw/types/input_media_empty.py new file mode 100644 index 00000000..e0cff54a --- /dev/null +++ b/pyrogram/raw/types/input_media_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaEmpty(TLObject): # type: ignore + """Empty media content of a message. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``9664F57F`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9664f57f + QUALNAME = "types.InputMediaEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaEmpty": + # No flags + + return InputMediaEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_game.py b/pyrogram/raw/types/input_media_game.py new file mode 100644 index 00000000..b4a10860 --- /dev/null +++ b/pyrogram/raw/types/input_media_game.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaGame(TLObject): # type: ignore + """A game + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``D33F43F3`` + + Parameters: + id (:obj:`InputGame `): + The game to forward + + """ + + __slots__: List[str] = ["id"] + + ID = 0xd33f43f3 + QUALNAME = "types.InputMediaGame" + + def __init__(self, *, id: "raw.base.InputGame") -> None: + self.id = id # InputGame + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaGame": + # No flags + + id = TLObject.read(b) + + return InputMediaGame(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_geo_live.py b/pyrogram/raw/types/input_media_geo_live.py new file mode 100644 index 00000000..9a9bef13 --- /dev/null +++ b/pyrogram/raw/types/input_media_geo_live.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaGeoLive(TLObject): # type: ignore + """Live geolocation + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``971FA843`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + Current geolocation + + stopped (``bool``, *optional*): + Whether sending of the geolocation was stopped + + heading (``int`` ``32-bit``, *optional*): + For live locations, a direction in which the location moves, in degrees; 1-360. + + period (``int`` ``32-bit``, *optional*): + Validity period of the current location + + proximity_notification_radius (``int`` ``32-bit``, *optional*): + For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000) + + """ + + __slots__: List[str] = ["geo_point", "stopped", "heading", "period", "proximity_notification_radius"] + + ID = 0x971fa843 + QUALNAME = "types.InputMediaGeoLive" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint", stopped: Optional[bool] = None, heading: Optional[int] = None, period: Optional[int] = None, proximity_notification_radius: Optional[int] = None) -> None: + self.geo_point = geo_point # InputGeoPoint + self.stopped = stopped # flags.0?true + self.heading = heading # flags.2?int + self.period = period # flags.1?int + self.proximity_notification_radius = proximity_notification_radius # flags.3?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaGeoLive": + + flags = Int.read(b) + + stopped = True if flags & (1 << 0) else False + geo_point = TLObject.read(b) + + heading = Int.read(b) if flags & (1 << 2) else None + period = Int.read(b) if flags & (1 << 1) else None + proximity_notification_radius = Int.read(b) if flags & (1 << 3) else None + return InputMediaGeoLive(geo_point=geo_point, stopped=stopped, heading=heading, period=period, proximity_notification_radius=proximity_notification_radius) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.stopped else 0 + flags |= (1 << 2) if self.heading is not None else 0 + flags |= (1 << 1) if self.period is not None else 0 + flags |= (1 << 3) if self.proximity_notification_radius is not None else 0 + b.write(Int(flags)) + + b.write(self.geo_point.write()) + + if self.heading is not None: + b.write(Int(self.heading)) + + if self.period is not None: + b.write(Int(self.period)) + + if self.proximity_notification_radius is not None: + b.write(Int(self.proximity_notification_radius)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_geo_point.py b/pyrogram/raw/types/input_media_geo_point.py new file mode 100644 index 00000000..cffa0c1a --- /dev/null +++ b/pyrogram/raw/types/input_media_geo_point.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaGeoPoint(TLObject): # type: ignore + """Map. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``F9C44144`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + GeoPoint + + """ + + __slots__: List[str] = ["geo_point"] + + ID = 0xf9c44144 + QUALNAME = "types.InputMediaGeoPoint" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint") -> None: + self.geo_point = geo_point # InputGeoPoint + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaGeoPoint": + # No flags + + geo_point = TLObject.read(b) + + return InputMediaGeoPoint(geo_point=geo_point) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo_point.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_invoice.py b/pyrogram/raw/types/input_media_invoice.py new file mode 100644 index 00000000..26e06fc8 --- /dev/null +++ b/pyrogram/raw/types/input_media_invoice.py @@ -0,0 +1,126 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaInvoice(TLObject): # type: ignore + """Generated invoice of a bot payment + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``405FEF0D`` + + Parameters: + title (``str``): + Product name, 1-32 characters + + description (``str``): + Product description, 1-255 characters + + invoice (:obj:`Invoice `): + The actual invoice + + payload (``bytes``): + Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes. + + provider_data (:obj:`DataJSON `): + JSON-encoded data about the invoice, which will be shared with the payment provider. A detailed description of required fields should be provided by the payment provider. + + photo (:obj:`InputWebDocument `, *optional*): + URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + + provider (``str``, *optional*): + Payments provider token, obtained via Botfather + + start_param (``str``, *optional*): + Unique bot deep links start parameter. If present, forwarded copies of the sent message will have a URL button with a deep link to the bot (instead of a Pay button), with the value used as the start parameter. If absent, forwarded copies of the sent message will have a Pay button, allowing multiple users to pay directly from the forwarded message, using the same invoice. + + extended_media (:obj:`InputMedia `, *optional*): + Extended media + + """ + + __slots__: List[str] = ["title", "description", "invoice", "payload", "provider_data", "photo", "provider", "start_param", "extended_media"] + + ID = 0x405fef0d + QUALNAME = "types.InputMediaInvoice" + + def __init__(self, *, title: str, description: str, invoice: "raw.base.Invoice", payload: bytes, provider_data: "raw.base.DataJSON", photo: "raw.base.InputWebDocument" = None, provider: Optional[str] = None, start_param: Optional[str] = None, extended_media: "raw.base.InputMedia" = None) -> None: + self.title = title # string + self.description = description # string + self.invoice = invoice # Invoice + self.payload = payload # bytes + self.provider_data = provider_data # DataJSON + self.photo = photo # flags.0?InputWebDocument + self.provider = provider # flags.3?string + self.start_param = start_param # flags.1?string + self.extended_media = extended_media # flags.2?InputMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaInvoice": + + flags = Int.read(b) + + title = String.read(b) + + description = String.read(b) + + photo = TLObject.read(b) if flags & (1 << 0) else None + + invoice = TLObject.read(b) + + payload = Bytes.read(b) + + provider = String.read(b) if flags & (1 << 3) else None + provider_data = TLObject.read(b) + + start_param = String.read(b) if flags & (1 << 1) else None + extended_media = TLObject.read(b) if flags & (1 << 2) else None + + return InputMediaInvoice(title=title, description=description, invoice=invoice, payload=payload, provider_data=provider_data, photo=photo, provider=provider, start_param=start_param, extended_media=extended_media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.photo is not None else 0 + flags |= (1 << 3) if self.provider is not None else 0 + flags |= (1 << 1) if self.start_param is not None else 0 + flags |= (1 << 2) if self.extended_media is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + if self.photo is not None: + b.write(self.photo.write()) + + b.write(self.invoice.write()) + + b.write(Bytes(self.payload)) + + if self.provider is not None: + b.write(String(self.provider)) + + b.write(self.provider_data.write()) + + if self.start_param is not None: + b.write(String(self.start_param)) + + if self.extended_media is not None: + b.write(self.extended_media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_paid_media.py b/pyrogram/raw/types/input_media_paid_media.py new file mode 100644 index 00000000..c665ab43 --- /dev/null +++ b/pyrogram/raw/types/input_media_paid_media.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaPaidMedia(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``C4103386`` + + Parameters: + stars_amount (``int`` ``64-bit``): + N/A + + extended_media (List of :obj:`InputMedia `): + N/A + + payload (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars_amount", "extended_media", "payload"] + + ID = 0xc4103386 + QUALNAME = "types.InputMediaPaidMedia" + + def __init__(self, *, stars_amount: int, extended_media: List["raw.base.InputMedia"], payload: Optional[str] = None) -> None: + self.stars_amount = stars_amount # long + self.extended_media = extended_media # Vector + self.payload = payload # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaPaidMedia": + + flags = Int.read(b) + + stars_amount = Long.read(b) + + extended_media = TLObject.read(b) + + payload = String.read(b) if flags & (1 << 0) else None + return InputMediaPaidMedia(stars_amount=stars_amount, extended_media=extended_media, payload=payload) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.payload is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.stars_amount)) + + b.write(Vector(self.extended_media)) + + if self.payload is not None: + b.write(String(self.payload)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_photo.py b/pyrogram/raw/types/input_media_photo.py new file mode 100644 index 00000000..18a203d8 --- /dev/null +++ b/pyrogram/raw/types/input_media_photo.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaPhoto(TLObject): # type: ignore + """Forwarded photo + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``B3BA0635`` + + Parameters: + id (:obj:`InputPhoto `): + Photo to be forwarded + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + ttl_seconds (``int`` ``32-bit``, *optional*): + Time to live in seconds of self-destructing photo + + """ + + __slots__: List[str] = ["id", "spoiler", "ttl_seconds"] + + ID = 0xb3ba0635 + QUALNAME = "types.InputMediaPhoto" + + def __init__(self, *, id: "raw.base.InputPhoto", spoiler: Optional[bool] = None, ttl_seconds: Optional[int] = None) -> None: + self.id = id # InputPhoto + self.spoiler = spoiler # flags.1?true + self.ttl_seconds = ttl_seconds # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaPhoto": + + flags = Int.read(b) + + spoiler = True if flags & (1 << 1) else False + id = TLObject.read(b) + + ttl_seconds = Int.read(b) if flags & (1 << 0) else None + return InputMediaPhoto(id=id, spoiler=spoiler, ttl_seconds=ttl_seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.spoiler else 0 + flags |= (1 << 0) if self.ttl_seconds is not None else 0 + b.write(Int(flags)) + + b.write(self.id.write()) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_photo_external.py b/pyrogram/raw/types/input_media_photo_external.py new file mode 100644 index 00000000..9dd4d0f4 --- /dev/null +++ b/pyrogram/raw/types/input_media_photo_external.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaPhotoExternal(TLObject): # type: ignore + """New photo that will be uploaded by the server using the specified URL + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``E5BBFE1A`` + + Parameters: + url (``str``): + URL of the photo + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + ttl_seconds (``int`` ``32-bit``, *optional*): + Self-destruct time to live of photo + + """ + + __slots__: List[str] = ["url", "spoiler", "ttl_seconds"] + + ID = 0xe5bbfe1a + QUALNAME = "types.InputMediaPhotoExternal" + + def __init__(self, *, url: str, spoiler: Optional[bool] = None, ttl_seconds: Optional[int] = None) -> None: + self.url = url # string + self.spoiler = spoiler # flags.1?true + self.ttl_seconds = ttl_seconds # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaPhotoExternal": + + flags = Int.read(b) + + spoiler = True if flags & (1 << 1) else False + url = String.read(b) + + ttl_seconds = Int.read(b) if flags & (1 << 0) else None + return InputMediaPhotoExternal(url=url, spoiler=spoiler, ttl_seconds=ttl_seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.spoiler else 0 + flags |= (1 << 0) if self.ttl_seconds is not None else 0 + b.write(Int(flags)) + + b.write(String(self.url)) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_poll.py b/pyrogram/raw/types/input_media_poll.py new file mode 100644 index 00000000..598dd54f --- /dev/null +++ b/pyrogram/raw/types/input_media_poll.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaPoll(TLObject): # type: ignore + """A poll + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``F94E5F1`` + + Parameters: + poll (:obj:`Poll `): + The poll to send + + correct_answers (List of ``bytes``, *optional*): + Correct answer IDs (for quiz polls) + + solution (``str``, *optional*): + Explanation of quiz solution + + solution_entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + """ + + __slots__: List[str] = ["poll", "correct_answers", "solution", "solution_entities"] + + ID = 0xf94e5f1 + QUALNAME = "types.InputMediaPoll" + + def __init__(self, *, poll: "raw.base.Poll", correct_answers: Optional[List[bytes]] = None, solution: Optional[str] = None, solution_entities: Optional[List["raw.base.MessageEntity"]] = None) -> None: + self.poll = poll # Poll + self.correct_answers = correct_answers # flags.0?Vector + self.solution = solution # flags.1?string + self.solution_entities = solution_entities # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaPoll": + + flags = Int.read(b) + + poll = TLObject.read(b) + + correct_answers = TLObject.read(b, Bytes) if flags & (1 << 0) else [] + + solution = String.read(b) if flags & (1 << 1) else None + solution_entities = TLObject.read(b) if flags & (1 << 1) else [] + + return InputMediaPoll(poll=poll, correct_answers=correct_answers, solution=solution, solution_entities=solution_entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.correct_answers else 0 + flags |= (1 << 1) if self.solution is not None else 0 + flags |= (1 << 1) if self.solution_entities else 0 + b.write(Int(flags)) + + b.write(self.poll.write()) + + if self.correct_answers is not None: + b.write(Vector(self.correct_answers, Bytes)) + + if self.solution is not None: + b.write(String(self.solution)) + + if self.solution_entities is not None: + b.write(Vector(self.solution_entities)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_stake_dice.py b/pyrogram/raw/types/input_media_stake_dice.py new file mode 100644 index 00000000..05158861 --- /dev/null +++ b/pyrogram/raw/types/input_media_stake_dice.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaStakeDice(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``F3A9244A`` + + Parameters: + game_hash (``str``): + N/A + + ton_amount (``int`` ``64-bit``): + N/A + + client_seed (``bytes``): + N/A + + """ + + __slots__: List[str] = ["game_hash", "ton_amount", "client_seed"] + + ID = 0xf3a9244a + QUALNAME = "types.InputMediaStakeDice" + + def __init__(self, *, game_hash: str, ton_amount: int, client_seed: bytes) -> None: + self.game_hash = game_hash # string + self.ton_amount = ton_amount # long + self.client_seed = client_seed # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaStakeDice": + # No flags + + game_hash = String.read(b) + + ton_amount = Long.read(b) + + client_seed = Bytes.read(b) + + return InputMediaStakeDice(game_hash=game_hash, ton_amount=ton_amount, client_seed=client_seed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.game_hash)) + + b.write(Long(self.ton_amount)) + + b.write(Bytes(self.client_seed)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_story.py b/pyrogram/raw/types/input_media_story.py new file mode 100644 index 00000000..4328086f --- /dev/null +++ b/pyrogram/raw/types/input_media_story.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaStory(TLObject): # type: ignore + """Forwarded story + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``89FDD778`` + + Parameters: + peer (:obj:`InputPeer `): + Peer where the story was posted + + id (``int`` ``32-bit``): + Story ID + + """ + + __slots__: List[str] = ["peer", "id"] + + ID = 0x89fdd778 + QUALNAME = "types.InputMediaStory" + + def __init__(self, *, peer: "raw.base.InputPeer", id: int) -> None: + self.peer = peer # InputPeer + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaStory": + # No flags + + peer = TLObject.read(b) + + id = Int.read(b) + + return InputMediaStory(peer=peer, id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_todo.py b/pyrogram/raw/types/input_media_todo.py new file mode 100644 index 00000000..15d333ef --- /dev/null +++ b/pyrogram/raw/types/input_media_todo.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaTodo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``9FC55FDE`` + + Parameters: + todo (:obj:`TodoList `): + N/A + + """ + + __slots__: List[str] = ["todo"] + + ID = 0x9fc55fde + QUALNAME = "types.InputMediaTodo" + + def __init__(self, *, todo: "raw.base.TodoList") -> None: + self.todo = todo # TodoList + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaTodo": + # No flags + + todo = TLObject.read(b) + + return InputMediaTodo(todo=todo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.todo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_uploaded_document.py b/pyrogram/raw/types/input_media_uploaded_document.py new file mode 100644 index 00000000..ce985454 --- /dev/null +++ b/pyrogram/raw/types/input_media_uploaded_document.py @@ -0,0 +1,138 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaUploadedDocument(TLObject): # type: ignore + """New document + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``37C9330`` + + Parameters: + file (:obj:`InputFile `): + The uploaded file + + mime_type (``str``): + MIME type of document + + attributes (List of :obj:`DocumentAttribute `): + Attributes that specify the type of the document (video, audio, voice, sticker, etc.) + + nosound_video (``bool``, *optional*): + Whether the specified document is a video file with no audio tracks (a GIF animation (even as MPEG4), for example) + + force_file (``bool``, *optional*): + Force the media file to be uploaded as document + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + thumb (:obj:`InputFile `, *optional*): + Thumbnail of the document, uploaded as for the file + + stickers (List of :obj:`InputDocument `, *optional*): + Attached stickers + + video_cover (:obj:`InputPhoto `, *optional*): + N/A + + video_timestamp (``int`` ``32-bit``, *optional*): + N/A + + ttl_seconds (``int`` ``32-bit``, *optional*): + Time to live in seconds of self-destructing document + + """ + + __slots__: List[str] = ["file", "mime_type", "attributes", "nosound_video", "force_file", "spoiler", "thumb", "stickers", "video_cover", "video_timestamp", "ttl_seconds"] + + ID = 0x37c9330 + QUALNAME = "types.InputMediaUploadedDocument" + + def __init__(self, *, file: "raw.base.InputFile", mime_type: str, attributes: List["raw.base.DocumentAttribute"], nosound_video: Optional[bool] = None, force_file: Optional[bool] = None, spoiler: Optional[bool] = None, thumb: "raw.base.InputFile" = None, stickers: Optional[List["raw.base.InputDocument"]] = None, video_cover: "raw.base.InputPhoto" = None, video_timestamp: Optional[int] = None, ttl_seconds: Optional[int] = None) -> None: + self.file = file # InputFile + self.mime_type = mime_type # string + self.attributes = attributes # Vector + self.nosound_video = nosound_video # flags.3?true + self.force_file = force_file # flags.4?true + self.spoiler = spoiler # flags.5?true + self.thumb = thumb # flags.2?InputFile + self.stickers = stickers # flags.0?Vector + self.video_cover = video_cover # flags.6?InputPhoto + self.video_timestamp = video_timestamp # flags.7?int + self.ttl_seconds = ttl_seconds # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaUploadedDocument": + + flags = Int.read(b) + + nosound_video = True if flags & (1 << 3) else False + force_file = True if flags & (1 << 4) else False + spoiler = True if flags & (1 << 5) else False + file = TLObject.read(b) + + thumb = TLObject.read(b) if flags & (1 << 2) else None + + mime_type = String.read(b) + + attributes = TLObject.read(b) + + stickers = TLObject.read(b) if flags & (1 << 0) else [] + + video_cover = TLObject.read(b) if flags & (1 << 6) else None + + video_timestamp = Int.read(b) if flags & (1 << 7) else None + ttl_seconds = Int.read(b) if flags & (1 << 1) else None + return InputMediaUploadedDocument(file=file, mime_type=mime_type, attributes=attributes, nosound_video=nosound_video, force_file=force_file, spoiler=spoiler, thumb=thumb, stickers=stickers, video_cover=video_cover, video_timestamp=video_timestamp, ttl_seconds=ttl_seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.nosound_video else 0 + flags |= (1 << 4) if self.force_file else 0 + flags |= (1 << 5) if self.spoiler else 0 + flags |= (1 << 2) if self.thumb is not None else 0 + flags |= (1 << 0) if self.stickers else 0 + flags |= (1 << 6) if self.video_cover is not None else 0 + flags |= (1 << 7) if self.video_timestamp is not None else 0 + flags |= (1 << 1) if self.ttl_seconds is not None else 0 + b.write(Int(flags)) + + b.write(self.file.write()) + + if self.thumb is not None: + b.write(self.thumb.write()) + + b.write(String(self.mime_type)) + + b.write(Vector(self.attributes)) + + if self.stickers is not None: + b.write(Vector(self.stickers)) + + if self.video_cover is not None: + b.write(self.video_cover.write()) + + if self.video_timestamp is not None: + b.write(Int(self.video_timestamp)) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_uploaded_photo.py b/pyrogram/raw/types/input_media_uploaded_photo.py new file mode 100644 index 00000000..6a119655 --- /dev/null +++ b/pyrogram/raw/types/input_media_uploaded_photo.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaUploadedPhoto(TLObject): # type: ignore + """Photo + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``1E287D04`` + + Parameters: + file (:obj:`InputFile `): + The uploaded file + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + stickers (List of :obj:`InputDocument `, *optional*): + Attached mask stickers + + ttl_seconds (``int`` ``32-bit``, *optional*): + Time to live in seconds of self-destructing photo + + """ + + __slots__: List[str] = ["file", "spoiler", "stickers", "ttl_seconds"] + + ID = 0x1e287d04 + QUALNAME = "types.InputMediaUploadedPhoto" + + def __init__(self, *, file: "raw.base.InputFile", spoiler: Optional[bool] = None, stickers: Optional[List["raw.base.InputDocument"]] = None, ttl_seconds: Optional[int] = None) -> None: + self.file = file # InputFile + self.spoiler = spoiler # flags.2?true + self.stickers = stickers # flags.0?Vector + self.ttl_seconds = ttl_seconds # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaUploadedPhoto": + + flags = Int.read(b) + + spoiler = True if flags & (1 << 2) else False + file = TLObject.read(b) + + stickers = TLObject.read(b) if flags & (1 << 0) else [] + + ttl_seconds = Int.read(b) if flags & (1 << 1) else None + return InputMediaUploadedPhoto(file=file, spoiler=spoiler, stickers=stickers, ttl_seconds=ttl_seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.spoiler else 0 + flags |= (1 << 0) if self.stickers else 0 + flags |= (1 << 1) if self.ttl_seconds is not None else 0 + b.write(Int(flags)) + + b.write(self.file.write()) + + if self.stickers is not None: + b.write(Vector(self.stickers)) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_venue.py b/pyrogram/raw/types/input_media_venue.py new file mode 100644 index 00000000..7d3e6ac2 --- /dev/null +++ b/pyrogram/raw/types/input_media_venue.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaVenue(TLObject): # type: ignore + """Can be used to send a venue geolocation. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``C13D1C11`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + Geolocation + + title (``str``): + Venue name + + address (``str``): + Physical address of the venue + + provider (``str``): + Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported + + venue_id (``str``): + Venue ID in the provider's database + + venue_type (``str``): + Venue type in the provider's database + + """ + + __slots__: List[str] = ["geo_point", "title", "address", "provider", "venue_id", "venue_type"] + + ID = 0xc13d1c11 + QUALNAME = "types.InputMediaVenue" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint", title: str, address: str, provider: str, venue_id: str, venue_type: str) -> None: + self.geo_point = geo_point # InputGeoPoint + self.title = title # string + self.address = address # string + self.provider = provider # string + self.venue_id = venue_id # string + self.venue_type = venue_type # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaVenue": + # No flags + + geo_point = TLObject.read(b) + + title = String.read(b) + + address = String.read(b) + + provider = String.read(b) + + venue_id = String.read(b) + + venue_type = String.read(b) + + return InputMediaVenue(geo_point=geo_point, title=title, address=address, provider=provider, venue_id=venue_id, venue_type=venue_type) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo_point.write()) + + b.write(String(self.title)) + + b.write(String(self.address)) + + b.write(String(self.provider)) + + b.write(String(self.venue_id)) + + b.write(String(self.venue_type)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_media_web_page.py b/pyrogram/raw/types/input_media_web_page.py new file mode 100644 index 00000000..fdb010c6 --- /dev/null +++ b/pyrogram/raw/types/input_media_web_page.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMediaWebPage(TLObject): # type: ignore + """Specifies options that will be used to generate the link preview for the caption, or even a standalone link preview without an attached message. + + Constructor of :obj:`~pyrogram.raw.base.InputMedia`. + + Details: + - Layer: ``224`` + - ID: ``C21B8849`` + + Parameters: + url (``str``): + The URL to use for the link preview. + + force_large_media (``bool``, *optional*): + If set, specifies that a large media preview should be used. + + force_small_media (``bool``, *optional*): + If set, specifies that a small media preview should be used. + + optional (``bool``, *optional*): + If not set, a WEBPAGE_NOT_FOUND RPC error will be emitted if a webpage preview cannot be generated for the specified url; otherwise, no error will be emitted (unless the provided message is also empty, in which case a MESSAGE_EMPTY will be emitted, instead). + + """ + + __slots__: List[str] = ["url", "force_large_media", "force_small_media", "optional"] + + ID = 0xc21b8849 + QUALNAME = "types.InputMediaWebPage" + + def __init__(self, *, url: str, force_large_media: Optional[bool] = None, force_small_media: Optional[bool] = None, optional: Optional[bool] = None) -> None: + self.url = url # string + self.force_large_media = force_large_media # flags.0?true + self.force_small_media = force_small_media # flags.1?true + self.optional = optional # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMediaWebPage": + + flags = Int.read(b) + + force_large_media = True if flags & (1 << 0) else False + force_small_media = True if flags & (1 << 1) else False + optional = True if flags & (1 << 2) else False + url = String.read(b) + + return InputMediaWebPage(url=url, force_large_media=force_large_media, force_small_media=force_small_media, optional=optional) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.force_large_media else 0 + flags |= (1 << 1) if self.force_small_media else 0 + flags |= (1 << 2) if self.optional else 0 + b.write(Int(flags)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_message_callback_query.py b/pyrogram/raw/types/input_message_callback_query.py new file mode 100644 index 00000000..bea41739 --- /dev/null +++ b/pyrogram/raw/types/input_message_callback_query.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessageCallbackQuery(TLObject): # type: ignore + """Used by bots for fetching information about the message that originated a callback query + + Constructor of :obj:`~pyrogram.raw.base.InputMessage`. + + Details: + - Layer: ``224`` + - ID: ``ACFA1A7E`` + + Parameters: + id (``int`` ``32-bit``): + Message ID + + query_id (``int`` ``64-bit``): + Callback query ID + + """ + + __slots__: List[str] = ["id", "query_id"] + + ID = 0xacfa1a7e + QUALNAME = "types.InputMessageCallbackQuery" + + def __init__(self, *, id: int, query_id: int) -> None: + self.id = id # int + self.query_id = query_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessageCallbackQuery": + # No flags + + id = Int.read(b) + + query_id = Long.read(b) + + return InputMessageCallbackQuery(id=id, query_id=query_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + b.write(Long(self.query_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_message_entity_mention_name.py b/pyrogram/raw/types/input_message_entity_mention_name.py new file mode 100644 index 00000000..8dede52c --- /dev/null +++ b/pyrogram/raw/types/input_message_entity_mention_name.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessageEntityMentionName(TLObject): # type: ignore + """Message entity that can be used to create a user user mention: received mentions use the messageEntityMentionName constructor, instead. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``208E68C9`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + user_id (:obj:`InputUser `): + Identifier of the user that was mentioned + + """ + + __slots__: List[str] = ["offset", "length", "user_id"] + + ID = 0x208e68c9 + QUALNAME = "types.InputMessageEntityMentionName" + + def __init__(self, *, offset: int, length: int, user_id: "raw.base.InputUser") -> None: + self.offset = offset # int + self.length = length # int + self.user_id = user_id # InputUser + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessageEntityMentionName": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + user_id = TLObject.read(b) + + return InputMessageEntityMentionName(offset=offset, length=length, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + b.write(self.user_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_message_id.py b/pyrogram/raw/types/input_message_id.py new file mode 100644 index 00000000..060feb60 --- /dev/null +++ b/pyrogram/raw/types/input_message_id.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessageID(TLObject): # type: ignore + """Message by ID + + Constructor of :obj:`~pyrogram.raw.base.InputMessage`. + + Details: + - Layer: ``224`` + - ID: ``A676A322`` + + Parameters: + id (``int`` ``32-bit``): + Message ID + + """ + + __slots__: List[str] = ["id"] + + ID = 0xa676a322 + QUALNAME = "types.InputMessageID" + + def __init__(self, *, id: int) -> None: + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessageID": + # No flags + + id = Int.read(b) + + return InputMessageID(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_message_pinned.py b/pyrogram/raw/types/input_message_pinned.py new file mode 100644 index 00000000..28e42182 --- /dev/null +++ b/pyrogram/raw/types/input_message_pinned.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagePinned(TLObject): # type: ignore + """Pinned message + + Constructor of :obj:`~pyrogram.raw.base.InputMessage`. + + Details: + - Layer: ``224`` + - ID: ``86872538`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x86872538 + QUALNAME = "types.InputMessagePinned" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagePinned": + # No flags + + return InputMessagePinned() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_message_reply_to.py b/pyrogram/raw/types/input_message_reply_to.py new file mode 100644 index 00000000..9fed667e --- /dev/null +++ b/pyrogram/raw/types/input_message_reply_to.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessageReplyTo(TLObject): # type: ignore + """Message to which the specified message replies to + + Constructor of :obj:`~pyrogram.raw.base.InputMessage`. + + Details: + - Layer: ``224`` + - ID: ``BAD88395`` + + Parameters: + id (``int`` ``32-bit``): + ID of the message that replies to the message we need + + """ + + __slots__: List[str] = ["id"] + + ID = 0xbad88395 + QUALNAME = "types.InputMessageReplyTo" + + def __init__(self, *, id: int) -> None: + self.id = id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessageReplyTo": + # No flags + + id = Int.read(b) + + return InputMessageReplyTo(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_chat_photos.py b/pyrogram/raw/types/input_messages_filter_chat_photos.py new file mode 100644 index 00000000..e85003d0 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_chat_photos.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterChatPhotos(TLObject): # type: ignore + """Return only chat photo changes + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``3A20ECB8`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3a20ecb8 + QUALNAME = "types.InputMessagesFilterChatPhotos" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterChatPhotos": + # No flags + + return InputMessagesFilterChatPhotos() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_contacts.py b/pyrogram/raw/types/input_messages_filter_contacts.py new file mode 100644 index 00000000..3d156030 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_contacts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterContacts(TLObject): # type: ignore + """Return only messages containing contacts + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``E062DB83`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xe062db83 + QUALNAME = "types.InputMessagesFilterContacts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterContacts": + # No flags + + return InputMessagesFilterContacts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_document.py b/pyrogram/raw/types/input_messages_filter_document.py new file mode 100644 index 00000000..8cbaadb9 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_document.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterDocument(TLObject): # type: ignore + """Filter for messages containing documents. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``9EDDF188`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9eddf188 + QUALNAME = "types.InputMessagesFilterDocument" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterDocument": + # No flags + + return InputMessagesFilterDocument() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_empty.py b/pyrogram/raw/types/input_messages_filter_empty.py new file mode 100644 index 00000000..910d44bd --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterEmpty(TLObject): # type: ignore + """Filter is absent. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``57E2F66C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x57e2f66c + QUALNAME = "types.InputMessagesFilterEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterEmpty": + # No flags + + return InputMessagesFilterEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_geo.py b/pyrogram/raw/types/input_messages_filter_geo.py new file mode 100644 index 00000000..b25e8285 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_geo.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterGeo(TLObject): # type: ignore + """Return only messages containing geolocations + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``E7026D0D`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xe7026d0d + QUALNAME = "types.InputMessagesFilterGeo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterGeo": + # No flags + + return InputMessagesFilterGeo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_gif.py b/pyrogram/raw/types/input_messages_filter_gif.py new file mode 100644 index 00000000..6cc42c39 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_gif.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterGif(TLObject): # type: ignore + """Return only messages containing gifs + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``FFC86587`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xffc86587 + QUALNAME = "types.InputMessagesFilterGif" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterGif": + # No flags + + return InputMessagesFilterGif() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_music.py b/pyrogram/raw/types/input_messages_filter_music.py new file mode 100644 index 00000000..adcf4f94 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_music.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterMusic(TLObject): # type: ignore + """Return only messages containing audio files + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``3751B49E`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3751b49e + QUALNAME = "types.InputMessagesFilterMusic" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterMusic": + # No flags + + return InputMessagesFilterMusic() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_my_mentions.py b/pyrogram/raw/types/input_messages_filter_my_mentions.py new file mode 100644 index 00000000..0882a5cb --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_my_mentions.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterMyMentions(TLObject): # type: ignore + """Return only messages where the current user was mentioned. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``C1F8E69A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc1f8e69a + QUALNAME = "types.InputMessagesFilterMyMentions" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterMyMentions": + # No flags + + return InputMessagesFilterMyMentions() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_phone_calls.py b/pyrogram/raw/types/input_messages_filter_phone_calls.py new file mode 100644 index 00000000..9d7c3370 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_phone_calls.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterPhoneCalls(TLObject): # type: ignore + """Return only phone calls + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``80C99768`` + + Parameters: + missed (``bool``, *optional*): + Return only missed phone calls + + """ + + __slots__: List[str] = ["missed"] + + ID = 0x80c99768 + QUALNAME = "types.InputMessagesFilterPhoneCalls" + + def __init__(self, *, missed: Optional[bool] = None) -> None: + self.missed = missed # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterPhoneCalls": + + flags = Int.read(b) + + missed = True if flags & (1 << 0) else False + return InputMessagesFilterPhoneCalls(missed=missed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.missed else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_photo_video.py b/pyrogram/raw/types/input_messages_filter_photo_video.py new file mode 100644 index 00000000..1bfbd8ed --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_photo_video.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterPhotoVideo(TLObject): # type: ignore + """Filter for messages containing photos or videos. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``56E9F0E4`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x56e9f0e4 + QUALNAME = "types.InputMessagesFilterPhotoVideo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterPhotoVideo": + # No flags + + return InputMessagesFilterPhotoVideo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_photo_video_documents.py b/pyrogram/raw/types/input_messages_filter_photo_video_documents.py new file mode 100644 index 00000000..30349949 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_photo_video_documents.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterPhotoVideoDocuments(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``D95E73BB`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd95e73bb + QUALNAME = "types.InputMessagesFilterPhotoVideoDocuments" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterPhotoVideoDocuments": + # No flags + + return InputMessagesFilterPhotoVideoDocuments() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_photos.py b/pyrogram/raw/types/input_messages_filter_photos.py new file mode 100644 index 00000000..111a6bc3 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_photos.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterPhotos(TLObject): # type: ignore + """Filter for messages containing photos. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``9609A51C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9609a51c + QUALNAME = "types.InputMessagesFilterPhotos" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterPhotos": + # No flags + + return InputMessagesFilterPhotos() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_pinned.py b/pyrogram/raw/types/input_messages_filter_pinned.py new file mode 100644 index 00000000..2de22530 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_pinned.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterPinned(TLObject): # type: ignore + """Fetch only pinned messages + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``1BB00451`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1bb00451 + QUALNAME = "types.InputMessagesFilterPinned" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterPinned": + # No flags + + return InputMessagesFilterPinned() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_round_video.py b/pyrogram/raw/types/input_messages_filter_round_video.py new file mode 100644 index 00000000..b093e2aa --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_round_video.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterRoundVideo(TLObject): # type: ignore + """Return only round videos + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``B549DA53`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb549da53 + QUALNAME = "types.InputMessagesFilterRoundVideo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterRoundVideo": + # No flags + + return InputMessagesFilterRoundVideo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_round_voice.py b/pyrogram/raw/types/input_messages_filter_round_voice.py new file mode 100644 index 00000000..5c227c19 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_round_voice.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterRoundVoice(TLObject): # type: ignore + """Return only round videos and voice notes + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``7A7C17A4`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x7a7c17a4 + QUALNAME = "types.InputMessagesFilterRoundVoice" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterRoundVoice": + # No flags + + return InputMessagesFilterRoundVoice() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_url.py b/pyrogram/raw/types/input_messages_filter_url.py new file mode 100644 index 00000000..11eb5c1e --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_url.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterUrl(TLObject): # type: ignore + """Return only messages containing URLs + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``7EF0DD87`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x7ef0dd87 + QUALNAME = "types.InputMessagesFilterUrl" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterUrl": + # No flags + + return InputMessagesFilterUrl() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_video.py b/pyrogram/raw/types/input_messages_filter_video.py new file mode 100644 index 00000000..3ee1fd67 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_video.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterVideo(TLObject): # type: ignore + """Filter for messages containing videos. + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``9FC00E65`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9fc00e65 + QUALNAME = "types.InputMessagesFilterVideo" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterVideo": + # No flags + + return InputMessagesFilterVideo() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_messages_filter_voice.py b/pyrogram/raw/types/input_messages_filter_voice.py new file mode 100644 index 00000000..7893c224 --- /dev/null +++ b/pyrogram/raw/types/input_messages_filter_voice.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputMessagesFilterVoice(TLObject): # type: ignore + """Return only messages containing voice notes + + Constructor of :obj:`~pyrogram.raw.base.MessagesFilter`. + + Details: + - Layer: ``224`` + - ID: ``50F5C392`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x50f5c392 + QUALNAME = "types.InputMessagesFilterVoice" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputMessagesFilterVoice": + # No flags + + return InputMessagesFilterVoice() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_notify_broadcasts.py b/pyrogram/raw/types/input_notify_broadcasts.py new file mode 100644 index 00000000..a1018eb7 --- /dev/null +++ b/pyrogram/raw/types/input_notify_broadcasts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputNotifyBroadcasts(TLObject): # type: ignore + """All channels + + Constructor of :obj:`~pyrogram.raw.base.InputNotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``B1DB7C7E`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb1db7c7e + QUALNAME = "types.InputNotifyBroadcasts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputNotifyBroadcasts": + # No flags + + return InputNotifyBroadcasts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_notify_chats.py b/pyrogram/raw/types/input_notify_chats.py new file mode 100644 index 00000000..b5c9eebe --- /dev/null +++ b/pyrogram/raw/types/input_notify_chats.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputNotifyChats(TLObject): # type: ignore + """Notifications generated by all groups. + + Constructor of :obj:`~pyrogram.raw.base.InputNotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``4A95E84E`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x4a95e84e + QUALNAME = "types.InputNotifyChats" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputNotifyChats": + # No flags + + return InputNotifyChats() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_notify_forum_topic.py b/pyrogram/raw/types/input_notify_forum_topic.py new file mode 100644 index 00000000..d2dfbf37 --- /dev/null +++ b/pyrogram/raw/types/input_notify_forum_topic.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputNotifyForumTopic(TLObject): # type: ignore + """Notifications generated by a topic in a forum. + + Constructor of :obj:`~pyrogram.raw.base.InputNotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``5C467992`` + + Parameters: + peer (:obj:`InputPeer `): + Forum ID + + top_msg_id (``int`` ``32-bit``): + Topic ID + + """ + + __slots__: List[str] = ["peer", "top_msg_id"] + + ID = 0x5c467992 + QUALNAME = "types.InputNotifyForumTopic" + + def __init__(self, *, peer: "raw.base.InputPeer", top_msg_id: int) -> None: + self.peer = peer # InputPeer + self.top_msg_id = top_msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputNotifyForumTopic": + # No flags + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) + + return InputNotifyForumTopic(peer=peer, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.top_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_notify_peer.py b/pyrogram/raw/types/input_notify_peer.py new file mode 100644 index 00000000..8b463564 --- /dev/null +++ b/pyrogram/raw/types/input_notify_peer.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputNotifyPeer(TLObject): # type: ignore + """Notifications generated by a certain user or group. + + Constructor of :obj:`~pyrogram.raw.base.InputNotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``B8BC5B0C`` + + Parameters: + peer (:obj:`InputPeer `): + User or group + + """ + + __slots__: List[str] = ["peer"] + + ID = 0xb8bc5b0c + QUALNAME = "types.InputNotifyPeer" + + def __init__(self, *, peer: "raw.base.InputPeer") -> None: + self.peer = peer # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputNotifyPeer": + # No flags + + peer = TLObject.read(b) + + return InputNotifyPeer(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_notify_users.py b/pyrogram/raw/types/input_notify_users.py new file mode 100644 index 00000000..2f71b3bd --- /dev/null +++ b/pyrogram/raw/types/input_notify_users.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputNotifyUsers(TLObject): # type: ignore + """Notifications generated by all users. + + Constructor of :obj:`~pyrogram.raw.base.InputNotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``193B4417`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x193b4417 + QUALNAME = "types.InputNotifyUsers" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputNotifyUsers": + # No flags + + return InputNotifyUsers() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_passkey_credential_firebase_pnv.py b/pyrogram/raw/types/input_passkey_credential_firebase_pnv.py new file mode 100644 index 00000000..3cc4d068 --- /dev/null +++ b/pyrogram/raw/types/input_passkey_credential_firebase_pnv.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPasskeyCredentialFirebasePNV(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPasskeyCredential`. + + Details: + - Layer: ``224`` + - ID: ``5B1CCB28`` + + Parameters: + pnv_token (``str``): + N/A + + """ + + __slots__: List[str] = ["pnv_token"] + + ID = 0x5b1ccb28 + QUALNAME = "types.InputPasskeyCredentialFirebasePNV" + + def __init__(self, *, pnv_token: str) -> None: + self.pnv_token = pnv_token # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPasskeyCredentialFirebasePNV": + # No flags + + pnv_token = String.read(b) + + return InputPasskeyCredentialFirebasePNV(pnv_token=pnv_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.pnv_token)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_passkey_credential_public_key.py b/pyrogram/raw/types/input_passkey_credential_public_key.py new file mode 100644 index 00000000..10e3b60c --- /dev/null +++ b/pyrogram/raw/types/input_passkey_credential_public_key.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPasskeyCredentialPublicKey(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPasskeyCredential`. + + Details: + - Layer: ``224`` + - ID: ``3C27B78F`` + + Parameters: + id (``str``): + N/A + + raw_id (``str``): + N/A + + response (:obj:`InputPasskeyResponse `): + N/A + + """ + + __slots__: List[str] = ["id", "raw_id", "response"] + + ID = 0x3c27b78f + QUALNAME = "types.InputPasskeyCredentialPublicKey" + + def __init__(self, *, id: str, raw_id: str, response: "raw.base.InputPasskeyResponse") -> None: + self.id = id # string + self.raw_id = raw_id # string + self.response = response # InputPasskeyResponse + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPasskeyCredentialPublicKey": + # No flags + + id = String.read(b) + + raw_id = String.read(b) + + response = TLObject.read(b) + + return InputPasskeyCredentialPublicKey(id=id, raw_id=raw_id, response=response) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.id)) + + b.write(String(self.raw_id)) + + b.write(self.response.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_passkey_response_login.py b/pyrogram/raw/types/input_passkey_response_login.py new file mode 100644 index 00000000..081b0869 --- /dev/null +++ b/pyrogram/raw/types/input_passkey_response_login.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPasskeyResponseLogin(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPasskeyResponse`. + + Details: + - Layer: ``224`` + - ID: ``C31FC14A`` + + Parameters: + client_data (:obj:`DataJSON `): + N/A + + authenticator_data (``bytes``): + N/A + + signature (``bytes``): + N/A + + user_handle (``str``): + N/A + + """ + + __slots__: List[str] = ["client_data", "authenticator_data", "signature", "user_handle"] + + ID = 0xc31fc14a + QUALNAME = "types.InputPasskeyResponseLogin" + + def __init__(self, *, client_data: "raw.base.DataJSON", authenticator_data: bytes, signature: bytes, user_handle: str) -> None: + self.client_data = client_data # DataJSON + self.authenticator_data = authenticator_data # bytes + self.signature = signature # bytes + self.user_handle = user_handle # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPasskeyResponseLogin": + # No flags + + client_data = TLObject.read(b) + + authenticator_data = Bytes.read(b) + + signature = Bytes.read(b) + + user_handle = String.read(b) + + return InputPasskeyResponseLogin(client_data=client_data, authenticator_data=authenticator_data, signature=signature, user_handle=user_handle) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.client_data.write()) + + b.write(Bytes(self.authenticator_data)) + + b.write(Bytes(self.signature)) + + b.write(String(self.user_handle)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_passkey_response_register.py b/pyrogram/raw/types/input_passkey_response_register.py new file mode 100644 index 00000000..7f21a979 --- /dev/null +++ b/pyrogram/raw/types/input_passkey_response_register.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPasskeyResponseRegister(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPasskeyResponse`. + + Details: + - Layer: ``224`` + - ID: ``3E63935C`` + + Parameters: + client_data (:obj:`DataJSON `): + N/A + + attestation_data (``bytes``): + N/A + + """ + + __slots__: List[str] = ["client_data", "attestation_data"] + + ID = 0x3e63935c + QUALNAME = "types.InputPasskeyResponseRegister" + + def __init__(self, *, client_data: "raw.base.DataJSON", attestation_data: bytes) -> None: + self.client_data = client_data # DataJSON + self.attestation_data = attestation_data # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPasskeyResponseRegister": + # No flags + + client_data = TLObject.read(b) + + attestation_data = Bytes.read(b) + + return InputPasskeyResponseRegister(client_data=client_data, attestation_data=attestation_data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.client_data.write()) + + b.write(Bytes(self.attestation_data)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_payment_credentials.py b/pyrogram/raw/types/input_payment_credentials.py new file mode 100644 index 00000000..a126e734 --- /dev/null +++ b/pyrogram/raw/types/input_payment_credentials.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPaymentCredentials(TLObject): # type: ignore + """Payment credentials + + Constructor of :obj:`~pyrogram.raw.base.InputPaymentCredentials`. + + Details: + - Layer: ``224`` + - ID: ``3417D728`` + + Parameters: + data (:obj:`DataJSON `): + Payment credentials + + save (``bool``, *optional*): + Save payment credential for future use + + """ + + __slots__: List[str] = ["data", "save"] + + ID = 0x3417d728 + QUALNAME = "types.InputPaymentCredentials" + + def __init__(self, *, data: "raw.base.DataJSON", save: Optional[bool] = None) -> None: + self.data = data # DataJSON + self.save = save # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPaymentCredentials": + + flags = Int.read(b) + + save = True if flags & (1 << 0) else False + data = TLObject.read(b) + + return InputPaymentCredentials(data=data, save=save) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.save else 0 + b.write(Int(flags)) + + b.write(self.data.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_payment_credentials_apple_pay.py b/pyrogram/raw/types/input_payment_credentials_apple_pay.py new file mode 100644 index 00000000..c865816c --- /dev/null +++ b/pyrogram/raw/types/input_payment_credentials_apple_pay.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPaymentCredentialsApplePay(TLObject): # type: ignore + """Apple pay payment credentials + + Constructor of :obj:`~pyrogram.raw.base.InputPaymentCredentials`. + + Details: + - Layer: ``224`` + - ID: ``AA1C39F`` + + Parameters: + payment_data (:obj:`DataJSON `): + Payment data + + """ + + __slots__: List[str] = ["payment_data"] + + ID = 0xaa1c39f + QUALNAME = "types.InputPaymentCredentialsApplePay" + + def __init__(self, *, payment_data: "raw.base.DataJSON") -> None: + self.payment_data = payment_data # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPaymentCredentialsApplePay": + # No flags + + payment_data = TLObject.read(b) + + return InputPaymentCredentialsApplePay(payment_data=payment_data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.payment_data.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_payment_credentials_google_pay.py b/pyrogram/raw/types/input_payment_credentials_google_pay.py new file mode 100644 index 00000000..36203b46 --- /dev/null +++ b/pyrogram/raw/types/input_payment_credentials_google_pay.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPaymentCredentialsGooglePay(TLObject): # type: ignore + """Google Pay payment credentials + + Constructor of :obj:`~pyrogram.raw.base.InputPaymentCredentials`. + + Details: + - Layer: ``224`` + - ID: ``8AC32801`` + + Parameters: + payment_token (:obj:`DataJSON `): + Payment token + + """ + + __slots__: List[str] = ["payment_token"] + + ID = 0x8ac32801 + QUALNAME = "types.InputPaymentCredentialsGooglePay" + + def __init__(self, *, payment_token: "raw.base.DataJSON") -> None: + self.payment_token = payment_token # DataJSON + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPaymentCredentialsGooglePay": + # No flags + + payment_token = TLObject.read(b) + + return InputPaymentCredentialsGooglePay(payment_token=payment_token) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.payment_token.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_payment_credentials_saved.py b/pyrogram/raw/types/input_payment_credentials_saved.py new file mode 100644 index 00000000..ff4b095d --- /dev/null +++ b/pyrogram/raw/types/input_payment_credentials_saved.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPaymentCredentialsSaved(TLObject): # type: ignore + """Saved payment credentials + + Constructor of :obj:`~pyrogram.raw.base.InputPaymentCredentials`. + + Details: + - Layer: ``224`` + - ID: ``C10EB2CF`` + + Parameters: + id (``str``): + Credential ID + + tmp_password (``bytes``): + Temporary password + + """ + + __slots__: List[str] = ["id", "tmp_password"] + + ID = 0xc10eb2cf + QUALNAME = "types.InputPaymentCredentialsSaved" + + def __init__(self, *, id: str, tmp_password: bytes) -> None: + self.id = id # string + self.tmp_password = tmp_password # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPaymentCredentialsSaved": + # No flags + + id = String.read(b) + + tmp_password = Bytes.read(b) + + return InputPaymentCredentialsSaved(id=id, tmp_password=tmp_password) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.id)) + + b.write(Bytes(self.tmp_password)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_channel.py b/pyrogram/raw/types/input_peer_channel.py new file mode 100644 index 00000000..7d49a384 --- /dev/null +++ b/pyrogram/raw/types/input_peer_channel.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerChannel(TLObject): # type: ignore + """Defines a channel for further interaction. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``27BCBBFC`` + + Parameters: + channel_id (``int`` ``64-bit``): + Channel identifier + + access_hash (``int`` ``64-bit``): + access_hash value from the channel constructor + + """ + + __slots__: List[str] = ["channel_id", "access_hash"] + + ID = 0x27bcbbfc + QUALNAME = "types.InputPeerChannel" + + def __init__(self, *, channel_id: int, access_hash: int) -> None: + self.channel_id = channel_id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerChannel": + # No flags + + channel_id = Long.read(b) + + access_hash = Long.read(b) + + return InputPeerChannel(channel_id=channel_id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.channel_id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_channel_from_message.py b/pyrogram/raw/types/input_peer_channel_from_message.py new file mode 100644 index 00000000..7369a602 --- /dev/null +++ b/pyrogram/raw/types/input_peer_channel_from_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerChannelFromMessage(TLObject): # type: ignore + """Defines a min channel that was seen in a certain message of a certain chat. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``BD2A0840`` + + Parameters: + peer (:obj:`InputPeer `): + The chat where the channel's message was seen + + msg_id (``int`` ``32-bit``): + The message ID + + channel_id (``int`` ``64-bit``): + The identifier of the channel that was seen + + """ + + __slots__: List[str] = ["peer", "msg_id", "channel_id"] + + ID = 0xbd2a0840 + QUALNAME = "types.InputPeerChannelFromMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, channel_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.channel_id = channel_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerChannelFromMessage": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + channel_id = Long.read(b) + + return InputPeerChannelFromMessage(peer=peer, msg_id=msg_id, channel_id=channel_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Long(self.channel_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_chat.py b/pyrogram/raw/types/input_peer_chat.py new file mode 100644 index 00000000..befa62c5 --- /dev/null +++ b/pyrogram/raw/types/input_peer_chat.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerChat(TLObject): # type: ignore + """Defines a chat for further interaction. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``35A95CB9`` + + Parameters: + chat_id (``int`` ``64-bit``): + Chat identifier + + """ + + __slots__: List[str] = ["chat_id"] + + ID = 0x35a95cb9 + QUALNAME = "types.InputPeerChat" + + def __init__(self, *, chat_id: int) -> None: + self.chat_id = chat_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerChat": + # No flags + + chat_id = Long.read(b) + + return InputPeerChat(chat_id=chat_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.chat_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_color_collectible.py b/pyrogram/raw/types/input_peer_color_collectible.py new file mode 100644 index 00000000..f4e84fa5 --- /dev/null +++ b/pyrogram/raw/types/input_peer_color_collectible.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerColorCollectible(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.PeerColor`. + + Details: + - Layer: ``224`` + - ID: ``B8EA86A9`` + + Parameters: + collectible_id (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["collectible_id"] + + ID = 0xb8ea86a9 + QUALNAME = "types.InputPeerColorCollectible" + + def __init__(self, *, collectible_id: int) -> None: + self.collectible_id = collectible_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerColorCollectible": + # No flags + + collectible_id = Long.read(b) + + return InputPeerColorCollectible(collectible_id=collectible_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.collectible_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_empty.py b/pyrogram/raw/types/input_peer_empty.py new file mode 100644 index 00000000..dbe65d9d --- /dev/null +++ b/pyrogram/raw/types/input_peer_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerEmpty(TLObject): # type: ignore + """An empty constructor, no user or chat is defined. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``7F3B18EA`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x7f3b18ea + QUALNAME = "types.InputPeerEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerEmpty": + # No flags + + return InputPeerEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_notify_settings.py b/pyrogram/raw/types/input_peer_notify_settings.py new file mode 100644 index 00000000..575bd356 --- /dev/null +++ b/pyrogram/raw/types/input_peer_notify_settings.py @@ -0,0 +1,113 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerNotifySettings(TLObject): # type: ignore + """Notification settings. + + Constructor of :obj:`~pyrogram.raw.base.InputPeerNotifySettings`. + + Details: + - Layer: ``224`` + - ID: ``CACB6AE2`` + + Parameters: + show_previews (``bool``, *optional*): + If the text of the message shall be displayed in notification + + silent (``bool``, *optional*): + Peer was muted? + + mute_until (``int`` ``32-bit``, *optional*): + Date until which all notifications shall be switched off + + sound (:obj:`NotificationSound `, *optional*): + Identifier of an audio file to play for notifications. + + stories_muted (``bool``, *optional*): + Whether story notifications should be disabled. + + stories_hide_sender (``bool``, *optional*): + Whether the sender name should be displayed in story notifications. + + stories_sound (:obj:`NotificationSound `, *optional*): + Identifier of an audio file to play for story notifications. + + """ + + __slots__: List[str] = ["show_previews", "silent", "mute_until", "sound", "stories_muted", "stories_hide_sender", "stories_sound"] + + ID = 0xcacb6ae2 + QUALNAME = "types.InputPeerNotifySettings" + + def __init__(self, *, show_previews: Optional[bool] = None, silent: Optional[bool] = None, mute_until: Optional[int] = None, sound: "raw.base.NotificationSound" = None, stories_muted: Optional[bool] = None, stories_hide_sender: Optional[bool] = None, stories_sound: "raw.base.NotificationSound" = None) -> None: + self.show_previews = show_previews # flags.0?Bool + self.silent = silent # flags.1?Bool + self.mute_until = mute_until # flags.2?int + self.sound = sound # flags.3?NotificationSound + self.stories_muted = stories_muted # flags.6?Bool + self.stories_hide_sender = stories_hide_sender # flags.7?Bool + self.stories_sound = stories_sound # flags.8?NotificationSound + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerNotifySettings": + + flags = Int.read(b) + + show_previews = Bool.read(b) if flags & (1 << 0) else None + silent = Bool.read(b) if flags & (1 << 1) else None + mute_until = Int.read(b) if flags & (1 << 2) else None + sound = TLObject.read(b) if flags & (1 << 3) else None + + stories_muted = Bool.read(b) if flags & (1 << 6) else None + stories_hide_sender = Bool.read(b) if flags & (1 << 7) else None + stories_sound = TLObject.read(b) if flags & (1 << 8) else None + + return InputPeerNotifySettings(show_previews=show_previews, silent=silent, mute_until=mute_until, sound=sound, stories_muted=stories_muted, stories_hide_sender=stories_hide_sender, stories_sound=stories_sound) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.show_previews is not None else 0 + flags |= (1 << 1) if self.silent is not None else 0 + flags |= (1 << 2) if self.mute_until is not None else 0 + flags |= (1 << 3) if self.sound is not None else 0 + flags |= (1 << 6) if self.stories_muted is not None else 0 + flags |= (1 << 7) if self.stories_hide_sender is not None else 0 + flags |= (1 << 8) if self.stories_sound is not None else 0 + b.write(Int(flags)) + + if self.show_previews is not None: + b.write(Bool(self.show_previews)) + + if self.silent is not None: + b.write(Bool(self.silent)) + + if self.mute_until is not None: + b.write(Int(self.mute_until)) + + if self.sound is not None: + b.write(self.sound.write()) + + if self.stories_muted is not None: + b.write(Bool(self.stories_muted)) + + if self.stories_hide_sender is not None: + b.write(Bool(self.stories_hide_sender)) + + if self.stories_sound is not None: + b.write(self.stories_sound.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_photo_file_location.py b/pyrogram/raw/types/input_peer_photo_file_location.py new file mode 100644 index 00000000..4859b797 --- /dev/null +++ b/pyrogram/raw/types/input_peer_photo_file_location.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerPhotoFileLocation(TLObject): # type: ignore + """Location of profile photo of channel/group/supergroup/user + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``37257E99`` + + Parameters: + peer (:obj:`InputPeer `): + The peer whose profile picture should be downloaded + + photo_id (``int`` ``64-bit``): + Photo ID + + big (``bool``, *optional*): + Whether to download the high-quality version of the picture + + """ + + __slots__: List[str] = ["peer", "photo_id", "big"] + + ID = 0x37257e99 + QUALNAME = "types.InputPeerPhotoFileLocation" + + def __init__(self, *, peer: "raw.base.InputPeer", photo_id: int, big: Optional[bool] = None) -> None: + self.peer = peer # InputPeer + self.photo_id = photo_id # long + self.big = big # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerPhotoFileLocation": + + flags = Int.read(b) + + big = True if flags & (1 << 0) else False + peer = TLObject.read(b) + + photo_id = Long.read(b) + + return InputPeerPhotoFileLocation(peer=peer, photo_id=photo_id, big=big) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.big else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Long(self.photo_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_self.py b/pyrogram/raw/types/input_peer_self.py new file mode 100644 index 00000000..b6992b4b --- /dev/null +++ b/pyrogram/raw/types/input_peer_self.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerSelf(TLObject): # type: ignore + """Defines the current user. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``7DA07EC9`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x7da07ec9 + QUALNAME = "types.InputPeerSelf" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerSelf": + # No flags + + return InputPeerSelf() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_user.py b/pyrogram/raw/types/input_peer_user.py new file mode 100644 index 00000000..51ce25af --- /dev/null +++ b/pyrogram/raw/types/input_peer_user.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerUser(TLObject): # type: ignore + """Defines a user for further interaction. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``DDE8A54C`` + + Parameters: + user_id (``int`` ``64-bit``): + User identifier + + access_hash (``int`` ``64-bit``): + access_hash value from the user constructor + + """ + + __slots__: List[str] = ["user_id", "access_hash"] + + ID = 0xdde8a54c + QUALNAME = "types.InputPeerUser" + + def __init__(self, *, user_id: int, access_hash: int) -> None: + self.user_id = user_id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerUser": + # No flags + + user_id = Long.read(b) + + access_hash = Long.read(b) + + return InputPeerUser(user_id=user_id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_peer_user_from_message.py b/pyrogram/raw/types/input_peer_user_from_message.py new file mode 100644 index 00000000..ddfbd10c --- /dev/null +++ b/pyrogram/raw/types/input_peer_user_from_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPeerUserFromMessage(TLObject): # type: ignore + """Defines a min user that was seen in a certain message of a certain chat. + + Constructor of :obj:`~pyrogram.raw.base.InputPeer`. + + Details: + - Layer: ``224`` + - ID: ``A87B0A1C`` + + Parameters: + peer (:obj:`InputPeer `): + The chat where the user was seen + + msg_id (``int`` ``32-bit``): + The message ID + + user_id (``int`` ``64-bit``): + The identifier of the user that was seen + + """ + + __slots__: List[str] = ["peer", "msg_id", "user_id"] + + ID = 0xa87b0a1c + QUALNAME = "types.InputPeerUserFromMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, user_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.user_id = user_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPeerUserFromMessage": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + user_id = Long.read(b) + + return InputPeerUserFromMessage(peer=peer, msg_id=msg_id, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_phone_call.py b/pyrogram/raw/types/input_phone_call.py new file mode 100644 index 00000000..8f3baa1f --- /dev/null +++ b/pyrogram/raw/types/input_phone_call.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPhoneCall(TLObject): # type: ignore + """Phone call + + Constructor of :obj:`~pyrogram.raw.base.InputPhoneCall`. + + Details: + - Layer: ``224`` + - ID: ``1E36FDED`` + + Parameters: + id (``int`` ``64-bit``): + Call ID + + access_hash (``int`` ``64-bit``): + Access hash + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0x1e36fded + QUALNAME = "types.InputPhoneCall" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPhoneCall": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputPhoneCall(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_phone_contact.py b/pyrogram/raw/types/input_phone_contact.py new file mode 100644 index 00000000..e4cf9939 --- /dev/null +++ b/pyrogram/raw/types/input_phone_contact.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPhoneContact(TLObject): # type: ignore + """Phone contact. + + Constructor of :obj:`~pyrogram.raw.base.InputContact`. + + Details: + - Layer: ``224`` + - ID: ``6A1DC4BE`` + + Parameters: + client_id (``int`` ``64-bit``): + An arbitrary 64-bit integer: it should be set, for example, to an incremental number when using contacts.importContacts, in order to retry importing only the contacts that weren't imported successfully, according to the client_ids returned in contacts.importedContacts.retry_contacts. + + phone (``str``): + Phone number + + first_name (``str``): + Contact's first name + + last_name (``str``): + Contact's last name + + note (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["client_id", "phone", "first_name", "last_name", "note"] + + ID = 0x6a1dc4be + QUALNAME = "types.InputPhoneContact" + + def __init__(self, *, client_id: int, phone: str, first_name: str, last_name: str, note: "raw.base.TextWithEntities" = None) -> None: + self.client_id = client_id # long + self.phone = phone # string + self.first_name = first_name # string + self.last_name = last_name # string + self.note = note # flags.0?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPhoneContact": + + flags = Int.read(b) + + client_id = Long.read(b) + + phone = String.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + note = TLObject.read(b) if flags & (1 << 0) else None + + return InputPhoneContact(client_id=client_id, phone=phone, first_name=first_name, last_name=last_name, note=note) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.note is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.client_id)) + + b.write(String(self.phone)) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + if self.note is not None: + b.write(self.note.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_photo.py b/pyrogram/raw/types/input_photo.py new file mode 100644 index 00000000..26c22694 --- /dev/null +++ b/pyrogram/raw/types/input_photo.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPhoto(TLObject): # type: ignore + """Defines a photo for further interaction. + + Constructor of :obj:`~pyrogram.raw.base.InputPhoto`. + + Details: + - Layer: ``224`` + - ID: ``3BB3B94A`` + + Parameters: + id (``int`` ``64-bit``): + Photo identifier + + access_hash (``int`` ``64-bit``): + access_hash value from the photo constructor + + file_reference (``bytes``): + File reference + + """ + + __slots__: List[str] = ["id", "access_hash", "file_reference"] + + ID = 0x3bb3b94a + QUALNAME = "types.InputPhoto" + + def __init__(self, *, id: int, access_hash: int, file_reference: bytes) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.file_reference = file_reference # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPhoto": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + file_reference = Bytes.read(b) + + return InputPhoto(id=id, access_hash=access_hash, file_reference=file_reference) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Bytes(self.file_reference)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_photo_empty.py b/pyrogram/raw/types/input_photo_empty.py new file mode 100644 index 00000000..d0ed64e1 --- /dev/null +++ b/pyrogram/raw/types/input_photo_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPhotoEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.InputPhoto`. + + Details: + - Layer: ``224`` + - ID: ``1CD7BF0D`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1cd7bf0d + QUALNAME = "types.InputPhotoEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPhotoEmpty": + # No flags + + return InputPhotoEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_photo_file_location.py b/pyrogram/raw/types/input_photo_file_location.py new file mode 100644 index 00000000..9184002a --- /dev/null +++ b/pyrogram/raw/types/input_photo_file_location.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPhotoFileLocation(TLObject): # type: ignore + """Use this object to download a photo with upload.getFile method + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``40181FFE`` + + Parameters: + id (``int`` ``64-bit``): + Photo ID, obtained from the photo object + + access_hash (``int`` ``64-bit``): + Photo's access hash, obtained from the photo object + + file_reference (``bytes``): + File reference + + thumb_size (``str``): + The PhotoSize to download: must be set to the type field of the desired PhotoSize object of the photo + + """ + + __slots__: List[str] = ["id", "access_hash", "file_reference", "thumb_size"] + + ID = 0x40181ffe + QUALNAME = "types.InputPhotoFileLocation" + + def __init__(self, *, id: int, access_hash: int, file_reference: bytes, thumb_size: str) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.file_reference = file_reference # bytes + self.thumb_size = thumb_size # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPhotoFileLocation": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + file_reference = Bytes.read(b) + + thumb_size = String.read(b) + + return InputPhotoFileLocation(id=id, access_hash=access_hash, file_reference=file_reference, thumb_size=thumb_size) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Bytes(self.file_reference)) + + b.write(String(self.thumb_size)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_photo_legacy_file_location.py b/pyrogram/raw/types/input_photo_legacy_file_location.py new file mode 100644 index 00000000..3dd84729 --- /dev/null +++ b/pyrogram/raw/types/input_photo_legacy_file_location.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPhotoLegacyFileLocation(TLObject): # type: ignore + """DEPRECATED legacy photo file location + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``D83466F3`` + + Parameters: + id (``int`` ``64-bit``): + Photo ID + + access_hash (``int`` ``64-bit``): + Access hash + + file_reference (``bytes``): + File reference + + volume_id (``int`` ``64-bit``): + Volume ID + + local_id (``int`` ``32-bit``): + Local ID + + secret (``int`` ``64-bit``): + Secret + + """ + + __slots__: List[str] = ["id", "access_hash", "file_reference", "volume_id", "local_id", "secret"] + + ID = 0xd83466f3 + QUALNAME = "types.InputPhotoLegacyFileLocation" + + def __init__(self, *, id: int, access_hash: int, file_reference: bytes, volume_id: int, local_id: int, secret: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + self.file_reference = file_reference # bytes + self.volume_id = volume_id # long + self.local_id = local_id # int + self.secret = secret # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPhotoLegacyFileLocation": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + file_reference = Bytes.read(b) + + volume_id = Long.read(b) + + local_id = Int.read(b) + + secret = Long.read(b) + + return InputPhotoLegacyFileLocation(id=id, access_hash=access_hash, file_reference=file_reference, volume_id=volume_id, local_id=local_id, secret=secret) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + b.write(Bytes(self.file_reference)) + + b.write(Long(self.volume_id)) + + b.write(Int(self.local_id)) + + b.write(Long(self.secret)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_about.py b/pyrogram/raw/types/input_privacy_key_about.py new file mode 100644 index 00000000..b89886b0 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_about.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyAbout(TLObject): # type: ignore + """Whether people can see your bio + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``3823CC40`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3823cc40 + QUALNAME = "types.InputPrivacyKeyAbout" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyAbout": + # No flags + + return InputPrivacyKeyAbout() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_added_by_phone.py b/pyrogram/raw/types/input_privacy_key_added_by_phone.py new file mode 100644 index 00000000..24abdd1f --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_added_by_phone.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyAddedByPhone(TLObject): # type: ignore + """Whether people can add you to their contact list by your phone number + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``D1219BDD`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd1219bdd + QUALNAME = "types.InputPrivacyKeyAddedByPhone" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyAddedByPhone": + # No flags + + return InputPrivacyKeyAddedByPhone() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_birthday.py b/pyrogram/raw/types/input_privacy_key_birthday.py new file mode 100644 index 00000000..56da07cb --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_birthday.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyBirthday(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``D65A11CC`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd65a11cc + QUALNAME = "types.InputPrivacyKeyBirthday" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyBirthday": + # No flags + + return InputPrivacyKeyBirthday() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_chat_invite.py b/pyrogram/raw/types/input_privacy_key_chat_invite.py new file mode 100644 index 00000000..d3b48569 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_chat_invite.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyChatInvite(TLObject): # type: ignore + """Whether people will be able to invite you to chats + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``BDFB0426`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xbdfb0426 + QUALNAME = "types.InputPrivacyKeyChatInvite" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyChatInvite": + # No flags + + return InputPrivacyKeyChatInvite() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_forwards.py b/pyrogram/raw/types/input_privacy_key_forwards.py new file mode 100644 index 00000000..92fa2dff --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_forwards.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyForwards(TLObject): # type: ignore + """Whether messages forwarded from you will be anonymous + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``A4DD4C08`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xa4dd4c08 + QUALNAME = "types.InputPrivacyKeyForwards" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyForwards": + # No flags + + return InputPrivacyKeyForwards() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_no_paid_messages.py b/pyrogram/raw/types/input_privacy_key_no_paid_messages.py new file mode 100644 index 00000000..9eac7025 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_no_paid_messages.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyNoPaidMessages(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``BDC597B4`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xbdc597b4 + QUALNAME = "types.InputPrivacyKeyNoPaidMessages" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyNoPaidMessages": + # No flags + + return InputPrivacyKeyNoPaidMessages() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_phone_call.py b/pyrogram/raw/types/input_privacy_key_phone_call.py new file mode 100644 index 00000000..117c3c5d --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_phone_call.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyPhoneCall(TLObject): # type: ignore + """Whether you will accept phone calls + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``FABADC5F`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xfabadc5f + QUALNAME = "types.InputPrivacyKeyPhoneCall" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyPhoneCall": + # No flags + + return InputPrivacyKeyPhoneCall() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_phone_number.py b/pyrogram/raw/types/input_privacy_key_phone_number.py new file mode 100644 index 00000000..87888979 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_phone_number.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyPhoneNumber(TLObject): # type: ignore + """Whether people will be able to see your phone number + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``352DAFA`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x352dafa + QUALNAME = "types.InputPrivacyKeyPhoneNumber" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyPhoneNumber": + # No flags + + return InputPrivacyKeyPhoneNumber() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_phone_p2_p.py b/pyrogram/raw/types/input_privacy_key_phone_p2_p.py new file mode 100644 index 00000000..cbb4e04b --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_phone_p2_p.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyPhoneP2P(TLObject): # type: ignore + """Whether to allow P2P communication during VoIP calls + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``DB9E70D2`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xdb9e70d2 + QUALNAME = "types.InputPrivacyKeyPhoneP2P" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyPhoneP2P": + # No flags + + return InputPrivacyKeyPhoneP2P() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_profile_photo.py b/pyrogram/raw/types/input_privacy_key_profile_photo.py new file mode 100644 index 00000000..b1ed0525 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_profile_photo.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyProfilePhoto(TLObject): # type: ignore + """Whether people will be able to see your profile picture + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``5719BACC`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x5719bacc + QUALNAME = "types.InputPrivacyKeyProfilePhoto" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyProfilePhoto": + # No flags + + return InputPrivacyKeyProfilePhoto() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_saved_music.py b/pyrogram/raw/types/input_privacy_key_saved_music.py new file mode 100644 index 00000000..173f6816 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_saved_music.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeySavedMusic(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``4DBE9226`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x4dbe9226 + QUALNAME = "types.InputPrivacyKeySavedMusic" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeySavedMusic": + # No flags + + return InputPrivacyKeySavedMusic() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_star_gifts_auto_save.py b/pyrogram/raw/types/input_privacy_key_star_gifts_auto_save.py new file mode 100644 index 00000000..6499a463 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_star_gifts_auto_save.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyStarGiftsAutoSave(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``E1732341`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xe1732341 + QUALNAME = "types.InputPrivacyKeyStarGiftsAutoSave" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyStarGiftsAutoSave": + # No flags + + return InputPrivacyKeyStarGiftsAutoSave() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_status_timestamp.py b/pyrogram/raw/types/input_privacy_key_status_timestamp.py new file mode 100644 index 00000000..6e784766 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_status_timestamp.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyStatusTimestamp(TLObject): # type: ignore + """Whether people will be able to see your exact last online timestamp + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``4F96CB18`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x4f96cb18 + QUALNAME = "types.InputPrivacyKeyStatusTimestamp" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyStatusTimestamp": + # No flags + + return InputPrivacyKeyStatusTimestamp() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_key_voice_messages.py b/pyrogram/raw/types/input_privacy_key_voice_messages.py new file mode 100644 index 00000000..c09bbc0b --- /dev/null +++ b/pyrogram/raw/types/input_privacy_key_voice_messages.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyKeyVoiceMessages(TLObject): # type: ignore + """Whether people can send you voice messages + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyKey`. + + Details: + - Layer: ``224`` + - ID: ``AEE69D68`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xaee69d68 + QUALNAME = "types.InputPrivacyKeyVoiceMessages" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyKeyVoiceMessages": + # No flags + + return InputPrivacyKeyVoiceMessages() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_all.py b/pyrogram/raw/types/input_privacy_value_allow_all.py new file mode 100644 index 00000000..8aee04ab --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_all.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowAll(TLObject): # type: ignore + """Allow all users + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``184B35CE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x184b35ce + QUALNAME = "types.InputPrivacyValueAllowAll" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowAll": + # No flags + + return InputPrivacyValueAllowAll() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_bots.py b/pyrogram/raw/types/input_privacy_value_allow_bots.py new file mode 100644 index 00000000..4d62b8b5 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_bots.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowBots(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``5A4FCCE5`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x5a4fcce5 + QUALNAME = "types.InputPrivacyValueAllowBots" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowBots": + # No flags + + return InputPrivacyValueAllowBots() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_chat_participants.py b/pyrogram/raw/types/input_privacy_value_allow_chat_participants.py new file mode 100644 index 00000000..0dcc7d7c --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_chat_participants.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowChatParticipants(TLObject): # type: ignore + """Allow only participants of certain chats + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``840649CF`` + + Parameters: + chats (List of ``int`` ``64-bit``): + Allowed chat IDs + + """ + + __slots__: List[str] = ["chats"] + + ID = 0x840649cf + QUALNAME = "types.InputPrivacyValueAllowChatParticipants" + + def __init__(self, *, chats: List[int]) -> None: + self.chats = chats # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowChatParticipants": + # No flags + + chats = TLObject.read(b, Long) + + return InputPrivacyValueAllowChatParticipants(chats=chats) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.chats, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_close_friends.py b/pyrogram/raw/types/input_privacy_value_allow_close_friends.py new file mode 100644 index 00000000..bc47918e --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_close_friends.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowCloseFriends(TLObject): # type: ignore + """Allow only close friends » + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``2F453E49`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x2f453e49 + QUALNAME = "types.InputPrivacyValueAllowCloseFriends" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowCloseFriends": + # No flags + + return InputPrivacyValueAllowCloseFriends() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_contacts.py b/pyrogram/raw/types/input_privacy_value_allow_contacts.py new file mode 100644 index 00000000..f0c204c9 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_contacts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowContacts(TLObject): # type: ignore + """Allow only contacts + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``D09E07B`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd09e07b + QUALNAME = "types.InputPrivacyValueAllowContacts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowContacts": + # No flags + + return InputPrivacyValueAllowContacts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_premium.py b/pyrogram/raw/types/input_privacy_value_allow_premium.py new file mode 100644 index 00000000..28d23a1a --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_premium.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowPremium(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``77CDC9F1`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x77cdc9f1 + QUALNAME = "types.InputPrivacyValueAllowPremium" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowPremium": + # No flags + + return InputPrivacyValueAllowPremium() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_allow_users.py b/pyrogram/raw/types/input_privacy_value_allow_users.py new file mode 100644 index 00000000..273ede20 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_allow_users.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueAllowUsers(TLObject): # type: ignore + """Allow only certain users + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``131CC67F`` + + Parameters: + users (List of :obj:`InputUser `): + Allowed users + + """ + + __slots__: List[str] = ["users"] + + ID = 0x131cc67f + QUALNAME = "types.InputPrivacyValueAllowUsers" + + def __init__(self, *, users: List["raw.base.InputUser"]) -> None: + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueAllowUsers": + # No flags + + users = TLObject.read(b) + + return InputPrivacyValueAllowUsers(users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_disallow_all.py b/pyrogram/raw/types/input_privacy_value_disallow_all.py new file mode 100644 index 00000000..15be8095 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_disallow_all.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueDisallowAll(TLObject): # type: ignore + """Disallow all + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``D66B66C9`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd66b66c9 + QUALNAME = "types.InputPrivacyValueDisallowAll" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueDisallowAll": + # No flags + + return InputPrivacyValueDisallowAll() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_disallow_bots.py b/pyrogram/raw/types/input_privacy_value_disallow_bots.py new file mode 100644 index 00000000..85291733 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_disallow_bots.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueDisallowBots(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``C4E57915`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc4e57915 + QUALNAME = "types.InputPrivacyValueDisallowBots" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueDisallowBots": + # No flags + + return InputPrivacyValueDisallowBots() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_disallow_chat_participants.py b/pyrogram/raw/types/input_privacy_value_disallow_chat_participants.py new file mode 100644 index 00000000..8c95db90 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_disallow_chat_participants.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueDisallowChatParticipants(TLObject): # type: ignore + """Disallow only participants of certain chats + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``E94F0F86`` + + Parameters: + chats (List of ``int`` ``64-bit``): + Disallowed chat IDs + + """ + + __slots__: List[str] = ["chats"] + + ID = 0xe94f0f86 + QUALNAME = "types.InputPrivacyValueDisallowChatParticipants" + + def __init__(self, *, chats: List[int]) -> None: + self.chats = chats # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueDisallowChatParticipants": + # No flags + + chats = TLObject.read(b, Long) + + return InputPrivacyValueDisallowChatParticipants(chats=chats) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.chats, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_disallow_contacts.py b/pyrogram/raw/types/input_privacy_value_disallow_contacts.py new file mode 100644 index 00000000..4550d718 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_disallow_contacts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueDisallowContacts(TLObject): # type: ignore + """Disallow only contacts + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``BA52007`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xba52007 + QUALNAME = "types.InputPrivacyValueDisallowContacts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueDisallowContacts": + # No flags + + return InputPrivacyValueDisallowContacts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_privacy_value_disallow_users.py b/pyrogram/raw/types/input_privacy_value_disallow_users.py new file mode 100644 index 00000000..6624fa33 --- /dev/null +++ b/pyrogram/raw/types/input_privacy_value_disallow_users.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputPrivacyValueDisallowUsers(TLObject): # type: ignore + """Disallow only certain users + + Constructor of :obj:`~pyrogram.raw.base.InputPrivacyRule`. + + Details: + - Layer: ``224`` + - ID: ``90110467`` + + Parameters: + users (List of :obj:`InputUser `): + Users to disallow + + """ + + __slots__: List[str] = ["users"] + + ID = 0x90110467 + QUALNAME = "types.InputPrivacyValueDisallowUsers" + + def __init__(self, *, users: List["raw.base.InputUser"]) -> None: + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputPrivacyValueDisallowUsers": + # No flags + + users = TLObject.read(b) + + return InputPrivacyValueDisallowUsers(users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_quick_reply_shortcut.py b/pyrogram/raw/types/input_quick_reply_shortcut.py new file mode 100644 index 00000000..472a59fd --- /dev/null +++ b/pyrogram/raw/types/input_quick_reply_shortcut.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputQuickReplyShortcut(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputQuickReplyShortcut`. + + Details: + - Layer: ``224`` + - ID: ``24596D41`` + + Parameters: + shortcut (``str``): + + + """ + + __slots__: List[str] = ["shortcut"] + + ID = 0x24596d41 + QUALNAME = "types.InputQuickReplyShortcut" + + def __init__(self, *, shortcut: str) -> None: + self.shortcut = shortcut # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputQuickReplyShortcut": + # No flags + + shortcut = String.read(b) + + return InputQuickReplyShortcut(shortcut=shortcut) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.shortcut)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_quick_reply_shortcut_id.py b/pyrogram/raw/types/input_quick_reply_shortcut_id.py new file mode 100644 index 00000000..105d6603 --- /dev/null +++ b/pyrogram/raw/types/input_quick_reply_shortcut_id.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputQuickReplyShortcutId(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.InputQuickReplyShortcut`. + + Details: + - Layer: ``224`` + - ID: ``1190CF1`` + + Parameters: + shortcut_id (``int`` ``32-bit``): + + + """ + + __slots__: List[str] = ["shortcut_id"] + + ID = 0x1190cf1 + QUALNAME = "types.InputQuickReplyShortcutId" + + def __init__(self, *, shortcut_id: int) -> None: + self.shortcut_id = shortcut_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputQuickReplyShortcutId": + # No flags + + shortcut_id = Int.read(b) + + return InputQuickReplyShortcutId(shortcut_id=shortcut_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.shortcut_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_reply_to_message.py b/pyrogram/raw/types/input_reply_to_message.py new file mode 100644 index 00000000..64846658 --- /dev/null +++ b/pyrogram/raw/types/input_reply_to_message.py @@ -0,0 +1,122 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReplyToMessage(TLObject): # type: ignore + """Reply to a message. + + Constructor of :obj:`~pyrogram.raw.base.InputReplyTo`. + + Details: + - Layer: ``224`` + - ID: ``869FBE10`` + + Parameters: + reply_to_msg_id (``int`` ``32-bit``): + The message ID to reply to. + + top_msg_id (``int`` ``32-bit``, *optional*): + This field must contain the topic ID only when replying to messages in forum topics different from the "General" topic (i.e. reply_to_msg_id is set and reply_to_msg_id != topicID and topicID != 1). If the replied-to message is deleted before the method finishes execution, the value in this field will be used to send the message to the correct topic, instead of the "General" topic. + + reply_to_peer_id (:obj:`InputPeer `, *optional*): + Used to reply to messages sent to another chat (specified here), can only be used for non-protected chats and messages. + + quote_text (``str``, *optional*): + Used to quote-reply to only a certain section (specified here) of the original message. The maximum UTF-8 length for quotes is specified in the quote_length_max config key. + + quote_entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text from the quote_text field. + + quote_offset (``int`` ``32-bit``, *optional*): + Offset of the message quote_text within the original message (in UTF-16 code units). + + monoforum_peer_id (:obj:`InputPeer `, *optional*): + N/A + + todo_item_id (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["reply_to_msg_id", "top_msg_id", "reply_to_peer_id", "quote_text", "quote_entities", "quote_offset", "monoforum_peer_id", "todo_item_id"] + + ID = 0x869fbe10 + QUALNAME = "types.InputReplyToMessage" + + def __init__(self, *, reply_to_msg_id: int, top_msg_id: Optional[int] = None, reply_to_peer_id: "raw.base.InputPeer" = None, quote_text: Optional[str] = None, quote_entities: Optional[List["raw.base.MessageEntity"]] = None, quote_offset: Optional[int] = None, monoforum_peer_id: "raw.base.InputPeer" = None, todo_item_id: Optional[int] = None) -> None: + self.reply_to_msg_id = reply_to_msg_id # int + self.top_msg_id = top_msg_id # flags.0?int + self.reply_to_peer_id = reply_to_peer_id # flags.1?InputPeer + self.quote_text = quote_text # flags.2?string + self.quote_entities = quote_entities # flags.3?Vector + self.quote_offset = quote_offset # flags.4?int + self.monoforum_peer_id = monoforum_peer_id # flags.5?InputPeer + self.todo_item_id = todo_item_id # flags.6?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReplyToMessage": + + flags = Int.read(b) + + reply_to_msg_id = Int.read(b) + + top_msg_id = Int.read(b) if flags & (1 << 0) else None + reply_to_peer_id = TLObject.read(b) if flags & (1 << 1) else None + + quote_text = String.read(b) if flags & (1 << 2) else None + quote_entities = TLObject.read(b) if flags & (1 << 3) else [] + + quote_offset = Int.read(b) if flags & (1 << 4) else None + monoforum_peer_id = TLObject.read(b) if flags & (1 << 5) else None + + todo_item_id = Int.read(b) if flags & (1 << 6) else None + return InputReplyToMessage(reply_to_msg_id=reply_to_msg_id, top_msg_id=top_msg_id, reply_to_peer_id=reply_to_peer_id, quote_text=quote_text, quote_entities=quote_entities, quote_offset=quote_offset, monoforum_peer_id=monoforum_peer_id, todo_item_id=todo_item_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top_msg_id is not None else 0 + flags |= (1 << 1) if self.reply_to_peer_id is not None else 0 + flags |= (1 << 2) if self.quote_text is not None else 0 + flags |= (1 << 3) if self.quote_entities else 0 + flags |= (1 << 4) if self.quote_offset is not None else 0 + flags |= (1 << 5) if self.monoforum_peer_id is not None else 0 + flags |= (1 << 6) if self.todo_item_id is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.reply_to_msg_id)) + + if self.top_msg_id is not None: + b.write(Int(self.top_msg_id)) + + if self.reply_to_peer_id is not None: + b.write(self.reply_to_peer_id.write()) + + if self.quote_text is not None: + b.write(String(self.quote_text)) + + if self.quote_entities is not None: + b.write(Vector(self.quote_entities)) + + if self.quote_offset is not None: + b.write(Int(self.quote_offset)) + + if self.monoforum_peer_id is not None: + b.write(self.monoforum_peer_id.write()) + + if self.todo_item_id is not None: + b.write(Int(self.todo_item_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_reply_to_mono_forum.py b/pyrogram/raw/types/input_reply_to_mono_forum.py new file mode 100644 index 00000000..98ec2061 --- /dev/null +++ b/pyrogram/raw/types/input_reply_to_mono_forum.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReplyToMonoForum(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputReplyTo`. + + Details: + - Layer: ``224`` + - ID: ``69D66C45`` + + Parameters: + monoforum_peer_id (:obj:`InputPeer `): + N/A + + """ + + __slots__: List[str] = ["monoforum_peer_id"] + + ID = 0x69d66c45 + QUALNAME = "types.InputReplyToMonoForum" + + def __init__(self, *, monoforum_peer_id: "raw.base.InputPeer") -> None: + self.monoforum_peer_id = monoforum_peer_id # InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReplyToMonoForum": + # No flags + + monoforum_peer_id = TLObject.read(b) + + return InputReplyToMonoForum(monoforum_peer_id=monoforum_peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.monoforum_peer_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_reply_to_story.py b/pyrogram/raw/types/input_reply_to_story.py new file mode 100644 index 00000000..1376447d --- /dev/null +++ b/pyrogram/raw/types/input_reply_to_story.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReplyToStory(TLObject): # type: ignore + """Reply to a story. + + Constructor of :obj:`~pyrogram.raw.base.InputReplyTo`. + + Details: + - Layer: ``224`` + - ID: ``5881323A`` + + Parameters: + peer (:obj:`InputPeer `): + + + story_id (``int`` ``32-bit``): + ID of the story to reply to. + + """ + + __slots__: List[str] = ["peer", "story_id"] + + ID = 0x5881323a + QUALNAME = "types.InputReplyToStory" + + def __init__(self, *, peer: "raw.base.InputPeer", story_id: int) -> None: + self.peer = peer # InputPeer + self.story_id = story_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReplyToStory": + # No flags + + peer = TLObject.read(b) + + story_id = Int.read(b) + + return InputReplyToStory(peer=peer, story_id=story_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.story_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_child_abuse.py b/pyrogram/raw/types/input_report_reason_child_abuse.py new file mode 100644 index 00000000..d82dac32 --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_child_abuse.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonChildAbuse(TLObject): # type: ignore + """Report for child abuse + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``ADF44EE3`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xadf44ee3 + QUALNAME = "types.InputReportReasonChildAbuse" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonChildAbuse": + # No flags + + return InputReportReasonChildAbuse() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_copyright.py b/pyrogram/raw/types/input_report_reason_copyright.py new file mode 100644 index 00000000..b621b03b --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_copyright.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonCopyright(TLObject): # type: ignore + """Report for copyrighted content + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``9B89F93A`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9b89f93a + QUALNAME = "types.InputReportReasonCopyright" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonCopyright": + # No flags + + return InputReportReasonCopyright() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_fake.py b/pyrogram/raw/types/input_report_reason_fake.py new file mode 100644 index 00000000..1672313f --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_fake.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonFake(TLObject): # type: ignore + """Report for impersonation + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``F5DDD6E7`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xf5ddd6e7 + QUALNAME = "types.InputReportReasonFake" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonFake": + # No flags + + return InputReportReasonFake() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_geo_irrelevant.py b/pyrogram/raw/types/input_report_reason_geo_irrelevant.py new file mode 100644 index 00000000..d2d0e7a2 --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_geo_irrelevant.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonGeoIrrelevant(TLObject): # type: ignore + """Report an irrelevant geogroup + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``DBD4FEED`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xdbd4feed + QUALNAME = "types.InputReportReasonGeoIrrelevant" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonGeoIrrelevant": + # No flags + + return InputReportReasonGeoIrrelevant() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_illegal_drugs.py b/pyrogram/raw/types/input_report_reason_illegal_drugs.py new file mode 100644 index 00000000..904f4dc2 --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_illegal_drugs.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonIllegalDrugs(TLObject): # type: ignore + """Report for illegal drugs + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``A8EB2BE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xa8eb2be + QUALNAME = "types.InputReportReasonIllegalDrugs" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonIllegalDrugs": + # No flags + + return InputReportReasonIllegalDrugs() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_other.py b/pyrogram/raw/types/input_report_reason_other.py new file mode 100644 index 00000000..4d1eaac8 --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_other.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonOther(TLObject): # type: ignore + """Other + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``C1E4A2B1`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc1e4a2b1 + QUALNAME = "types.InputReportReasonOther" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonOther": + # No flags + + return InputReportReasonOther() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_personal_details.py b/pyrogram/raw/types/input_report_reason_personal_details.py new file mode 100644 index 00000000..263e5eda --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_personal_details.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonPersonalDetails(TLObject): # type: ignore + """Report for divulgation of personal details + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``9EC7863D`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9ec7863d + QUALNAME = "types.InputReportReasonPersonalDetails" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonPersonalDetails": + # No flags + + return InputReportReasonPersonalDetails() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_pornography.py b/pyrogram/raw/types/input_report_reason_pornography.py new file mode 100644 index 00000000..90165e2f --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_pornography.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonPornography(TLObject): # type: ignore + """Report for pornography + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``2E59D922`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x2e59d922 + QUALNAME = "types.InputReportReasonPornography" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonPornography": + # No flags + + return InputReportReasonPornography() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_spam.py b/pyrogram/raw/types/input_report_reason_spam.py new file mode 100644 index 00000000..f0cb93e0 --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_spam.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonSpam(TLObject): # type: ignore + """Report for spam + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``58DBCAB8`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x58dbcab8 + QUALNAME = "types.InputReportReasonSpam" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonSpam": + # No flags + + return InputReportReasonSpam() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_report_reason_violence.py b/pyrogram/raw/types/input_report_reason_violence.py new file mode 100644 index 00000000..0d907781 --- /dev/null +++ b/pyrogram/raw/types/input_report_reason_violence.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputReportReasonViolence(TLObject): # type: ignore + """Report for violence + + Constructor of :obj:`~pyrogram.raw.base.ReportReason`. + + Details: + - Layer: ``224`` + - ID: ``1E22C78D`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1e22c78d + QUALNAME = "types.InputReportReasonViolence" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputReportReasonViolence": + # No flags + + return InputReportReasonViolence() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_saved_star_gift_chat.py b/pyrogram/raw/types/input_saved_star_gift_chat.py new file mode 100644 index 00000000..3b6f3e42 --- /dev/null +++ b/pyrogram/raw/types/input_saved_star_gift_chat.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSavedStarGiftChat(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputSavedStarGift`. + + Details: + - Layer: ``224`` + - ID: ``F101AA7F`` + + Parameters: + peer (:obj:`InputPeer `): + N/A + + saved_id (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["peer", "saved_id"] + + ID = 0xf101aa7f + QUALNAME = "types.InputSavedStarGiftChat" + + def __init__(self, *, peer: "raw.base.InputPeer", saved_id: int) -> None: + self.peer = peer # InputPeer + self.saved_id = saved_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSavedStarGiftChat": + # No flags + + peer = TLObject.read(b) + + saved_id = Long.read(b) + + return InputSavedStarGiftChat(peer=peer, saved_id=saved_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Long(self.saved_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_saved_star_gift_slug.py b/pyrogram/raw/types/input_saved_star_gift_slug.py new file mode 100644 index 00000000..a90c764a --- /dev/null +++ b/pyrogram/raw/types/input_saved_star_gift_slug.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSavedStarGiftSlug(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputSavedStarGift`. + + Details: + - Layer: ``224`` + - ID: ``2085C238`` + + Parameters: + slug (``str``): + N/A + + """ + + __slots__: List[str] = ["slug"] + + ID = 0x2085c238 + QUALNAME = "types.InputSavedStarGiftSlug" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSavedStarGiftSlug": + # No flags + + slug = String.read(b) + + return InputSavedStarGiftSlug(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_saved_star_gift_user.py b/pyrogram/raw/types/input_saved_star_gift_user.py new file mode 100644 index 00000000..f2a93679 --- /dev/null +++ b/pyrogram/raw/types/input_saved_star_gift_user.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSavedStarGiftUser(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputSavedStarGift`. + + Details: + - Layer: ``224`` + - ID: ``69279795`` + + Parameters: + msg_id (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_id"] + + ID = 0x69279795 + QUALNAME = "types.InputSavedStarGiftUser" + + def __init__(self, *, msg_id: int) -> None: + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSavedStarGiftUser": + # No flags + + msg_id = Int.read(b) + + return InputSavedStarGiftUser(msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_secure_file.py b/pyrogram/raw/types/input_secure_file.py new file mode 100644 index 00000000..1f6fbf95 --- /dev/null +++ b/pyrogram/raw/types/input_secure_file.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSecureFile(TLObject): # type: ignore + """Pre-uploaded passport file, for more info see the passport docs » + + Constructor of :obj:`~pyrogram.raw.base.InputSecureFile`. + + Details: + - Layer: ``224`` + - ID: ``5367E5BE`` + + Parameters: + id (``int`` ``64-bit``): + Secure file ID + + access_hash (``int`` ``64-bit``): + Secure file access hash + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0x5367e5be + QUALNAME = "types.InputSecureFile" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSecureFile": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputSecureFile(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_secure_file_location.py b/pyrogram/raw/types/input_secure_file_location.py new file mode 100644 index 00000000..6137a11c --- /dev/null +++ b/pyrogram/raw/types/input_secure_file_location.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSecureFileLocation(TLObject): # type: ignore + """Location of encrypted telegram passport file. + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``CBC7EE28`` + + Parameters: + id (``int`` ``64-bit``): + File ID, id parameter value from secureFile + + access_hash (``int`` ``64-bit``): + Checksum, access_hash parameter value from secureFile + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0xcbc7ee28 + QUALNAME = "types.InputSecureFileLocation" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSecureFileLocation": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputSecureFileLocation(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_secure_file_uploaded.py b/pyrogram/raw/types/input_secure_file_uploaded.py new file mode 100644 index 00000000..a35c4086 --- /dev/null +++ b/pyrogram/raw/types/input_secure_file_uploaded.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSecureFileUploaded(TLObject): # type: ignore + """Uploaded secure file, for more info see the passport docs » + + Constructor of :obj:`~pyrogram.raw.base.InputSecureFile`. + + Details: + - Layer: ``224`` + - ID: ``3334B0F0`` + + Parameters: + id (``int`` ``64-bit``): + Secure file ID + + parts (``int`` ``32-bit``): + Secure file part count + + md5_checksum (``str``): + MD5 hash of encrypted uploaded file, to be checked server-side + + file_hash (``bytes``): + File hash + + secret (``bytes``): + Secret + + """ + + __slots__: List[str] = ["id", "parts", "md5_checksum", "file_hash", "secret"] + + ID = 0x3334b0f0 + QUALNAME = "types.InputSecureFileUploaded" + + def __init__(self, *, id: int, parts: int, md5_checksum: str, file_hash: bytes, secret: bytes) -> None: + self.id = id # long + self.parts = parts # int + self.md5_checksum = md5_checksum # string + self.file_hash = file_hash # bytes + self.secret = secret # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSecureFileUploaded": + # No flags + + id = Long.read(b) + + parts = Int.read(b) + + md5_checksum = String.read(b) + + file_hash = Bytes.read(b) + + secret = Bytes.read(b) + + return InputSecureFileUploaded(id=id, parts=parts, md5_checksum=md5_checksum, file_hash=file_hash, secret=secret) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Int(self.parts)) + + b.write(String(self.md5_checksum)) + + b.write(Bytes(self.file_hash)) + + b.write(Bytes(self.secret)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_secure_value.py b/pyrogram/raw/types/input_secure_value.py new file mode 100644 index 00000000..4e26b47d --- /dev/null +++ b/pyrogram/raw/types/input_secure_value.py @@ -0,0 +1,126 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSecureValue(TLObject): # type: ignore + """Secure value, for more info see the passport docs » + + Constructor of :obj:`~pyrogram.raw.base.InputSecureValue`. + + Details: + - Layer: ``224`` + - ID: ``DB21D0A7`` + + Parameters: + type (:obj:`SecureValueType `): + Secure passport value type + + data (:obj:`SecureData `, *optional*): + Encrypted Telegram Passport element data + + front_side (:obj:`InputSecureFile `, *optional*): + Encrypted passport file with the front side of the document + + reverse_side (:obj:`InputSecureFile `, *optional*): + Encrypted passport file with the reverse side of the document + + selfie (:obj:`InputSecureFile `, *optional*): + Encrypted passport file with a selfie of the user holding the document + + translation (List of :obj:`InputSecureFile `, *optional*): + Array of encrypted passport files with translated versions of the provided documents + + files (List of :obj:`InputSecureFile `, *optional*): + Array of encrypted passport files with photos the of the documents + + plain_data (:obj:`SecurePlainData `, *optional*): + Plaintext verified passport data + + """ + + __slots__: List[str] = ["type", "data", "front_side", "reverse_side", "selfie", "translation", "files", "plain_data"] + + ID = 0xdb21d0a7 + QUALNAME = "types.InputSecureValue" + + def __init__(self, *, type: "raw.base.SecureValueType", data: "raw.base.SecureData" = None, front_side: "raw.base.InputSecureFile" = None, reverse_side: "raw.base.InputSecureFile" = None, selfie: "raw.base.InputSecureFile" = None, translation: Optional[List["raw.base.InputSecureFile"]] = None, files: Optional[List["raw.base.InputSecureFile"]] = None, plain_data: "raw.base.SecurePlainData" = None) -> None: + self.type = type # SecureValueType + self.data = data # flags.0?SecureData + self.front_side = front_side # flags.1?InputSecureFile + self.reverse_side = reverse_side # flags.2?InputSecureFile + self.selfie = selfie # flags.3?InputSecureFile + self.translation = translation # flags.6?Vector + self.files = files # flags.4?Vector + self.plain_data = plain_data # flags.5?SecurePlainData + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSecureValue": + + flags = Int.read(b) + + type = TLObject.read(b) + + data = TLObject.read(b) if flags & (1 << 0) else None + + front_side = TLObject.read(b) if flags & (1 << 1) else None + + reverse_side = TLObject.read(b) if flags & (1 << 2) else None + + selfie = TLObject.read(b) if flags & (1 << 3) else None + + translation = TLObject.read(b) if flags & (1 << 6) else [] + + files = TLObject.read(b) if flags & (1 << 4) else [] + + plain_data = TLObject.read(b) if flags & (1 << 5) else None + + return InputSecureValue(type=type, data=data, front_side=front_side, reverse_side=reverse_side, selfie=selfie, translation=translation, files=files, plain_data=plain_data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.data is not None else 0 + flags |= (1 << 1) if self.front_side is not None else 0 + flags |= (1 << 2) if self.reverse_side is not None else 0 + flags |= (1 << 3) if self.selfie is not None else 0 + flags |= (1 << 6) if self.translation else 0 + flags |= (1 << 4) if self.files else 0 + flags |= (1 << 5) if self.plain_data is not None else 0 + b.write(Int(flags)) + + b.write(self.type.write()) + + if self.data is not None: + b.write(self.data.write()) + + if self.front_side is not None: + b.write(self.front_side.write()) + + if self.reverse_side is not None: + b.write(self.reverse_side.write()) + + if self.selfie is not None: + b.write(self.selfie.write()) + + if self.translation is not None: + b.write(Vector(self.translation)) + + if self.files is not None: + b.write(Vector(self.files)) + + if self.plain_data is not None: + b.write(self.plain_data.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_single_media.py b/pyrogram/raw/types/input_single_media.py new file mode 100644 index 00000000..f267b8fd --- /dev/null +++ b/pyrogram/raw/types/input_single_media.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputSingleMedia(TLObject): # type: ignore + """A single media in an album or grouped media sent with messages.sendMultiMedia. + + Constructor of :obj:`~pyrogram.raw.base.InputSingleMedia`. + + Details: + - Layer: ``224`` + - ID: ``1CC6E91F`` + + Parameters: + media (:obj:`InputMedia `): + The media + + random_id (``int`` ``64-bit``): + Unique client media ID required to prevent message resending + + message (``str``): + A caption for the media + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + """ + + __slots__: List[str] = ["media", "random_id", "message", "entities"] + + ID = 0x1cc6e91f + QUALNAME = "types.InputSingleMedia" + + def __init__(self, *, media: "raw.base.InputMedia", random_id: int, message: str, entities: Optional[List["raw.base.MessageEntity"]] = None) -> None: + self.media = media # InputMedia + self.random_id = random_id # long + self.message = message # string + self.entities = entities # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputSingleMedia": + + flags = Int.read(b) + + media = TLObject.read(b) + + random_id = Long.read(b) + + message = String.read(b) + + entities = TLObject.read(b) if flags & (1 << 0) else [] + + return InputSingleMedia(media=media, random_id=random_id, message=message, entities=entities) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.entities else 0 + b.write(Int(flags)) + + b.write(self.media.write()) + + b.write(Long(self.random_id)) + + b.write(String(self.message)) + + if self.entities is not None: + b.write(Vector(self.entities)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_star_gift_auction.py b/pyrogram/raw/types/input_star_gift_auction.py new file mode 100644 index 00000000..3608405b --- /dev/null +++ b/pyrogram/raw/types/input_star_gift_auction.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStarGiftAuction(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStarGiftAuction`. + + Details: + - Layer: ``224`` + - ID: ``2E16C98`` + + Parameters: + gift_id (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["gift_id"] + + ID = 0x2e16c98 + QUALNAME = "types.InputStarGiftAuction" + + def __init__(self, *, gift_id: int) -> None: + self.gift_id = gift_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStarGiftAuction": + # No flags + + gift_id = Long.read(b) + + return InputStarGiftAuction(gift_id=gift_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.gift_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_star_gift_auction_slug.py b/pyrogram/raw/types/input_star_gift_auction_slug.py new file mode 100644 index 00000000..aae95e20 --- /dev/null +++ b/pyrogram/raw/types/input_star_gift_auction_slug.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStarGiftAuctionSlug(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStarGiftAuction`. + + Details: + - Layer: ``224`` + - ID: ``7AB58308`` + + Parameters: + slug (``str``): + N/A + + """ + + __slots__: List[str] = ["slug"] + + ID = 0x7ab58308 + QUALNAME = "types.InputStarGiftAuctionSlug" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStarGiftAuctionSlug": + # No flags + + slug = String.read(b) + + return InputStarGiftAuctionSlug(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_stars_transaction.py b/pyrogram/raw/types/input_stars_transaction.py new file mode 100644 index 00000000..dc36d800 --- /dev/null +++ b/pyrogram/raw/types/input_stars_transaction.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStarsTransaction(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStarsTransaction`. + + Details: + - Layer: ``224`` + - ID: ``206AE6D1`` + + Parameters: + id (``str``): + N/A + + refund (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "refund"] + + ID = 0x206ae6d1 + QUALNAME = "types.InputStarsTransaction" + + def __init__(self, *, id: str, refund: Optional[bool] = None) -> None: + self.id = id # string + self.refund = refund # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStarsTransaction": + + flags = Int.read(b) + + refund = True if flags & (1 << 0) else False + id = String.read(b) + + return InputStarsTransaction(id=id, refund=refund) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.refund else 0 + b.write(Int(flags)) + + b.write(String(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_animated_emoji.py b/pyrogram/raw/types/input_sticker_set_animated_emoji.py new file mode 100644 index 00000000..ccd2b541 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_animated_emoji.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetAnimatedEmoji(TLObject): # type: ignore + """Animated emojis stickerset + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``28703C8`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x28703c8 + QUALNAME = "types.InputStickerSetAnimatedEmoji" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetAnimatedEmoji": + # No flags + + return InputStickerSetAnimatedEmoji() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_animated_emoji_animations.py b/pyrogram/raw/types/input_sticker_set_animated_emoji_animations.py new file mode 100644 index 00000000..f6e7682b --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_animated_emoji_animations.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetAnimatedEmojiAnimations(TLObject): # type: ignore + """Animated emoji reaction stickerset (contains animations to play when a user clicks on a given animated emoji) + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``CDE3739`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xcde3739 + QUALNAME = "types.InputStickerSetAnimatedEmojiAnimations" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetAnimatedEmojiAnimations": + # No flags + + return InputStickerSetAnimatedEmojiAnimations() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_dice.py b/pyrogram/raw/types/input_sticker_set_dice.py new file mode 100644 index 00000000..cfaea4f9 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_dice.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetDice(TLObject): # type: ignore + """Used for fetching animated dice stickers + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``E67F520E`` + + Parameters: + emoticon (``str``): + The emoji, for now , and are supported + + """ + + __slots__: List[str] = ["emoticon"] + + ID = 0xe67f520e + QUALNAME = "types.InputStickerSetDice" + + def __init__(self, *, emoticon: str) -> None: + self.emoticon = emoticon # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetDice": + # No flags + + emoticon = String.read(b) + + return InputStickerSetDice(emoticon=emoticon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.emoticon)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_emoji_channel_default_statuses.py b/pyrogram/raw/types/input_sticker_set_emoji_channel_default_statuses.py new file mode 100644 index 00000000..46bac991 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_emoji_channel_default_statuses.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetEmojiChannelDefaultStatuses(TLObject): # type: ignore + """Default custom emoji status stickerset for channel statuses + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``49748553`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x49748553 + QUALNAME = "types.InputStickerSetEmojiChannelDefaultStatuses" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetEmojiChannelDefaultStatuses": + # No flags + + return InputStickerSetEmojiChannelDefaultStatuses() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_emoji_default_statuses.py b/pyrogram/raw/types/input_sticker_set_emoji_default_statuses.py new file mode 100644 index 00000000..0e1ccac8 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_emoji_default_statuses.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetEmojiDefaultStatuses(TLObject): # type: ignore + """Default custom emoji status stickerset + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``29D0F5EE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x29d0f5ee + QUALNAME = "types.InputStickerSetEmojiDefaultStatuses" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetEmojiDefaultStatuses": + # No flags + + return InputStickerSetEmojiDefaultStatuses() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_emoji_default_topic_icons.py b/pyrogram/raw/types/input_sticker_set_emoji_default_topic_icons.py new file mode 100644 index 00000000..7dd0fc9f --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_emoji_default_topic_icons.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetEmojiDefaultTopicIcons(TLObject): # type: ignore + """Default custom emoji stickerset for forum topic icons + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``44C1F8E9`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x44c1f8e9 + QUALNAME = "types.InputStickerSetEmojiDefaultTopicIcons" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetEmojiDefaultTopicIcons": + # No flags + + return InputStickerSetEmojiDefaultTopicIcons() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_emoji_generic_animations.py b/pyrogram/raw/types/input_sticker_set_emoji_generic_animations.py new file mode 100644 index 00000000..36788169 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_emoji_generic_animations.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetEmojiGenericAnimations(TLObject): # type: ignore + """Generic animation stickerset containing animations to play when reacting to messages using a normal emoji without a custom animation + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``4C4D4CE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x4c4d4ce + QUALNAME = "types.InputStickerSetEmojiGenericAnimations" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetEmojiGenericAnimations": + # No flags + + return InputStickerSetEmojiGenericAnimations() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_empty.py b/pyrogram/raw/types/input_sticker_set_empty.py new file mode 100644 index 00000000..b5b26d0a --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetEmpty(TLObject): # type: ignore + """Empty constructor + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``FFB62B95`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xffb62b95 + QUALNAME = "types.InputStickerSetEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetEmpty": + # No flags + + return InputStickerSetEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_id.py b/pyrogram/raw/types/input_sticker_set_id.py new file mode 100644 index 00000000..c2a85408 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_id.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetID(TLObject): # type: ignore + """Stickerset by ID + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``9DE7A269`` + + Parameters: + id (``int`` ``64-bit``): + ID + + access_hash (``int`` ``64-bit``): + Access hash + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0x9de7a269 + QUALNAME = "types.InputStickerSetID" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetID": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputStickerSetID(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_item.py b/pyrogram/raw/types/input_sticker_set_item.py new file mode 100644 index 00000000..9a268141 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_item.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetItem(TLObject): # type: ignore + """Sticker in a stickerset + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSetItem`. + + Details: + - Layer: ``224`` + - ID: ``32DA9E9C`` + + Parameters: + document (:obj:`InputDocument `): + The sticker + + emoji (``str``): + Associated emoji + + mask_coords (:obj:`MaskCoords `, *optional*): + Coordinates for mask sticker + + keywords (``str``, *optional*): + Set of keywords, separated by commas (can't be provided for mask stickers) + + """ + + __slots__: List[str] = ["document", "emoji", "mask_coords", "keywords"] + + ID = 0x32da9e9c + QUALNAME = "types.InputStickerSetItem" + + def __init__(self, *, document: "raw.base.InputDocument", emoji: str, mask_coords: "raw.base.MaskCoords" = None, keywords: Optional[str] = None) -> None: + self.document = document # InputDocument + self.emoji = emoji # string + self.mask_coords = mask_coords # flags.0?MaskCoords + self.keywords = keywords # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetItem": + + flags = Int.read(b) + + document = TLObject.read(b) + + emoji = String.read(b) + + mask_coords = TLObject.read(b) if flags & (1 << 0) else None + + keywords = String.read(b) if flags & (1 << 1) else None + return InputStickerSetItem(document=document, emoji=emoji, mask_coords=mask_coords, keywords=keywords) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.mask_coords is not None else 0 + flags |= (1 << 1) if self.keywords is not None else 0 + b.write(Int(flags)) + + b.write(self.document.write()) + + b.write(String(self.emoji)) + + if self.mask_coords is not None: + b.write(self.mask_coords.write()) + + if self.keywords is not None: + b.write(String(self.keywords)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_premium_gifts.py b/pyrogram/raw/types/input_sticker_set_premium_gifts.py new file mode 100644 index 00000000..67301190 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_premium_gifts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetPremiumGifts(TLObject): # type: ignore + """Stickers to show when receiving a gifted Telegram Premium subscription + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``C88B3B02`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc88b3b02 + QUALNAME = "types.InputStickerSetPremiumGifts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetPremiumGifts": + # No flags + + return InputStickerSetPremiumGifts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_short_name.py b/pyrogram/raw/types/input_sticker_set_short_name.py new file mode 100644 index 00000000..69b9a2f1 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_short_name.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetShortName(TLObject): # type: ignore + """Stickerset by short name, from a stickerset deep link » + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``861CC8A0`` + + Parameters: + short_name (``str``): + Short name from a stickerset deep link » + + """ + + __slots__: List[str] = ["short_name"] + + ID = 0x861cc8a0 + QUALNAME = "types.InputStickerSetShortName" + + def __init__(self, *, short_name: str) -> None: + self.short_name = short_name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetShortName": + # No flags + + short_name = String.read(b) + + return InputStickerSetShortName(short_name=short_name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.short_name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_thumb.py b/pyrogram/raw/types/input_sticker_set_thumb.py new file mode 100644 index 00000000..003c73b7 --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_thumb.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetThumb(TLObject): # type: ignore + """Location of stickerset thumbnail (see files) + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``9D84F3DB`` + + Parameters: + stickerset (:obj:`InputStickerSet `): + Sticker set + + thumb_version (``int`` ``32-bit``): + Thumbnail version + + """ + + __slots__: List[str] = ["stickerset", "thumb_version"] + + ID = 0x9d84f3db + QUALNAME = "types.InputStickerSetThumb" + + def __init__(self, *, stickerset: "raw.base.InputStickerSet", thumb_version: int) -> None: + self.stickerset = stickerset # InputStickerSet + self.thumb_version = thumb_version # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetThumb": + # No flags + + stickerset = TLObject.read(b) + + thumb_version = Int.read(b) + + return InputStickerSetThumb(stickerset=stickerset, thumb_version=thumb_version) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.stickerset.write()) + + b.write(Int(self.thumb_version)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_sticker_set_ton_gifts.py b/pyrogram/raw/types/input_sticker_set_ton_gifts.py new file mode 100644 index 00000000..87a227ca --- /dev/null +++ b/pyrogram/raw/types/input_sticker_set_ton_gifts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickerSetTonGifts(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStickerSet`. + + Details: + - Layer: ``224`` + - ID: ``1CF671A0`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1cf671a0 + QUALNAME = "types.InputStickerSetTonGifts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickerSetTonGifts": + # No flags + + return InputStickerSetTonGifts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_stickered_media_document.py b/pyrogram/raw/types/input_stickered_media_document.py new file mode 100644 index 00000000..f75e361e --- /dev/null +++ b/pyrogram/raw/types/input_stickered_media_document.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickeredMediaDocument(TLObject): # type: ignore + """A document with stickers attached + + Constructor of :obj:`~pyrogram.raw.base.InputStickeredMedia`. + + Details: + - Layer: ``224`` + - ID: ``438865B`` + + Parameters: + id (:obj:`InputDocument `): + The document + + """ + + __slots__: List[str] = ["id"] + + ID = 0x438865b + QUALNAME = "types.InputStickeredMediaDocument" + + def __init__(self, *, id: "raw.base.InputDocument") -> None: + self.id = id # InputDocument + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickeredMediaDocument": + # No flags + + id = TLObject.read(b) + + return InputStickeredMediaDocument(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_stickered_media_photo.py b/pyrogram/raw/types/input_stickered_media_photo.py new file mode 100644 index 00000000..03b1f4b0 --- /dev/null +++ b/pyrogram/raw/types/input_stickered_media_photo.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStickeredMediaPhoto(TLObject): # type: ignore + """A photo with stickers attached + + Constructor of :obj:`~pyrogram.raw.base.InputStickeredMedia`. + + Details: + - Layer: ``224`` + - ID: ``4A992157`` + + Parameters: + id (:obj:`InputPhoto `): + The photo + + """ + + __slots__: List[str] = ["id"] + + ID = 0x4a992157 + QUALNAME = "types.InputStickeredMediaPhoto" + + def __init__(self, *, id: "raw.base.InputPhoto") -> None: + self.id = id # InputPhoto + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStickeredMediaPhoto": + # No flags + + id = TLObject.read(b) + + return InputStickeredMediaPhoto(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_auth_code.py b/pyrogram/raw/types/input_store_payment_auth_code.py new file mode 100644 index 00000000..4e52ea0b --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_auth_code.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentAuthCode(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``9BB2636D`` + + Parameters: + phone_number (``str``): + N/A + + phone_code_hash (``str``): + N/A + + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + restore (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["phone_number", "phone_code_hash", "currency", "amount", "restore"] + + ID = 0x9bb2636d + QUALNAME = "types.InputStorePaymentAuthCode" + + def __init__(self, *, phone_number: str, phone_code_hash: str, currency: str, amount: int, restore: Optional[bool] = None) -> None: + self.phone_number = phone_number # string + self.phone_code_hash = phone_code_hash # string + self.currency = currency # string + self.amount = amount # long + self.restore = restore # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentAuthCode": + + flags = Int.read(b) + + restore = True if flags & (1 << 0) else False + phone_number = String.read(b) + + phone_code_hash = String.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + return InputStorePaymentAuthCode(phone_number=phone_number, phone_code_hash=phone_code_hash, currency=currency, amount=amount, restore=restore) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.restore else 0 + b.write(Int(flags)) + + b.write(String(self.phone_number)) + + b.write(String(self.phone_code_hash)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_gift_premium.py b/pyrogram/raw/types/input_store_payment_gift_premium.py new file mode 100644 index 00000000..907e27fb --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_gift_premium.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentGiftPremium(TLObject): # type: ignore + """Info about a gifted Telegram Premium purchase + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``616F7FE8`` + + Parameters: + user_id (:obj:`InputUser `): + The user to which the Telegram Premium subscription was gifted + + currency (``str``): + Three-letter ISO 4217 currency code + + amount (``int`` ``64-bit``): + Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + """ + + __slots__: List[str] = ["user_id", "currency", "amount"] + + ID = 0x616f7fe8 + QUALNAME = "types.InputStorePaymentGiftPremium" + + def __init__(self, *, user_id: "raw.base.InputUser", currency: str, amount: int) -> None: + self.user_id = user_id # InputUser + self.currency = currency # string + self.amount = amount # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentGiftPremium": + # No flags + + user_id = TLObject.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + return InputStorePaymentGiftPremium(user_id=user_id, currency=currency, amount=amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_premium_gift_code.py b/pyrogram/raw/types/input_store_payment_premium_gift_code.py new file mode 100644 index 00000000..ec759e60 --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_premium_gift_code.py @@ -0,0 +1,92 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentPremiumGiftCode(TLObject): # type: ignore + """Used to gift Telegram Premium subscriptions only to some specific subscribers of a channel or to some of our contacts, see here » for more info on giveaways and gifts. + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``FB790393`` + + Parameters: + users (List of :obj:`InputUser `): + The users that will receive the Telegram Premium subscriptions. + + currency (``str``): + Three-letter ISO 4217 currency code + + amount (``int`` ``64-bit``): + Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + boost_peer (:obj:`InputPeer `, *optional*): + If set, the gifts will be sent on behalf of a channel we are an admin of, which will also assign some boosts to it. Otherwise, the gift will be sent directly from the currently logged in users, and we will gain some extra boost slots. See here » for more info on giveaways and gifts. + + message (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["users", "currency", "amount", "boost_peer", "message"] + + ID = 0xfb790393 + QUALNAME = "types.InputStorePaymentPremiumGiftCode" + + def __init__(self, *, users: List["raw.base.InputUser"], currency: str, amount: int, boost_peer: "raw.base.InputPeer" = None, message: "raw.base.TextWithEntities" = None) -> None: + self.users = users # Vector + self.currency = currency # string + self.amount = amount # long + self.boost_peer = boost_peer # flags.0?InputPeer + self.message = message # flags.1?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentPremiumGiftCode": + + flags = Int.read(b) + + users = TLObject.read(b) + + boost_peer = TLObject.read(b) if flags & (1 << 0) else None + + currency = String.read(b) + + amount = Long.read(b) + + message = TLObject.read(b) if flags & (1 << 1) else None + + return InputStorePaymentPremiumGiftCode(users=users, currency=currency, amount=amount, boost_peer=boost_peer, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.boost_peer is not None else 0 + flags |= (1 << 1) if self.message is not None else 0 + b.write(Int(flags)) + + b.write(Vector(self.users)) + + if self.boost_peer is not None: + b.write(self.boost_peer.write()) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_premium_giveaway.py b/pyrogram/raw/types/input_store_payment_premium_giveaway.py new file mode 100644 index 00000000..e4a6ce6f --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_premium_giveaway.py @@ -0,0 +1,129 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentPremiumGiveaway(TLObject): # type: ignore + """Used to pay for a giveaway, see here » for more info. + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``160544CA`` + + Parameters: + boost_peer (:obj:`InputPeer `): + The channel starting the giveaway, that the user must join to participate, that will receive the giveaway boosts; see here » for more info on giveaways. + + random_id (``int`` ``64-bit``): + Random ID to avoid resending the giveaway + + until_date (``int`` ``32-bit``): + The end date of the giveaway, must be at most giveaway_period_max seconds in the future; see here » for more info on giveaways. + + currency (``str``): + Three-letter ISO 4217 currency code + + amount (``int`` ``64-bit``): + Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + only_new_subscribers (``bool``, *optional*): + If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. + + winners_are_visible (``bool``, *optional*): + If set, giveaway winners are public and will be listed in a messageMediaGiveawayResults message that will be automatically sent to the channel once the giveaway ends. + + additional_peers (List of :obj:`InputPeer `, *optional*): + Additional channels that the user must join to participate to the giveaway can be specified here. + + countries_iso2 (List of ``str``, *optional*): + The set of users that can participate to the giveaway can be restricted by passing here an explicit whitelist of up to giveaway_countries_max countries, specified as two-letter ISO 3166-1 alpha-2 country codes. + + prize_description (``str``, *optional*): + Can contain a textual description of additional giveaway prizes. + + """ + + __slots__: List[str] = ["boost_peer", "random_id", "until_date", "currency", "amount", "only_new_subscribers", "winners_are_visible", "additional_peers", "countries_iso2", "prize_description"] + + ID = 0x160544ca + QUALNAME = "types.InputStorePaymentPremiumGiveaway" + + def __init__(self, *, boost_peer: "raw.base.InputPeer", random_id: int, until_date: int, currency: str, amount: int, only_new_subscribers: Optional[bool] = None, winners_are_visible: Optional[bool] = None, additional_peers: Optional[List["raw.base.InputPeer"]] = None, countries_iso2: Optional[List[str]] = None, prize_description: Optional[str] = None) -> None: + self.boost_peer = boost_peer # InputPeer + self.random_id = random_id # long + self.until_date = until_date # int + self.currency = currency # string + self.amount = amount # long + self.only_new_subscribers = only_new_subscribers # flags.0?true + self.winners_are_visible = winners_are_visible # flags.3?true + self.additional_peers = additional_peers # flags.1?Vector + self.countries_iso2 = countries_iso2 # flags.2?Vector + self.prize_description = prize_description # flags.4?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentPremiumGiveaway": + + flags = Int.read(b) + + only_new_subscribers = True if flags & (1 << 0) else False + winners_are_visible = True if flags & (1 << 3) else False + boost_peer = TLObject.read(b) + + additional_peers = TLObject.read(b) if flags & (1 << 1) else [] + + countries_iso2 = TLObject.read(b, String) if flags & (1 << 2) else [] + + prize_description = String.read(b) if flags & (1 << 4) else None + random_id = Long.read(b) + + until_date = Int.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + return InputStorePaymentPremiumGiveaway(boost_peer=boost_peer, random_id=random_id, until_date=until_date, currency=currency, amount=amount, only_new_subscribers=only_new_subscribers, winners_are_visible=winners_are_visible, additional_peers=additional_peers, countries_iso2=countries_iso2, prize_description=prize_description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.only_new_subscribers else 0 + flags |= (1 << 3) if self.winners_are_visible else 0 + flags |= (1 << 1) if self.additional_peers else 0 + flags |= (1 << 2) if self.countries_iso2 else 0 + flags |= (1 << 4) if self.prize_description is not None else 0 + b.write(Int(flags)) + + b.write(self.boost_peer.write()) + + if self.additional_peers is not None: + b.write(Vector(self.additional_peers)) + + if self.countries_iso2 is not None: + b.write(Vector(self.countries_iso2, String)) + + if self.prize_description is not None: + b.write(String(self.prize_description)) + + b.write(Long(self.random_id)) + + b.write(Int(self.until_date)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_premium_subscription.py b/pyrogram/raw/types/input_store_payment_premium_subscription.py new file mode 100644 index 00000000..e7d7eab8 --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_premium_subscription.py @@ -0,0 +1,60 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentPremiumSubscription(TLObject): # type: ignore + """Info about a Telegram Premium purchase + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``A6751E66`` + + Parameters: + restore (``bool``, *optional*): + Pass true if this is a restore of a Telegram Premium purchase; only for the App Store + + upgrade (``bool``, *optional*): + Pass true if this is an upgrade from a monthly subscription to a yearly subscription; only for App Store + + """ + + __slots__: List[str] = ["restore", "upgrade"] + + ID = 0xa6751e66 + QUALNAME = "types.InputStorePaymentPremiumSubscription" + + def __init__(self, *, restore: Optional[bool] = None, upgrade: Optional[bool] = None) -> None: + self.restore = restore # flags.0?true + self.upgrade = upgrade # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentPremiumSubscription": + + flags = Int.read(b) + + restore = True if flags & (1 << 0) else False + upgrade = True if flags & (1 << 1) else False + return InputStorePaymentPremiumSubscription(restore=restore, upgrade=upgrade) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.restore else 0 + flags |= (1 << 1) if self.upgrade else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_stars_gift.py b/pyrogram/raw/types/input_store_payment_stars_gift.py new file mode 100644 index 00000000..b694cad6 --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_stars_gift.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentStarsGift(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``1D741EF7`` + + Parameters: + user_id (:obj:`InputUser `): + N/A + + stars (``int`` ``64-bit``): + N/A + + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["user_id", "stars", "currency", "amount"] + + ID = 0x1d741ef7 + QUALNAME = "types.InputStorePaymentStarsGift" + + def __init__(self, *, user_id: "raw.base.InputUser", stars: int, currency: str, amount: int) -> None: + self.user_id = user_id # InputUser + self.stars = stars # long + self.currency = currency # string + self.amount = amount # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentStarsGift": + # No flags + + user_id = TLObject.read(b) + + stars = Long.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + return InputStorePaymentStarsGift(user_id=user_id, stars=stars, currency=currency, amount=amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.user_id.write()) + + b.write(Long(self.stars)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_stars_giveaway.py b/pyrogram/raw/types/input_store_payment_stars_giveaway.py new file mode 100644 index 00000000..e16b2d3f --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_stars_giveaway.py @@ -0,0 +1,145 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentStarsGiveaway(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``751F08FA`` + + Parameters: + stars (``int`` ``64-bit``): + N/A + + boost_peer (:obj:`InputPeer `): + N/A + + random_id (``int`` ``64-bit``): + N/A + + until_date (``int`` ``32-bit``): + N/A + + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + users (``int`` ``32-bit``): + N/A + + only_new_subscribers (``bool``, *optional*): + N/A + + winners_are_visible (``bool``, *optional*): + N/A + + additional_peers (List of :obj:`InputPeer `, *optional*): + N/A + + countries_iso2 (List of ``str``, *optional*): + N/A + + prize_description (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars", "boost_peer", "random_id", "until_date", "currency", "amount", "users", "only_new_subscribers", "winners_are_visible", "additional_peers", "countries_iso2", "prize_description"] + + ID = 0x751f08fa + QUALNAME = "types.InputStorePaymentStarsGiveaway" + + def __init__(self, *, stars: int, boost_peer: "raw.base.InputPeer", random_id: int, until_date: int, currency: str, amount: int, users: int, only_new_subscribers: Optional[bool] = None, winners_are_visible: Optional[bool] = None, additional_peers: Optional[List["raw.base.InputPeer"]] = None, countries_iso2: Optional[List[str]] = None, prize_description: Optional[str] = None) -> None: + self.stars = stars # long + self.boost_peer = boost_peer # InputPeer + self.random_id = random_id # long + self.until_date = until_date # int + self.currency = currency # string + self.amount = amount # long + self.users = users # int + self.only_new_subscribers = only_new_subscribers # flags.0?true + self.winners_are_visible = winners_are_visible # flags.3?true + self.additional_peers = additional_peers # flags.1?Vector + self.countries_iso2 = countries_iso2 # flags.2?Vector + self.prize_description = prize_description # flags.4?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentStarsGiveaway": + + flags = Int.read(b) + + only_new_subscribers = True if flags & (1 << 0) else False + winners_are_visible = True if flags & (1 << 3) else False + stars = Long.read(b) + + boost_peer = TLObject.read(b) + + additional_peers = TLObject.read(b) if flags & (1 << 1) else [] + + countries_iso2 = TLObject.read(b, String) if flags & (1 << 2) else [] + + prize_description = String.read(b) if flags & (1 << 4) else None + random_id = Long.read(b) + + until_date = Int.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + users = Int.read(b) + + return InputStorePaymentStarsGiveaway(stars=stars, boost_peer=boost_peer, random_id=random_id, until_date=until_date, currency=currency, amount=amount, users=users, only_new_subscribers=only_new_subscribers, winners_are_visible=winners_are_visible, additional_peers=additional_peers, countries_iso2=countries_iso2, prize_description=prize_description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.only_new_subscribers else 0 + flags |= (1 << 3) if self.winners_are_visible else 0 + flags |= (1 << 1) if self.additional_peers else 0 + flags |= (1 << 2) if self.countries_iso2 else 0 + flags |= (1 << 4) if self.prize_description is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.stars)) + + b.write(self.boost_peer.write()) + + if self.additional_peers is not None: + b.write(Vector(self.additional_peers)) + + if self.countries_iso2 is not None: + b.write(Vector(self.countries_iso2, String)) + + if self.prize_description is not None: + b.write(String(self.prize_description)) + + b.write(Long(self.random_id)) + + b.write(Int(self.until_date)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + b.write(Int(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_store_payment_stars_topup.py b/pyrogram/raw/types/input_store_payment_stars_topup.py new file mode 100644 index 00000000..d8c5b899 --- /dev/null +++ b/pyrogram/raw/types/input_store_payment_stars_topup.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputStorePaymentStarsTopup(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.InputStorePaymentPurpose`. + + Details: + - Layer: ``224`` + - ID: ``F9A2A6CB`` + + Parameters: + stars (``int`` ``64-bit``): + N/A + + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + spend_purpose_peer (:obj:`InputPeer `, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars", "currency", "amount", "spend_purpose_peer"] + + ID = 0xf9a2a6cb + QUALNAME = "types.InputStorePaymentStarsTopup" + + def __init__(self, *, stars: int, currency: str, amount: int, spend_purpose_peer: "raw.base.InputPeer" = None) -> None: + self.stars = stars # long + self.currency = currency # string + self.amount = amount # long + self.spend_purpose_peer = spend_purpose_peer # flags.0?InputPeer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputStorePaymentStarsTopup": + + flags = Int.read(b) + + stars = Long.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + spend_purpose_peer = TLObject.read(b) if flags & (1 << 0) else None + + return InputStorePaymentStarsTopup(stars=stars, currency=currency, amount=amount, spend_purpose_peer=spend_purpose_peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.spend_purpose_peer is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.stars)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + if self.spend_purpose_peer is not None: + b.write(self.spend_purpose_peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_takeout_file_location.py b/pyrogram/raw/types/input_takeout_file_location.py new file mode 100644 index 00000000..03e5ce45 --- /dev/null +++ b/pyrogram/raw/types/input_takeout_file_location.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputTakeoutFileLocation(TLObject): # type: ignore + """Used to download a JSON file that will contain all personal data related to features that do not have a specialized takeout method yet, see here » for more info on the takeout API. + + Constructor of :obj:`~pyrogram.raw.base.InputFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``29BE5899`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x29be5899 + QUALNAME = "types.InputTakeoutFileLocation" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputTakeoutFileLocation": + # No flags + + return InputTakeoutFileLocation() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_theme.py b/pyrogram/raw/types/input_theme.py new file mode 100644 index 00000000..cf5ea6fb --- /dev/null +++ b/pyrogram/raw/types/input_theme.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputTheme(TLObject): # type: ignore + """Theme + + Constructor of :obj:`~pyrogram.raw.base.InputTheme`. + + Details: + - Layer: ``224`` + - ID: ``3C5693E9`` + + Parameters: + id (``int`` ``64-bit``): + ID + + access_hash (``int`` ``64-bit``): + Access hash + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0x3c5693e9 + QUALNAME = "types.InputTheme" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputTheme": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputTheme(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_theme_settings.py b/pyrogram/raw/types/input_theme_settings.py new file mode 100644 index 00000000..27f75c4c --- /dev/null +++ b/pyrogram/raw/types/input_theme_settings.py @@ -0,0 +1,109 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputThemeSettings(TLObject): # type: ignore + """Theme settings + + Constructor of :obj:`~pyrogram.raw.base.InputThemeSettings`. + + Details: + - Layer: ``224`` + - ID: ``8FDE504F`` + + Parameters: + base_theme (:obj:`BaseTheme `): + Default theme on which this theme is based + + accent_color (``int`` ``32-bit``): + Accent color, ARGB format + + message_colors_animated (``bool``, *optional*): + If set, the freeform gradient fill needs to be animated on every sent message + + outbox_accent_color (``int`` ``32-bit``, *optional*): + Accent color of outgoing messages in ARGB format + + message_colors (List of ``int`` ``32-bit``, *optional*): + The fill to be used as a background for outgoing messages, in RGB24 format. If just one or two equal colors are provided, describes a solid fill of a background. If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.If three or four colors are provided, describes a freeform gradient fill of a background. + + wallpaper (:obj:`InputWallPaper `, *optional*): + inputWallPaper or inputWallPaperSlug when passing wallpaper files for image or pattern wallpapers, inputWallPaperNoFile with id=0 otherwise. + + wallpaper_settings (:obj:`WallPaperSettings `, *optional*): + Wallpaper settings. + + """ + + __slots__: List[str] = ["base_theme", "accent_color", "message_colors_animated", "outbox_accent_color", "message_colors", "wallpaper", "wallpaper_settings"] + + ID = 0x8fde504f + QUALNAME = "types.InputThemeSettings" + + def __init__(self, *, base_theme: "raw.base.BaseTheme", accent_color: int, message_colors_animated: Optional[bool] = None, outbox_accent_color: Optional[int] = None, message_colors: Optional[List[int]] = None, wallpaper: "raw.base.InputWallPaper" = None, wallpaper_settings: "raw.base.WallPaperSettings" = None) -> None: + self.base_theme = base_theme # BaseTheme + self.accent_color = accent_color # int + self.message_colors_animated = message_colors_animated # flags.2?true + self.outbox_accent_color = outbox_accent_color # flags.3?int + self.message_colors = message_colors # flags.0?Vector + self.wallpaper = wallpaper # flags.1?InputWallPaper + self.wallpaper_settings = wallpaper_settings # flags.1?WallPaperSettings + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputThemeSettings": + + flags = Int.read(b) + + message_colors_animated = True if flags & (1 << 2) else False + base_theme = TLObject.read(b) + + accent_color = Int.read(b) + + outbox_accent_color = Int.read(b) if flags & (1 << 3) else None + message_colors = TLObject.read(b, Int) if flags & (1 << 0) else [] + + wallpaper = TLObject.read(b) if flags & (1 << 1) else None + + wallpaper_settings = TLObject.read(b) if flags & (1 << 1) else None + + return InputThemeSettings(base_theme=base_theme, accent_color=accent_color, message_colors_animated=message_colors_animated, outbox_accent_color=outbox_accent_color, message_colors=message_colors, wallpaper=wallpaper, wallpaper_settings=wallpaper_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.message_colors_animated else 0 + flags |= (1 << 3) if self.outbox_accent_color is not None else 0 + flags |= (1 << 0) if self.message_colors else 0 + flags |= (1 << 1) if self.wallpaper is not None else 0 + flags |= (1 << 1) if self.wallpaper_settings is not None else 0 + b.write(Int(flags)) + + b.write(self.base_theme.write()) + + b.write(Int(self.accent_color)) + + if self.outbox_accent_color is not None: + b.write(Int(self.outbox_accent_color)) + + if self.message_colors is not None: + b.write(Vector(self.message_colors, Int)) + + if self.wallpaper is not None: + b.write(self.wallpaper.write()) + + if self.wallpaper_settings is not None: + b.write(self.wallpaper_settings.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_theme_slug.py b/pyrogram/raw/types/input_theme_slug.py new file mode 100644 index 00000000..8518052b --- /dev/null +++ b/pyrogram/raw/types/input_theme_slug.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputThemeSlug(TLObject): # type: ignore + """Theme by theme ID + + Constructor of :obj:`~pyrogram.raw.base.InputTheme`. + + Details: + - Layer: ``224`` + - ID: ``F5890DF1`` + + Parameters: + slug (``str``): + Unique theme ID obtained from a theme deep link » + + """ + + __slots__: List[str] = ["slug"] + + ID = 0xf5890df1 + QUALNAME = "types.InputThemeSlug" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputThemeSlug": + # No flags + + slug = String.read(b) + + return InputThemeSlug(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_user.py b/pyrogram/raw/types/input_user.py new file mode 100644 index 00000000..7ebbe5d8 --- /dev/null +++ b/pyrogram/raw/types/input_user.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputUser(TLObject): # type: ignore + """Defines a user for further interaction. + + Constructor of :obj:`~pyrogram.raw.base.InputUser`. + + Details: + - Layer: ``224`` + - ID: ``F21158C6`` + + Parameters: + user_id (``int`` ``64-bit``): + User identifier + + access_hash (``int`` ``64-bit``): + access_hash value from the user constructor + + """ + + __slots__: List[str] = ["user_id", "access_hash"] + + ID = 0xf21158c6 + QUALNAME = "types.InputUser" + + def __init__(self, *, user_id: int, access_hash: int) -> None: + self.user_id = user_id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputUser": + # No flags + + user_id = Long.read(b) + + access_hash = Long.read(b) + + return InputUser(user_id=user_id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_user_empty.py b/pyrogram/raw/types/input_user_empty.py new file mode 100644 index 00000000..e8a63545 --- /dev/null +++ b/pyrogram/raw/types/input_user_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputUserEmpty(TLObject): # type: ignore + """Empty constructor, does not define a user. + + Constructor of :obj:`~pyrogram.raw.base.InputUser`. + + Details: + - Layer: ``224`` + - ID: ``B98886CF`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb98886cf + QUALNAME = "types.InputUserEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputUserEmpty": + # No flags + + return InputUserEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_user_from_message.py b/pyrogram/raw/types/input_user_from_message.py new file mode 100644 index 00000000..57b6bc45 --- /dev/null +++ b/pyrogram/raw/types/input_user_from_message.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputUserFromMessage(TLObject): # type: ignore + """Defines a min user that was seen in a certain message of a certain chat. + + Constructor of :obj:`~pyrogram.raw.base.InputUser`. + + Details: + - Layer: ``224`` + - ID: ``1DA448E2`` + + Parameters: + peer (:obj:`InputPeer `): + The chat where the user was seen + + msg_id (``int`` ``32-bit``): + The message ID + + user_id (``int`` ``64-bit``): + The identifier of the user that was seen + + """ + + __slots__: List[str] = ["peer", "msg_id", "user_id"] + + ID = 0x1da448e2 + QUALNAME = "types.InputUserFromMessage" + + def __init__(self, *, peer: "raw.base.InputPeer", msg_id: int, user_id: int) -> None: + self.peer = peer # InputPeer + self.msg_id = msg_id # int + self.user_id = user_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputUserFromMessage": + # No flags + + peer = TLObject.read(b) + + msg_id = Int.read(b) + + user_id = Long.read(b) + + return InputUserFromMessage(peer=peer, msg_id=msg_id, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.msg_id)) + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_user_self.py b/pyrogram/raw/types/input_user_self.py new file mode 100644 index 00000000..8877858c --- /dev/null +++ b/pyrogram/raw/types/input_user_self.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputUserSelf(TLObject): # type: ignore + """Defines the current user. + + Constructor of :obj:`~pyrogram.raw.base.InputUser`. + + Details: + - Layer: ``224`` + - ID: ``F7C1B13F`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xf7c1b13f + QUALNAME = "types.InputUserSelf" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputUserSelf": + # No flags + + return InputUserSelf() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/input_wall_paper.py b/pyrogram/raw/types/input_wall_paper.py new file mode 100644 index 00000000..d0e2f2d8 --- /dev/null +++ b/pyrogram/raw/types/input_wall_paper.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWallPaper(TLObject): # type: ignore + """Wallpaper + + Constructor of :obj:`~pyrogram.raw.base.InputWallPaper`. + + Details: + - Layer: ``224`` + - ID: ``E630B979`` + + Parameters: + id (``int`` ``64-bit``): + Wallpaper ID + + access_hash (``int`` ``64-bit``): + Access hash + + """ + + __slots__: List[str] = ["id", "access_hash"] + + ID = 0xe630b979 + QUALNAME = "types.InputWallPaper" + + def __init__(self, *, id: int, access_hash: int) -> None: + self.id = id # long + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWallPaper": + # No flags + + id = Long.read(b) + + access_hash = Long.read(b) + + return InputWallPaper(id=id, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_wall_paper_no_file.py b/pyrogram/raw/types/input_wall_paper_no_file.py new file mode 100644 index 00000000..ed67b91e --- /dev/null +++ b/pyrogram/raw/types/input_wall_paper_no_file.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWallPaperNoFile(TLObject): # type: ignore + """Wallpaper with no file access hash, used for example when deleting (unsave=true) wallpapers using account.saveWallPaper, specifying just the wallpaper ID. + + Constructor of :obj:`~pyrogram.raw.base.InputWallPaper`. + + Details: + - Layer: ``224`` + - ID: ``967A462E`` + + Parameters: + id (``int`` ``64-bit``): + Wallpaper ID + + """ + + __slots__: List[str] = ["id"] + + ID = 0x967a462e + QUALNAME = "types.InputWallPaperNoFile" + + def __init__(self, *, id: int) -> None: + self.id = id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWallPaperNoFile": + # No flags + + id = Long.read(b) + + return InputWallPaperNoFile(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_wall_paper_slug.py b/pyrogram/raw/types/input_wall_paper_slug.py new file mode 100644 index 00000000..29cb6ebe --- /dev/null +++ b/pyrogram/raw/types/input_wall_paper_slug.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWallPaperSlug(TLObject): # type: ignore + """Wallpaper by slug (a unique ID, obtained from a wallpaper link ») + + Constructor of :obj:`~pyrogram.raw.base.InputWallPaper`. + + Details: + - Layer: ``224`` + - ID: ``72091C80`` + + Parameters: + slug (``str``): + Unique wallpaper ID + + """ + + __slots__: List[str] = ["slug"] + + ID = 0x72091c80 + QUALNAME = "types.InputWallPaperSlug" + + def __init__(self, *, slug: str) -> None: + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWallPaperSlug": + # No flags + + slug = String.read(b) + + return InputWallPaperSlug(slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_web_document.py b/pyrogram/raw/types/input_web_document.py new file mode 100644 index 00000000..06fc3d90 --- /dev/null +++ b/pyrogram/raw/types/input_web_document.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWebDocument(TLObject): # type: ignore + """The document + + Constructor of :obj:`~pyrogram.raw.base.InputWebDocument`. + + Details: + - Layer: ``224`` + - ID: ``9BED434D`` + + Parameters: + url (``str``): + Remote document URL to be downloaded using the appropriate method + + size (``int`` ``32-bit``): + Remote file size + + mime_type (``str``): + Mime type + + attributes (List of :obj:`DocumentAttribute `): + Attributes for media types + + """ + + __slots__: List[str] = ["url", "size", "mime_type", "attributes"] + + ID = 0x9bed434d + QUALNAME = "types.InputWebDocument" + + def __init__(self, *, url: str, size: int, mime_type: str, attributes: List["raw.base.DocumentAttribute"]) -> None: + self.url = url # string + self.size = size # int + self.mime_type = mime_type # string + self.attributes = attributes # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWebDocument": + # No flags + + url = String.read(b) + + size = Int.read(b) + + mime_type = String.read(b) + + attributes = TLObject.read(b) + + return InputWebDocument(url=url, size=size, mime_type=mime_type, attributes=attributes) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(Int(self.size)) + + b.write(String(self.mime_type)) + + b.write(Vector(self.attributes)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_web_file_audio_album_thumb_location.py b/pyrogram/raw/types/input_web_file_audio_album_thumb_location.py new file mode 100644 index 00000000..a5af5e28 --- /dev/null +++ b/pyrogram/raw/types/input_web_file_audio_album_thumb_location.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWebFileAudioAlbumThumbLocation(TLObject): # type: ignore + """Used to download an album cover for any music file using upload.getWebFile, see the webfile docs for more info ». + + Constructor of :obj:`~pyrogram.raw.base.InputWebFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``F46FE924`` + + Parameters: + small (``bool``, *optional*): + Used to return a thumbnail with 100x100 resolution (instead of the default 600x600) + + document (:obj:`InputDocument `, *optional*): + The audio file in question: must NOT be provided in secret chats, provide the title and performer fields instead. + + title (``str``, *optional*): + Song title: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits. + + performer (``str``, *optional*): + Song performer: should only be used in secret chats, in normal chats provide document instead, as it has more lax rate limits. + + """ + + __slots__: List[str] = ["small", "document", "title", "performer"] + + ID = 0xf46fe924 + QUALNAME = "types.InputWebFileAudioAlbumThumbLocation" + + def __init__(self, *, small: Optional[bool] = None, document: "raw.base.InputDocument" = None, title: Optional[str] = None, performer: Optional[str] = None) -> None: + self.small = small # flags.2?true + self.document = document # flags.0?InputDocument + self.title = title # flags.1?string + self.performer = performer # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWebFileAudioAlbumThumbLocation": + + flags = Int.read(b) + + small = True if flags & (1 << 2) else False + document = TLObject.read(b) if flags & (1 << 0) else None + + title = String.read(b) if flags & (1 << 1) else None + performer = String.read(b) if flags & (1 << 1) else None + return InputWebFileAudioAlbumThumbLocation(small=small, document=document, title=title, performer=performer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.small else 0 + flags |= (1 << 0) if self.document is not None else 0 + flags |= (1 << 1) if self.title is not None else 0 + flags |= (1 << 1) if self.performer is not None else 0 + b.write(Int(flags)) + + if self.document is not None: + b.write(self.document.write()) + + if self.title is not None: + b.write(String(self.title)) + + if self.performer is not None: + b.write(String(self.performer)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_web_file_geo_point_location.py b/pyrogram/raw/types/input_web_file_geo_point_location.py new file mode 100644 index 00000000..d7197dda --- /dev/null +++ b/pyrogram/raw/types/input_web_file_geo_point_location.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWebFileGeoPointLocation(TLObject): # type: ignore + """Used to download a server-generated image with the map preview from a geoPoint, see the webfile docs for more info ». + + Constructor of :obj:`~pyrogram.raw.base.InputWebFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``9F2221C9`` + + Parameters: + geo_point (:obj:`InputGeoPoint `): + Generated from the lat, long and accuracy_radius parameters of the geoPoint + + access_hash (``int`` ``64-bit``): + Access hash of the geoPoint + + w (``int`` ``32-bit``): + Map width in pixels before applying scale; 16-1024 + + h (``int`` ``32-bit``): + Map height in pixels before applying scale; 16-1024 + + zoom (``int`` ``32-bit``): + Map zoom level; 13-20 + + scale (``int`` ``32-bit``): + Map scale; 1-3 + + """ + + __slots__: List[str] = ["geo_point", "access_hash", "w", "h", "zoom", "scale"] + + ID = 0x9f2221c9 + QUALNAME = "types.InputWebFileGeoPointLocation" + + def __init__(self, *, geo_point: "raw.base.InputGeoPoint", access_hash: int, w: int, h: int, zoom: int, scale: int) -> None: + self.geo_point = geo_point # InputGeoPoint + self.access_hash = access_hash # long + self.w = w # int + self.h = h # int + self.zoom = zoom # int + self.scale = scale # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWebFileGeoPointLocation": + # No flags + + geo_point = TLObject.read(b) + + access_hash = Long.read(b) + + w = Int.read(b) + + h = Int.read(b) + + zoom = Int.read(b) + + scale = Int.read(b) + + return InputWebFileGeoPointLocation(geo_point=geo_point, access_hash=access_hash, w=w, h=h, zoom=zoom, scale=scale) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo_point.write()) + + b.write(Long(self.access_hash)) + + b.write(Int(self.w)) + + b.write(Int(self.h)) + + b.write(Int(self.zoom)) + + b.write(Int(self.scale)) + + return b.getvalue() diff --git a/pyrogram/raw/types/input_web_file_location.py b/pyrogram/raw/types/input_web_file_location.py new file mode 100644 index 00000000..a98d296d --- /dev/null +++ b/pyrogram/raw/types/input_web_file_location.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InputWebFileLocation(TLObject): # type: ignore + """Location of a remote HTTP(s) file + + Constructor of :obj:`~pyrogram.raw.base.InputWebFileLocation`. + + Details: + - Layer: ``224`` + - ID: ``C239D686`` + + Parameters: + url (``str``): + HTTP URL of file + + access_hash (``int`` ``64-bit``): + Access hash + + """ + + __slots__: List[str] = ["url", "access_hash"] + + ID = 0xc239d686 + QUALNAME = "types.InputWebFileLocation" + + def __init__(self, *, url: str, access_hash: int) -> None: + self.url = url # string + self.access_hash = access_hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InputWebFileLocation": + # No flags + + url = String.read(b) + + access_hash = Long.read(b) + + return InputWebFileLocation(url=url, access_hash=access_hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(Long(self.access_hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/invoice.py b/pyrogram/raw/types/invoice.py new file mode 100644 index 00000000..00036a7e --- /dev/null +++ b/pyrogram/raw/types/invoice.py @@ -0,0 +1,155 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Invoice(TLObject): # type: ignore + """Invoice + + Constructor of :obj:`~pyrogram.raw.base.Invoice`. + + Details: + - Layer: ``224`` + - ID: ``49EE584`` + + Parameters: + currency (``str``): + Three-letter ISO 4217 currency code + + prices (List of :obj:`LabeledPrice `): + Price breakdown, a list of components (e.g. product price, tax, discount, delivery cost, delivery tax, bonus, etc.) + + test (``bool``, *optional*): + Test invoice + + name_requested (``bool``, *optional*): + Set this flag if you require the user's full name to complete the order + + phone_requested (``bool``, *optional*): + Set this flag if you require the user's phone number to complete the order + + email_requested (``bool``, *optional*): + Set this flag if you require the user's email address to complete the order + + shipping_address_requested (``bool``, *optional*): + Set this flag if you require the user's shipping address to complete the order + + flexible (``bool``, *optional*): + Set this flag if the final price depends on the shipping method + + phone_to_provider (``bool``, *optional*): + Set this flag if user's phone number should be sent to provider + + email_to_provider (``bool``, *optional*): + Set this flag if user's email address should be sent to provider + + recurring (``bool``, *optional*): + Whether this is a recurring payment + + max_tip_amount (``int`` ``64-bit``, *optional*): + The maximum accepted amount for tips in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + suggested_tip_amounts (List of ``int`` ``64-bit``, *optional*): + A vector of suggested amounts of tips in the smallest units of the currency (integer, not float/double). At most 4 suggested tip amounts can be specified. The suggested tip amounts must be positive, passed in a strictly increased order and must not exceed max_tip_amount. + + terms_url (``str``, *optional*): + Terms of service URL + + subscription_period (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["currency", "prices", "test", "name_requested", "phone_requested", "email_requested", "shipping_address_requested", "flexible", "phone_to_provider", "email_to_provider", "recurring", "max_tip_amount", "suggested_tip_amounts", "terms_url", "subscription_period"] + + ID = 0x49ee584 + QUALNAME = "types.Invoice" + + def __init__(self, *, currency: str, prices: List["raw.base.LabeledPrice"], test: Optional[bool] = None, name_requested: Optional[bool] = None, phone_requested: Optional[bool] = None, email_requested: Optional[bool] = None, shipping_address_requested: Optional[bool] = None, flexible: Optional[bool] = None, phone_to_provider: Optional[bool] = None, email_to_provider: Optional[bool] = None, recurring: Optional[bool] = None, max_tip_amount: Optional[int] = None, suggested_tip_amounts: Optional[List[int]] = None, terms_url: Optional[str] = None, subscription_period: Optional[int] = None) -> None: + self.currency = currency # string + self.prices = prices # Vector + self.test = test # flags.0?true + self.name_requested = name_requested # flags.1?true + self.phone_requested = phone_requested # flags.2?true + self.email_requested = email_requested # flags.3?true + self.shipping_address_requested = shipping_address_requested # flags.4?true + self.flexible = flexible # flags.5?true + self.phone_to_provider = phone_to_provider # flags.6?true + self.email_to_provider = email_to_provider # flags.7?true + self.recurring = recurring # flags.9?true + self.max_tip_amount = max_tip_amount # flags.8?long + self.suggested_tip_amounts = suggested_tip_amounts # flags.8?Vector + self.terms_url = terms_url # flags.10?string + self.subscription_period = subscription_period # flags.11?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Invoice": + + flags = Int.read(b) + + test = True if flags & (1 << 0) else False + name_requested = True if flags & (1 << 1) else False + phone_requested = True if flags & (1 << 2) else False + email_requested = True if flags & (1 << 3) else False + shipping_address_requested = True if flags & (1 << 4) else False + flexible = True if flags & (1 << 5) else False + phone_to_provider = True if flags & (1 << 6) else False + email_to_provider = True if flags & (1 << 7) else False + recurring = True if flags & (1 << 9) else False + currency = String.read(b) + + prices = TLObject.read(b) + + max_tip_amount = Long.read(b) if flags & (1 << 8) else None + suggested_tip_amounts = TLObject.read(b, Long) if flags & (1 << 8) else [] + + terms_url = String.read(b) if flags & (1 << 10) else None + subscription_period = Int.read(b) if flags & (1 << 11) else None + return Invoice(currency=currency, prices=prices, test=test, name_requested=name_requested, phone_requested=phone_requested, email_requested=email_requested, shipping_address_requested=shipping_address_requested, flexible=flexible, phone_to_provider=phone_to_provider, email_to_provider=email_to_provider, recurring=recurring, max_tip_amount=max_tip_amount, suggested_tip_amounts=suggested_tip_amounts, terms_url=terms_url, subscription_period=subscription_period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.test else 0 + flags |= (1 << 1) if self.name_requested else 0 + flags |= (1 << 2) if self.phone_requested else 0 + flags |= (1 << 3) if self.email_requested else 0 + flags |= (1 << 4) if self.shipping_address_requested else 0 + flags |= (1 << 5) if self.flexible else 0 + flags |= (1 << 6) if self.phone_to_provider else 0 + flags |= (1 << 7) if self.email_to_provider else 0 + flags |= (1 << 9) if self.recurring else 0 + flags |= (1 << 8) if self.max_tip_amount is not None else 0 + flags |= (1 << 8) if self.suggested_tip_amounts else 0 + flags |= (1 << 10) if self.terms_url is not None else 0 + flags |= (1 << 11) if self.subscription_period is not None else 0 + b.write(Int(flags)) + + b.write(String(self.currency)) + + b.write(Vector(self.prices)) + + if self.max_tip_amount is not None: + b.write(Long(self.max_tip_amount)) + + if self.suggested_tip_amounts is not None: + b.write(Vector(self.suggested_tip_amounts, Long)) + + if self.terms_url is not None: + b.write(String(self.terms_url)) + + if self.subscription_period is not None: + b.write(Int(self.subscription_period)) + + return b.getvalue() diff --git a/pyrogram/raw/types/ip_port.py b/pyrogram/raw/types/ip_port.py new file mode 100644 index 00000000..140be895 --- /dev/null +++ b/pyrogram/raw/types/ip_port.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class IpPort(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.IpPort`. + + Details: + - Layer: ``224`` + - ID: ``D433AD73`` + + Parameters: + ipv4 (``int`` ``32-bit``): + N/A + + port (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["ipv4", "port"] + + ID = 0xd433ad73 + QUALNAME = "types.IpPort" + + def __init__(self, *, ipv4: int, port: int) -> None: + self.ipv4 = ipv4 # int + self.port = port # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "IpPort": + # No flags + + ipv4 = Int.read(b) + + port = Int.read(b) + + return IpPort(ipv4=ipv4, port=port) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.ipv4)) + + b.write(Int(self.port)) + + return b.getvalue() diff --git a/pyrogram/raw/types/ip_port_secret.py b/pyrogram/raw/types/ip_port_secret.py new file mode 100644 index 00000000..6dad5c2e --- /dev/null +++ b/pyrogram/raw/types/ip_port_secret.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class IpPortSecret(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.IpPort`. + + Details: + - Layer: ``224`` + - ID: ``37982646`` + + Parameters: + ipv4 (``int`` ``32-bit``): + N/A + + port (``int`` ``32-bit``): + N/A + + secret (``bytes``): + N/A + + """ + + __slots__: List[str] = ["ipv4", "port", "secret"] + + ID = 0x37982646 + QUALNAME = "types.IpPortSecret" + + def __init__(self, *, ipv4: int, port: int, secret: bytes) -> None: + self.ipv4 = ipv4 # int + self.port = port # int + self.secret = secret # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "IpPortSecret": + # No flags + + ipv4 = Int.read(b) + + port = Int.read(b) + + secret = Bytes.read(b) + + return IpPortSecret(ipv4=ipv4, port=port, secret=secret) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.ipv4)) + + b.write(Int(self.port)) + + b.write(Bytes(self.secret)) + + return b.getvalue() diff --git a/pyrogram/raw/types/json_array.py b/pyrogram/raw/types/json_array.py new file mode 100644 index 00000000..7b600200 --- /dev/null +++ b/pyrogram/raw/types/json_array.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonArray(TLObject): # type: ignore + """JSON array + + Constructor of :obj:`~pyrogram.raw.base.JSONValue`. + + Details: + - Layer: ``224`` + - ID: ``F7444763`` + + Parameters: + value (List of :obj:`JSONValue `): + JSON values + + """ + + __slots__: List[str] = ["value"] + + ID = 0xf7444763 + QUALNAME = "types.JsonArray" + + def __init__(self, *, value: List["raw.base.JSONValue"]) -> None: + self.value = value # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonArray": + # No flags + + value = TLObject.read(b) + + return JsonArray(value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/json_bool.py b/pyrogram/raw/types/json_bool.py new file mode 100644 index 00000000..3fd828ca --- /dev/null +++ b/pyrogram/raw/types/json_bool.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonBool(TLObject): # type: ignore + """JSON boolean value + + Constructor of :obj:`~pyrogram.raw.base.JSONValue`. + + Details: + - Layer: ``224`` + - ID: ``C7345E6A`` + + Parameters: + value (``bool``): + Value + + """ + + __slots__: List[str] = ["value"] + + ID = 0xc7345e6a + QUALNAME = "types.JsonBool" + + def __init__(self, *, value: bool) -> None: + self.value = value # Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonBool": + # No flags + + value = Bool.read(b) + + return JsonBool(value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bool(self.value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/json_null.py b/pyrogram/raw/types/json_null.py new file mode 100644 index 00000000..7dae016c --- /dev/null +++ b/pyrogram/raw/types/json_null.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonNull(TLObject): # type: ignore + """null JSON value + + Constructor of :obj:`~pyrogram.raw.base.JSONValue`. + + Details: + - Layer: ``224`` + - ID: ``3F6D7B68`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3f6d7b68 + QUALNAME = "types.JsonNull" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonNull": + # No flags + + return JsonNull() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/json_number.py b/pyrogram/raw/types/json_number.py new file mode 100644 index 00000000..e325b06f --- /dev/null +++ b/pyrogram/raw/types/json_number.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonNumber(TLObject): # type: ignore + """JSON numeric value + + Constructor of :obj:`~pyrogram.raw.base.JSONValue`. + + Details: + - Layer: ``224`` + - ID: ``2BE0DFA4`` + + Parameters: + value (``float`` ``64-bit``): + Value + + """ + + __slots__: List[str] = ["value"] + + ID = 0x2be0dfa4 + QUALNAME = "types.JsonNumber" + + def __init__(self, *, value: float) -> None: + self.value = value # double + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonNumber": + # No flags + + value = Double.read(b) + + return JsonNumber(value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Double(self.value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/json_object.py b/pyrogram/raw/types/json_object.py new file mode 100644 index 00000000..a4b3819b --- /dev/null +++ b/pyrogram/raw/types/json_object.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonObject(TLObject): # type: ignore + """JSON object value + + Constructor of :obj:`~pyrogram.raw.base.JSONValue`. + + Details: + - Layer: ``224`` + - ID: ``99C1D49D`` + + Parameters: + value (List of :obj:`JSONObjectValue `): + Values + + """ + + __slots__: List[str] = ["value"] + + ID = 0x99c1d49d + QUALNAME = "types.JsonObject" + + def __init__(self, *, value: List["raw.base.JSONObjectValue"]) -> None: + self.value = value # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonObject": + # No flags + + value = TLObject.read(b) + + return JsonObject(value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/json_object_value.py b/pyrogram/raw/types/json_object_value.py new file mode 100644 index 00000000..250c851f --- /dev/null +++ b/pyrogram/raw/types/json_object_value.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonObjectValue(TLObject): # type: ignore + """JSON key: value pair + + Constructor of :obj:`~pyrogram.raw.base.JSONObjectValue`. + + Details: + - Layer: ``224`` + - ID: ``C0DE1BD9`` + + Parameters: + key (``str``): + Key + + value (:obj:`JSONValue `): + Value + + """ + + __slots__: List[str] = ["key", "value"] + + ID = 0xc0de1bd9 + QUALNAME = "types.JsonObjectValue" + + def __init__(self, *, key: str, value: "raw.base.JSONValue") -> None: + self.key = key # string + self.value = value # JSONValue + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonObjectValue": + # No flags + + key = String.read(b) + + value = TLObject.read(b) + + return JsonObjectValue(key=key, value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.key)) + + b.write(self.value.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/json_string.py b/pyrogram/raw/types/json_string.py new file mode 100644 index 00000000..bb683e26 --- /dev/null +++ b/pyrogram/raw/types/json_string.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class JsonString(TLObject): # type: ignore + """JSON string + + Constructor of :obj:`~pyrogram.raw.base.JSONValue`. + + Details: + - Layer: ``224`` + - ID: ``B71E767A`` + + Parameters: + value (``str``): + Value + + """ + + __slots__: List[str] = ["value"] + + ID = 0xb71e767a + QUALNAME = "types.JsonString" + + def __init__(self, *, value: str) -> None: + self.value = value # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "JsonString": + # No flags + + value = String.read(b) + + return JsonString(value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button.py b/pyrogram/raw/types/keyboard_button.py new file mode 100644 index 00000000..8eb8e87c --- /dev/null +++ b/pyrogram/raw/types/keyboard_button.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButton(TLObject): # type: ignore + """Bot keyboard button + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``7D170CFF`` + + Parameters: + text (``str``): + Button text + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "style"] + + ID = 0x7d170cff + QUALNAME = "types.KeyboardButton" + + def __init__(self, *, text: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButton": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + return KeyboardButton(text=text, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_buy.py b/pyrogram/raw/types/keyboard_button_buy.py new file mode 100644 index 00000000..b777e7d3 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_buy.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonBuy(TLObject): # type: ignore + """Button to buy a product + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``3FA53905`` + + Parameters: + text (``str``): + Button text + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "style"] + + ID = 0x3fa53905 + QUALNAME = "types.KeyboardButtonBuy" + + def __init__(self, *, text: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonBuy": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + return KeyboardButtonBuy(text=text, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_callback.py b/pyrogram/raw/types/keyboard_button_callback.py new file mode 100644 index 00000000..c6a807c7 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_callback.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonCallback(TLObject): # type: ignore + """Callback button + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``E62BC960`` + + Parameters: + text (``str``): + Button text + + data (``bytes``): + Callback data + + requires_password (``bool``, *optional*): + Whether the user should verify his identity by entering his 2FA SRP parameters to the messages.getBotCallbackAnswer method. NOTE: telegram and the bot WILL NOT have access to the plaintext password, thanks to SRP. This button is mainly used by the official @botfather bot, for verifying the user's identity before transferring ownership of a bot to another user. + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "data", "requires_password", "style"] + + ID = 0xe62bc960 + QUALNAME = "types.KeyboardButtonCallback" + + def __init__(self, *, text: str, data: bytes, requires_password: Optional[bool] = None, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.data = data # bytes + self.requires_password = requires_password # flags.0?true + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonCallback": + + flags = Int.read(b) + + requires_password = True if flags & (1 << 0) else False + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + data = Bytes.read(b) + + return KeyboardButtonCallback(text=text, data=data, requires_password=requires_password, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.requires_password else 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(Bytes(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_copy.py b/pyrogram/raw/types/keyboard_button_copy.py new file mode 100644 index 00000000..8989eba4 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_copy.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonCopy(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``BCC4AF10`` + + Parameters: + text (``str``): + N/A + + copy_text (``str``): + N/A + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "copy_text", "style"] + + ID = 0xbcc4af10 + QUALNAME = "types.KeyboardButtonCopy" + + def __init__(self, *, text: str, copy_text: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.copy_text = copy_text # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonCopy": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + copy_text = String.read(b) + + return KeyboardButtonCopy(text=text, copy_text=copy_text, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(String(self.copy_text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_game.py b/pyrogram/raw/types/keyboard_button_game.py new file mode 100644 index 00000000..7a76b519 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_game.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonGame(TLObject): # type: ignore + """Button to start a game + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``89C590F9`` + + Parameters: + text (``str``): + Button text + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "style"] + + ID = 0x89c590f9 + QUALNAME = "types.KeyboardButtonGame" + + def __init__(self, *, text: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonGame": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + return KeyboardButtonGame(text=text, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_request_geo_location.py b/pyrogram/raw/types/keyboard_button_request_geo_location.py new file mode 100644 index 00000000..382e9f5d --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_request_geo_location.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonRequestGeoLocation(TLObject): # type: ignore + """Button to request a user's geolocation + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``AA40F94D`` + + Parameters: + text (``str``): + Button text + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "style"] + + ID = 0xaa40f94d + QUALNAME = "types.KeyboardButtonRequestGeoLocation" + + def __init__(self, *, text: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonRequestGeoLocation": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + return KeyboardButtonRequestGeoLocation(text=text, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_request_peer.py b/pyrogram/raw/types/keyboard_button_request_peer.py new file mode 100644 index 00000000..7333110f --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_request_peer.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonRequestPeer(TLObject): # type: ignore + """Prompts the user to select and share one or more peers with the bot using messages.sendBotRequestedPeer + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``5B0F15F5`` + + Parameters: + text (``str``): + Button text + + button_id (``int`` ``32-bit``): + Button ID, to be passed to messages.sendBotRequestedPeer. + + peer_type (:obj:`RequestPeerType `): + Filtering criteria to use for the peer selection list shown to the user. The list should display all existing peers of the specified type, and should also offer an option for the user to create and immediately use one or more (up to max_quantity) peers of the specified type, if needed. + + max_quantity (``int`` ``32-bit``): + Maximum number of peers that can be chosne. + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "button_id", "peer_type", "max_quantity", "style"] + + ID = 0x5b0f15f5 + QUALNAME = "types.KeyboardButtonRequestPeer" + + def __init__(self, *, text: str, button_id: int, peer_type: "raw.base.RequestPeerType", max_quantity: int, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.button_id = button_id # int + self.peer_type = peer_type # RequestPeerType + self.max_quantity = max_quantity # int + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonRequestPeer": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + button_id = Int.read(b) + + peer_type = TLObject.read(b) + + max_quantity = Int.read(b) + + return KeyboardButtonRequestPeer(text=text, button_id=button_id, peer_type=peer_type, max_quantity=max_quantity, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(Int(self.button_id)) + + b.write(self.peer_type.write()) + + b.write(Int(self.max_quantity)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_request_phone.py b/pyrogram/raw/types/keyboard_button_request_phone.py new file mode 100644 index 00000000..130c3c5f --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_request_phone.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonRequestPhone(TLObject): # type: ignore + """Button to request a user's phone number + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``417EFD8F`` + + Parameters: + text (``str``): + Button text + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "style"] + + ID = 0x417efd8f + QUALNAME = "types.KeyboardButtonRequestPhone" + + def __init__(self, *, text: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonRequestPhone": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + return KeyboardButtonRequestPhone(text=text, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_request_poll.py b/pyrogram/raw/types/keyboard_button_request_poll.py new file mode 100644 index 00000000..7d89c9c2 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_request_poll.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonRequestPoll(TLObject): # type: ignore + """A button that allows the user to create and send a poll when pressed; available only in private + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``7A11D782`` + + Parameters: + text (``str``): + Button text + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + quiz (``bool``, *optional*): + If set, only quiz polls can be sent + + """ + + __slots__: List[str] = ["text", "style", "quiz"] + + ID = 0x7a11d782 + QUALNAME = "types.KeyboardButtonRequestPoll" + + def __init__(self, *, text: str, style: "raw.base.KeyboardButtonStyle" = None, quiz: Optional[bool] = None) -> None: + self.text = text # string + self.style = style # flags.10?KeyboardButtonStyle + self.quiz = quiz # flags.0?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonRequestPoll": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + quiz = Bool.read(b) if flags & (1 << 0) else None + text = String.read(b) + + return KeyboardButtonRequestPoll(text=text, style=style, quiz=quiz) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + flags |= (1 << 0) if self.quiz is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + if self.quiz is not None: + b.write(Bool(self.quiz)) + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_row.py b/pyrogram/raw/types/keyboard_button_row.py new file mode 100644 index 00000000..339b3a06 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_row.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonRow(TLObject): # type: ignore + """Inline keyboard row + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButtonRow`. + + Details: + - Layer: ``224`` + - ID: ``77608B83`` + + Parameters: + buttons (List of :obj:`KeyboardButton `): + Bot or inline keyboard buttons + + """ + + __slots__: List[str] = ["buttons"] + + ID = 0x77608b83 + QUALNAME = "types.KeyboardButtonRow" + + def __init__(self, *, buttons: List["raw.base.KeyboardButton"]) -> None: + self.buttons = buttons # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonRow": + # No flags + + buttons = TLObject.read(b) + + return KeyboardButtonRow(buttons=buttons) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.buttons)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_simple_web_view.py b/pyrogram/raw/types/keyboard_button_simple_web_view.py new file mode 100644 index 00000000..14d4e8cc --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_simple_web_view.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonSimpleWebView(TLObject): # type: ignore + """Button to open a bot mini app using messages.requestSimpleWebView, without sending user information to the web app. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``E15C4370`` + + Parameters: + text (``str``): + Button text + + url (``str``): + Web app URL + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "url", "style"] + + ID = 0xe15c4370 + QUALNAME = "types.KeyboardButtonSimpleWebView" + + def __init__(self, *, text: str, url: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.url = url # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonSimpleWebView": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + url = String.read(b) + + return KeyboardButtonSimpleWebView(text=text, url=url, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_style.py b/pyrogram/raw/types/keyboard_button_style.py new file mode 100644 index 00000000..1792fa54 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_style.py @@ -0,0 +1,75 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonStyle(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButtonStyle`. + + Details: + - Layer: ``224`` + - ID: ``4FDD3430`` + + Parameters: + bg_primary (``bool``, *optional*): + N/A + + bg_danger (``bool``, *optional*): + N/A + + bg_success (``bool``, *optional*): + N/A + + icon (``int`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["bg_primary", "bg_danger", "bg_success", "icon"] + + ID = 0x4fdd3430 + QUALNAME = "types.KeyboardButtonStyle" + + def __init__(self, *, bg_primary: Optional[bool] = None, bg_danger: Optional[bool] = None, bg_success: Optional[bool] = None, icon: Optional[int] = None) -> None: + self.bg_primary = bg_primary # flags.0?true + self.bg_danger = bg_danger # flags.1?true + self.bg_success = bg_success # flags.2?true + self.icon = icon # flags.3?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonStyle": + + flags = Int.read(b) + + bg_primary = True if flags & (1 << 0) else False + bg_danger = True if flags & (1 << 1) else False + bg_success = True if flags & (1 << 2) else False + icon = Long.read(b) if flags & (1 << 3) else None + return KeyboardButtonStyle(bg_primary=bg_primary, bg_danger=bg_danger, bg_success=bg_success, icon=icon) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.bg_primary else 0 + flags |= (1 << 1) if self.bg_danger else 0 + flags |= (1 << 2) if self.bg_success else 0 + flags |= (1 << 3) if self.icon is not None else 0 + b.write(Int(flags)) + + if self.icon is not None: + b.write(Long(self.icon)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_switch_inline.py b/pyrogram/raw/types/keyboard_button_switch_inline.py new file mode 100644 index 00000000..024cb118 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_switch_inline.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonSwitchInline(TLObject): # type: ignore + """Button to force a user to switch to inline mode: pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``991399FC`` + + Parameters: + text (``str``): + Button label + + query (``str``): + The inline query to use + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + same_peer (``bool``, *optional*): + If set, pressing the button will insert the bot's username and the specified inline query in the current chat's input field. + + peer_types (List of :obj:`InlineQueryPeerType `, *optional*): + Filter to use when selecting chats. + + """ + + __slots__: List[str] = ["text", "query", "style", "same_peer", "peer_types"] + + ID = 0x991399fc + QUALNAME = "types.KeyboardButtonSwitchInline" + + def __init__(self, *, text: str, query: str, style: "raw.base.KeyboardButtonStyle" = None, same_peer: Optional[bool] = None, peer_types: Optional[List["raw.base.InlineQueryPeerType"]] = None) -> None: + self.text = text # string + self.query = query # string + self.style = style # flags.10?KeyboardButtonStyle + self.same_peer = same_peer # flags.0?true + self.peer_types = peer_types # flags.1?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonSwitchInline": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + same_peer = True if flags & (1 << 0) else False + text = String.read(b) + + query = String.read(b) + + peer_types = TLObject.read(b) if flags & (1 << 1) else [] + + return KeyboardButtonSwitchInline(text=text, query=query, style=style, same_peer=same_peer, peer_types=peer_types) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + flags |= (1 << 0) if self.same_peer else 0 + flags |= (1 << 1) if self.peer_types else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(String(self.query)) + + if self.peer_types is not None: + b.write(Vector(self.peer_types)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_url.py b/pyrogram/raw/types/keyboard_button_url.py new file mode 100644 index 00000000..69b74e2d --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_url.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonUrl(TLObject): # type: ignore + """URL button + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``D80C25EC`` + + Parameters: + text (``str``): + Button label + + url (``str``): + URL + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "url", "style"] + + ID = 0xd80c25ec + QUALNAME = "types.KeyboardButtonUrl" + + def __init__(self, *, text: str, url: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.url = url # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonUrl": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + url = String.read(b) + + return KeyboardButtonUrl(text=text, url=url, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_url_auth.py b/pyrogram/raw/types/keyboard_button_url_auth.py new file mode 100644 index 00000000..fe8a60f7 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_url_auth.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonUrlAuth(TLObject): # type: ignore + """Button to request a user to authorize via URL using Seamless Telegram Login. When the user clicks on such a button, messages.requestUrlAuth should be called, providing the button_id and the ID of the container message. The returned urlAuthResultRequest object will contain more details about the authorization request (request_write_access if the bot would like to send messages to the user along with the username of the bot which will be used for user authorization). Finally, the user can choose to call messages.acceptUrlAuth to get a urlAuthResultAccepted with the URL to open instead of the url of this constructor, or a urlAuthResultDefault, in which case the url of this constructor must be opened, instead. If the user refuses the authorization request but still wants to open the link, the url of this constructor must be used. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``F51006F9`` + + Parameters: + text (``str``): + Button label + + url (``str``): + An HTTP URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in Receiving authorization data.NOTE: Services must always check the hash of the received data to verify the authentication and the integrity of the data as described in Checking authorization. + + button_id (``int`` ``32-bit``): + ID of the button to pass to messages.requestUrlAuth + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + fwd_text (``str``, *optional*): + New text of the button in forwarded messages. + + """ + + __slots__: List[str] = ["text", "url", "button_id", "style", "fwd_text"] + + ID = 0xf51006f9 + QUALNAME = "types.KeyboardButtonUrlAuth" + + def __init__(self, *, text: str, url: str, button_id: int, style: "raw.base.KeyboardButtonStyle" = None, fwd_text: Optional[str] = None) -> None: + self.text = text # string + self.url = url # string + self.button_id = button_id # int + self.style = style # flags.10?KeyboardButtonStyle + self.fwd_text = fwd_text # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonUrlAuth": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + fwd_text = String.read(b) if flags & (1 << 0) else None + url = String.read(b) + + button_id = Int.read(b) + + return KeyboardButtonUrlAuth(text=text, url=url, button_id=button_id, style=style, fwd_text=fwd_text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + flags |= (1 << 0) if self.fwd_text is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + if self.fwd_text is not None: + b.write(String(self.fwd_text)) + + b.write(String(self.url)) + + b.write(Int(self.button_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_user_profile.py b/pyrogram/raw/types/keyboard_button_user_profile.py new file mode 100644 index 00000000..db03297f --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_user_profile.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonUserProfile(TLObject): # type: ignore + """Button that links directly to a user profile + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``C0FD5D09`` + + Parameters: + text (``str``): + Button text + + user_id (``int`` ``64-bit``): + User ID + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "user_id", "style"] + + ID = 0xc0fd5d09 + QUALNAME = "types.KeyboardButtonUserProfile" + + def __init__(self, *, text: str, user_id: int, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.user_id = user_id # long + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonUserProfile": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + user_id = Long.read(b) + + return KeyboardButtonUserProfile(text=text, user_id=user_id, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/keyboard_button_web_view.py b/pyrogram/raw/types/keyboard_button_web_view.py new file mode 100644 index 00000000..f17f1ed8 --- /dev/null +++ b/pyrogram/raw/types/keyboard_button_web_view.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class KeyboardButtonWebView(TLObject): # type: ignore + """Button to open a bot mini app using messages.requestWebView, sending over user information after user confirmation. + + Constructor of :obj:`~pyrogram.raw.base.KeyboardButton`. + + Details: + - Layer: ``224`` + - ID: ``E846B1A0`` + + Parameters: + text (``str``): + Button text + + url (``str``): + Web app url + + style (:obj:`KeyboardButtonStyle `, *optional*): + N/A + + """ + + __slots__: List[str] = ["text", "url", "style"] + + ID = 0xe846b1a0 + QUALNAME = "types.KeyboardButtonWebView" + + def __init__(self, *, text: str, url: str, style: "raw.base.KeyboardButtonStyle" = None) -> None: + self.text = text # string + self.url = url # string + self.style = style # flags.10?KeyboardButtonStyle + + @staticmethod + def read(b: BytesIO, *args: Any) -> "KeyboardButtonWebView": + + flags = Int.read(b) + + style = TLObject.read(b) if flags & (1 << 10) else None + + text = String.read(b) + + url = String.read(b) + + return KeyboardButtonWebView(text=text, url=url, style=style) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 10) if self.style is not None else 0 + b.write(Int(flags)) + + if self.style is not None: + b.write(self.style.write()) + + b.write(String(self.text)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/labeled_price.py b/pyrogram/raw/types/labeled_price.py new file mode 100644 index 00000000..1d96f9dc --- /dev/null +++ b/pyrogram/raw/types/labeled_price.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LabeledPrice(TLObject): # type: ignore + """This object represents a portion of the price for goods or services. + + Constructor of :obj:`~pyrogram.raw.base.LabeledPrice`. + + Details: + - Layer: ``224`` + - ID: ``CB296BF8`` + + Parameters: + label (``str``): + Portion label + + amount (``int`` ``64-bit``): + Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + """ + + __slots__: List[str] = ["label", "amount"] + + ID = 0xcb296bf8 + QUALNAME = "types.LabeledPrice" + + def __init__(self, *, label: str, amount: int) -> None: + self.label = label # string + self.amount = amount # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LabeledPrice": + # No flags + + label = String.read(b) + + amount = Long.read(b) + + return LabeledPrice(label=label, amount=amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.label)) + + b.write(Long(self.amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/lang_pack_difference.py b/pyrogram/raw/types/lang_pack_difference.py new file mode 100644 index 00000000..b2d0d4be --- /dev/null +++ b/pyrogram/raw/types/lang_pack_difference.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LangPackDifference(TLObject): # type: ignore + """Changes to the app's localization pack + + Constructor of :obj:`~pyrogram.raw.base.LangPackDifference`. + + Details: + - Layer: ``224`` + - ID: ``F385C1F6`` + + Parameters: + lang_code (``str``): + Language code + + from_version (``int`` ``32-bit``): + Previous version number + + version (``int`` ``32-bit``): + New version number + + strings (List of :obj:`LangPackString `): + Localized strings + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + langpack.GetLangPack + langpack.GetDifference + """ + + __slots__: List[str] = ["lang_code", "from_version", "version", "strings"] + + ID = 0xf385c1f6 + QUALNAME = "types.LangPackDifference" + + def __init__(self, *, lang_code: str, from_version: int, version: int, strings: List["raw.base.LangPackString"]) -> None: + self.lang_code = lang_code # string + self.from_version = from_version # int + self.version = version # int + self.strings = strings # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LangPackDifference": + # No flags + + lang_code = String.read(b) + + from_version = Int.read(b) + + version = Int.read(b) + + strings = TLObject.read(b) + + return LangPackDifference(lang_code=lang_code, from_version=from_version, version=version, strings=strings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.lang_code)) + + b.write(Int(self.from_version)) + + b.write(Int(self.version)) + + b.write(Vector(self.strings)) + + return b.getvalue() diff --git a/pyrogram/raw/types/lang_pack_language.py b/pyrogram/raw/types/lang_pack_language.py new file mode 100644 index 00000000..c58797c1 --- /dev/null +++ b/pyrogram/raw/types/lang_pack_language.py @@ -0,0 +1,141 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LangPackLanguage(TLObject): # type: ignore + """Identifies a localization pack + + Constructor of :obj:`~pyrogram.raw.base.LangPackLanguage`. + + Details: + - Layer: ``224`` + - ID: ``EECA5CE3`` + + Parameters: + name (``str``): + Language name + + native_name (``str``): + Language name in the language itself + + lang_code (``str``): + Language code (pack identifier) + + plural_code (``str``): + A language code to be used to apply plural forms. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info + + strings_count (``int`` ``32-bit``): + Total number of non-deleted strings from the language pack + + translated_count (``int`` ``32-bit``): + Total number of translated strings from the language pack + + translations_url (``str``): + Link to language translation interface; empty for custom local language packs + + official (``bool``, *optional*): + Whether the language pack is official + + rtl (``bool``, *optional*): + Is this a localization pack for an RTL language + + beta (``bool``, *optional*): + Is this a beta localization pack? + + base_lang_code (``str``, *optional*): + Identifier of a base language pack; may be empty. If a string is missed in the language pack, then it should be fetched from base language pack. Unsupported in custom language packs + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + langpack.GetLanguages + langpack.GetLanguage + """ + + __slots__: List[str] = ["name", "native_name", "lang_code", "plural_code", "strings_count", "translated_count", "translations_url", "official", "rtl", "beta", "base_lang_code"] + + ID = 0xeeca5ce3 + QUALNAME = "types.LangPackLanguage" + + def __init__(self, *, name: str, native_name: str, lang_code: str, plural_code: str, strings_count: int, translated_count: int, translations_url: str, official: Optional[bool] = None, rtl: Optional[bool] = None, beta: Optional[bool] = None, base_lang_code: Optional[str] = None) -> None: + self.name = name # string + self.native_name = native_name # string + self.lang_code = lang_code # string + self.plural_code = plural_code # string + self.strings_count = strings_count # int + self.translated_count = translated_count # int + self.translations_url = translations_url # string + self.official = official # flags.0?true + self.rtl = rtl # flags.2?true + self.beta = beta # flags.3?true + self.base_lang_code = base_lang_code # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LangPackLanguage": + + flags = Int.read(b) + + official = True if flags & (1 << 0) else False + rtl = True if flags & (1 << 2) else False + beta = True if flags & (1 << 3) else False + name = String.read(b) + + native_name = String.read(b) + + lang_code = String.read(b) + + base_lang_code = String.read(b) if flags & (1 << 1) else None + plural_code = String.read(b) + + strings_count = Int.read(b) + + translated_count = Int.read(b) + + translations_url = String.read(b) + + return LangPackLanguage(name=name, native_name=native_name, lang_code=lang_code, plural_code=plural_code, strings_count=strings_count, translated_count=translated_count, translations_url=translations_url, official=official, rtl=rtl, beta=beta, base_lang_code=base_lang_code) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.official else 0 + flags |= (1 << 2) if self.rtl else 0 + flags |= (1 << 3) if self.beta else 0 + flags |= (1 << 1) if self.base_lang_code is not None else 0 + b.write(Int(flags)) + + b.write(String(self.name)) + + b.write(String(self.native_name)) + + b.write(String(self.lang_code)) + + if self.base_lang_code is not None: + b.write(String(self.base_lang_code)) + + b.write(String(self.plural_code)) + + b.write(Int(self.strings_count)) + + b.write(Int(self.translated_count)) + + b.write(String(self.translations_url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/lang_pack_string.py b/pyrogram/raw/types/lang_pack_string.py new file mode 100644 index 00000000..91d747cc --- /dev/null +++ b/pyrogram/raw/types/lang_pack_string.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LangPackString(TLObject): # type: ignore + """Translated localization string + + Constructor of :obj:`~pyrogram.raw.base.LangPackString`. + + Details: + - Layer: ``224`` + - ID: ``CAD181F6`` + + Parameters: + key (``str``): + Language key + + value (``str``): + Value + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + langpack.GetStrings + """ + + __slots__: List[str] = ["key", "value"] + + ID = 0xcad181f6 + QUALNAME = "types.LangPackString" + + def __init__(self, *, key: str, value: str) -> None: + self.key = key # string + self.value = value # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LangPackString": + # No flags + + key = String.read(b) + + value = String.read(b) + + return LangPackString(key=key, value=value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.key)) + + b.write(String(self.value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/lang_pack_string_deleted.py b/pyrogram/raw/types/lang_pack_string_deleted.py new file mode 100644 index 00000000..a3951667 --- /dev/null +++ b/pyrogram/raw/types/lang_pack_string_deleted.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LangPackStringDeleted(TLObject): # type: ignore + """Deleted localization string + + Constructor of :obj:`~pyrogram.raw.base.LangPackString`. + + Details: + - Layer: ``224`` + - ID: ``2979EEB2`` + + Parameters: + key (``str``): + Localization key + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + langpack.GetStrings + """ + + __slots__: List[str] = ["key"] + + ID = 0x2979eeb2 + QUALNAME = "types.LangPackStringDeleted" + + def __init__(self, *, key: str) -> None: + self.key = key # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LangPackStringDeleted": + # No flags + + key = String.read(b) + + return LangPackStringDeleted(key=key) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.key)) + + return b.getvalue() diff --git a/pyrogram/raw/types/lang_pack_string_pluralized.py b/pyrogram/raw/types/lang_pack_string_pluralized.py new file mode 100644 index 00000000..12afd704 --- /dev/null +++ b/pyrogram/raw/types/lang_pack_string_pluralized.py @@ -0,0 +1,118 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class LangPackStringPluralized(TLObject): # type: ignore + """A language pack string which has different forms based on the number of some object it mentions. See https://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html for more info + + Constructor of :obj:`~pyrogram.raw.base.LangPackString`. + + Details: + - Layer: ``224`` + - ID: ``6C47AC9F`` + + Parameters: + key (``str``): + Localization key + + other_value (``str``): + Default value + + zero_value (``str``, *optional*): + Value for zero objects + + one_value (``str``, *optional*): + Value for one object + + two_value (``str``, *optional*): + Value for two objects + + few_value (``str``, *optional*): + Value for a few objects + + many_value (``str``, *optional*): + Value for many objects + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + langpack.GetStrings + """ + + __slots__: List[str] = ["key", "other_value", "zero_value", "one_value", "two_value", "few_value", "many_value"] + + ID = 0x6c47ac9f + QUALNAME = "types.LangPackStringPluralized" + + def __init__(self, *, key: str, other_value: str, zero_value: Optional[str] = None, one_value: Optional[str] = None, two_value: Optional[str] = None, few_value: Optional[str] = None, many_value: Optional[str] = None) -> None: + self.key = key # string + self.other_value = other_value # string + self.zero_value = zero_value # flags.0?string + self.one_value = one_value # flags.1?string + self.two_value = two_value # flags.2?string + self.few_value = few_value # flags.3?string + self.many_value = many_value # flags.4?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "LangPackStringPluralized": + + flags = Int.read(b) + + key = String.read(b) + + zero_value = String.read(b) if flags & (1 << 0) else None + one_value = String.read(b) if flags & (1 << 1) else None + two_value = String.read(b) if flags & (1 << 2) else None + few_value = String.read(b) if flags & (1 << 3) else None + many_value = String.read(b) if flags & (1 << 4) else None + other_value = String.read(b) + + return LangPackStringPluralized(key=key, other_value=other_value, zero_value=zero_value, one_value=one_value, two_value=two_value, few_value=few_value, many_value=many_value) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.zero_value is not None else 0 + flags |= (1 << 1) if self.one_value is not None else 0 + flags |= (1 << 2) if self.two_value is not None else 0 + flags |= (1 << 3) if self.few_value is not None else 0 + flags |= (1 << 4) if self.many_value is not None else 0 + b.write(Int(flags)) + + b.write(String(self.key)) + + if self.zero_value is not None: + b.write(String(self.zero_value)) + + if self.one_value is not None: + b.write(String(self.one_value)) + + if self.two_value is not None: + b.write(String(self.two_value)) + + if self.few_value is not None: + b.write(String(self.few_value)) + + if self.many_value is not None: + b.write(String(self.many_value)) + + b.write(String(self.other_value)) + + return b.getvalue() diff --git a/pyrogram/raw/types/mask_coords.py b/pyrogram/raw/types/mask_coords.py new file mode 100644 index 00000000..f32b729b --- /dev/null +++ b/pyrogram/raw/types/mask_coords.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MaskCoords(TLObject): # type: ignore + """Position on a photo where a mask should be placed when attaching stickers to media » + + Constructor of :obj:`~pyrogram.raw.base.MaskCoords`. + + Details: + - Layer: ``224`` + - ID: ``AED6DBB2`` + + Parameters: + n (``int`` ``32-bit``): + Part of the face, relative to which the mask should be placed + + x (``float`` ``64-bit``): + Shift by X-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just to the left of the default mask position) + + y (``float`` ``64-bit``): + Shift by Y-axis measured in widths of the mask scaled to the face size, from left to right. (For example, -1.0 will place the mask just below the default mask position) + + zoom (``float`` ``64-bit``): + Mask scaling coefficient. (For example, 2.0 means a doubled size) + + """ + + __slots__: List[str] = ["n", "x", "y", "zoom"] + + ID = 0xaed6dbb2 + QUALNAME = "types.MaskCoords" + + def __init__(self, *, n: int, x: float, y: float, zoom: float) -> None: + self.n = n # int + self.x = x # double + self.y = y # double + self.zoom = zoom # double + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MaskCoords": + # No flags + + n = Int.read(b) + + x = Double.read(b) + + y = Double.read(b) + + zoom = Double.read(b) + + return MaskCoords(n=n, x=x, y=y, zoom=zoom) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.n)) + + b.write(Double(self.x)) + + b.write(Double(self.y)) + + b.write(Double(self.zoom)) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_channel_post.py b/pyrogram/raw/types/media_area_channel_post.py new file mode 100644 index 00000000..ee8ac238 --- /dev/null +++ b/pyrogram/raw/types/media_area_channel_post.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaChannelPost(TLObject): # type: ignore + """Represents a channel post. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``770416AF`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + The size and location of the media area corresponding to the location sticker on top of the story media. + + channel_id (``int`` ``64-bit``): + The channel that posted the message + + msg_id (``int`` ``32-bit``): + ID of the channel message + + """ + + __slots__: List[str] = ["coordinates", "channel_id", "msg_id"] + + ID = 0x770416af + QUALNAME = "types.MediaAreaChannelPost" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", channel_id: int, msg_id: int) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.channel_id = channel_id # long + self.msg_id = msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaChannelPost": + # No flags + + coordinates = TLObject.read(b) + + channel_id = Long.read(b) + + msg_id = Int.read(b) + + return MediaAreaChannelPost(coordinates=coordinates, channel_id=channel_id, msg_id=msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(Long(self.channel_id)) + + b.write(Int(self.msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_coordinates.py b/pyrogram/raw/types/media_area_coordinates.py new file mode 100644 index 00000000..6e64f878 --- /dev/null +++ b/pyrogram/raw/types/media_area_coordinates.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaCoordinates(TLObject): # type: ignore + """Coordinates and size of a clicable rectangular area on top of a story. + + Constructor of :obj:`~pyrogram.raw.base.MediaAreaCoordinates`. + + Details: + - Layer: ``224`` + - ID: ``CFC9E002`` + + Parameters: + x (``float`` ``64-bit``): + The abscissa of the rectangle's center, as a percentage of the media width (0-100). + + y (``float`` ``64-bit``): + The ordinate of the rectangle's center, as a percentage of the media height (0-100). + + w (``float`` ``64-bit``): + The width of the rectangle, as a percentage of the media width (0-100). + + h (``float`` ``64-bit``): + The height of the rectangle, as a percentage of the media height (0-100). + + rotation (``float`` ``64-bit``): + Clockwise rotation angle of the rectangle, in degrees (0-360). + + radius (``float`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["x", "y", "w", "h", "rotation", "radius"] + + ID = 0xcfc9e002 + QUALNAME = "types.MediaAreaCoordinates" + + def __init__(self, *, x: float, y: float, w: float, h: float, rotation: float, radius: Optional[float] = None) -> None: + self.x = x # double + self.y = y # double + self.w = w # double + self.h = h # double + self.rotation = rotation # double + self.radius = radius # flags.0?double + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaCoordinates": + + flags = Int.read(b) + + x = Double.read(b) + + y = Double.read(b) + + w = Double.read(b) + + h = Double.read(b) + + rotation = Double.read(b) + + radius = Double.read(b) if flags & (1 << 0) else None + return MediaAreaCoordinates(x=x, y=y, w=w, h=h, rotation=rotation, radius=radius) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.radius is not None else 0 + b.write(Int(flags)) + + b.write(Double(self.x)) + + b.write(Double(self.y)) + + b.write(Double(self.w)) + + b.write(Double(self.h)) + + b.write(Double(self.rotation)) + + if self.radius is not None: + b.write(Double(self.radius)) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_geo_point.py b/pyrogram/raw/types/media_area_geo_point.py new file mode 100644 index 00000000..35a6d275 --- /dev/null +++ b/pyrogram/raw/types/media_area_geo_point.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaGeoPoint(TLObject): # type: ignore + """Represents a geolocation tag attached to a story. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``CAD5452D`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + The size and position of the media area corresponding to the location sticker on top of the story media. + + geo (:obj:`GeoPoint `): + Coordinates of the geolocation tag. + + address (:obj:`GeoPointAddress `, *optional*): + N/A + + """ + + __slots__: List[str] = ["coordinates", "geo", "address"] + + ID = 0xcad5452d + QUALNAME = "types.MediaAreaGeoPoint" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", geo: "raw.base.GeoPoint", address: "raw.base.GeoPointAddress" = None) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.geo = geo # GeoPoint + self.address = address # flags.0?GeoPointAddress + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaGeoPoint": + + flags = Int.read(b) + + coordinates = TLObject.read(b) + + geo = TLObject.read(b) + + address = TLObject.read(b) if flags & (1 << 0) else None + + return MediaAreaGeoPoint(coordinates=coordinates, geo=geo, address=address) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.address is not None else 0 + b.write(Int(flags)) + + b.write(self.coordinates.write()) + + b.write(self.geo.write()) + + if self.address is not None: + b.write(self.address.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_star_gift.py b/pyrogram/raw/types/media_area_star_gift.py new file mode 100644 index 00000000..3f9f2588 --- /dev/null +++ b/pyrogram/raw/types/media_area_star_gift.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaStarGift(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``5787686D`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + N/A + + slug (``str``): + N/A + + """ + + __slots__: List[str] = ["coordinates", "slug"] + + ID = 0x5787686d + QUALNAME = "types.MediaAreaStarGift" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", slug: str) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.slug = slug # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaStarGift": + # No flags + + coordinates = TLObject.read(b) + + slug = String.read(b) + + return MediaAreaStarGift(coordinates=coordinates, slug=slug) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(String(self.slug)) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_suggested_reaction.py b/pyrogram/raw/types/media_area_suggested_reaction.py new file mode 100644 index 00000000..2e09e31c --- /dev/null +++ b/pyrogram/raw/types/media_area_suggested_reaction.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaSuggestedReaction(TLObject): # type: ignore + """Represents a reaction bubble. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``14455871`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + The coordinates of the media area corresponding to the reaction button. + + reaction (:obj:`Reaction `): + The reaction that should be sent when this area is clicked. + + dark (``bool``, *optional*): + Whether the reaction bubble has a dark background. + + flipped (``bool``, *optional*): + Whether the reaction bubble is mirrored (see here » for more info). + + """ + + __slots__: List[str] = ["coordinates", "reaction", "dark", "flipped"] + + ID = 0x14455871 + QUALNAME = "types.MediaAreaSuggestedReaction" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", reaction: "raw.base.Reaction", dark: Optional[bool] = None, flipped: Optional[bool] = None) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.reaction = reaction # Reaction + self.dark = dark # flags.0?true + self.flipped = flipped # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaSuggestedReaction": + + flags = Int.read(b) + + dark = True if flags & (1 << 0) else False + flipped = True if flags & (1 << 1) else False + coordinates = TLObject.read(b) + + reaction = TLObject.read(b) + + return MediaAreaSuggestedReaction(coordinates=coordinates, reaction=reaction, dark=dark, flipped=flipped) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.dark else 0 + flags |= (1 << 1) if self.flipped else 0 + b.write(Int(flags)) + + b.write(self.coordinates.write()) + + b.write(self.reaction.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_url.py b/pyrogram/raw/types/media_area_url.py new file mode 100644 index 00000000..c1877d2a --- /dev/null +++ b/pyrogram/raw/types/media_area_url.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaUrl(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``37381085`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + N/A + + url (``str``): + N/A + + """ + + __slots__: List[str] = ["coordinates", "url"] + + ID = 0x37381085 + QUALNAME = "types.MediaAreaUrl" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", url: str) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaUrl": + # No flags + + coordinates = TLObject.read(b) + + url = String.read(b) + + return MediaAreaUrl(coordinates=coordinates, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_venue.py b/pyrogram/raw/types/media_area_venue.py new file mode 100644 index 00000000..2610bc8c --- /dev/null +++ b/pyrogram/raw/types/media_area_venue.py @@ -0,0 +1,102 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaVenue(TLObject): # type: ignore + """Represents a location tag attached to a story, with additional venue information. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``BE82DB9C`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + The size and location of the media area corresponding to the location sticker on top of the story media. + + geo (:obj:`GeoPoint `): + Coordinates of the venue + + title (``str``): + Venue name + + address (``str``): + Address + + provider (``str``): + Venue provider: currently only "foursquare" needs to be supported. + + venue_id (``str``): + Venue ID in the provider's database + + venue_type (``str``): + Venue type in the provider's database + + """ + + __slots__: List[str] = ["coordinates", "geo", "title", "address", "provider", "venue_id", "venue_type"] + + ID = 0xbe82db9c + QUALNAME = "types.MediaAreaVenue" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", geo: "raw.base.GeoPoint", title: str, address: str, provider: str, venue_id: str, venue_type: str) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.geo = geo # GeoPoint + self.title = title # string + self.address = address # string + self.provider = provider # string + self.venue_id = venue_id # string + self.venue_type = venue_type # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaVenue": + # No flags + + coordinates = TLObject.read(b) + + geo = TLObject.read(b) + + title = String.read(b) + + address = String.read(b) + + provider = String.read(b) + + venue_id = String.read(b) + + venue_type = String.read(b) + + return MediaAreaVenue(coordinates=coordinates, geo=geo, title=title, address=address, provider=provider, venue_id=venue_id, venue_type=venue_type) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(self.geo.write()) + + b.write(String(self.title)) + + b.write(String(self.address)) + + b.write(String(self.provider)) + + b.write(String(self.venue_id)) + + b.write(String(self.venue_type)) + + return b.getvalue() diff --git a/pyrogram/raw/types/media_area_weather.py b/pyrogram/raw/types/media_area_weather.py new file mode 100644 index 00000000..09c1cff6 --- /dev/null +++ b/pyrogram/raw/types/media_area_weather.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MediaAreaWeather(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MediaArea`. + + Details: + - Layer: ``224`` + - ID: ``49A6549C`` + + Parameters: + coordinates (:obj:`MediaAreaCoordinates `): + N/A + + emoji (``str``): + N/A + + temperature_c (``float`` ``64-bit``): + N/A + + color (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["coordinates", "emoji", "temperature_c", "color"] + + ID = 0x49a6549c + QUALNAME = "types.MediaAreaWeather" + + def __init__(self, *, coordinates: "raw.base.MediaAreaCoordinates", emoji: str, temperature_c: float, color: int) -> None: + self.coordinates = coordinates # MediaAreaCoordinates + self.emoji = emoji # string + self.temperature_c = temperature_c # double + self.color = color # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MediaAreaWeather": + # No flags + + coordinates = TLObject.read(b) + + emoji = String.read(b) + + temperature_c = Double.read(b) + + color = Int.read(b) + + return MediaAreaWeather(coordinates=coordinates, emoji=emoji, temperature_c=temperature_c, color=color) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.coordinates.write()) + + b.write(String(self.emoji)) + + b.write(Double(self.temperature_c)) + + b.write(Int(self.color)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message.py b/pyrogram/raw/types/message.py new file mode 100644 index 00000000..dda6899a --- /dev/null +++ b/pyrogram/raw/types/message.py @@ -0,0 +1,429 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Message(TLObject): # type: ignore + """A message + + Constructor of :obj:`~pyrogram.raw.base.Message`. + + Details: + - Layer: ``224`` + - ID: ``9CB490E9`` + + Parameters: + id (``int`` ``32-bit``): + ID of the message + + peer_id (:obj:`Peer `): + Peer ID, the chat where this message was sent + + date (``int`` ``32-bit``): + Date of the message + + message (``str``): + The message + + out (``bool``, *optional*): + Is this an outgoing message + + mentioned (``bool``, *optional*): + Whether we were mentioned in this message + + media_unread (``bool``, *optional*): + Whether there are unread media attachments in this message + + silent (``bool``, *optional*): + Whether this is a silent message (no notification triggered) + + post (``bool``, *optional*): + Whether this is a channel post + + from_scheduled (``bool``, *optional*): + Whether this is a scheduled message + + legacy (``bool``, *optional*): + This is a legacy message: it has to be refetched with the new layer + + edit_hide (``bool``, *optional*): + Whether the message should be shown as not modified to the user, even if an edit date is present + + pinned (``bool``, *optional*): + Whether this message is pinned + + noforwards (``bool``, *optional*): + Whether this message is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera). + + invert_media (``bool``, *optional*): + If set, any eventual webpage preview will be shown on top of the message instead of at the bottom. + + offline (``bool``, *optional*): + + + video_processing_pending (``bool``, *optional*): + N/A + + paid_suggested_post_stars (``bool``, *optional*): + N/A + + paid_suggested_post_ton (``bool``, *optional*): + N/A + + from_id (:obj:`Peer `, *optional*): + ID of the sender of the message + + from_boosts_applied (``int`` ``32-bit``, *optional*): + + + saved_peer_id (:obj:`Peer `, *optional*): + Messages fetched from a saved messages dialog » will have peer=inputPeerSelf and the saved_peer_id flag set to the ID of the saved dialog. + + fwd_from (:obj:`MessageFwdHeader `, *optional*): + Info about forwarded messages + + via_bot_id (``int`` ``64-bit``, *optional*): + ID of the inline bot that generated the message + + via_business_bot_id (``int`` ``64-bit``, *optional*): + + + reply_to (:obj:`MessageReplyHeader `, *optional*): + Reply information + + media (:obj:`MessageMedia `, *optional*): + Media attachment + + reply_markup (:obj:`ReplyMarkup `, *optional*): + Reply markup (bot/inline keyboards) + + entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text + + views (``int`` ``32-bit``, *optional*): + View count for channel posts + + forwards (``int`` ``32-bit``, *optional*): + Forward counter + + replies (:obj:`MessageReplies `, *optional*): + Info about post comments (for channels) or message replies (for groups) + + edit_date (``int`` ``32-bit``, *optional*): + Last edit date of this message + + post_author (``str``, *optional*): + Name of the author of this message for channel posts (with signatures enabled) + + grouped_id (``int`` ``64-bit``, *optional*): + Multiple media messages sent using messages.sendMultiMedia with the same grouped ID indicate an album or media group + + reactions (:obj:`MessageReactions `, *optional*): + Reactions to this message + + restriction_reason (List of :obj:`RestrictionReason `, *optional*): + Contains the reason why access to this message must be restricted. + + ttl_period (``int`` ``32-bit``, *optional*): + Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. + + quick_reply_shortcut_id (``int`` ``32-bit``, *optional*): + + + effect (``int`` ``64-bit``, *optional*): + + + factcheck (:obj:`FactCheck `, *optional*): + + + report_delivery_until_date (``int`` ``32-bit``, *optional*): + N/A + + paid_message_stars (``int`` ``64-bit``, *optional*): + N/A + + suggested_post (:obj:`SuggestedPost `, *optional*): + N/A + + schedule_repeat_period (``int`` ``32-bit``, *optional*): + N/A + + summary_from_language (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["id", "peer_id", "date", "message", "out", "mentioned", "media_unread", "silent", "post", "from_scheduled", "legacy", "edit_hide", "pinned", "noforwards", "invert_media", "offline", "video_processing_pending", "paid_suggested_post_stars", "paid_suggested_post_ton", "from_id", "from_boosts_applied", "saved_peer_id", "fwd_from", "via_bot_id", "via_business_bot_id", "reply_to", "media", "reply_markup", "entities", "views", "forwards", "replies", "edit_date", "post_author", "grouped_id", "reactions", "restriction_reason", "ttl_period", "quick_reply_shortcut_id", "effect", "factcheck", "report_delivery_until_date", "paid_message_stars", "suggested_post", "schedule_repeat_period", "summary_from_language"] + + ID = 0x9cb490e9 + QUALNAME = "types.Message" + + def __init__(self, *, id: int, peer_id: "raw.base.Peer", date: int, message: str, out: Optional[bool] = None, mentioned: Optional[bool] = None, media_unread: Optional[bool] = None, silent: Optional[bool] = None, post: Optional[bool] = None, from_scheduled: Optional[bool] = None, legacy: Optional[bool] = None, edit_hide: Optional[bool] = None, pinned: Optional[bool] = None, noforwards: Optional[bool] = None, invert_media: Optional[bool] = None, offline: Optional[bool] = None, video_processing_pending: Optional[bool] = None, paid_suggested_post_stars: Optional[bool] = None, paid_suggested_post_ton: Optional[bool] = None, from_id: "raw.base.Peer" = None, from_boosts_applied: Optional[int] = None, saved_peer_id: "raw.base.Peer" = None, fwd_from: "raw.base.MessageFwdHeader" = None, via_bot_id: Optional[int] = None, via_business_bot_id: Optional[int] = None, reply_to: "raw.base.MessageReplyHeader" = None, media: "raw.base.MessageMedia" = None, reply_markup: "raw.base.ReplyMarkup" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, views: Optional[int] = None, forwards: Optional[int] = None, replies: "raw.base.MessageReplies" = None, edit_date: Optional[int] = None, post_author: Optional[str] = None, grouped_id: Optional[int] = None, reactions: "raw.base.MessageReactions" = None, restriction_reason: Optional[List["raw.base.RestrictionReason"]] = None, ttl_period: Optional[int] = None, quick_reply_shortcut_id: Optional[int] = None, effect: Optional[int] = None, factcheck: "raw.base.FactCheck" = None, report_delivery_until_date: Optional[int] = None, paid_message_stars: Optional[int] = None, suggested_post: "raw.base.SuggestedPost" = None, schedule_repeat_period: Optional[int] = None, summary_from_language: Optional[str] = None) -> None: + self.id = id # int + self.peer_id = peer_id # Peer + self.date = date # int + self.message = message # string + self.out = out # flags.1?true + self.mentioned = mentioned # flags.4?true + self.media_unread = media_unread # flags.5?true + self.silent = silent # flags.13?true + self.post = post # flags.14?true + self.from_scheduled = from_scheduled # flags.18?true + self.legacy = legacy # flags.19?true + self.edit_hide = edit_hide # flags.21?true + self.pinned = pinned # flags.24?true + self.noforwards = noforwards # flags.26?true + self.invert_media = invert_media # flags.27?true + self.offline = offline # flags2.1?true + self.video_processing_pending = video_processing_pending # flags2.4?true + self.paid_suggested_post_stars = paid_suggested_post_stars # flags2.8?true + self.paid_suggested_post_ton = paid_suggested_post_ton # flags2.9?true + self.from_id = from_id # flags.8?Peer + self.from_boosts_applied = from_boosts_applied # flags.29?int + self.saved_peer_id = saved_peer_id # flags.28?Peer + self.fwd_from = fwd_from # flags.2?MessageFwdHeader + self.via_bot_id = via_bot_id # flags.11?long + self.via_business_bot_id = via_business_bot_id # flags2.0?long + self.reply_to = reply_to # flags.3?MessageReplyHeader + self.media = media # flags.9?MessageMedia + self.reply_markup = reply_markup # flags.6?ReplyMarkup + self.entities = entities # flags.7?Vector + self.views = views # flags.10?int + self.forwards = forwards # flags.10?int + self.replies = replies # flags.23?MessageReplies + self.edit_date = edit_date # flags.15?int + self.post_author = post_author # flags.16?string + self.grouped_id = grouped_id # flags.17?long + self.reactions = reactions # flags.20?MessageReactions + self.restriction_reason = restriction_reason # flags.22?Vector + self.ttl_period = ttl_period # flags.25?int + self.quick_reply_shortcut_id = quick_reply_shortcut_id # flags.30?int + self.effect = effect # flags2.2?long + self.factcheck = factcheck # flags2.3?FactCheck + self.report_delivery_until_date = report_delivery_until_date # flags2.5?int + self.paid_message_stars = paid_message_stars # flags2.6?long + self.suggested_post = suggested_post # flags2.7?SuggestedPost + self.schedule_repeat_period = schedule_repeat_period # flags2.10?int + self.summary_from_language = summary_from_language # flags2.11?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Message": + + flags = Int.read(b) + + out = True if flags & (1 << 1) else False + mentioned = True if flags & (1 << 4) else False + media_unread = True if flags & (1 << 5) else False + silent = True if flags & (1 << 13) else False + post = True if flags & (1 << 14) else False + from_scheduled = True if flags & (1 << 18) else False + legacy = True if flags & (1 << 19) else False + edit_hide = True if flags & (1 << 21) else False + pinned = True if flags & (1 << 24) else False + noforwards = True if flags & (1 << 26) else False + invert_media = True if flags & (1 << 27) else False + flags2 = Int.read(b) + + offline = True if flags2 & (1 << 1) else False + video_processing_pending = True if flags2 & (1 << 4) else False + paid_suggested_post_stars = True if flags2 & (1 << 8) else False + paid_suggested_post_ton = True if flags2 & (1 << 9) else False + id = Int.read(b) + + from_id = TLObject.read(b) if flags & (1 << 8) else None + + from_boosts_applied = Int.read(b) if flags & (1 << 29) else None + peer_id = TLObject.read(b) + + saved_peer_id = TLObject.read(b) if flags & (1 << 28) else None + + fwd_from = TLObject.read(b) if flags & (1 << 2) else None + + via_bot_id = Long.read(b) if flags & (1 << 11) else None + via_business_bot_id = Long.read(b) if flags2 & (1 << 0) else None + reply_to = TLObject.read(b) if flags & (1 << 3) else None + + date = Int.read(b) + + message = String.read(b) + + media = TLObject.read(b) if flags & (1 << 9) else None + + reply_markup = TLObject.read(b) if flags & (1 << 6) else None + + entities = TLObject.read(b) if flags & (1 << 7) else [] + + views = Int.read(b) if flags & (1 << 10) else None + forwards = Int.read(b) if flags & (1 << 10) else None + replies = TLObject.read(b) if flags & (1 << 23) else None + + edit_date = Int.read(b) if flags & (1 << 15) else None + post_author = String.read(b) if flags & (1 << 16) else None + grouped_id = Long.read(b) if flags & (1 << 17) else None + reactions = TLObject.read(b) if flags & (1 << 20) else None + + restriction_reason = TLObject.read(b) if flags & (1 << 22) else [] + + ttl_period = Int.read(b) if flags & (1 << 25) else None + quick_reply_shortcut_id = Int.read(b) if flags & (1 << 30) else None + effect = Long.read(b) if flags2 & (1 << 2) else None + factcheck = TLObject.read(b) if flags2 & (1 << 3) else None + + report_delivery_until_date = Int.read(b) if flags2 & (1 << 5) else None + paid_message_stars = Long.read(b) if flags2 & (1 << 6) else None + suggested_post = TLObject.read(b) if flags2 & (1 << 7) else None + + schedule_repeat_period = Int.read(b) if flags2 & (1 << 10) else None + summary_from_language = String.read(b) if flags2 & (1 << 11) else None + return Message(id=id, peer_id=peer_id, date=date, message=message, out=out, mentioned=mentioned, media_unread=media_unread, silent=silent, post=post, from_scheduled=from_scheduled, legacy=legacy, edit_hide=edit_hide, pinned=pinned, noforwards=noforwards, invert_media=invert_media, offline=offline, video_processing_pending=video_processing_pending, paid_suggested_post_stars=paid_suggested_post_stars, paid_suggested_post_ton=paid_suggested_post_ton, from_id=from_id, from_boosts_applied=from_boosts_applied, saved_peer_id=saved_peer_id, fwd_from=fwd_from, via_bot_id=via_bot_id, via_business_bot_id=via_business_bot_id, reply_to=reply_to, media=media, reply_markup=reply_markup, entities=entities, views=views, forwards=forwards, replies=replies, edit_date=edit_date, post_author=post_author, grouped_id=grouped_id, reactions=reactions, restriction_reason=restriction_reason, ttl_period=ttl_period, quick_reply_shortcut_id=quick_reply_shortcut_id, effect=effect, factcheck=factcheck, report_delivery_until_date=report_delivery_until_date, paid_message_stars=paid_message_stars, suggested_post=suggested_post, schedule_repeat_period=schedule_repeat_period, summary_from_language=summary_from_language) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.out else 0 + flags |= (1 << 4) if self.mentioned else 0 + flags |= (1 << 5) if self.media_unread else 0 + flags |= (1 << 13) if self.silent else 0 + flags |= (1 << 14) if self.post else 0 + flags |= (1 << 18) if self.from_scheduled else 0 + flags |= (1 << 19) if self.legacy else 0 + flags |= (1 << 21) if self.edit_hide else 0 + flags |= (1 << 24) if self.pinned else 0 + flags |= (1 << 26) if self.noforwards else 0 + flags |= (1 << 27) if self.invert_media else 0 + flags |= (1 << 8) if self.from_id is not None else 0 + flags |= (1 << 29) if self.from_boosts_applied is not None else 0 + flags |= (1 << 28) if self.saved_peer_id is not None else 0 + flags |= (1 << 2) if self.fwd_from is not None else 0 + flags |= (1 << 11) if self.via_bot_id is not None else 0 + flags |= (1 << 3) if self.reply_to is not None else 0 + flags |= (1 << 9) if self.media is not None else 0 + flags |= (1 << 6) if self.reply_markup is not None else 0 + flags |= (1 << 7) if self.entities else 0 + flags |= (1 << 10) if self.views is not None else 0 + flags |= (1 << 10) if self.forwards is not None else 0 + flags |= (1 << 23) if self.replies is not None else 0 + flags |= (1 << 15) if self.edit_date is not None else 0 + flags |= (1 << 16) if self.post_author is not None else 0 + flags |= (1 << 17) if self.grouped_id is not None else 0 + flags |= (1 << 20) if self.reactions is not None else 0 + flags |= (1 << 22) if self.restriction_reason else 0 + flags |= (1 << 25) if self.ttl_period is not None else 0 + flags |= (1 << 30) if self.quick_reply_shortcut_id is not None else 0 + b.write(Int(flags)) + flags2 = 0 + flags2 |= (1 << 1) if self.offline else 0 + flags2 |= (1 << 4) if self.video_processing_pending else 0 + flags2 |= (1 << 8) if self.paid_suggested_post_stars else 0 + flags2 |= (1 << 9) if self.paid_suggested_post_ton else 0 + flags2 |= (1 << 0) if self.via_business_bot_id is not None else 0 + flags2 |= (1 << 2) if self.effect is not None else 0 + flags2 |= (1 << 3) if self.factcheck is not None else 0 + flags2 |= (1 << 5) if self.report_delivery_until_date is not None else 0 + flags2 |= (1 << 6) if self.paid_message_stars is not None else 0 + flags2 |= (1 << 7) if self.suggested_post is not None else 0 + flags2 |= (1 << 10) if self.schedule_repeat_period is not None else 0 + flags2 |= (1 << 11) if self.summary_from_language is not None else 0 + b.write(Int(flags2)) + + b.write(Int(self.id)) + + if self.from_id is not None: + b.write(self.from_id.write()) + + if self.from_boosts_applied is not None: + b.write(Int(self.from_boosts_applied)) + + b.write(self.peer_id.write()) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + if self.fwd_from is not None: + b.write(self.fwd_from.write()) + + if self.via_bot_id is not None: + b.write(Long(self.via_bot_id)) + + if self.via_business_bot_id is not None: + b.write(Long(self.via_business_bot_id)) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(Int(self.date)) + + b.write(String(self.message)) + + if self.media is not None: + b.write(self.media.write()) + + if self.reply_markup is not None: + b.write(self.reply_markup.write()) + + if self.entities is not None: + b.write(Vector(self.entities)) + + if self.views is not None: + b.write(Int(self.views)) + + if self.forwards is not None: + b.write(Int(self.forwards)) + + if self.replies is not None: + b.write(self.replies.write()) + + if self.edit_date is not None: + b.write(Int(self.edit_date)) + + if self.post_author is not None: + b.write(String(self.post_author)) + + if self.grouped_id is not None: + b.write(Long(self.grouped_id)) + + if self.reactions is not None: + b.write(self.reactions.write()) + + if self.restriction_reason is not None: + b.write(Vector(self.restriction_reason)) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + if self.quick_reply_shortcut_id is not None: + b.write(Int(self.quick_reply_shortcut_id)) + + if self.effect is not None: + b.write(Long(self.effect)) + + if self.factcheck is not None: + b.write(self.factcheck.write()) + + if self.report_delivery_until_date is not None: + b.write(Int(self.report_delivery_until_date)) + + if self.paid_message_stars is not None: + b.write(Long(self.paid_message_stars)) + + if self.suggested_post is not None: + b.write(self.suggested_post.write()) + + if self.schedule_repeat_period is not None: + b.write(Int(self.schedule_repeat_period)) + + if self.summary_from_language is not None: + b.write(String(self.summary_from_language)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_boost_apply.py b/pyrogram/raw/types/message_action_boost_apply.py new file mode 100644 index 00000000..ec67877b --- /dev/null +++ b/pyrogram/raw/types/message_action_boost_apply.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionBoostApply(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``CC02AA6D`` + + Parameters: + boosts (``int`` ``32-bit``): + + + """ + + __slots__: List[str] = ["boosts"] + + ID = 0xcc02aa6d + QUALNAME = "types.MessageActionBoostApply" + + def __init__(self, *, boosts: int) -> None: + self.boosts = boosts # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionBoostApply": + # No flags + + boosts = Int.read(b) + + return MessageActionBoostApply(boosts=boosts) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.boosts)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_bot_allowed.py b/pyrogram/raw/types/message_action_bot_allowed.py new file mode 100644 index 00000000..f2627265 --- /dev/null +++ b/pyrogram/raw/types/message_action_bot_allowed.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionBotAllowed(TLObject): # type: ignore + """We have given the bot permission to send us direct messages. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``C516D679`` + + Parameters: + attach_menu (``bool``, *optional*): + We have authorized the bot to send us messages by installing the bot's attachment menu. + + from_request (``bool``, *optional*): + We have allowed the bot to send us messages using bots.allowSendMessage ». + + domain (``str``, *optional*): + We have authorized the bot to send us messages by logging into a website via Telegram Login »; this field contains the domain name of the website on which the user has logged in. + + app (:obj:`BotApp `, *optional*): + We have authorized the bot to send us messages by opening the specified bot mini app. + + """ + + __slots__: List[str] = ["attach_menu", "from_request", "domain", "app"] + + ID = 0xc516d679 + QUALNAME = "types.MessageActionBotAllowed" + + def __init__(self, *, attach_menu: Optional[bool] = None, from_request: Optional[bool] = None, domain: Optional[str] = None, app: "raw.base.BotApp" = None) -> None: + self.attach_menu = attach_menu # flags.1?true + self.from_request = from_request # flags.3?true + self.domain = domain # flags.0?string + self.app = app # flags.2?BotApp + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionBotAllowed": + + flags = Int.read(b) + + attach_menu = True if flags & (1 << 1) else False + from_request = True if flags & (1 << 3) else False + domain = String.read(b) if flags & (1 << 0) else None + app = TLObject.read(b) if flags & (1 << 2) else None + + return MessageActionBotAllowed(attach_menu=attach_menu, from_request=from_request, domain=domain, app=app) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.attach_menu else 0 + flags |= (1 << 3) if self.from_request else 0 + flags |= (1 << 0) if self.domain is not None else 0 + flags |= (1 << 2) if self.app is not None else 0 + b.write(Int(flags)) + + if self.domain is not None: + b.write(String(self.domain)) + + if self.app is not None: + b.write(self.app.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_change_creator.py b/pyrogram/raw/types/message_action_change_creator.py new file mode 100644 index 00000000..acd9216b --- /dev/null +++ b/pyrogram/raw/types/message_action_change_creator.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChangeCreator(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``E188503B`` + + Parameters: + new_creator_id (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["new_creator_id"] + + ID = 0xe188503b + QUALNAME = "types.MessageActionChangeCreator" + + def __init__(self, *, new_creator_id: int) -> None: + self.new_creator_id = new_creator_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChangeCreator": + # No flags + + new_creator_id = Long.read(b) + + return MessageActionChangeCreator(new_creator_id=new_creator_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.new_creator_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_channel_create.py b/pyrogram/raw/types/message_action_channel_create.py new file mode 100644 index 00000000..1ededd92 --- /dev/null +++ b/pyrogram/raw/types/message_action_channel_create.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChannelCreate(TLObject): # type: ignore + """The channel was created + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``95D2AC92`` + + Parameters: + title (``str``): + Original channel/supergroup title + + """ + + __slots__: List[str] = ["title"] + + ID = 0x95d2ac92 + QUALNAME = "types.MessageActionChannelCreate" + + def __init__(self, *, title: str) -> None: + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChannelCreate": + # No flags + + title = String.read(b) + + return MessageActionChannelCreate(title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_channel_migrate_from.py b/pyrogram/raw/types/message_action_channel_migrate_from.py new file mode 100644 index 00000000..4a8a68bf --- /dev/null +++ b/pyrogram/raw/types/message_action_channel_migrate_from.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChannelMigrateFrom(TLObject): # type: ignore + """Indicates the channel was migrated from the specified chat + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``EA3948E9`` + + Parameters: + title (``str``): + The old chat title + + chat_id (``int`` ``64-bit``): + The old chat ID + + """ + + __slots__: List[str] = ["title", "chat_id"] + + ID = 0xea3948e9 + QUALNAME = "types.MessageActionChannelMigrateFrom" + + def __init__(self, *, title: str, chat_id: int) -> None: + self.title = title # string + self.chat_id = chat_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChannelMigrateFrom": + # No flags + + title = String.read(b) + + chat_id = Long.read(b) + + return MessageActionChannelMigrateFrom(title=title, chat_id=chat_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(Long(self.chat_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_add_user.py b/pyrogram/raw/types/message_action_chat_add_user.py new file mode 100644 index 00000000..6b87ffe7 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_add_user.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatAddUser(TLObject): # type: ignore + """New member in the group + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``15CEFD00`` + + Parameters: + users (List of ``int`` ``64-bit``): + Users that were invited to the chat + + """ + + __slots__: List[str] = ["users"] + + ID = 0x15cefd00 + QUALNAME = "types.MessageActionChatAddUser" + + def __init__(self, *, users: List[int]) -> None: + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatAddUser": + # No flags + + users = TLObject.read(b, Long) + + return MessageActionChatAddUser(users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.users, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_create.py b/pyrogram/raw/types/message_action_chat_create.py new file mode 100644 index 00000000..00d29b1f --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_create.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatCreate(TLObject): # type: ignore + """Group created + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``BD47CBAD`` + + Parameters: + title (``str``): + Group name + + users (List of ``int`` ``64-bit``): + List of group members + + """ + + __slots__: List[str] = ["title", "users"] + + ID = 0xbd47cbad + QUALNAME = "types.MessageActionChatCreate" + + def __init__(self, *, title: str, users: List[int]) -> None: + self.title = title # string + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatCreate": + # No flags + + title = String.read(b) + + users = TLObject.read(b, Long) + + return MessageActionChatCreate(title=title, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(Vector(self.users, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_delete_photo.py b/pyrogram/raw/types/message_action_chat_delete_photo.py new file mode 100644 index 00000000..bce3c262 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_delete_photo.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatDeletePhoto(TLObject): # type: ignore + """Group profile photo removed. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``95E3FBEF`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x95e3fbef + QUALNAME = "types.MessageActionChatDeletePhoto" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatDeletePhoto": + # No flags + + return MessageActionChatDeletePhoto() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_delete_user.py b/pyrogram/raw/types/message_action_chat_delete_user.py new file mode 100644 index 00000000..f2a548d3 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_delete_user.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatDeleteUser(TLObject): # type: ignore + """User left the group. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``A43F30CC`` + + Parameters: + user_id (``int`` ``64-bit``): + Leaving user ID + + """ + + __slots__: List[str] = ["user_id"] + + ID = 0xa43f30cc + QUALNAME = "types.MessageActionChatDeleteUser" + + def __init__(self, *, user_id: int) -> None: + self.user_id = user_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatDeleteUser": + # No flags + + user_id = Long.read(b) + + return MessageActionChatDeleteUser(user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_edit_photo.py b/pyrogram/raw/types/message_action_chat_edit_photo.py new file mode 100644 index 00000000..2a7a55d6 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_edit_photo.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatEditPhoto(TLObject): # type: ignore + """Group profile changed + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``7FCB13A8`` + + Parameters: + photo (:obj:`Photo `): + New group profile photo + + """ + + __slots__: List[str] = ["photo"] + + ID = 0x7fcb13a8 + QUALNAME = "types.MessageActionChatEditPhoto" + + def __init__(self, *, photo: "raw.base.Photo") -> None: + self.photo = photo # Photo + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatEditPhoto": + # No flags + + photo = TLObject.read(b) + + return MessageActionChatEditPhoto(photo=photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_edit_title.py b/pyrogram/raw/types/message_action_chat_edit_title.py new file mode 100644 index 00000000..80b27434 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_edit_title.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatEditTitle(TLObject): # type: ignore + """Group name changed. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B5A1CE5A`` + + Parameters: + title (``str``): + New group name + + """ + + __slots__: List[str] = ["title"] + + ID = 0xb5a1ce5a + QUALNAME = "types.MessageActionChatEditTitle" + + def __init__(self, *, title: str) -> None: + self.title = title # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatEditTitle": + # No flags + + title = String.read(b) + + return MessageActionChatEditTitle(title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_joined_by_link.py b/pyrogram/raw/types/message_action_chat_joined_by_link.py new file mode 100644 index 00000000..b0ada6f6 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_joined_by_link.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatJoinedByLink(TLObject): # type: ignore + """A user joined the chat via an invite link + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``31224C3`` + + Parameters: + inviter_id (``int`` ``64-bit``): + ID of the user that created the invite link + + """ + + __slots__: List[str] = ["inviter_id"] + + ID = 0x31224c3 + QUALNAME = "types.MessageActionChatJoinedByLink" + + def __init__(self, *, inviter_id: int) -> None: + self.inviter_id = inviter_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatJoinedByLink": + # No flags + + inviter_id = Long.read(b) + + return MessageActionChatJoinedByLink(inviter_id=inviter_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.inviter_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_joined_by_request.py b/pyrogram/raw/types/message_action_chat_joined_by_request.py new file mode 100644 index 00000000..ce1e3202 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_joined_by_request.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatJoinedByRequest(TLObject): # type: ignore + """A user was accepted into the group by an admin + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``EBBCA3CB`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xebbca3cb + QUALNAME = "types.MessageActionChatJoinedByRequest" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatJoinedByRequest": + # No flags + + return MessageActionChatJoinedByRequest() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_chat_migrate_to.py b/pyrogram/raw/types/message_action_chat_migrate_to.py new file mode 100644 index 00000000..d427a821 --- /dev/null +++ b/pyrogram/raw/types/message_action_chat_migrate_to.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionChatMigrateTo(TLObject): # type: ignore + """Indicates the chat was migrated to the specified supergroup + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``E1037F92`` + + Parameters: + channel_id (``int`` ``64-bit``): + The supergroup it was migrated to + + """ + + __slots__: List[str] = ["channel_id"] + + ID = 0xe1037f92 + QUALNAME = "types.MessageActionChatMigrateTo" + + def __init__(self, *, channel_id: int) -> None: + self.channel_id = channel_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionChatMigrateTo": + # No flags + + channel_id = Long.read(b) + + return MessageActionChatMigrateTo(channel_id=channel_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.channel_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_conference_call.py b/pyrogram/raw/types/message_action_conference_call.py new file mode 100644 index 00000000..4cd46213 --- /dev/null +++ b/pyrogram/raw/types/message_action_conference_call.py @@ -0,0 +1,93 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionConferenceCall(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``2FFE2F7A`` + + Parameters: + call_id (``int`` ``64-bit``): + N/A + + missed (``bool``, *optional*): + N/A + + active (``bool``, *optional*): + N/A + + video (``bool``, *optional*): + N/A + + duration (``int`` ``32-bit``, *optional*): + N/A + + other_participants (List of :obj:`Peer `, *optional*): + N/A + + """ + + __slots__: List[str] = ["call_id", "missed", "active", "video", "duration", "other_participants"] + + ID = 0x2ffe2f7a + QUALNAME = "types.MessageActionConferenceCall" + + def __init__(self, *, call_id: int, missed: Optional[bool] = None, active: Optional[bool] = None, video: Optional[bool] = None, duration: Optional[int] = None, other_participants: Optional[List["raw.base.Peer"]] = None) -> None: + self.call_id = call_id # long + self.missed = missed # flags.0?true + self.active = active # flags.1?true + self.video = video # flags.4?true + self.duration = duration # flags.2?int + self.other_participants = other_participants # flags.3?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionConferenceCall": + + flags = Int.read(b) + + missed = True if flags & (1 << 0) else False + active = True if flags & (1 << 1) else False + video = True if flags & (1 << 4) else False + call_id = Long.read(b) + + duration = Int.read(b) if flags & (1 << 2) else None + other_participants = TLObject.read(b) if flags & (1 << 3) else [] + + return MessageActionConferenceCall(call_id=call_id, missed=missed, active=active, video=video, duration=duration, other_participants=other_participants) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.missed else 0 + flags |= (1 << 1) if self.active else 0 + flags |= (1 << 4) if self.video else 0 + flags |= (1 << 2) if self.duration is not None else 0 + flags |= (1 << 3) if self.other_participants else 0 + b.write(Int(flags)) + + b.write(Long(self.call_id)) + + if self.duration is not None: + b.write(Int(self.duration)) + + if self.other_participants is not None: + b.write(Vector(self.other_participants)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_contact_sign_up.py b/pyrogram/raw/types/message_action_contact_sign_up.py new file mode 100644 index 00000000..a96592b1 --- /dev/null +++ b/pyrogram/raw/types/message_action_contact_sign_up.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionContactSignUp(TLObject): # type: ignore + """A contact just signed up to telegram + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``F3F25F76`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xf3f25f76 + QUALNAME = "types.MessageActionContactSignUp" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionContactSignUp": + # No flags + + return MessageActionContactSignUp() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_created_broadcast_list.py b/pyrogram/raw/types/message_action_created_broadcast_list.py new file mode 100644 index 00000000..8df4c797 --- /dev/null +++ b/pyrogram/raw/types/message_action_created_broadcast_list.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionCreatedBroadcastList(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``55555557`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x55555557 + QUALNAME = "types.MessageActionCreatedBroadcastList" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionCreatedBroadcastList": + # No flags + + return MessageActionCreatedBroadcastList() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_custom_action.py b/pyrogram/raw/types/message_action_custom_action.py new file mode 100644 index 00000000..c58436ae --- /dev/null +++ b/pyrogram/raw/types/message_action_custom_action.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionCustomAction(TLObject): # type: ignore + """Custom action (most likely not supported by the current layer, an upgrade might be needed) + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``FAE69F56`` + + Parameters: + message (``str``): + Action message + + """ + + __slots__: List[str] = ["message"] + + ID = 0xfae69f56 + QUALNAME = "types.MessageActionCustomAction" + + def __init__(self, *, message: str) -> None: + self.message = message # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionCustomAction": + # No flags + + message = String.read(b) + + return MessageActionCustomAction(message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.message)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_empty.py b/pyrogram/raw/types/message_action_empty.py new file mode 100644 index 00000000..fb2479ce --- /dev/null +++ b/pyrogram/raw/types/message_action_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B6AEF7B0`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb6aef7b0 + QUALNAME = "types.MessageActionEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionEmpty": + # No flags + + return MessageActionEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_game_score.py b/pyrogram/raw/types/message_action_game_score.py new file mode 100644 index 00000000..6ea06083 --- /dev/null +++ b/pyrogram/raw/types/message_action_game_score.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGameScore(TLObject): # type: ignore + """Someone scored in a game + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``92A72876`` + + Parameters: + game_id (``int`` ``64-bit``): + Game ID + + score (``int`` ``32-bit``): + Score + + """ + + __slots__: List[str] = ["game_id", "score"] + + ID = 0x92a72876 + QUALNAME = "types.MessageActionGameScore" + + def __init__(self, *, game_id: int, score: int) -> None: + self.game_id = game_id # long + self.score = score # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGameScore": + # No flags + + game_id = Long.read(b) + + score = Int.read(b) + + return MessageActionGameScore(game_id=game_id, score=score) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.game_id)) + + b.write(Int(self.score)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_geo_proximity_reached.py b/pyrogram/raw/types/message_action_geo_proximity_reached.py new file mode 100644 index 00000000..ac1c307e --- /dev/null +++ b/pyrogram/raw/types/message_action_geo_proximity_reached.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGeoProximityReached(TLObject): # type: ignore + """A user of the chat is now in proximity of another user + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``98E0D697`` + + Parameters: + from_id (:obj:`Peer `): + The user or chat that is now in proximity of to_id + + to_id (:obj:`Peer `): + The user or chat that subscribed to live geolocation proximity alerts + + distance (``int`` ``32-bit``): + Distance, in meters (0-100000) + + """ + + __slots__: List[str] = ["from_id", "to_id", "distance"] + + ID = 0x98e0d697 + QUALNAME = "types.MessageActionGeoProximityReached" + + def __init__(self, *, from_id: "raw.base.Peer", to_id: "raw.base.Peer", distance: int) -> None: + self.from_id = from_id # Peer + self.to_id = to_id # Peer + self.distance = distance # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGeoProximityReached": + # No flags + + from_id = TLObject.read(b) + + to_id = TLObject.read(b) + + distance = Int.read(b) + + return MessageActionGeoProximityReached(from_id=from_id, to_id=to_id, distance=distance) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.from_id.write()) + + b.write(self.to_id.write()) + + b.write(Int(self.distance)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_gift_code.py b/pyrogram/raw/types/message_action_gift_code.py new file mode 100644 index 00000000..874ef2c6 --- /dev/null +++ b/pyrogram/raw/types/message_action_gift_code.py @@ -0,0 +1,132 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGiftCode(TLObject): # type: ignore + """Contains a Telegram Premium giftcode link. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``31C48347`` + + Parameters: + days (``int`` ``32-bit``): + N/A + + slug (``str``): + Slug of the Telegram Premium giftcode link + + via_giveaway (``bool``, *optional*): + If set, this gift code was received from a giveaway » started by a channel we're subscribed to. + + unclaimed (``bool``, *optional*): + If set, the link was not redeemed yet. + + boost_peer (:obj:`Peer `, *optional*): + Identifier of the channel that created the gift code either directly or through a giveaway: if we import this giftcode link, we will also automatically boost this channel. + + currency (``str``, *optional*): + Three-letter ISO 4217 currency code + + amount (``int`` ``64-bit``, *optional*): + Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + crypto_currency (``str``, *optional*): + If set, the gift was made using the specified cryptocurrency. + + crypto_amount (``int`` ``64-bit``, *optional*): + If crypto_currency is set, contains the paid amount, in the smallest units of the cryptocurrency. + + message (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["days", "slug", "via_giveaway", "unclaimed", "boost_peer", "currency", "amount", "crypto_currency", "crypto_amount", "message"] + + ID = 0x31c48347 + QUALNAME = "types.MessageActionGiftCode" + + def __init__(self, *, days: int, slug: str, via_giveaway: Optional[bool] = None, unclaimed: Optional[bool] = None, boost_peer: "raw.base.Peer" = None, currency: Optional[str] = None, amount: Optional[int] = None, crypto_currency: Optional[str] = None, crypto_amount: Optional[int] = None, message: "raw.base.TextWithEntities" = None) -> None: + self.days = days # int + self.slug = slug # string + self.via_giveaway = via_giveaway # flags.0?true + self.unclaimed = unclaimed # flags.5?true + self.boost_peer = boost_peer # flags.1?Peer + self.currency = currency # flags.2?string + self.amount = amount # flags.2?long + self.crypto_currency = crypto_currency # flags.3?string + self.crypto_amount = crypto_amount # flags.3?long + self.message = message # flags.4?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGiftCode": + + flags = Int.read(b) + + via_giveaway = True if flags & (1 << 0) else False + unclaimed = True if flags & (1 << 5) else False + boost_peer = TLObject.read(b) if flags & (1 << 1) else None + + days = Int.read(b) + + slug = String.read(b) + + currency = String.read(b) if flags & (1 << 2) else None + amount = Long.read(b) if flags & (1 << 2) else None + crypto_currency = String.read(b) if flags & (1 << 3) else None + crypto_amount = Long.read(b) if flags & (1 << 3) else None + message = TLObject.read(b) if flags & (1 << 4) else None + + return MessageActionGiftCode(days=days, slug=slug, via_giveaway=via_giveaway, unclaimed=unclaimed, boost_peer=boost_peer, currency=currency, amount=amount, crypto_currency=crypto_currency, crypto_amount=crypto_amount, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.via_giveaway else 0 + flags |= (1 << 5) if self.unclaimed else 0 + flags |= (1 << 1) if self.boost_peer is not None else 0 + flags |= (1 << 2) if self.currency is not None else 0 + flags |= (1 << 2) if self.amount is not None else 0 + flags |= (1 << 3) if self.crypto_currency is not None else 0 + flags |= (1 << 3) if self.crypto_amount is not None else 0 + flags |= (1 << 4) if self.message is not None else 0 + b.write(Int(flags)) + + if self.boost_peer is not None: + b.write(self.boost_peer.write()) + + b.write(Int(self.days)) + + b.write(String(self.slug)) + + if self.currency is not None: + b.write(String(self.currency)) + + if self.amount is not None: + b.write(Long(self.amount)) + + if self.crypto_currency is not None: + b.write(String(self.crypto_currency)) + + if self.crypto_amount is not None: + b.write(Long(self.crypto_amount)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_gift_premium.py b/pyrogram/raw/types/message_action_gift_premium.py new file mode 100644 index 00000000..e52f2a11 --- /dev/null +++ b/pyrogram/raw/types/message_action_gift_premium.py @@ -0,0 +1,100 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGiftPremium(TLObject): # type: ignore + """Info about a gifted Telegram Premium subscription + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``48E91302`` + + Parameters: + currency (``str``): + Three-letter ISO 4217 currency code + + amount (``int`` ``64-bit``): + Price of the gift in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + days (``int`` ``32-bit``): + N/A + + crypto_currency (``str``, *optional*): + If the gift was bought using a cryptocurrency, the cryptocurrency name. + + crypto_amount (``int`` ``64-bit``, *optional*): + If the gift was bought using a cryptocurrency, price of the gift in the smallest units of a cryptocurrency. + + message (:obj:`TextWithEntities `, *optional*): + N/A + + """ + + __slots__: List[str] = ["currency", "amount", "days", "crypto_currency", "crypto_amount", "message"] + + ID = 0x48e91302 + QUALNAME = "types.MessageActionGiftPremium" + + def __init__(self, *, currency: str, amount: int, days: int, crypto_currency: Optional[str] = None, crypto_amount: Optional[int] = None, message: "raw.base.TextWithEntities" = None) -> None: + self.currency = currency # string + self.amount = amount # long + self.days = days # int + self.crypto_currency = crypto_currency # flags.0?string + self.crypto_amount = crypto_amount # flags.0?long + self.message = message # flags.1?TextWithEntities + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGiftPremium": + + flags = Int.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + days = Int.read(b) + + crypto_currency = String.read(b) if flags & (1 << 0) else None + crypto_amount = Long.read(b) if flags & (1 << 0) else None + message = TLObject.read(b) if flags & (1 << 1) else None + + return MessageActionGiftPremium(currency=currency, amount=amount, days=days, crypto_currency=crypto_currency, crypto_amount=crypto_amount, message=message) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.crypto_currency is not None else 0 + flags |= (1 << 0) if self.crypto_amount is not None else 0 + flags |= (1 << 1) if self.message is not None else 0 + b.write(Int(flags)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + b.write(Int(self.days)) + + if self.crypto_currency is not None: + b.write(String(self.crypto_currency)) + + if self.crypto_amount is not None: + b.write(Long(self.crypto_amount)) + + if self.message is not None: + b.write(self.message.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_gift_stars.py b/pyrogram/raw/types/message_action_gift_stars.py new file mode 100644 index 00000000..52055582 --- /dev/null +++ b/pyrogram/raw/types/message_action_gift_stars.py @@ -0,0 +1,99 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGiftStars(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``45D5B021`` + + Parameters: + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + stars (``int`` ``64-bit``): + N/A + + crypto_currency (``str``, *optional*): + N/A + + crypto_amount (``int`` ``64-bit``, *optional*): + N/A + + transaction_id (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["currency", "amount", "stars", "crypto_currency", "crypto_amount", "transaction_id"] + + ID = 0x45d5b021 + QUALNAME = "types.MessageActionGiftStars" + + def __init__(self, *, currency: str, amount: int, stars: int, crypto_currency: Optional[str] = None, crypto_amount: Optional[int] = None, transaction_id: Optional[str] = None) -> None: + self.currency = currency # string + self.amount = amount # long + self.stars = stars # long + self.crypto_currency = crypto_currency # flags.0?string + self.crypto_amount = crypto_amount # flags.0?long + self.transaction_id = transaction_id # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGiftStars": + + flags = Int.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + stars = Long.read(b) + + crypto_currency = String.read(b) if flags & (1 << 0) else None + crypto_amount = Long.read(b) if flags & (1 << 0) else None + transaction_id = String.read(b) if flags & (1 << 1) else None + return MessageActionGiftStars(currency=currency, amount=amount, stars=stars, crypto_currency=crypto_currency, crypto_amount=crypto_amount, transaction_id=transaction_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.crypto_currency is not None else 0 + flags |= (1 << 0) if self.crypto_amount is not None else 0 + flags |= (1 << 1) if self.transaction_id is not None else 0 + b.write(Int(flags)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + b.write(Long(self.stars)) + + if self.crypto_currency is not None: + b.write(String(self.crypto_currency)) + + if self.crypto_amount is not None: + b.write(Long(self.crypto_amount)) + + if self.transaction_id is not None: + b.write(String(self.transaction_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_gift_ton.py b/pyrogram/raw/types/message_action_gift_ton.py new file mode 100644 index 00000000..d50e093f --- /dev/null +++ b/pyrogram/raw/types/message_action_gift_ton.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGiftTon(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``A8A3C699`` + + Parameters: + currency (``str``): + N/A + + amount (``int`` ``64-bit``): + N/A + + crypto_currency (``str``): + N/A + + crypto_amount (``int`` ``64-bit``): + N/A + + transaction_id (``str``, *optional*): + N/A + + """ + + __slots__: List[str] = ["currency", "amount", "crypto_currency", "crypto_amount", "transaction_id"] + + ID = 0xa8a3c699 + QUALNAME = "types.MessageActionGiftTon" + + def __init__(self, *, currency: str, amount: int, crypto_currency: str, crypto_amount: int, transaction_id: Optional[str] = None) -> None: + self.currency = currency # string + self.amount = amount # long + self.crypto_currency = crypto_currency # string + self.crypto_amount = crypto_amount # long + self.transaction_id = transaction_id # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGiftTon": + + flags = Int.read(b) + + currency = String.read(b) + + amount = Long.read(b) + + crypto_currency = String.read(b) + + crypto_amount = Long.read(b) + + transaction_id = String.read(b) if flags & (1 << 0) else None + return MessageActionGiftTon(currency=currency, amount=amount, crypto_currency=crypto_currency, crypto_amount=crypto_amount, transaction_id=transaction_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.transaction_id is not None else 0 + b.write(Int(flags)) + + b.write(String(self.currency)) + + b.write(Long(self.amount)) + + b.write(String(self.crypto_currency)) + + b.write(Long(self.crypto_amount)) + + if self.transaction_id is not None: + b.write(String(self.transaction_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_giveaway_launch.py b/pyrogram/raw/types/message_action_giveaway_launch.py new file mode 100644 index 00000000..90adb9a2 --- /dev/null +++ b/pyrogram/raw/types/message_action_giveaway_launch.py @@ -0,0 +1,57 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGiveawayLaunch(TLObject): # type: ignore + """A giveaway was started. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``A80F51E4`` + + Parameters: + stars (``int`` ``64-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars"] + + ID = 0xa80f51e4 + QUALNAME = "types.MessageActionGiveawayLaunch" + + def __init__(self, *, stars: Optional[int] = None) -> None: + self.stars = stars # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGiveawayLaunch": + + flags = Int.read(b) + + stars = Long.read(b) if flags & (1 << 0) else None + return MessageActionGiveawayLaunch(stars=stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.stars is not None else 0 + b.write(Int(flags)) + + if self.stars is not None: + b.write(Long(self.stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_giveaway_results.py b/pyrogram/raw/types/message_action_giveaway_results.py new file mode 100644 index 00000000..d405d206 --- /dev/null +++ b/pyrogram/raw/types/message_action_giveaway_results.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGiveawayResults(TLObject): # type: ignore + """A giveaway has ended. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``87E2F155`` + + Parameters: + winners_count (``int`` ``32-bit``): + Number of winners in the giveaway + + unclaimed_count (``int`` ``32-bit``): + Number of undistributed prizes + + stars (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["winners_count", "unclaimed_count", "stars"] + + ID = 0x87e2f155 + QUALNAME = "types.MessageActionGiveawayResults" + + def __init__(self, *, winners_count: int, unclaimed_count: int, stars: Optional[bool] = None) -> None: + self.winners_count = winners_count # int + self.unclaimed_count = unclaimed_count # int + self.stars = stars # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGiveawayResults": + + flags = Int.read(b) + + stars = True if flags & (1 << 0) else False + winners_count = Int.read(b) + + unclaimed_count = Int.read(b) + + return MessageActionGiveawayResults(winners_count=winners_count, unclaimed_count=unclaimed_count, stars=stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.stars else 0 + b.write(Int(flags)) + + b.write(Int(self.winners_count)) + + b.write(Int(self.unclaimed_count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_group_call.py b/pyrogram/raw/types/message_action_group_call.py new file mode 100644 index 00000000..b7e2918f --- /dev/null +++ b/pyrogram/raw/types/message_action_group_call.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGroupCall(TLObject): # type: ignore + """The group call has ended + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``7A0D7F42`` + + Parameters: + call (:obj:`InputGroupCall `): + Group call + + duration (``int`` ``32-bit``, *optional*): + Group call duration + + """ + + __slots__: List[str] = ["call", "duration"] + + ID = 0x7a0d7f42 + QUALNAME = "types.MessageActionGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", duration: Optional[int] = None) -> None: + self.call = call # InputGroupCall + self.duration = duration # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGroupCall": + + flags = Int.read(b) + + call = TLObject.read(b) + + duration = Int.read(b) if flags & (1 << 0) else None + return MessageActionGroupCall(call=call, duration=duration) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.duration is not None else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + if self.duration is not None: + b.write(Int(self.duration)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_group_call_scheduled.py b/pyrogram/raw/types/message_action_group_call_scheduled.py new file mode 100644 index 00000000..1af932f7 --- /dev/null +++ b/pyrogram/raw/types/message_action_group_call_scheduled.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionGroupCallScheduled(TLObject): # type: ignore + """A group call was scheduled + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B3A07661`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + schedule_date (``int`` ``32-bit``): + When is this group call scheduled to start + + """ + + __slots__: List[str] = ["call", "schedule_date"] + + ID = 0xb3a07661 + QUALNAME = "types.MessageActionGroupCallScheduled" + + def __init__(self, *, call: "raw.base.InputGroupCall", schedule_date: int) -> None: + self.call = call # InputGroupCall + self.schedule_date = schedule_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionGroupCallScheduled": + # No flags + + call = TLObject.read(b) + + schedule_date = Int.read(b) + + return MessageActionGroupCallScheduled(call=call, schedule_date=schedule_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Int(self.schedule_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_history_clear.py b/pyrogram/raw/types/message_action_history_clear.py new file mode 100644 index 00000000..9bb23c5b --- /dev/null +++ b/pyrogram/raw/types/message_action_history_clear.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionHistoryClear(TLObject): # type: ignore + """Chat history was cleared + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``9FBAB604`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x9fbab604 + QUALNAME = "types.MessageActionHistoryClear" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionHistoryClear": + # No flags + + return MessageActionHistoryClear() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_invite_to_group_call.py b/pyrogram/raw/types/message_action_invite_to_group_call.py new file mode 100644 index 00000000..85699fb0 --- /dev/null +++ b/pyrogram/raw/types/message_action_invite_to_group_call.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionInviteToGroupCall(TLObject): # type: ignore + """A set of users was invited to the group call + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``502F92F7`` + + Parameters: + call (:obj:`InputGroupCall `): + The group call + + users (List of ``int`` ``64-bit``): + The invited users + + """ + + __slots__: List[str] = ["call", "users"] + + ID = 0x502f92f7 + QUALNAME = "types.MessageActionInviteToGroupCall" + + def __init__(self, *, call: "raw.base.InputGroupCall", users: List[int]) -> None: + self.call = call # InputGroupCall + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionInviteToGroupCall": + # No flags + + call = TLObject.read(b) + + users = TLObject.read(b, Long) + + return MessageActionInviteToGroupCall(call=call, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.call.write()) + + b.write(Vector(self.users, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_login_unknown_location.py b/pyrogram/raw/types/message_action_login_unknown_location.py new file mode 100644 index 00000000..0104f152 --- /dev/null +++ b/pyrogram/raw/types/message_action_login_unknown_location.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionLoginUnknownLocation(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``555555F5`` + + Parameters: + title (``str``): + N/A + + address (``str``): + N/A + + """ + + __slots__: List[str] = ["title", "address"] + + ID = 0x555555f5 + QUALNAME = "types.MessageActionLoginUnknownLocation" + + def __init__(self, *, title: str, address: str) -> None: + self.title = title # string + self.address = address # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionLoginUnknownLocation": + # No flags + + title = String.read(b) + + address = String.read(b) + + return MessageActionLoginUnknownLocation(title=title, address=address) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(String(self.address)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_new_creator_pending.py b/pyrogram/raw/types/message_action_new_creator_pending.py new file mode 100644 index 00000000..15485289 --- /dev/null +++ b/pyrogram/raw/types/message_action_new_creator_pending.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionNewCreatorPending(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B07ED085`` + + Parameters: + new_creator_id (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["new_creator_id"] + + ID = 0xb07ed085 + QUALNAME = "types.MessageActionNewCreatorPending" + + def __init__(self, *, new_creator_id: int) -> None: + self.new_creator_id = new_creator_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionNewCreatorPending": + # No flags + + new_creator_id = Long.read(b) + + return MessageActionNewCreatorPending(new_creator_id=new_creator_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.new_creator_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_paid_messages_price.py b/pyrogram/raw/types/message_action_paid_messages_price.py new file mode 100644 index 00000000..a9c5f2be --- /dev/null +++ b/pyrogram/raw/types/message_action_paid_messages_price.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPaidMessagesPrice(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``84B88578`` + + Parameters: + stars (``int`` ``64-bit``): + N/A + + broadcast_messages_allowed (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars", "broadcast_messages_allowed"] + + ID = 0x84b88578 + QUALNAME = "types.MessageActionPaidMessagesPrice" + + def __init__(self, *, stars: int, broadcast_messages_allowed: Optional[bool] = None) -> None: + self.stars = stars # long + self.broadcast_messages_allowed = broadcast_messages_allowed # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPaidMessagesPrice": + + flags = Int.read(b) + + broadcast_messages_allowed = True if flags & (1 << 0) else False + stars = Long.read(b) + + return MessageActionPaidMessagesPrice(stars=stars, broadcast_messages_allowed=broadcast_messages_allowed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.broadcast_messages_allowed else 0 + b.write(Int(flags)) + + b.write(Long(self.stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_paid_messages_refunded.py b/pyrogram/raw/types/message_action_paid_messages_refunded.py new file mode 100644 index 00000000..9495402b --- /dev/null +++ b/pyrogram/raw/types/message_action_paid_messages_refunded.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPaidMessagesRefunded(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``AC1F1FCD`` + + Parameters: + count (``int`` ``32-bit``): + N/A + + stars (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["count", "stars"] + + ID = 0xac1f1fcd + QUALNAME = "types.MessageActionPaidMessagesRefunded" + + def __init__(self, *, count: int, stars: int) -> None: + self.count = count # int + self.stars = stars # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPaidMessagesRefunded": + # No flags + + count = Int.read(b) + + stars = Long.read(b) + + return MessageActionPaidMessagesRefunded(count=count, stars=stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Long(self.stars)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_payment_refunded.py b/pyrogram/raw/types/message_action_payment_refunded.py new file mode 100644 index 00000000..735029b4 --- /dev/null +++ b/pyrogram/raw/types/message_action_payment_refunded.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPaymentRefunded(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``41B3E202`` + + Parameters: + peer (:obj:`Peer `): + N/A + + currency (``str``): + N/A + + total_amount (``int`` ``64-bit``): + N/A + + charge (:obj:`PaymentCharge `): + N/A + + payload (``bytes``, *optional*): + N/A + + """ + + __slots__: List[str] = ["peer", "currency", "total_amount", "charge", "payload"] + + ID = 0x41b3e202 + QUALNAME = "types.MessageActionPaymentRefunded" + + def __init__(self, *, peer: "raw.base.Peer", currency: str, total_amount: int, charge: "raw.base.PaymentCharge", payload: Optional[bytes] = None) -> None: + self.peer = peer # Peer + self.currency = currency # string + self.total_amount = total_amount # long + self.charge = charge # PaymentCharge + self.payload = payload # flags.0?bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPaymentRefunded": + + flags = Int.read(b) + + peer = TLObject.read(b) + + currency = String.read(b) + + total_amount = Long.read(b) + + payload = Bytes.read(b) if flags & (1 << 0) else None + charge = TLObject.read(b) + + return MessageActionPaymentRefunded(peer=peer, currency=currency, total_amount=total_amount, charge=charge, payload=payload) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.payload is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(String(self.currency)) + + b.write(Long(self.total_amount)) + + if self.payload is not None: + b.write(Bytes(self.payload)) + + b.write(self.charge.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_payment_sent.py b/pyrogram/raw/types/message_action_payment_sent.py new file mode 100644 index 00000000..8a443315 --- /dev/null +++ b/pyrogram/raw/types/message_action_payment_sent.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPaymentSent(TLObject): # type: ignore + """A payment was sent + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``C624B16E`` + + Parameters: + currency (``str``): + Three-letter ISO 4217 currency code + + total_amount (``int`` ``64-bit``): + Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + recurring_init (``bool``, *optional*): + Whether this is the first payment of a recurring payment we just subscribed to + + recurring_used (``bool``, *optional*): + Whether this payment is part of a recurring payment + + invoice_slug (``str``, *optional*): + An invoice slug taken from an invoice deep link or from the premium_invoice_slug app config parameter » + + subscription_until_date (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["currency", "total_amount", "recurring_init", "recurring_used", "invoice_slug", "subscription_until_date"] + + ID = 0xc624b16e + QUALNAME = "types.MessageActionPaymentSent" + + def __init__(self, *, currency: str, total_amount: int, recurring_init: Optional[bool] = None, recurring_used: Optional[bool] = None, invoice_slug: Optional[str] = None, subscription_until_date: Optional[int] = None) -> None: + self.currency = currency # string + self.total_amount = total_amount # long + self.recurring_init = recurring_init # flags.2?true + self.recurring_used = recurring_used # flags.3?true + self.invoice_slug = invoice_slug # flags.0?string + self.subscription_until_date = subscription_until_date # flags.4?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPaymentSent": + + flags = Int.read(b) + + recurring_init = True if flags & (1 << 2) else False + recurring_used = True if flags & (1 << 3) else False + currency = String.read(b) + + total_amount = Long.read(b) + + invoice_slug = String.read(b) if flags & (1 << 0) else None + subscription_until_date = Int.read(b) if flags & (1 << 4) else None + return MessageActionPaymentSent(currency=currency, total_amount=total_amount, recurring_init=recurring_init, recurring_used=recurring_used, invoice_slug=invoice_slug, subscription_until_date=subscription_until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.recurring_init else 0 + flags |= (1 << 3) if self.recurring_used else 0 + flags |= (1 << 0) if self.invoice_slug is not None else 0 + flags |= (1 << 4) if self.subscription_until_date is not None else 0 + b.write(Int(flags)) + + b.write(String(self.currency)) + + b.write(Long(self.total_amount)) + + if self.invoice_slug is not None: + b.write(String(self.invoice_slug)) + + if self.subscription_until_date is not None: + b.write(Int(self.subscription_until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_payment_sent_me.py b/pyrogram/raw/types/message_action_payment_sent_me.py new file mode 100644 index 00000000..006b5dea --- /dev/null +++ b/pyrogram/raw/types/message_action_payment_sent_me.py @@ -0,0 +1,120 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPaymentSentMe(TLObject): # type: ignore + """A user just sent a payment to me (a bot) + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``FFA00CCC`` + + Parameters: + currency (``str``): + Three-letter ISO 4217 currency code + + total_amount (``int`` ``64-bit``): + Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + payload (``bytes``): + Bot specified invoice payload + + charge (:obj:`PaymentCharge `): + Provider payment identifier + + recurring_init (``bool``, *optional*): + Whether this is the first payment of a recurring payment we just subscribed to + + recurring_used (``bool``, *optional*): + Whether this payment is part of a recurring payment + + info (:obj:`PaymentRequestedInfo `, *optional*): + Order info provided by the user + + shipping_option_id (``str``, *optional*): + Identifier of the shipping option chosen by the user + + subscription_until_date (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["currency", "total_amount", "payload", "charge", "recurring_init", "recurring_used", "info", "shipping_option_id", "subscription_until_date"] + + ID = 0xffa00ccc + QUALNAME = "types.MessageActionPaymentSentMe" + + def __init__(self, *, currency: str, total_amount: int, payload: bytes, charge: "raw.base.PaymentCharge", recurring_init: Optional[bool] = None, recurring_used: Optional[bool] = None, info: "raw.base.PaymentRequestedInfo" = None, shipping_option_id: Optional[str] = None, subscription_until_date: Optional[int] = None) -> None: + self.currency = currency # string + self.total_amount = total_amount # long + self.payload = payload # bytes + self.charge = charge # PaymentCharge + self.recurring_init = recurring_init # flags.2?true + self.recurring_used = recurring_used # flags.3?true + self.info = info # flags.0?PaymentRequestedInfo + self.shipping_option_id = shipping_option_id # flags.1?string + self.subscription_until_date = subscription_until_date # flags.4?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPaymentSentMe": + + flags = Int.read(b) + + recurring_init = True if flags & (1 << 2) else False + recurring_used = True if flags & (1 << 3) else False + currency = String.read(b) + + total_amount = Long.read(b) + + payload = Bytes.read(b) + + info = TLObject.read(b) if flags & (1 << 0) else None + + shipping_option_id = String.read(b) if flags & (1 << 1) else None + charge = TLObject.read(b) + + subscription_until_date = Int.read(b) if flags & (1 << 4) else None + return MessageActionPaymentSentMe(currency=currency, total_amount=total_amount, payload=payload, charge=charge, recurring_init=recurring_init, recurring_used=recurring_used, info=info, shipping_option_id=shipping_option_id, subscription_until_date=subscription_until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.recurring_init else 0 + flags |= (1 << 3) if self.recurring_used else 0 + flags |= (1 << 0) if self.info is not None else 0 + flags |= (1 << 1) if self.shipping_option_id is not None else 0 + flags |= (1 << 4) if self.subscription_until_date is not None else 0 + b.write(Int(flags)) + + b.write(String(self.currency)) + + b.write(Long(self.total_amount)) + + b.write(Bytes(self.payload)) + + if self.info is not None: + b.write(self.info.write()) + + if self.shipping_option_id is not None: + b.write(String(self.shipping_option_id)) + + b.write(self.charge.write()) + + if self.subscription_until_date is not None: + b.write(Int(self.subscription_until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_phone_call.py b/pyrogram/raw/types/message_action_phone_call.py new file mode 100644 index 00000000..30457856 --- /dev/null +++ b/pyrogram/raw/types/message_action_phone_call.py @@ -0,0 +1,81 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPhoneCall(TLObject): # type: ignore + """A phone call + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``80E11A7F`` + + Parameters: + call_id (``int`` ``64-bit``): + Call ID + + video (``bool``, *optional*): + Is this a video call? + + reason (:obj:`PhoneCallDiscardReason `, *optional*): + If the call has ended, the reason why it ended + + duration (``int`` ``32-bit``, *optional*): + Duration of the call in seconds + + """ + + __slots__: List[str] = ["call_id", "video", "reason", "duration"] + + ID = 0x80e11a7f + QUALNAME = "types.MessageActionPhoneCall" + + def __init__(self, *, call_id: int, video: Optional[bool] = None, reason: "raw.base.PhoneCallDiscardReason" = None, duration: Optional[int] = None) -> None: + self.call_id = call_id # long + self.video = video # flags.2?true + self.reason = reason # flags.0?PhoneCallDiscardReason + self.duration = duration # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPhoneCall": + + flags = Int.read(b) + + video = True if flags & (1 << 2) else False + call_id = Long.read(b) + + reason = TLObject.read(b) if flags & (1 << 0) else None + + duration = Int.read(b) if flags & (1 << 1) else None + return MessageActionPhoneCall(call_id=call_id, video=video, reason=reason, duration=duration) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.video else 0 + flags |= (1 << 0) if self.reason is not None else 0 + flags |= (1 << 1) if self.duration is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.call_id)) + + if self.reason is not None: + b.write(self.reason.write()) + + if self.duration is not None: + b.write(Int(self.duration)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_phone_number_request.py b/pyrogram/raw/types/message_action_phone_number_request.py new file mode 100644 index 00000000..31d22889 --- /dev/null +++ b/pyrogram/raw/types/message_action_phone_number_request.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPhoneNumberRequest(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``1BAA035`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x1baa035 + QUALNAME = "types.MessageActionPhoneNumberRequest" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPhoneNumberRequest": + # No flags + + return MessageActionPhoneNumberRequest() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_pin_message.py b/pyrogram/raw/types/message_action_pin_message.py new file mode 100644 index 00000000..f3a70eea --- /dev/null +++ b/pyrogram/raw/types/message_action_pin_message.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPinMessage(TLObject): # type: ignore + """A message was pinned + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``94BD38ED`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x94bd38ed + QUALNAME = "types.MessageActionPinMessage" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPinMessage": + # No flags + + return MessageActionPinMessage() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_prize_stars.py b/pyrogram/raw/types/message_action_prize_stars.py new file mode 100644 index 00000000..a62d2a91 --- /dev/null +++ b/pyrogram/raw/types/message_action_prize_stars.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionPrizeStars(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B00C47A2`` + + Parameters: + stars (``int`` ``64-bit``): + N/A + + transaction_id (``str``): + N/A + + boost_peer (:obj:`Peer `): + N/A + + giveaway_msg_id (``int`` ``32-bit``): + N/A + + unclaimed (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["stars", "transaction_id", "boost_peer", "giveaway_msg_id", "unclaimed"] + + ID = 0xb00c47a2 + QUALNAME = "types.MessageActionPrizeStars" + + def __init__(self, *, stars: int, transaction_id: str, boost_peer: "raw.base.Peer", giveaway_msg_id: int, unclaimed: Optional[bool] = None) -> None: + self.stars = stars # long + self.transaction_id = transaction_id # string + self.boost_peer = boost_peer # Peer + self.giveaway_msg_id = giveaway_msg_id # int + self.unclaimed = unclaimed # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionPrizeStars": + + flags = Int.read(b) + + unclaimed = True if flags & (1 << 0) else False + stars = Long.read(b) + + transaction_id = String.read(b) + + boost_peer = TLObject.read(b) + + giveaway_msg_id = Int.read(b) + + return MessageActionPrizeStars(stars=stars, transaction_id=transaction_id, boost_peer=boost_peer, giveaway_msg_id=giveaway_msg_id, unclaimed=unclaimed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.unclaimed else 0 + b.write(Int(flags)) + + b.write(Long(self.stars)) + + b.write(String(self.transaction_id)) + + b.write(self.boost_peer.write()) + + b.write(Int(self.giveaway_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_requested_peer.py b/pyrogram/raw/types/message_action_requested_peer.py new file mode 100644 index 00000000..6581da04 --- /dev/null +++ b/pyrogram/raw/types/message_action_requested_peer.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionRequestedPeer(TLObject): # type: ignore + """Contains info about one or more peers that the user shared with the bot after clicking on a keyboardButtonRequestPeer button. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``31518E9B`` + + Parameters: + button_id (``int`` ``32-bit``): + button_id contained in the keyboardButtonRequestPeer + + peers (List of :obj:`Peer `): + The shared peers + + """ + + __slots__: List[str] = ["button_id", "peers"] + + ID = 0x31518e9b + QUALNAME = "types.MessageActionRequestedPeer" + + def __init__(self, *, button_id: int, peers: List["raw.base.Peer"]) -> None: + self.button_id = button_id # int + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionRequestedPeer": + # No flags + + button_id = Int.read(b) + + peers = TLObject.read(b) + + return MessageActionRequestedPeer(button_id=button_id, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.button_id)) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_requested_peer_sent_me.py b/pyrogram/raw/types/message_action_requested_peer_sent_me.py new file mode 100644 index 00000000..ec910bd6 --- /dev/null +++ b/pyrogram/raw/types/message_action_requested_peer_sent_me.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionRequestedPeerSentMe(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``93B31848`` + + Parameters: + button_id (``int`` ``32-bit``): + + + peers (List of :obj:`RequestedPeer `): + + + """ + + __slots__: List[str] = ["button_id", "peers"] + + ID = 0x93b31848 + QUALNAME = "types.MessageActionRequestedPeerSentMe" + + def __init__(self, *, button_id: int, peers: List["raw.base.RequestedPeer"]) -> None: + self.button_id = button_id # int + self.peers = peers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionRequestedPeerSentMe": + # No flags + + button_id = Int.read(b) + + peers = TLObject.read(b) + + return MessageActionRequestedPeerSentMe(button_id=button_id, peers=peers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.button_id)) + + b.write(Vector(self.peers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_screenshot_taken.py b/pyrogram/raw/types/message_action_screenshot_taken.py new file mode 100644 index 00000000..d672173b --- /dev/null +++ b/pyrogram/raw/types/message_action_screenshot_taken.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionScreenshotTaken(TLObject): # type: ignore + """A screenshot of the chat was taken + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``4792929B`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x4792929b + QUALNAME = "types.MessageActionScreenshotTaken" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionScreenshotTaken": + # No flags + + return MessageActionScreenshotTaken() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_secure_values_sent.py b/pyrogram/raw/types/message_action_secure_values_sent.py new file mode 100644 index 00000000..ca5331d5 --- /dev/null +++ b/pyrogram/raw/types/message_action_secure_values_sent.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSecureValuesSent(TLObject): # type: ignore + """Request for secure telegram passport values was sent + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``D95C6154`` + + Parameters: + types (List of :obj:`SecureValueType `): + Secure value types + + """ + + __slots__: List[str] = ["types"] + + ID = 0xd95c6154 + QUALNAME = "types.MessageActionSecureValuesSent" + + def __init__(self, *, types: List["raw.base.SecureValueType"]) -> None: + self.types = types # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSecureValuesSent": + # No flags + + types = TLObject.read(b) + + return MessageActionSecureValuesSent(types=types) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.types)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_secure_values_sent_me.py b/pyrogram/raw/types/message_action_secure_values_sent_me.py new file mode 100644 index 00000000..1ae6789f --- /dev/null +++ b/pyrogram/raw/types/message_action_secure_values_sent_me.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSecureValuesSentMe(TLObject): # type: ignore + """Secure telegram passport values were received + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``1B287353`` + + Parameters: + values (List of :obj:`SecureValue `): + Vector with information about documents and other Telegram Passport elements that were shared with the bot + + credentials (:obj:`SecureCredentialsEncrypted `): + Encrypted credentials required to decrypt the data + + """ + + __slots__: List[str] = ["values", "credentials"] + + ID = 0x1b287353 + QUALNAME = "types.MessageActionSecureValuesSentMe" + + def __init__(self, *, values: List["raw.base.SecureValue"], credentials: "raw.base.SecureCredentialsEncrypted") -> None: + self.values = values # Vector + self.credentials = credentials # SecureCredentialsEncrypted + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSecureValuesSentMe": + # No flags + + values = TLObject.read(b) + + credentials = TLObject.read(b) + + return MessageActionSecureValuesSentMe(values=values, credentials=credentials) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.values)) + + b.write(self.credentials.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_set_chat_theme.py b/pyrogram/raw/types/message_action_set_chat_theme.py new file mode 100644 index 00000000..aecaf727 --- /dev/null +++ b/pyrogram/raw/types/message_action_set_chat_theme.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSetChatTheme(TLObject): # type: ignore + """The chat theme was changed + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B91BBD3A`` + + Parameters: + theme (:obj:`ChatTheme `): + N/A + + """ + + __slots__: List[str] = ["theme"] + + ID = 0xb91bbd3a + QUALNAME = "types.MessageActionSetChatTheme" + + def __init__(self, *, theme: "raw.base.ChatTheme") -> None: + self.theme = theme # ChatTheme + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSetChatTheme": + # No flags + + theme = TLObject.read(b) + + return MessageActionSetChatTheme(theme=theme) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.theme.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_set_chat_wall_paper.py b/pyrogram/raw/types/message_action_set_chat_wall_paper.py new file mode 100644 index 00000000..4f908d47 --- /dev/null +++ b/pyrogram/raw/types/message_action_set_chat_wall_paper.py @@ -0,0 +1,68 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSetChatWallPaper(TLObject): # type: ignore + """The wallpaper » of the current chat was changed. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``5060A3F4`` + + Parameters: + wallpaper (:obj:`WallPaper `): + New wallpaper + + same (``bool``, *optional*): + If set, indicates the user applied a wallpaper » previously sent by the other user in a messageActionSetChatWallPaper message. + + for_both (``bool``, *optional*): + If set, indicates the wallpaper was forcefully applied for both sides, without explicit confirmation from the other side. If the message is incoming, and we did not like the new wallpaper the other user has chosen for us, we can re-set our previous wallpaper just on our side, by invoking messages.setChatWallPaper, providing only the revert flag (and obviously the peer parameter). + + """ + + __slots__: List[str] = ["wallpaper", "same", "for_both"] + + ID = 0x5060a3f4 + QUALNAME = "types.MessageActionSetChatWallPaper" + + def __init__(self, *, wallpaper: "raw.base.WallPaper", same: Optional[bool] = None, for_both: Optional[bool] = None) -> None: + self.wallpaper = wallpaper # WallPaper + self.same = same # flags.0?true + self.for_both = for_both # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSetChatWallPaper": + + flags = Int.read(b) + + same = True if flags & (1 << 0) else False + for_both = True if flags & (1 << 1) else False + wallpaper = TLObject.read(b) + + return MessageActionSetChatWallPaper(wallpaper=wallpaper, same=same, for_both=for_both) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.same else 0 + flags |= (1 << 1) if self.for_both else 0 + b.write(Int(flags)) + + b.write(self.wallpaper.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_set_messages_ttl.py b/pyrogram/raw/types/message_action_set_messages_ttl.py new file mode 100644 index 00000000..11dacb23 --- /dev/null +++ b/pyrogram/raw/types/message_action_set_messages_ttl.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSetMessagesTTL(TLObject): # type: ignore + """The Time-To-Live of messages in this chat was changed. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``3C134D7B`` + + Parameters: + period (``int`` ``32-bit``): + New Time-To-Live of all messages sent in this chat; if 0, autodeletion was disabled. + + auto_setting_from (``int`` ``64-bit``, *optional*): + If set, the chat TTL setting was set not due to a manual change by one of participants, but automatically because one of the participants has the default TTL settings enabled ». For example, when a user writes to us for the first time and we have set a default messages TTL of 1 week, this service message (with auto_setting_from=our_userid) will be emitted before our first message. + + """ + + __slots__: List[str] = ["period", "auto_setting_from"] + + ID = 0x3c134d7b + QUALNAME = "types.MessageActionSetMessagesTTL" + + def __init__(self, *, period: int, auto_setting_from: Optional[int] = None) -> None: + self.period = period # int + self.auto_setting_from = auto_setting_from # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSetMessagesTTL": + + flags = Int.read(b) + + period = Int.read(b) + + auto_setting_from = Long.read(b) if flags & (1 << 0) else None + return MessageActionSetMessagesTTL(period=period, auto_setting_from=auto_setting_from) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.auto_setting_from is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.period)) + + if self.auto_setting_from is not None: + b.write(Long(self.auto_setting_from)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_star_gift.py b/pyrogram/raw/types/message_action_star_gift.py new file mode 100644 index 00000000..8cc6ee4c --- /dev/null +++ b/pyrogram/raw/types/message_action_star_gift.py @@ -0,0 +1,219 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionStarGift(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``EA2C31D3`` + + Parameters: + gift (:obj:`StarGift `): + N/A + + name_hidden (``bool``, *optional*): + N/A + + saved (``bool``, *optional*): + N/A + + converted (``bool``, *optional*): + N/A + + upgraded (``bool``, *optional*): + N/A + + transferred (``bool``, *optional*): + N/A + + can_upgrade (``bool``, *optional*): + N/A + + refunded (``bool``, *optional*): + N/A + + prepaid_upgrade (``bool``, *optional*): + N/A + + upgrade_separate (``bool``, *optional*): + N/A + + auction_acquired (``bool``, *optional*): + N/A + + message (:obj:`TextWithEntities `, *optional*): + N/A + + convert_stars (``int`` ``64-bit``, *optional*): + N/A + + upgrade_msg_id (``int`` ``32-bit``, *optional*): + N/A + + upgrade_stars (``int`` ``64-bit``, *optional*): + N/A + + from_id (:obj:`Peer `, *optional*): + N/A + + peer (:obj:`Peer `, *optional*): + N/A + + saved_id (``int`` ``64-bit``, *optional*): + N/A + + prepaid_upgrade_hash (``str``, *optional*): + N/A + + gift_msg_id (``int`` ``32-bit``, *optional*): + N/A + + to_id (:obj:`Peer `, *optional*): + N/A + + gift_num (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["gift", "name_hidden", "saved", "converted", "upgraded", "transferred", "can_upgrade", "refunded", "prepaid_upgrade", "upgrade_separate", "auction_acquired", "message", "convert_stars", "upgrade_msg_id", "upgrade_stars", "from_id", "peer", "saved_id", "prepaid_upgrade_hash", "gift_msg_id", "to_id", "gift_num"] + + ID = 0xea2c31d3 + QUALNAME = "types.MessageActionStarGift" + + def __init__(self, *, gift: "raw.base.StarGift", name_hidden: Optional[bool] = None, saved: Optional[bool] = None, converted: Optional[bool] = None, upgraded: Optional[bool] = None, transferred: Optional[bool] = None, can_upgrade: Optional[bool] = None, refunded: Optional[bool] = None, prepaid_upgrade: Optional[bool] = None, upgrade_separate: Optional[bool] = None, auction_acquired: Optional[bool] = None, message: "raw.base.TextWithEntities" = None, convert_stars: Optional[int] = None, upgrade_msg_id: Optional[int] = None, upgrade_stars: Optional[int] = None, from_id: "raw.base.Peer" = None, peer: "raw.base.Peer" = None, saved_id: Optional[int] = None, prepaid_upgrade_hash: Optional[str] = None, gift_msg_id: Optional[int] = None, to_id: "raw.base.Peer" = None, gift_num: Optional[int] = None) -> None: + self.gift = gift # StarGift + self.name_hidden = name_hidden # flags.0?true + self.saved = saved # flags.2?true + self.converted = converted # flags.3?true + self.upgraded = upgraded # flags.5?true + self.transferred = transferred # flags.6?true + self.can_upgrade = can_upgrade # flags.10?true + self.refunded = refunded # flags.9?true + self.prepaid_upgrade = prepaid_upgrade # flags.13?true + self.upgrade_separate = upgrade_separate # flags.16?true + self.auction_acquired = auction_acquired # flags.17?true + self.message = message # flags.1?TextWithEntities + self.convert_stars = convert_stars # flags.4?long + self.upgrade_msg_id = upgrade_msg_id # flags.5?int + self.upgrade_stars = upgrade_stars # flags.8?long + self.from_id = from_id # flags.11?Peer + self.peer = peer # flags.12?Peer + self.saved_id = saved_id # flags.12?long + self.prepaid_upgrade_hash = prepaid_upgrade_hash # flags.14?string + self.gift_msg_id = gift_msg_id # flags.15?int + self.to_id = to_id # flags.18?Peer + self.gift_num = gift_num # flags.19?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionStarGift": + + flags = Int.read(b) + + name_hidden = True if flags & (1 << 0) else False + saved = True if flags & (1 << 2) else False + converted = True if flags & (1 << 3) else False + upgraded = True if flags & (1 << 5) else False + transferred = True if flags & (1 << 6) else False + can_upgrade = True if flags & (1 << 10) else False + refunded = True if flags & (1 << 9) else False + prepaid_upgrade = True if flags & (1 << 13) else False + upgrade_separate = True if flags & (1 << 16) else False + auction_acquired = True if flags & (1 << 17) else False + gift = TLObject.read(b) + + message = TLObject.read(b) if flags & (1 << 1) else None + + convert_stars = Long.read(b) if flags & (1 << 4) else None + upgrade_msg_id = Int.read(b) if flags & (1 << 5) else None + upgrade_stars = Long.read(b) if flags & (1 << 8) else None + from_id = TLObject.read(b) if flags & (1 << 11) else None + + peer = TLObject.read(b) if flags & (1 << 12) else None + + saved_id = Long.read(b) if flags & (1 << 12) else None + prepaid_upgrade_hash = String.read(b) if flags & (1 << 14) else None + gift_msg_id = Int.read(b) if flags & (1 << 15) else None + to_id = TLObject.read(b) if flags & (1 << 18) else None + + gift_num = Int.read(b) if flags & (1 << 19) else None + return MessageActionStarGift(gift=gift, name_hidden=name_hidden, saved=saved, converted=converted, upgraded=upgraded, transferred=transferred, can_upgrade=can_upgrade, refunded=refunded, prepaid_upgrade=prepaid_upgrade, upgrade_separate=upgrade_separate, auction_acquired=auction_acquired, message=message, convert_stars=convert_stars, upgrade_msg_id=upgrade_msg_id, upgrade_stars=upgrade_stars, from_id=from_id, peer=peer, saved_id=saved_id, prepaid_upgrade_hash=prepaid_upgrade_hash, gift_msg_id=gift_msg_id, to_id=to_id, gift_num=gift_num) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.name_hidden else 0 + flags |= (1 << 2) if self.saved else 0 + flags |= (1 << 3) if self.converted else 0 + flags |= (1 << 5) if self.upgraded else 0 + flags |= (1 << 6) if self.transferred else 0 + flags |= (1 << 10) if self.can_upgrade else 0 + flags |= (1 << 9) if self.refunded else 0 + flags |= (1 << 13) if self.prepaid_upgrade else 0 + flags |= (1 << 16) if self.upgrade_separate else 0 + flags |= (1 << 17) if self.auction_acquired else 0 + flags |= (1 << 1) if self.message is not None else 0 + flags |= (1 << 4) if self.convert_stars is not None else 0 + flags |= (1 << 5) if self.upgrade_msg_id is not None else 0 + flags |= (1 << 8) if self.upgrade_stars is not None else 0 + flags |= (1 << 11) if self.from_id is not None else 0 + flags |= (1 << 12) if self.peer is not None else 0 + flags |= (1 << 12) if self.saved_id is not None else 0 + flags |= (1 << 14) if self.prepaid_upgrade_hash is not None else 0 + flags |= (1 << 15) if self.gift_msg_id is not None else 0 + flags |= (1 << 18) if self.to_id is not None else 0 + flags |= (1 << 19) if self.gift_num is not None else 0 + b.write(Int(flags)) + + b.write(self.gift.write()) + + if self.message is not None: + b.write(self.message.write()) + + if self.convert_stars is not None: + b.write(Long(self.convert_stars)) + + if self.upgrade_msg_id is not None: + b.write(Int(self.upgrade_msg_id)) + + if self.upgrade_stars is not None: + b.write(Long(self.upgrade_stars)) + + if self.from_id is not None: + b.write(self.from_id.write()) + + if self.peer is not None: + b.write(self.peer.write()) + + if self.saved_id is not None: + b.write(Long(self.saved_id)) + + if self.prepaid_upgrade_hash is not None: + b.write(String(self.prepaid_upgrade_hash)) + + if self.gift_msg_id is not None: + b.write(Int(self.gift_msg_id)) + + if self.to_id is not None: + b.write(self.to_id.write()) + + if self.gift_num is not None: + b.write(Int(self.gift_num)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_star_gift_purchase_offer.py b/pyrogram/raw/types/message_action_star_gift_purchase_offer.py new file mode 100644 index 00000000..778091ed --- /dev/null +++ b/pyrogram/raw/types/message_action_star_gift_purchase_offer.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionStarGiftPurchaseOffer(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``774278D4`` + + Parameters: + gift (:obj:`StarGift `): + N/A + + price (:obj:`StarsAmount `): + N/A + + expires_at (``int`` ``32-bit``): + N/A + + accepted (``int`` ``32-bit``, *optional*): + N/A + + declined (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["gift", "price", "expires_at", "accepted", "declined"] + + ID = 0x774278d4 + QUALNAME = "types.MessageActionStarGiftPurchaseOffer" + + def __init__(self, *, gift: "raw.base.StarGift", price: "raw.base.StarsAmount", expires_at: int, accepted: Optional[int] = None, declined: Optional[bool] = None) -> None: + self.gift = gift # StarGift + self.price = price # StarsAmount + self.expires_at = expires_at # int + self.accepted = accepted # flags.0?int + self.declined = declined # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionStarGiftPurchaseOffer": + + flags = Int.read(b) + + accepted = Int.read(b) if flags & (1 << 0) else None + declined = True if flags & (1 << 1) else False + gift = TLObject.read(b) + + price = TLObject.read(b) + + expires_at = Int.read(b) + + return MessageActionStarGiftPurchaseOffer(gift=gift, price=price, expires_at=expires_at, accepted=accepted, declined=declined) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.accepted is not None else 0 + flags |= (1 << 1) if self.declined else 0 + b.write(Int(flags)) + + if self.accepted is not None: + b.write(Int(self.accepted)) + + b.write(self.gift.write()) + + b.write(self.price.write()) + + b.write(Int(self.expires_at)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_star_gift_purchase_offer_declined.py b/pyrogram/raw/types/message_action_star_gift_purchase_offer_declined.py new file mode 100644 index 00000000..5104d6ca --- /dev/null +++ b/pyrogram/raw/types/message_action_star_gift_purchase_offer_declined.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionStarGiftPurchaseOfferDeclined(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``73ADA76B`` + + Parameters: + gift (:obj:`StarGift `): + N/A + + price (:obj:`StarsAmount `): + N/A + + expired (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["gift", "price", "expired"] + + ID = 0x73ada76b + QUALNAME = "types.MessageActionStarGiftPurchaseOfferDeclined" + + def __init__(self, *, gift: "raw.base.StarGift", price: "raw.base.StarsAmount", expired: Optional[bool] = None) -> None: + self.gift = gift # StarGift + self.price = price # StarsAmount + self.expired = expired # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionStarGiftPurchaseOfferDeclined": + + flags = Int.read(b) + + expired = True if flags & (1 << 0) else False + gift = TLObject.read(b) + + price = TLObject.read(b) + + return MessageActionStarGiftPurchaseOfferDeclined(gift=gift, price=price, expired=expired) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.expired else 0 + b.write(Int(flags)) + + b.write(self.gift.write()) + + b.write(self.price.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_star_gift_unique.py b/pyrogram/raw/types/message_action_star_gift_unique.py new file mode 100644 index 00000000..a7f88380 --- /dev/null +++ b/pyrogram/raw/types/message_action_star_gift_unique.py @@ -0,0 +1,191 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionStarGiftUnique(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``E6C31522`` + + Parameters: + gift (:obj:`StarGift `): + N/A + + upgrade (``bool``, *optional*): + N/A + + transferred (``bool``, *optional*): + N/A + + saved (``bool``, *optional*): + N/A + + refunded (``bool``, *optional*): + N/A + + prepaid_upgrade (``bool``, *optional*): + N/A + + assigned (``bool``, *optional*): + N/A + + from_offer (``bool``, *optional*): + N/A + + can_export_at (``int`` ``32-bit``, *optional*): + N/A + + transfer_stars (``int`` ``64-bit``, *optional*): + N/A + + from_id (:obj:`Peer `, *optional*): + N/A + + peer (:obj:`Peer `, *optional*): + N/A + + saved_id (``int`` ``64-bit``, *optional*): + N/A + + resale_amount (:obj:`StarsAmount `, *optional*): + N/A + + can_transfer_at (``int`` ``32-bit``, *optional*): + N/A + + can_resell_at (``int`` ``32-bit``, *optional*): + N/A + + drop_original_details_stars (``int`` ``64-bit``, *optional*): + N/A + + can_craft_at (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["gift", "upgrade", "transferred", "saved", "refunded", "prepaid_upgrade", "assigned", "from_offer", "can_export_at", "transfer_stars", "from_id", "peer", "saved_id", "resale_amount", "can_transfer_at", "can_resell_at", "drop_original_details_stars", "can_craft_at"] + + ID = 0xe6c31522 + QUALNAME = "types.MessageActionStarGiftUnique" + + def __init__(self, *, gift: "raw.base.StarGift", upgrade: Optional[bool] = None, transferred: Optional[bool] = None, saved: Optional[bool] = None, refunded: Optional[bool] = None, prepaid_upgrade: Optional[bool] = None, assigned: Optional[bool] = None, from_offer: Optional[bool] = None, can_export_at: Optional[int] = None, transfer_stars: Optional[int] = None, from_id: "raw.base.Peer" = None, peer: "raw.base.Peer" = None, saved_id: Optional[int] = None, resale_amount: "raw.base.StarsAmount" = None, can_transfer_at: Optional[int] = None, can_resell_at: Optional[int] = None, drop_original_details_stars: Optional[int] = None, can_craft_at: Optional[int] = None) -> None: + self.gift = gift # StarGift + self.upgrade = upgrade # flags.0?true + self.transferred = transferred # flags.1?true + self.saved = saved # flags.2?true + self.refunded = refunded # flags.5?true + self.prepaid_upgrade = prepaid_upgrade # flags.11?true + self.assigned = assigned # flags.13?true + self.from_offer = from_offer # flags.14?true + self.can_export_at = can_export_at # flags.3?int + self.transfer_stars = transfer_stars # flags.4?long + self.from_id = from_id # flags.6?Peer + self.peer = peer # flags.7?Peer + self.saved_id = saved_id # flags.7?long + self.resale_amount = resale_amount # flags.8?StarsAmount + self.can_transfer_at = can_transfer_at # flags.9?int + self.can_resell_at = can_resell_at # flags.10?int + self.drop_original_details_stars = drop_original_details_stars # flags.12?long + self.can_craft_at = can_craft_at # flags.15?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionStarGiftUnique": + + flags = Int.read(b) + + upgrade = True if flags & (1 << 0) else False + transferred = True if flags & (1 << 1) else False + saved = True if flags & (1 << 2) else False + refunded = True if flags & (1 << 5) else False + prepaid_upgrade = True if flags & (1 << 11) else False + assigned = True if flags & (1 << 13) else False + from_offer = True if flags & (1 << 14) else False + gift = TLObject.read(b) + + can_export_at = Int.read(b) if flags & (1 << 3) else None + transfer_stars = Long.read(b) if flags & (1 << 4) else None + from_id = TLObject.read(b) if flags & (1 << 6) else None + + peer = TLObject.read(b) if flags & (1 << 7) else None + + saved_id = Long.read(b) if flags & (1 << 7) else None + resale_amount = TLObject.read(b) if flags & (1 << 8) else None + + can_transfer_at = Int.read(b) if flags & (1 << 9) else None + can_resell_at = Int.read(b) if flags & (1 << 10) else None + drop_original_details_stars = Long.read(b) if flags & (1 << 12) else None + can_craft_at = Int.read(b) if flags & (1 << 15) else None + return MessageActionStarGiftUnique(gift=gift, upgrade=upgrade, transferred=transferred, saved=saved, refunded=refunded, prepaid_upgrade=prepaid_upgrade, assigned=assigned, from_offer=from_offer, can_export_at=can_export_at, transfer_stars=transfer_stars, from_id=from_id, peer=peer, saved_id=saved_id, resale_amount=resale_amount, can_transfer_at=can_transfer_at, can_resell_at=can_resell_at, drop_original_details_stars=drop_original_details_stars, can_craft_at=can_craft_at) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.upgrade else 0 + flags |= (1 << 1) if self.transferred else 0 + flags |= (1 << 2) if self.saved else 0 + flags |= (1 << 5) if self.refunded else 0 + flags |= (1 << 11) if self.prepaid_upgrade else 0 + flags |= (1 << 13) if self.assigned else 0 + flags |= (1 << 14) if self.from_offer else 0 + flags |= (1 << 3) if self.can_export_at is not None else 0 + flags |= (1 << 4) if self.transfer_stars is not None else 0 + flags |= (1 << 6) if self.from_id is not None else 0 + flags |= (1 << 7) if self.peer is not None else 0 + flags |= (1 << 7) if self.saved_id is not None else 0 + flags |= (1 << 8) if self.resale_amount is not None else 0 + flags |= (1 << 9) if self.can_transfer_at is not None else 0 + flags |= (1 << 10) if self.can_resell_at is not None else 0 + flags |= (1 << 12) if self.drop_original_details_stars is not None else 0 + flags |= (1 << 15) if self.can_craft_at is not None else 0 + b.write(Int(flags)) + + b.write(self.gift.write()) + + if self.can_export_at is not None: + b.write(Int(self.can_export_at)) + + if self.transfer_stars is not None: + b.write(Long(self.transfer_stars)) + + if self.from_id is not None: + b.write(self.from_id.write()) + + if self.peer is not None: + b.write(self.peer.write()) + + if self.saved_id is not None: + b.write(Long(self.saved_id)) + + if self.resale_amount is not None: + b.write(self.resale_amount.write()) + + if self.can_transfer_at is not None: + b.write(Int(self.can_transfer_at)) + + if self.can_resell_at is not None: + b.write(Int(self.can_resell_at)) + + if self.drop_original_details_stars is not None: + b.write(Long(self.drop_original_details_stars)) + + if self.can_craft_at is not None: + b.write(Int(self.can_craft_at)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_suggest_birthday.py b/pyrogram/raw/types/message_action_suggest_birthday.py new file mode 100644 index 00000000..458f083b --- /dev/null +++ b/pyrogram/raw/types/message_action_suggest_birthday.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSuggestBirthday(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``2C8F2A25`` + + Parameters: + birthday (:obj:`Birthday `): + N/A + + """ + + __slots__: List[str] = ["birthday"] + + ID = 0x2c8f2a25 + QUALNAME = "types.MessageActionSuggestBirthday" + + def __init__(self, *, birthday: "raw.base.Birthday") -> None: + self.birthday = birthday # Birthday + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSuggestBirthday": + # No flags + + birthday = TLObject.read(b) + + return MessageActionSuggestBirthday(birthday=birthday) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.birthday.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_suggest_profile_photo.py b/pyrogram/raw/types/message_action_suggest_profile_photo.py new file mode 100644 index 00000000..a4da0196 --- /dev/null +++ b/pyrogram/raw/types/message_action_suggest_profile_photo.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSuggestProfilePhoto(TLObject): # type: ignore + """A new profile picture was suggested using photos.uploadContactProfilePhoto. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``57DE635E`` + + Parameters: + photo (:obj:`Photo `): + The photo that the user suggested we set as profile picture. + + """ + + __slots__: List[str] = ["photo"] + + ID = 0x57de635e + QUALNAME = "types.MessageActionSuggestProfilePhoto" + + def __init__(self, *, photo: "raw.base.Photo") -> None: + self.photo = photo # Photo + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSuggestProfilePhoto": + # No flags + + photo = TLObject.read(b) + + return MessageActionSuggestProfilePhoto(photo=photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_suggested_post_approval.py b/pyrogram/raw/types/message_action_suggested_post_approval.py new file mode 100644 index 00000000..81e453dc --- /dev/null +++ b/pyrogram/raw/types/message_action_suggested_post_approval.py @@ -0,0 +1,88 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSuggestedPostApproval(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``EE7A1596`` + + Parameters: + rejected (``bool``, *optional*): + N/A + + balance_too_low (``bool``, *optional*): + N/A + + reject_comment (``str``, *optional*): + N/A + + schedule_date (``int`` ``32-bit``, *optional*): + N/A + + price (:obj:`StarsAmount `, *optional*): + N/A + + """ + + __slots__: List[str] = ["rejected", "balance_too_low", "reject_comment", "schedule_date", "price"] + + ID = 0xee7a1596 + QUALNAME = "types.MessageActionSuggestedPostApproval" + + def __init__(self, *, rejected: Optional[bool] = None, balance_too_low: Optional[bool] = None, reject_comment: Optional[str] = None, schedule_date: Optional[int] = None, price: "raw.base.StarsAmount" = None) -> None: + self.rejected = rejected # flags.0?true + self.balance_too_low = balance_too_low # flags.1?true + self.reject_comment = reject_comment # flags.2?string + self.schedule_date = schedule_date # flags.3?int + self.price = price # flags.4?StarsAmount + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSuggestedPostApproval": + + flags = Int.read(b) + + rejected = True if flags & (1 << 0) else False + balance_too_low = True if flags & (1 << 1) else False + reject_comment = String.read(b) if flags & (1 << 2) else None + schedule_date = Int.read(b) if flags & (1 << 3) else None + price = TLObject.read(b) if flags & (1 << 4) else None + + return MessageActionSuggestedPostApproval(rejected=rejected, balance_too_low=balance_too_low, reject_comment=reject_comment, schedule_date=schedule_date, price=price) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.rejected else 0 + flags |= (1 << 1) if self.balance_too_low else 0 + flags |= (1 << 2) if self.reject_comment is not None else 0 + flags |= (1 << 3) if self.schedule_date is not None else 0 + flags |= (1 << 4) if self.price is not None else 0 + b.write(Int(flags)) + + if self.reject_comment is not None: + b.write(String(self.reject_comment)) + + if self.schedule_date is not None: + b.write(Int(self.schedule_date)) + + if self.price is not None: + b.write(self.price.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_suggested_post_refund.py b/pyrogram/raw/types/message_action_suggested_post_refund.py new file mode 100644 index 00000000..b109362c --- /dev/null +++ b/pyrogram/raw/types/message_action_suggested_post_refund.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSuggestedPostRefund(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``69F916F8`` + + Parameters: + payer_initiated (``bool``, *optional*): + N/A + + """ + + __slots__: List[str] = ["payer_initiated"] + + ID = 0x69f916f8 + QUALNAME = "types.MessageActionSuggestedPostRefund" + + def __init__(self, *, payer_initiated: Optional[bool] = None) -> None: + self.payer_initiated = payer_initiated # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSuggestedPostRefund": + + flags = Int.read(b) + + payer_initiated = True if flags & (1 << 0) else False + return MessageActionSuggestedPostRefund(payer_initiated=payer_initiated) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.payer_initiated else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_suggested_post_success.py b/pyrogram/raw/types/message_action_suggested_post_success.py new file mode 100644 index 00000000..b4e9a4b7 --- /dev/null +++ b/pyrogram/raw/types/message_action_suggested_post_success.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionSuggestedPostSuccess(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``95DDCF69`` + + Parameters: + price (:obj:`StarsAmount `): + N/A + + """ + + __slots__: List[str] = ["price"] + + ID = 0x95ddcf69 + QUALNAME = "types.MessageActionSuggestedPostSuccess" + + def __init__(self, *, price: "raw.base.StarsAmount") -> None: + self.price = price # StarsAmount + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionSuggestedPostSuccess": + # No flags + + price = TLObject.read(b) + + return MessageActionSuggestedPostSuccess(price=price) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.price.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_todo_append_tasks.py b/pyrogram/raw/types/message_action_todo_append_tasks.py new file mode 100644 index 00000000..02f98910 --- /dev/null +++ b/pyrogram/raw/types/message_action_todo_append_tasks.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionTodoAppendTasks(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``C7EDBC83`` + + Parameters: + list (List of :obj:`TodoItem `): + N/A + + """ + + __slots__: List[str] = ["list"] + + ID = 0xc7edbc83 + QUALNAME = "types.MessageActionTodoAppendTasks" + + def __init__(self, *, list: List["raw.base.TodoItem"]) -> None: + self.list = list # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionTodoAppendTasks": + # No flags + + list = TLObject.read(b) + + return MessageActionTodoAppendTasks(list=list) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.list)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_todo_completions.py b/pyrogram/raw/types/message_action_todo_completions.py new file mode 100644 index 00000000..b6c54750 --- /dev/null +++ b/pyrogram/raw/types/message_action_todo_completions.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionTodoCompletions(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``CC7C5C89`` + + Parameters: + completed (List of ``int`` ``32-bit``): + N/A + + incompleted (List of ``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["completed", "incompleted"] + + ID = 0xcc7c5c89 + QUALNAME = "types.MessageActionTodoCompletions" + + def __init__(self, *, completed: List[int], incompleted: List[int]) -> None: + self.completed = completed # Vector + self.incompleted = incompleted # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionTodoCompletions": + # No flags + + completed = TLObject.read(b, Int) + + incompleted = TLObject.read(b, Int) + + return MessageActionTodoCompletions(completed=completed, incompleted=incompleted) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.completed, Int)) + + b.write(Vector(self.incompleted, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_topic_create.py b/pyrogram/raw/types/message_action_topic_create.py new file mode 100644 index 00000000..64de092d --- /dev/null +++ b/pyrogram/raw/types/message_action_topic_create.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionTopicCreate(TLObject): # type: ignore + """A forum topic was created. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``D999256`` + + Parameters: + title (``str``): + Topic name. + + icon_color (``int`` ``32-bit``): + If no custom emoji icon is specified, specifies the color of the fallback topic icon (RGB), one of 0x6FB9F0, 0xFFD67E, 0xCB86DB, 0x8EEE98, 0xFF93B2, or 0xFB6F5F. + + title_missing (``bool``, *optional*): + N/A + + icon_emoji_id (``int`` ``64-bit``, *optional*): + ID of the custom emoji used as topic icon. + + """ + + __slots__: List[str] = ["title", "icon_color", "title_missing", "icon_emoji_id"] + + ID = 0xd999256 + QUALNAME = "types.MessageActionTopicCreate" + + def __init__(self, *, title: str, icon_color: int, title_missing: Optional[bool] = None, icon_emoji_id: Optional[int] = None) -> None: + self.title = title # string + self.icon_color = icon_color # int + self.title_missing = title_missing # flags.1?true + self.icon_emoji_id = icon_emoji_id # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionTopicCreate": + + flags = Int.read(b) + + title_missing = True if flags & (1 << 1) else False + title = String.read(b) + + icon_color = Int.read(b) + + icon_emoji_id = Long.read(b) if flags & (1 << 0) else None + return MessageActionTopicCreate(title=title, icon_color=icon_color, title_missing=title_missing, icon_emoji_id=icon_emoji_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.title_missing else 0 + flags |= (1 << 0) if self.icon_emoji_id is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(Int(self.icon_color)) + + if self.icon_emoji_id is not None: + b.write(Long(self.icon_emoji_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_topic_edit.py b/pyrogram/raw/types/message_action_topic_edit.py new file mode 100644 index 00000000..88144ca6 --- /dev/null +++ b/pyrogram/raw/types/message_action_topic_edit.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionTopicEdit(TLObject): # type: ignore + """Forum topic information was edited. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``C0944820`` + + Parameters: + title (``str``, *optional*): + New topic title. + + icon_emoji_id (``int`` ``64-bit``, *optional*): + ID of the new custom emoji used as topic icon, or if it was removed. + + closed (``bool``, *optional*): + Whether the topic was opened or closed. + + hidden (``bool``, *optional*): + Whether the topic was hidden or unhidden (only valid for the "General" topic, id=1). + + """ + + __slots__: List[str] = ["title", "icon_emoji_id", "closed", "hidden"] + + ID = 0xc0944820 + QUALNAME = "types.MessageActionTopicEdit" + + def __init__(self, *, title: Optional[str] = None, icon_emoji_id: Optional[int] = None, closed: Optional[bool] = None, hidden: Optional[bool] = None) -> None: + self.title = title # flags.0?string + self.icon_emoji_id = icon_emoji_id # flags.1?long + self.closed = closed # flags.2?Bool + self.hidden = hidden # flags.3?Bool + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionTopicEdit": + + flags = Int.read(b) + + title = String.read(b) if flags & (1 << 0) else None + icon_emoji_id = Long.read(b) if flags & (1 << 1) else None + closed = Bool.read(b) if flags & (1 << 2) else None + hidden = Bool.read(b) if flags & (1 << 3) else None + return MessageActionTopicEdit(title=title, icon_emoji_id=icon_emoji_id, closed=closed, hidden=hidden) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.title is not None else 0 + flags |= (1 << 1) if self.icon_emoji_id is not None else 0 + flags |= (1 << 2) if self.closed is not None else 0 + flags |= (1 << 3) if self.hidden is not None else 0 + b.write(Int(flags)) + + if self.title is not None: + b.write(String(self.title)) + + if self.icon_emoji_id is not None: + b.write(Long(self.icon_emoji_id)) + + if self.closed is not None: + b.write(Bool(self.closed)) + + if self.hidden is not None: + b.write(Bool(self.hidden)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_ttl_change.py b/pyrogram/raw/types/message_action_ttl_change.py new file mode 100644 index 00000000..47f947bd --- /dev/null +++ b/pyrogram/raw/types/message_action_ttl_change.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionTTLChange(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``55555552`` + + Parameters: + ttl (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["ttl"] + + ID = 0x55555552 + QUALNAME = "types.MessageActionTTLChange" + + def __init__(self, *, ttl: int) -> None: + self.ttl = ttl # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionTTLChange": + # No flags + + ttl = Int.read(b) + + return MessageActionTTLChange(ttl=ttl) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.ttl)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_user_joined.py b/pyrogram/raw/types/message_action_user_joined.py new file mode 100644 index 00000000..3821beff --- /dev/null +++ b/pyrogram/raw/types/message_action_user_joined.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionUserJoined(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``55555550`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x55555550 + QUALNAME = "types.MessageActionUserJoined" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionUserJoined": + # No flags + + return MessageActionUserJoined() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_user_updated_photo.py b/pyrogram/raw/types/message_action_user_updated_photo.py new file mode 100644 index 00000000..b8ba64b6 --- /dev/null +++ b/pyrogram/raw/types/message_action_user_updated_photo.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionUserUpdatedPhoto(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``55555551`` + + Parameters: + new_user_photo (:obj:`UserProfilePhoto `): + N/A + + """ + + __slots__: List[str] = ["new_user_photo"] + + ID = 0x55555551 + QUALNAME = "types.MessageActionUserUpdatedPhoto" + + def __init__(self, *, new_user_photo: "raw.base.UserProfilePhoto") -> None: + self.new_user_photo = new_user_photo # UserProfilePhoto + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionUserUpdatedPhoto": + # No flags + + new_user_photo = TLObject.read(b) + + return MessageActionUserUpdatedPhoto(new_user_photo=new_user_photo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.new_user_photo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_web_view_data_sent.py b/pyrogram/raw/types/message_action_web_view_data_sent.py new file mode 100644 index 00000000..e78afd22 --- /dev/null +++ b/pyrogram/raw/types/message_action_web_view_data_sent.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionWebViewDataSent(TLObject): # type: ignore + """Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (user side service message). + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``B4C38CB5`` + + Parameters: + text (``str``): + Text of the keyboardButtonSimpleWebView that was pressed to open the web app. + + """ + + __slots__: List[str] = ["text"] + + ID = 0xb4c38cb5 + QUALNAME = "types.MessageActionWebViewDataSent" + + def __init__(self, *, text: str) -> None: + self.text = text # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionWebViewDataSent": + # No flags + + text = String.read(b) + + return MessageActionWebViewDataSent(text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_action_web_view_data_sent_me.py b/pyrogram/raw/types/message_action_web_view_data_sent_me.py new file mode 100644 index 00000000..f81411e4 --- /dev/null +++ b/pyrogram/raw/types/message_action_web_view_data_sent_me.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageActionWebViewDataSentMe(TLObject): # type: ignore + """Data from an opened reply keyboard bot mini app was relayed to the bot that owns it (bot side service message). + + Constructor of :obj:`~pyrogram.raw.base.MessageAction`. + + Details: + - Layer: ``224`` + - ID: ``47DD8079`` + + Parameters: + text (``str``): + Text of the keyboardButtonSimpleWebView that was pressed to open the web app. + + data (``str``): + Relayed data. + + """ + + __slots__: List[str] = ["text", "data"] + + ID = 0x47dd8079 + QUALNAME = "types.MessageActionWebViewDataSentMe" + + def __init__(self, *, text: str, data: str) -> None: + self.text = text # string + self.data = data # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageActionWebViewDataSentMe": + # No flags + + text = String.read(b) + + data = String.read(b) + + return MessageActionWebViewDataSentMe(text=text, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.text)) + + b.write(String(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_empty.py b/pyrogram/raw/types/message_empty.py new file mode 100644 index 00000000..5a3792cd --- /dev/null +++ b/pyrogram/raw/types/message_empty.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEmpty(TLObject): # type: ignore + """Empty constructor, non-existent message. + + Constructor of :obj:`~pyrogram.raw.base.Message`. + + Details: + - Layer: ``224`` + - ID: ``90A6CA84`` + + Parameters: + id (``int`` ``32-bit``): + Message identifier + + peer_id (:obj:`Peer `, *optional*): + Peer ID, the chat where this message was sent + + """ + + __slots__: List[str] = ["id", "peer_id"] + + ID = 0x90a6ca84 + QUALNAME = "types.MessageEmpty" + + def __init__(self, *, id: int, peer_id: "raw.base.Peer" = None) -> None: + self.id = id # int + self.peer_id = peer_id # flags.0?Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEmpty": + + flags = Int.read(b) + + id = Int.read(b) + + peer_id = TLObject.read(b) if flags & (1 << 0) else None + + return MessageEmpty(id=id, peer_id=peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.peer_id is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + if self.peer_id is not None: + b.write(self.peer_id.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_bank_card.py b/pyrogram/raw/types/message_entity_bank_card.py new file mode 100644 index 00000000..79714387 --- /dev/null +++ b/pyrogram/raw/types/message_entity_bank_card.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityBankCard(TLObject): # type: ignore + """Indicates a credit card number + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``761E6AF4`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x761e6af4 + QUALNAME = "types.MessageEntityBankCard" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityBankCard": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityBankCard(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_blockquote.py b/pyrogram/raw/types/message_entity_blockquote.py new file mode 100644 index 00000000..5f66ec4f --- /dev/null +++ b/pyrogram/raw/types/message_entity_blockquote.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityBlockquote(TLObject): # type: ignore + """Message entity representing a block quote. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``F1CCAAAC`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + collapsed (``bool``, *optional*): + + + """ + + __slots__: List[str] = ["offset", "length", "collapsed"] + + ID = 0xf1ccaaac + QUALNAME = "types.MessageEntityBlockquote" + + def __init__(self, *, offset: int, length: int, collapsed: Optional[bool] = None) -> None: + self.offset = offset # int + self.length = length # int + self.collapsed = collapsed # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityBlockquote": + + flags = Int.read(b) + + collapsed = True if flags & (1 << 0) else False + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityBlockquote(offset=offset, length=length, collapsed=collapsed) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.collapsed else 0 + b.write(Int(flags)) + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_bold.py b/pyrogram/raw/types/message_entity_bold.py new file mode 100644 index 00000000..6a033968 --- /dev/null +++ b/pyrogram/raw/types/message_entity_bold.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityBold(TLObject): # type: ignore + """Message entity representing bold text. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``BD610BC9`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0xbd610bc9 + QUALNAME = "types.MessageEntityBold" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityBold": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityBold(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_bot_command.py b/pyrogram/raw/types/message_entity_bot_command.py new file mode 100644 index 00000000..ca4fe957 --- /dev/null +++ b/pyrogram/raw/types/message_entity_bot_command.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityBotCommand(TLObject): # type: ignore + """Message entity representing a bot /command + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``6CEF8AC7`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x6cef8ac7 + QUALNAME = "types.MessageEntityBotCommand" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityBotCommand": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityBotCommand(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_cashtag.py b/pyrogram/raw/types/message_entity_cashtag.py new file mode 100644 index 00000000..9e311cd9 --- /dev/null +++ b/pyrogram/raw/types/message_entity_cashtag.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityCashtag(TLObject): # type: ignore + """Message entity representing a $cashtag. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``4C4E743F`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x4c4e743f + QUALNAME = "types.MessageEntityCashtag" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityCashtag": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityCashtag(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_code.py b/pyrogram/raw/types/message_entity_code.py new file mode 100644 index 00000000..e05cef29 --- /dev/null +++ b/pyrogram/raw/types/message_entity_code.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityCode(TLObject): # type: ignore + """Message entity representing a codeblock. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``28A20571`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x28a20571 + QUALNAME = "types.MessageEntityCode" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityCode": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityCode(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_custom_emoji.py b/pyrogram/raw/types/message_entity_custom_emoji.py new file mode 100644 index 00000000..1c427ffc --- /dev/null +++ b/pyrogram/raw/types/message_entity_custom_emoji.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityCustomEmoji(TLObject): # type: ignore + """Represents a custom emoji. +Note that this entity must wrap exactly one regular emoji (the one contained in documentAttributeCustomEmoji.alt) in the related text, otherwise the server will ignore it. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``C8CF05F8`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + document_id (``int`` ``64-bit``): + Document ID of the custom emoji, use messages.getCustomEmojiDocuments to fetch the emoji animation and the actual emoji it represents. + + """ + + __slots__: List[str] = ["offset", "length", "document_id"] + + ID = 0xc8cf05f8 + QUALNAME = "types.MessageEntityCustomEmoji" + + def __init__(self, *, offset: int, length: int, document_id: int) -> None: + self.offset = offset # int + self.length = length # int + self.document_id = document_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityCustomEmoji": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + document_id = Long.read(b) + + return MessageEntityCustomEmoji(offset=offset, length=length, document_id=document_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + b.write(Long(self.document_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_email.py b/pyrogram/raw/types/message_entity_email.py new file mode 100644 index 00000000..9b5912b2 --- /dev/null +++ b/pyrogram/raw/types/message_entity_email.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityEmail(TLObject): # type: ignore + """Message entity representing an email@example.com. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``64E475C2`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x64e475c2 + QUALNAME = "types.MessageEntityEmail" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityEmail": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityEmail(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_hashtag.py b/pyrogram/raw/types/message_entity_hashtag.py new file mode 100644 index 00000000..929f04c6 --- /dev/null +++ b/pyrogram/raw/types/message_entity_hashtag.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityHashtag(TLObject): # type: ignore + """#hashtag message entity + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``6F635B0D`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x6f635b0d + QUALNAME = "types.MessageEntityHashtag" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityHashtag": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityHashtag(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_italic.py b/pyrogram/raw/types/message_entity_italic.py new file mode 100644 index 00000000..3f9df061 --- /dev/null +++ b/pyrogram/raw/types/message_entity_italic.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityItalic(TLObject): # type: ignore + """Message entity representing italic text. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``826F8B60`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x826f8b60 + QUALNAME = "types.MessageEntityItalic" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityItalic": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityItalic(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_mention.py b/pyrogram/raw/types/message_entity_mention.py new file mode 100644 index 00000000..8b6e9998 --- /dev/null +++ b/pyrogram/raw/types/message_entity_mention.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityMention(TLObject): # type: ignore + """Message entity mentioning a user by @username; messageEntityMentionName can also be used to mention users by their ID. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``FA04579D`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0xfa04579d + QUALNAME = "types.MessageEntityMention" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityMention": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityMention(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_mention_name.py b/pyrogram/raw/types/message_entity_mention_name.py new file mode 100644 index 00000000..d79c2f55 --- /dev/null +++ b/pyrogram/raw/types/message_entity_mention_name.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityMentionName(TLObject): # type: ignore + """Message entity representing a user mention: for creating a mention use inputMessageEntityMentionName. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``DC7B1140`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + user_id (``int`` ``64-bit``): + Identifier of the user that was mentioned + + """ + + __slots__: List[str] = ["offset", "length", "user_id"] + + ID = 0xdc7b1140 + QUALNAME = "types.MessageEntityMentionName" + + def __init__(self, *, offset: int, length: int, user_id: int) -> None: + self.offset = offset # int + self.length = length # int + self.user_id = user_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityMentionName": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + user_id = Long.read(b) + + return MessageEntityMentionName(offset=offset, length=length, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_phone.py b/pyrogram/raw/types/message_entity_phone.py new file mode 100644 index 00000000..0585205c --- /dev/null +++ b/pyrogram/raw/types/message_entity_phone.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityPhone(TLObject): # type: ignore + """Message entity representing a phone number. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``9B69E34B`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x9b69e34b + QUALNAME = "types.MessageEntityPhone" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityPhone": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityPhone(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_pre.py b/pyrogram/raw/types/message_entity_pre.py new file mode 100644 index 00000000..eed2c48b --- /dev/null +++ b/pyrogram/raw/types/message_entity_pre.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityPre(TLObject): # type: ignore + """Message entity representing a preformatted codeblock, allowing the user to specify a programming language for the codeblock. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``73924BE0`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + language (``str``): + Programming language of the code + + """ + + __slots__: List[str] = ["offset", "length", "language"] + + ID = 0x73924be0 + QUALNAME = "types.MessageEntityPre" + + def __init__(self, *, offset: int, length: int, language: str) -> None: + self.offset = offset # int + self.length = length # int + self.language = language # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityPre": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + language = String.read(b) + + return MessageEntityPre(offset=offset, length=length, language=language) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + b.write(String(self.language)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_spoiler.py b/pyrogram/raw/types/message_entity_spoiler.py new file mode 100644 index 00000000..93c328ed --- /dev/null +++ b/pyrogram/raw/types/message_entity_spoiler.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntitySpoiler(TLObject): # type: ignore + """Message entity representing a spoiler + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``32CA960F`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x32ca960f + QUALNAME = "types.MessageEntitySpoiler" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntitySpoiler": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntitySpoiler(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_strike.py b/pyrogram/raw/types/message_entity_strike.py new file mode 100644 index 00000000..94b7d7a5 --- /dev/null +++ b/pyrogram/raw/types/message_entity_strike.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityStrike(TLObject): # type: ignore + """Message entity representing strikethrough text. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``BF0693D4`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0xbf0693d4 + QUALNAME = "types.MessageEntityStrike" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityStrike": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityStrike(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_text_url.py b/pyrogram/raw/types/message_entity_text_url.py new file mode 100644 index 00000000..4a200802 --- /dev/null +++ b/pyrogram/raw/types/message_entity_text_url.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityTextUrl(TLObject): # type: ignore + """Message entity representing a text url: for in-text urls like https://google.com use messageEntityUrl. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``76A6D327`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + url (``str``): + The actual URL + + """ + + __slots__: List[str] = ["offset", "length", "url"] + + ID = 0x76a6d327 + QUALNAME = "types.MessageEntityTextUrl" + + def __init__(self, *, offset: int, length: int, url: str) -> None: + self.offset = offset # int + self.length = length # int + self.url = url # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityTextUrl": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + url = String.read(b) + + return MessageEntityTextUrl(offset=offset, length=length, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + b.write(String(self.url)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_underline.py b/pyrogram/raw/types/message_entity_underline.py new file mode 100644 index 00000000..bcd5bb1b --- /dev/null +++ b/pyrogram/raw/types/message_entity_underline.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityUnderline(TLObject): # type: ignore + """Message entity representing underlined text. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``9C4E7E8B`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x9c4e7e8b + QUALNAME = "types.MessageEntityUnderline" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityUnderline": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityUnderline(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_unknown.py b/pyrogram/raw/types/message_entity_unknown.py new file mode 100644 index 00000000..bad09519 --- /dev/null +++ b/pyrogram/raw/types/message_entity_unknown.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityUnknown(TLObject): # type: ignore + """Unknown message entity + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``BB92BA95`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0xbb92ba95 + QUALNAME = "types.MessageEntityUnknown" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityUnknown": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityUnknown(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_entity_url.py b/pyrogram/raw/types/message_entity_url.py new file mode 100644 index 00000000..8e319025 --- /dev/null +++ b/pyrogram/raw/types/message_entity_url.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEntityUrl(TLObject): # type: ignore + """Message entity representing an in-text url: https://google.com; for text urls, use messageEntityTextUrl. + + Constructor of :obj:`~pyrogram.raw.base.MessageEntity`. + + Details: + - Layer: ``224`` + - ID: ``6ED02538`` + + Parameters: + offset (``int`` ``32-bit``): + Offset of message entity within message (in UTF-16 code units) + + length (``int`` ``32-bit``): + Length of message entity within message (in UTF-16 code units) + + """ + + __slots__: List[str] = ["offset", "length"] + + ID = 0x6ed02538 + QUALNAME = "types.MessageEntityUrl" + + def __init__(self, *, offset: int, length: int) -> None: + self.offset = offset # int + self.length = length # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEntityUrl": + # No flags + + offset = Int.read(b) + + length = Int.read(b) + + return MessageEntityUrl(offset=offset, length=length) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.offset)) + + b.write(Int(self.length)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_extended_media.py b/pyrogram/raw/types/message_extended_media.py new file mode 100644 index 00000000..9e5b0e23 --- /dev/null +++ b/pyrogram/raw/types/message_extended_media.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageExtendedMedia(TLObject): # type: ignore + """Extended media + + Constructor of :obj:`~pyrogram.raw.base.MessageExtendedMedia`. + + Details: + - Layer: ``224`` + - ID: ``EE479C64`` + + Parameters: + media (:obj:`MessageMedia `): + Media + + """ + + __slots__: List[str] = ["media"] + + ID = 0xee479c64 + QUALNAME = "types.MessageExtendedMedia" + + def __init__(self, *, media: "raw.base.MessageMedia") -> None: + self.media = media # MessageMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageExtendedMedia": + # No flags + + media = TLObject.read(b) + + return MessageExtendedMedia(media=media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_extended_media_preview.py b/pyrogram/raw/types/message_extended_media_preview.py new file mode 100644 index 00000000..5d14edc6 --- /dev/null +++ b/pyrogram/raw/types/message_extended_media_preview.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageExtendedMediaPreview(TLObject): # type: ignore + """Extended media preview + + Constructor of :obj:`~pyrogram.raw.base.MessageExtendedMedia`. + + Details: + - Layer: ``224`` + - ID: ``AD628CC8`` + + Parameters: + w (``int`` ``32-bit``, *optional*): + Width + + h (``int`` ``32-bit``, *optional*): + Height + + thumb (:obj:`PhotoSize `, *optional*): + Thumbnail + + video_duration (``int`` ``32-bit``, *optional*): + Video duration + + """ + + __slots__: List[str] = ["w", "h", "thumb", "video_duration"] + + ID = 0xad628cc8 + QUALNAME = "types.MessageExtendedMediaPreview" + + def __init__(self, *, w: Optional[int] = None, h: Optional[int] = None, thumb: "raw.base.PhotoSize" = None, video_duration: Optional[int] = None) -> None: + self.w = w # flags.0?int + self.h = h # flags.0?int + self.thumb = thumb # flags.1?PhotoSize + self.video_duration = video_duration # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageExtendedMediaPreview": + + flags = Int.read(b) + + w = Int.read(b) if flags & (1 << 0) else None + h = Int.read(b) if flags & (1 << 0) else None + thumb = TLObject.read(b) if flags & (1 << 1) else None + + video_duration = Int.read(b) if flags & (1 << 2) else None + return MessageExtendedMediaPreview(w=w, h=h, thumb=thumb, video_duration=video_duration) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.w is not None else 0 + flags |= (1 << 0) if self.h is not None else 0 + flags |= (1 << 1) if self.thumb is not None else 0 + flags |= (1 << 2) if self.video_duration is not None else 0 + b.write(Int(flags)) + + if self.w is not None: + b.write(Int(self.w)) + + if self.h is not None: + b.write(Int(self.h)) + + if self.thumb is not None: + b.write(self.thumb.write()) + + if self.video_duration is not None: + b.write(Int(self.video_duration)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_fwd_header.py b/pyrogram/raw/types/message_fwd_header.py new file mode 100644 index 00000000..5717a453 --- /dev/null +++ b/pyrogram/raw/types/message_fwd_header.py @@ -0,0 +1,161 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageFwdHeader(TLObject): # type: ignore + """Info about a forwarded message + + Constructor of :obj:`~pyrogram.raw.base.MessageFwdHeader`. + + Details: + - Layer: ``224`` + - ID: ``4E4DF4BB`` + + Parameters: + date (``int`` ``32-bit``): + When was the message originally sent + + imported (``bool``, *optional*): + Whether this message was imported from a foreign chat service, click here for more info » + + saved_out (``bool``, *optional*): + Only for messages forwarded to saved messages », set if the original message was outgoing (though the message may have been originally outgoing even if this flag is not set, if from_id points to the current user). + + from_id (:obj:`Peer `, *optional*): + The ID of the user that originally sent the message + + from_name (``str``, *optional*): + The name of the user that originally sent the message + + channel_post (``int`` ``32-bit``, *optional*): + ID of the channel message that was forwarded + + post_author (``str``, *optional*): + For channels and if signatures are enabled, author of the channel message + + saved_from_peer (:obj:`Peer `, *optional*): + Only for messages forwarded to saved messages », contains the dialog where the message was originally sent. + + saved_from_msg_id (``int`` ``32-bit``, *optional*): + Only for messages forwarded to saved messages », contains the original ID of the message in saved_from_peer. + + saved_from_id (:obj:`Peer `, *optional*): + Only for forwarded messages reforwarded to saved messages », contains the sender of the original message (i.e. if user A sends a message, then user B forwards it somewhere, then user C saves it to saved messages, this field will contain the ID of user B and from_id will contain the ID of user A). + + saved_from_name (``str``, *optional*): + Only for forwarded messages from users with forward privacy enabled, sent by users with forward privacy enabled, reforwarded to saved messages », contains the sender of the original message (i.e. if user A (fwd privacy enabled) sends a message, then user B (fwd privacy enabled) forwards it somewhere, then user C saves it to saved messages, this field will contain the name of user B and from_name will contain the name of user A). + + saved_date (``int`` ``32-bit``, *optional*): + Only for forwarded messages reforwarded to saved messages », indicates when was the original message sent (i.e. if user A sends a message @ unixtime 1, then user B forwards it somewhere @ unixtime 2, then user C saves it to saved messages @ unixtime 3, this field will contain 2, date will contain 1 and the date of the containing message will contain 3). + + psa_type (``str``, *optional*): + PSA type + + """ + + __slots__: List[str] = ["date", "imported", "saved_out", "from_id", "from_name", "channel_post", "post_author", "saved_from_peer", "saved_from_msg_id", "saved_from_id", "saved_from_name", "saved_date", "psa_type"] + + ID = 0x4e4df4bb + QUALNAME = "types.MessageFwdHeader" + + def __init__(self, *, date: int, imported: Optional[bool] = None, saved_out: Optional[bool] = None, from_id: "raw.base.Peer" = None, from_name: Optional[str] = None, channel_post: Optional[int] = None, post_author: Optional[str] = None, saved_from_peer: "raw.base.Peer" = None, saved_from_msg_id: Optional[int] = None, saved_from_id: "raw.base.Peer" = None, saved_from_name: Optional[str] = None, saved_date: Optional[int] = None, psa_type: Optional[str] = None) -> None: + self.date = date # int + self.imported = imported # flags.7?true + self.saved_out = saved_out # flags.11?true + self.from_id = from_id # flags.0?Peer + self.from_name = from_name # flags.5?string + self.channel_post = channel_post # flags.2?int + self.post_author = post_author # flags.3?string + self.saved_from_peer = saved_from_peer # flags.4?Peer + self.saved_from_msg_id = saved_from_msg_id # flags.4?int + self.saved_from_id = saved_from_id # flags.8?Peer + self.saved_from_name = saved_from_name # flags.9?string + self.saved_date = saved_date # flags.10?int + self.psa_type = psa_type # flags.6?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageFwdHeader": + + flags = Int.read(b) + + imported = True if flags & (1 << 7) else False + saved_out = True if flags & (1 << 11) else False + from_id = TLObject.read(b) if flags & (1 << 0) else None + + from_name = String.read(b) if flags & (1 << 5) else None + date = Int.read(b) + + channel_post = Int.read(b) if flags & (1 << 2) else None + post_author = String.read(b) if flags & (1 << 3) else None + saved_from_peer = TLObject.read(b) if flags & (1 << 4) else None + + saved_from_msg_id = Int.read(b) if flags & (1 << 4) else None + saved_from_id = TLObject.read(b) if flags & (1 << 8) else None + + saved_from_name = String.read(b) if flags & (1 << 9) else None + saved_date = Int.read(b) if flags & (1 << 10) else None + psa_type = String.read(b) if flags & (1 << 6) else None + return MessageFwdHeader(date=date, imported=imported, saved_out=saved_out, from_id=from_id, from_name=from_name, channel_post=channel_post, post_author=post_author, saved_from_peer=saved_from_peer, saved_from_msg_id=saved_from_msg_id, saved_from_id=saved_from_id, saved_from_name=saved_from_name, saved_date=saved_date, psa_type=psa_type) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 7) if self.imported else 0 + flags |= (1 << 11) if self.saved_out else 0 + flags |= (1 << 0) if self.from_id is not None else 0 + flags |= (1 << 5) if self.from_name is not None else 0 + flags |= (1 << 2) if self.channel_post is not None else 0 + flags |= (1 << 3) if self.post_author is not None else 0 + flags |= (1 << 4) if self.saved_from_peer is not None else 0 + flags |= (1 << 4) if self.saved_from_msg_id is not None else 0 + flags |= (1 << 8) if self.saved_from_id is not None else 0 + flags |= (1 << 9) if self.saved_from_name is not None else 0 + flags |= (1 << 10) if self.saved_date is not None else 0 + flags |= (1 << 6) if self.psa_type is not None else 0 + b.write(Int(flags)) + + if self.from_id is not None: + b.write(self.from_id.write()) + + if self.from_name is not None: + b.write(String(self.from_name)) + + b.write(Int(self.date)) + + if self.channel_post is not None: + b.write(Int(self.channel_post)) + + if self.post_author is not None: + b.write(String(self.post_author)) + + if self.saved_from_peer is not None: + b.write(self.saved_from_peer.write()) + + if self.saved_from_msg_id is not None: + b.write(Int(self.saved_from_msg_id)) + + if self.saved_from_id is not None: + b.write(self.saved_from_id.write()) + + if self.saved_from_name is not None: + b.write(String(self.saved_from_name)) + + if self.saved_date is not None: + b.write(Int(self.saved_date)) + + if self.psa_type is not None: + b.write(String(self.psa_type)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_contact.py b/pyrogram/raw/types/message_media_contact.py new file mode 100644 index 00000000..7e43cdd2 --- /dev/null +++ b/pyrogram/raw/types/message_media_contact.py @@ -0,0 +1,96 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaContact(TLObject): # type: ignore + """Attached contact. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``70322949`` + + Parameters: + phone_number (``str``): + Phone number + + first_name (``str``): + Contact's first name + + last_name (``str``): + Contact's last name + + vcard (``str``): + VCARD of contact + + user_id (``int`` ``64-bit``): + User identifier or 0, if the user with the given phone number is not registered + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["phone_number", "first_name", "last_name", "vcard", "user_id"] + + ID = 0x70322949 + QUALNAME = "types.MessageMediaContact" + + def __init__(self, *, phone_number: str, first_name: str, last_name: str, vcard: str, user_id: int) -> None: + self.phone_number = phone_number # string + self.first_name = first_name # string + self.last_name = last_name # string + self.vcard = vcard # string + self.user_id = user_id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaContact": + # No flags + + phone_number = String.read(b) + + first_name = String.read(b) + + last_name = String.read(b) + + vcard = String.read(b) + + user_id = Long.read(b) + + return MessageMediaContact(phone_number=phone_number, first_name=first_name, last_name=last_name, vcard=vcard, user_id=user_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.phone_number)) + + b.write(String(self.first_name)) + + b.write(String(self.last_name)) + + b.write(String(self.vcard)) + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_dice.py b/pyrogram/raw/types/message_media_dice.py new file mode 100644 index 00000000..f8cc973e --- /dev/null +++ b/pyrogram/raw/types/message_media_dice.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaDice(TLObject): # type: ignore + """Dice-based animated sticker + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``8CBEC07`` + + Parameters: + value (``int`` ``32-bit``): + Dice value + + emoticon (``str``): + The emoji, for now , and are supported + + game_outcome (:obj:`messages.EmojiGameOutcome `, *optional*): + N/A + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["value", "emoticon", "game_outcome"] + + ID = 0x8cbec07 + QUALNAME = "types.MessageMediaDice" + + def __init__(self, *, value: int, emoticon: str, game_outcome: "raw.base.messages.EmojiGameOutcome" = None) -> None: + self.value = value # int + self.emoticon = emoticon # string + self.game_outcome = game_outcome # flags.0?messages.EmojiGameOutcome + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaDice": + + flags = Int.read(b) + + value = Int.read(b) + + emoticon = String.read(b) + + game_outcome = TLObject.read(b) if flags & (1 << 0) else None + + return MessageMediaDice(value=value, emoticon=emoticon, game_outcome=game_outcome) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.game_outcome is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.value)) + + b.write(String(self.emoticon)) + + if self.game_outcome is not None: + b.write(self.game_outcome.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_document.py b/pyrogram/raw/types/message_media_document.py new file mode 100644 index 00000000..984d4887 --- /dev/null +++ b/pyrogram/raw/types/message_media_document.py @@ -0,0 +1,136 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaDocument(TLObject): # type: ignore + """Document (video, audio, voice, sticker, any media type except photo) + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``52D8CCD9`` + + Parameters: + nopremium (``bool``, *optional*): + Whether this is a normal sticker, if not set this is a premium sticker and a premium sticker animation must be played. + + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + video (``bool``, *optional*): + Whether this is a video. + + round (``bool``, *optional*): + Whether this is a round video. + + voice (``bool``, *optional*): + Whether this is a voice message. + + document (:obj:`Document `, *optional*): + Attached document + + alt_documents (List of :obj:`Document `, *optional*): + N/A + + video_cover (:obj:`Photo `, *optional*): + N/A + + video_timestamp (``int`` ``32-bit``, *optional*): + N/A + + ttl_seconds (``int`` ``32-bit``, *optional*): + Time to live of self-destructing document + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["nopremium", "spoiler", "video", "round", "voice", "document", "alt_documents", "video_cover", "video_timestamp", "ttl_seconds"] + + ID = 0x52d8ccd9 + QUALNAME = "types.MessageMediaDocument" + + def __init__(self, *, nopremium: Optional[bool] = None, spoiler: Optional[bool] = None, video: Optional[bool] = None, round: Optional[bool] = None, voice: Optional[bool] = None, document: "raw.base.Document" = None, alt_documents: Optional[List["raw.base.Document"]] = None, video_cover: "raw.base.Photo" = None, video_timestamp: Optional[int] = None, ttl_seconds: Optional[int] = None) -> None: + self.nopremium = nopremium # flags.3?true + self.spoiler = spoiler # flags.4?true + self.video = video # flags.6?true + self.round = round # flags.7?true + self.voice = voice # flags.8?true + self.document = document # flags.0?Document + self.alt_documents = alt_documents # flags.5?Vector + self.video_cover = video_cover # flags.9?Photo + self.video_timestamp = video_timestamp # flags.10?int + self.ttl_seconds = ttl_seconds # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaDocument": + + flags = Int.read(b) + + nopremium = True if flags & (1 << 3) else False + spoiler = True if flags & (1 << 4) else False + video = True if flags & (1 << 6) else False + round = True if flags & (1 << 7) else False + voice = True if flags & (1 << 8) else False + document = TLObject.read(b) if flags & (1 << 0) else None + + alt_documents = TLObject.read(b) if flags & (1 << 5) else [] + + video_cover = TLObject.read(b) if flags & (1 << 9) else None + + video_timestamp = Int.read(b) if flags & (1 << 10) else None + ttl_seconds = Int.read(b) if flags & (1 << 2) else None + return MessageMediaDocument(nopremium=nopremium, spoiler=spoiler, video=video, round=round, voice=voice, document=document, alt_documents=alt_documents, video_cover=video_cover, video_timestamp=video_timestamp, ttl_seconds=ttl_seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.nopremium else 0 + flags |= (1 << 4) if self.spoiler else 0 + flags |= (1 << 6) if self.video else 0 + flags |= (1 << 7) if self.round else 0 + flags |= (1 << 8) if self.voice else 0 + flags |= (1 << 0) if self.document is not None else 0 + flags |= (1 << 5) if self.alt_documents else 0 + flags |= (1 << 9) if self.video_cover is not None else 0 + flags |= (1 << 10) if self.video_timestamp is not None else 0 + flags |= (1 << 2) if self.ttl_seconds is not None else 0 + b.write(Int(flags)) + + if self.document is not None: + b.write(self.document.write()) + + if self.alt_documents is not None: + b.write(Vector(self.alt_documents)) + + if self.video_cover is not None: + b.write(self.video_cover.write()) + + if self.video_timestamp is not None: + b.write(Int(self.video_timestamp)) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_empty.py b/pyrogram/raw/types/message_media_empty.py new file mode 100644 index 00000000..f1f579d1 --- /dev/null +++ b/pyrogram/raw/types/message_media_empty.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaEmpty(TLObject): # type: ignore + """Empty constructor. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``3DED6320`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = [] + + ID = 0x3ded6320 + QUALNAME = "types.MessageMediaEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaEmpty": + # No flags + + return MessageMediaEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_game.py b/pyrogram/raw/types/message_media_game.py new file mode 100644 index 00000000..19a8940b --- /dev/null +++ b/pyrogram/raw/types/message_media_game.py @@ -0,0 +1,64 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaGame(TLObject): # type: ignore + """Telegram game + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``FDB19008`` + + Parameters: + game (:obj:`Game `): + Game + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["game"] + + ID = 0xfdb19008 + QUALNAME = "types.MessageMediaGame" + + def __init__(self, *, game: "raw.base.Game") -> None: + self.game = game # Game + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaGame": + # No flags + + game = TLObject.read(b) + + return MessageMediaGame(game=game) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.game.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_geo.py b/pyrogram/raw/types/message_media_geo.py new file mode 100644 index 00000000..16e58cc3 --- /dev/null +++ b/pyrogram/raw/types/message_media_geo.py @@ -0,0 +1,64 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaGeo(TLObject): # type: ignore + """Attached map. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``56E0D474`` + + Parameters: + geo (:obj:`GeoPoint `): + GeoPoint + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["geo"] + + ID = 0x56e0d474 + QUALNAME = "types.MessageMediaGeo" + + def __init__(self, *, geo: "raw.base.GeoPoint") -> None: + self.geo = geo # GeoPoint + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaGeo": + # No flags + + geo = TLObject.read(b) + + return MessageMediaGeo(geo=geo) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_geo_live.py b/pyrogram/raw/types/message_media_geo_live.py new file mode 100644 index 00000000..7ecc337a --- /dev/null +++ b/pyrogram/raw/types/message_media_geo_live.py @@ -0,0 +1,92 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaGeoLive(TLObject): # type: ignore + """Indicates a live geolocation + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``B940C666`` + + Parameters: + geo (:obj:`GeoPoint `): + Geolocation + + period (``int`` ``32-bit``): + Validity period of provided geolocation + + heading (``int`` ``32-bit``, *optional*): + For live locations, a direction in which the location moves, in degrees; 1-360 + + proximity_notification_radius (``int`` ``32-bit``, *optional*): + For live locations, a maximum distance to another chat member for proximity alerts, in meters (0-100000). + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["geo", "period", "heading", "proximity_notification_radius"] + + ID = 0xb940c666 + QUALNAME = "types.MessageMediaGeoLive" + + def __init__(self, *, geo: "raw.base.GeoPoint", period: int, heading: Optional[int] = None, proximity_notification_radius: Optional[int] = None) -> None: + self.geo = geo # GeoPoint + self.period = period # int + self.heading = heading # flags.0?int + self.proximity_notification_radius = proximity_notification_radius # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaGeoLive": + + flags = Int.read(b) + + geo = TLObject.read(b) + + heading = Int.read(b) if flags & (1 << 0) else None + period = Int.read(b) + + proximity_notification_radius = Int.read(b) if flags & (1 << 1) else None + return MessageMediaGeoLive(geo=geo, period=period, heading=heading, proximity_notification_radius=proximity_notification_radius) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.heading is not None else 0 + flags |= (1 << 1) if self.proximity_notification_radius is not None else 0 + b.write(Int(flags)) + + b.write(self.geo.write()) + + if self.heading is not None: + b.write(Int(self.heading)) + + b.write(Int(self.period)) + + if self.proximity_notification_radius is not None: + b.write(Int(self.proximity_notification_radius)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_giveaway.py b/pyrogram/raw/types/message_media_giveaway.py new file mode 100644 index 00000000..b65c8529 --- /dev/null +++ b/pyrogram/raw/types/message_media_giveaway.py @@ -0,0 +1,131 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaGiveaway(TLObject): # type: ignore + """Contains info about a giveaway, see here » for more info. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``AA073BEB`` + + Parameters: + channels (List of ``int`` ``64-bit``): + The channels that the user must join to participate in the giveaway. + + quantity (``int`` ``32-bit``): + Number of Telegram Premium subscriptions given away. + + until_date (``int`` ``32-bit``): + The end date of the giveaway. + + only_new_subscribers (``bool``, *optional*): + If set, only new subscribers starting from the giveaway creation date will be able to participate to the giveaway. + + winners_are_visible (``bool``, *optional*): + If set, giveaway winners are public and will be listed in a messageMediaGiveawayResults message that will be automatically sent to the channel once the giveaway ends. + + countries_iso2 (List of ``str``, *optional*): + If set, only users residing in these countries can participate in the giveaway, (specified as a list of two-letter ISO 3166-1 alpha-2 country codes); otherwise there are no country-based limitations. + + prize_description (``str``, *optional*): + Can contain a textual description of additional giveaway prizes. + + months (``int`` ``32-bit``, *optional*): + Duration in months of each Telegram Premium subscription in the giveaway. + + stars (``int`` ``64-bit``, *optional*): + N/A + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["channels", "quantity", "until_date", "only_new_subscribers", "winners_are_visible", "countries_iso2", "prize_description", "months", "stars"] + + ID = 0xaa073beb + QUALNAME = "types.MessageMediaGiveaway" + + def __init__(self, *, channels: List[int], quantity: int, until_date: int, only_new_subscribers: Optional[bool] = None, winners_are_visible: Optional[bool] = None, countries_iso2: Optional[List[str]] = None, prize_description: Optional[str] = None, months: Optional[int] = None, stars: Optional[int] = None) -> None: + self.channels = channels # Vector + self.quantity = quantity # int + self.until_date = until_date # int + self.only_new_subscribers = only_new_subscribers # flags.0?true + self.winners_are_visible = winners_are_visible # flags.2?true + self.countries_iso2 = countries_iso2 # flags.1?Vector + self.prize_description = prize_description # flags.3?string + self.months = months # flags.4?int + self.stars = stars # flags.5?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaGiveaway": + + flags = Int.read(b) + + only_new_subscribers = True if flags & (1 << 0) else False + winners_are_visible = True if flags & (1 << 2) else False + channels = TLObject.read(b, Long) + + countries_iso2 = TLObject.read(b, String) if flags & (1 << 1) else [] + + prize_description = String.read(b) if flags & (1 << 3) else None + quantity = Int.read(b) + + months = Int.read(b) if flags & (1 << 4) else None + stars = Long.read(b) if flags & (1 << 5) else None + until_date = Int.read(b) + + return MessageMediaGiveaway(channels=channels, quantity=quantity, until_date=until_date, only_new_subscribers=only_new_subscribers, winners_are_visible=winners_are_visible, countries_iso2=countries_iso2, prize_description=prize_description, months=months, stars=stars) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.only_new_subscribers else 0 + flags |= (1 << 2) if self.winners_are_visible else 0 + flags |= (1 << 1) if self.countries_iso2 else 0 + flags |= (1 << 3) if self.prize_description is not None else 0 + flags |= (1 << 4) if self.months is not None else 0 + flags |= (1 << 5) if self.stars is not None else 0 + b.write(Int(flags)) + + b.write(Vector(self.channels, Long)) + + if self.countries_iso2 is not None: + b.write(Vector(self.countries_iso2, String)) + + if self.prize_description is not None: + b.write(String(self.prize_description)) + + b.write(Int(self.quantity)) + + if self.months is not None: + b.write(Int(self.months)) + + if self.stars is not None: + b.write(Long(self.stars)) + + b.write(Int(self.until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_giveaway_results.py b/pyrogram/raw/types/message_media_giveaway_results.py new file mode 100644 index 00000000..b0ece7bf --- /dev/null +++ b/pyrogram/raw/types/message_media_giveaway_results.py @@ -0,0 +1,154 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaGiveawayResults(TLObject): # type: ignore + """A giveaway with public winners has finished, this constructor contains info about the winners. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``CEAA3EA1`` + + Parameters: + channel_id (``int`` ``64-bit``): + ID of the channel that was automatically boosted by the winners of the giveaway for duration of the Premium subscription. + + launch_msg_id (``int`` ``32-bit``): + Identifier of the message with the giveaway in channel_id. + + winners_count (``int`` ``32-bit``): + Total number of winners in the giveaway. + + unclaimed_count (``int`` ``32-bit``): + Number of not-yet-claimed prizes. + + winners (List of ``int`` ``64-bit``): + Up to 100 user identifiers of the winners of the giveaway. + + until_date (``int`` ``32-bit``): + Point in time (Unix timestamp) when the winners were selected. May be bigger than winners selection date specified in initial parameters of the giveaway. + + only_new_subscribers (``bool``, *optional*): + If set, only new subscribers starting from the giveaway creation date participated in the giveaway. + + refunded (``bool``, *optional*): + If set, the giveaway was canceled and was fully refunded. + + additional_peers_count (``int`` ``32-bit``, *optional*): + Number of other channels that participated in the giveaway. + + months (``int`` ``32-bit``, *optional*): + Duration in months of each Telegram Premium subscription in the giveaway. + + stars (``int`` ``64-bit``, *optional*): + N/A + + prize_description (``str``, *optional*): + Can contain a textual description of additional giveaway prizes. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["channel_id", "launch_msg_id", "winners_count", "unclaimed_count", "winners", "until_date", "only_new_subscribers", "refunded", "additional_peers_count", "months", "stars", "prize_description"] + + ID = 0xceaa3ea1 + QUALNAME = "types.MessageMediaGiveawayResults" + + def __init__(self, *, channel_id: int, launch_msg_id: int, winners_count: int, unclaimed_count: int, winners: List[int], until_date: int, only_new_subscribers: Optional[bool] = None, refunded: Optional[bool] = None, additional_peers_count: Optional[int] = None, months: Optional[int] = None, stars: Optional[int] = None, prize_description: Optional[str] = None) -> None: + self.channel_id = channel_id # long + self.launch_msg_id = launch_msg_id # int + self.winners_count = winners_count # int + self.unclaimed_count = unclaimed_count # int + self.winners = winners # Vector + self.until_date = until_date # int + self.only_new_subscribers = only_new_subscribers # flags.0?true + self.refunded = refunded # flags.2?true + self.additional_peers_count = additional_peers_count # flags.3?int + self.months = months # flags.4?int + self.stars = stars # flags.5?long + self.prize_description = prize_description # flags.1?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaGiveawayResults": + + flags = Int.read(b) + + only_new_subscribers = True if flags & (1 << 0) else False + refunded = True if flags & (1 << 2) else False + channel_id = Long.read(b) + + additional_peers_count = Int.read(b) if flags & (1 << 3) else None + launch_msg_id = Int.read(b) + + winners_count = Int.read(b) + + unclaimed_count = Int.read(b) + + winners = TLObject.read(b, Long) + + months = Int.read(b) if flags & (1 << 4) else None + stars = Long.read(b) if flags & (1 << 5) else None + prize_description = String.read(b) if flags & (1 << 1) else None + until_date = Int.read(b) + + return MessageMediaGiveawayResults(channel_id=channel_id, launch_msg_id=launch_msg_id, winners_count=winners_count, unclaimed_count=unclaimed_count, winners=winners, until_date=until_date, only_new_subscribers=only_new_subscribers, refunded=refunded, additional_peers_count=additional_peers_count, months=months, stars=stars, prize_description=prize_description) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.only_new_subscribers else 0 + flags |= (1 << 2) if self.refunded else 0 + flags |= (1 << 3) if self.additional_peers_count is not None else 0 + flags |= (1 << 4) if self.months is not None else 0 + flags |= (1 << 5) if self.stars is not None else 0 + flags |= (1 << 1) if self.prize_description is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.channel_id)) + + if self.additional_peers_count is not None: + b.write(Int(self.additional_peers_count)) + + b.write(Int(self.launch_msg_id)) + + b.write(Int(self.winners_count)) + + b.write(Int(self.unclaimed_count)) + + b.write(Vector(self.winners, Long)) + + if self.months is not None: + b.write(Int(self.months)) + + if self.stars is not None: + b.write(Long(self.stars)) + + if self.prize_description is not None: + b.write(String(self.prize_description)) + + b.write(Int(self.until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_invoice.py b/pyrogram/raw/types/message_media_invoice.py new file mode 100644 index 00000000..9ccd37a5 --- /dev/null +++ b/pyrogram/raw/types/message_media_invoice.py @@ -0,0 +1,139 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaInvoice(TLObject): # type: ignore + """Invoice + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``F6A548D3`` + + Parameters: + title (``str``): + Product name, 1-32 characters + + description (``str``): + Product description, 1-255 characters + + currency (``str``): + Three-letter ISO 4217 currency code + + total_amount (``int`` ``64-bit``): + Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies). + + start_param (``str``): + Unique bot deep-linking parameter that can be used to generate this invoice + + shipping_address_requested (``bool``, *optional*): + Whether the shipping address was requested + + test (``bool``, *optional*): + Whether this is an example invoice + + photo (:obj:`WebDocument `, *optional*): + URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a service. People like it better when they see what they are paying for. + + receipt_msg_id (``int`` ``32-bit``, *optional*): + Message ID of receipt: if set, clients should change the text of the first keyboardButtonBuy button always attached to the message to a localized version of the word Receipt + + extended_media (:obj:`MessageExtendedMedia `, *optional*): + Extended media + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["title", "description", "currency", "total_amount", "start_param", "shipping_address_requested", "test", "photo", "receipt_msg_id", "extended_media"] + + ID = 0xf6a548d3 + QUALNAME = "types.MessageMediaInvoice" + + def __init__(self, *, title: str, description: str, currency: str, total_amount: int, start_param: str, shipping_address_requested: Optional[bool] = None, test: Optional[bool] = None, photo: "raw.base.WebDocument" = None, receipt_msg_id: Optional[int] = None, extended_media: "raw.base.MessageExtendedMedia" = None) -> None: + self.title = title # string + self.description = description # string + self.currency = currency # string + self.total_amount = total_amount # long + self.start_param = start_param # string + self.shipping_address_requested = shipping_address_requested # flags.1?true + self.test = test # flags.3?true + self.photo = photo # flags.0?WebDocument + self.receipt_msg_id = receipt_msg_id # flags.2?int + self.extended_media = extended_media # flags.4?MessageExtendedMedia + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaInvoice": + + flags = Int.read(b) + + shipping_address_requested = True if flags & (1 << 1) else False + test = True if flags & (1 << 3) else False + title = String.read(b) + + description = String.read(b) + + photo = TLObject.read(b) if flags & (1 << 0) else None + + receipt_msg_id = Int.read(b) if flags & (1 << 2) else None + currency = String.read(b) + + total_amount = Long.read(b) + + start_param = String.read(b) + + extended_media = TLObject.read(b) if flags & (1 << 4) else None + + return MessageMediaInvoice(title=title, description=description, currency=currency, total_amount=total_amount, start_param=start_param, shipping_address_requested=shipping_address_requested, test=test, photo=photo, receipt_msg_id=receipt_msg_id, extended_media=extended_media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.shipping_address_requested else 0 + flags |= (1 << 3) if self.test else 0 + flags |= (1 << 0) if self.photo is not None else 0 + flags |= (1 << 2) if self.receipt_msg_id is not None else 0 + flags |= (1 << 4) if self.extended_media is not None else 0 + b.write(Int(flags)) + + b.write(String(self.title)) + + b.write(String(self.description)) + + if self.photo is not None: + b.write(self.photo.write()) + + if self.receipt_msg_id is not None: + b.write(Int(self.receipt_msg_id)) + + b.write(String(self.currency)) + + b.write(Long(self.total_amount)) + + b.write(String(self.start_param)) + + if self.extended_media is not None: + b.write(self.extended_media.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_paid_media.py b/pyrogram/raw/types/message_media_paid_media.py new file mode 100644 index 00000000..0ee00c44 --- /dev/null +++ b/pyrogram/raw/types/message_media_paid_media.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaPaidMedia(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``A8852491`` + + Parameters: + stars_amount (``int`` ``64-bit``): + N/A + + extended_media (List of :obj:`MessageExtendedMedia `): + N/A + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["stars_amount", "extended_media"] + + ID = 0xa8852491 + QUALNAME = "types.MessageMediaPaidMedia" + + def __init__(self, *, stars_amount: int, extended_media: List["raw.base.MessageExtendedMedia"]) -> None: + self.stars_amount = stars_amount # long + self.extended_media = extended_media # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaPaidMedia": + # No flags + + stars_amount = Long.read(b) + + extended_media = TLObject.read(b) + + return MessageMediaPaidMedia(stars_amount=stars_amount, extended_media=extended_media) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.stars_amount)) + + b.write(Vector(self.extended_media)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_photo.py b/pyrogram/raw/types/message_media_photo.py new file mode 100644 index 00000000..b4cf9ee1 --- /dev/null +++ b/pyrogram/raw/types/message_media_photo.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaPhoto(TLObject): # type: ignore + """Attached photo. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``695150D7`` + + Parameters: + spoiler (``bool``, *optional*): + Whether this media should be hidden behind a spoiler warning + + photo (:obj:`Photo `, *optional*): + Photo + + ttl_seconds (``int`` ``32-bit``, *optional*): + Time to live in seconds of self-destructing photo + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["spoiler", "photo", "ttl_seconds"] + + ID = 0x695150d7 + QUALNAME = "types.MessageMediaPhoto" + + def __init__(self, *, spoiler: Optional[bool] = None, photo: "raw.base.Photo" = None, ttl_seconds: Optional[int] = None) -> None: + self.spoiler = spoiler # flags.3?true + self.photo = photo # flags.0?Photo + self.ttl_seconds = ttl_seconds # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaPhoto": + + flags = Int.read(b) + + spoiler = True if flags & (1 << 3) else False + photo = TLObject.read(b) if flags & (1 << 0) else None + + ttl_seconds = Int.read(b) if flags & (1 << 2) else None + return MessageMediaPhoto(spoiler=spoiler, photo=photo, ttl_seconds=ttl_seconds) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.spoiler else 0 + flags |= (1 << 0) if self.photo is not None else 0 + flags |= (1 << 2) if self.ttl_seconds is not None else 0 + b.write(Int(flags)) + + if self.photo is not None: + b.write(self.photo.write()) + + if self.ttl_seconds is not None: + b.write(Int(self.ttl_seconds)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_poll.py b/pyrogram/raw/types/message_media_poll.py new file mode 100644 index 00000000..3900788b --- /dev/null +++ b/pyrogram/raw/types/message_media_poll.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaPoll(TLObject): # type: ignore + """Poll + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``4BD6E798`` + + Parameters: + poll (:obj:`Poll `): + The poll + + results (:obj:`PollResults `): + The results of the poll + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["poll", "results"] + + ID = 0x4bd6e798 + QUALNAME = "types.MessageMediaPoll" + + def __init__(self, *, poll: "raw.base.Poll", results: "raw.base.PollResults") -> None: + self.poll = poll # Poll + self.results = results # PollResults + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaPoll": + # No flags + + poll = TLObject.read(b) + + results = TLObject.read(b) + + return MessageMediaPoll(poll=poll, results=results) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.poll.write()) + + b.write(self.results.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_story.py b/pyrogram/raw/types/message_media_story.py new file mode 100644 index 00000000..deb1bc8b --- /dev/null +++ b/pyrogram/raw/types/message_media_story.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaStory(TLObject): # type: ignore + """Represents a forwarded story or a story mention. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``68CB6283`` + + Parameters: + peer (:obj:`Peer `): + Peer that posted the story. + + id (``int`` ``32-bit``): + Story ID + + via_mention (``bool``, *optional*): + If set, indicates that this someone has mentioned us in this story (i.e. by tagging us in the description) or vice versa, we have mentioned the other peer (if the message is outgoing). + + story (:obj:`StoryItem `, *optional*): + The story itself, if absent fetch it using stories.getStoriesByID and the peer/id parameters specified above. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["peer", "id", "via_mention", "story"] + + ID = 0x68cb6283 + QUALNAME = "types.MessageMediaStory" + + def __init__(self, *, peer: "raw.base.Peer", id: int, via_mention: Optional[bool] = None, story: "raw.base.StoryItem" = None) -> None: + self.peer = peer # Peer + self.id = id # int + self.via_mention = via_mention # flags.1?true + self.story = story # flags.0?StoryItem + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaStory": + + flags = Int.read(b) + + via_mention = True if flags & (1 << 1) else False + peer = TLObject.read(b) + + id = Int.read(b) + + story = TLObject.read(b) if flags & (1 << 0) else None + + return MessageMediaStory(peer=peer, id=id, via_mention=via_mention, story=story) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.via_mention else 0 + flags |= (1 << 0) if self.story is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.id)) + + if self.story is not None: + b.write(self.story.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_to_do.py b/pyrogram/raw/types/message_media_to_do.py new file mode 100644 index 00000000..bbc38729 --- /dev/null +++ b/pyrogram/raw/types/message_media_to_do.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaToDo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``8A53B014`` + + Parameters: + todo (:obj:`TodoList `): + N/A + + completions (List of :obj:`TodoCompletion `, *optional*): + N/A + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["todo", "completions"] + + ID = 0x8a53b014 + QUALNAME = "types.MessageMediaToDo" + + def __init__(self, *, todo: "raw.base.TodoList", completions: Optional[List["raw.base.TodoCompletion"]] = None) -> None: + self.todo = todo # TodoList + self.completions = completions # flags.0?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaToDo": + + flags = Int.read(b) + + todo = TLObject.read(b) + + completions = TLObject.read(b) if flags & (1 << 0) else [] + + return MessageMediaToDo(todo=todo, completions=completions) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.completions else 0 + b.write(Int(flags)) + + b.write(self.todo.write()) + + if self.completions is not None: + b.write(Vector(self.completions)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_unsupported.py b/pyrogram/raw/types/message_media_unsupported.py new file mode 100644 index 00000000..cb3f6996 --- /dev/null +++ b/pyrogram/raw/types/message_media_unsupported.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaUnsupported(TLObject): # type: ignore + """Current version of the client does not support this media type. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``9F84F49E`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = [] + + ID = 0x9f84f49e + QUALNAME = "types.MessageMediaUnsupported" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaUnsupported": + # No flags + + return MessageMediaUnsupported() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_venue.py b/pyrogram/raw/types/message_media_venue.py new file mode 100644 index 00000000..f831b519 --- /dev/null +++ b/pyrogram/raw/types/message_media_venue.py @@ -0,0 +1,104 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaVenue(TLObject): # type: ignore + """Venue + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``2EC0533F`` + + Parameters: + geo (:obj:`GeoPoint `): + Geolocation of venue + + title (``str``): + Venue name + + address (``str``): + Address + + provider (``str``): + Venue provider: currently only "foursquare" and "gplaces" (Google Places) need to be supported + + venue_id (``str``): + Venue ID in the provider's database + + venue_type (``str``): + Venue type in the provider's database + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["geo", "title", "address", "provider", "venue_id", "venue_type"] + + ID = 0x2ec0533f + QUALNAME = "types.MessageMediaVenue" + + def __init__(self, *, geo: "raw.base.GeoPoint", title: str, address: str, provider: str, venue_id: str, venue_type: str) -> None: + self.geo = geo # GeoPoint + self.title = title # string + self.address = address # string + self.provider = provider # string + self.venue_id = venue_id # string + self.venue_type = venue_type # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaVenue": + # No flags + + geo = TLObject.read(b) + + title = String.read(b) + + address = String.read(b) + + provider = String.read(b) + + venue_id = String.read(b) + + venue_type = String.read(b) + + return MessageMediaVenue(geo=geo, title=title, address=address, provider=provider, venue_id=venue_id, venue_type=venue_type) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo.write()) + + b.write(String(self.title)) + + b.write(String(self.address)) + + b.write(String(self.provider)) + + b.write(String(self.venue_id)) + + b.write(String(self.venue_type)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_video_stream.py b/pyrogram/raw/types/message_media_video_stream.py new file mode 100644 index 00000000..5589e46f --- /dev/null +++ b/pyrogram/raw/types/message_media_video_stream.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaVideoStream(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``CA5CAB89`` + + Parameters: + call (:obj:`InputGroupCall `): + N/A + + rtmp_stream (``bool``, *optional*): + N/A + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["call", "rtmp_stream"] + + ID = 0xca5cab89 + QUALNAME = "types.MessageMediaVideoStream" + + def __init__(self, *, call: "raw.base.InputGroupCall", rtmp_stream: Optional[bool] = None) -> None: + self.call = call # InputGroupCall + self.rtmp_stream = rtmp_stream # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaVideoStream": + + flags = Int.read(b) + + rtmp_stream = True if flags & (1 << 0) else False + call = TLObject.read(b) + + return MessageMediaVideoStream(call=call, rtmp_stream=rtmp_stream) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.rtmp_stream else 0 + b.write(Int(flags)) + + b.write(self.call.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_media_web_page.py b/pyrogram/raw/types/message_media_web_page.py new file mode 100644 index 00000000..96396a3f --- /dev/null +++ b/pyrogram/raw/types/message_media_web_page.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageMediaWebPage(TLObject): # type: ignore + """Preview of webpage + + Constructor of :obj:`~pyrogram.raw.base.MessageMedia`. + + Details: + - Layer: ``224`` + - ID: ``DDF10C3B`` + + Parameters: + webpage (:obj:`WebPage `): + Webpage preview + + force_large_media (``bool``, *optional*): + If set, specifies that a large media preview should be used. + + force_small_media (``bool``, *optional*): + If set, specifies that a small media preview should be used. + + manual (``bool``, *optional*): + If set, indicates that the URL used for the webpage preview was specified manually using inputMediaWebPage, and may not be related to any of the URLs specified in the message. + + safe (``bool``, *optional*): + If set, the webpage can be opened directly without user confirmation; otherwise, user confirmation is required, showing the exact URL that will be opened. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.UploadMedia + messages.UploadImportedMedia + """ + + __slots__: List[str] = ["webpage", "force_large_media", "force_small_media", "manual", "safe"] + + ID = 0xddf10c3b + QUALNAME = "types.MessageMediaWebPage" + + def __init__(self, *, webpage: "raw.base.WebPage", force_large_media: Optional[bool] = None, force_small_media: Optional[bool] = None, manual: Optional[bool] = None, safe: Optional[bool] = None) -> None: + self.webpage = webpage # WebPage + self.force_large_media = force_large_media # flags.0?true + self.force_small_media = force_small_media # flags.1?true + self.manual = manual # flags.3?true + self.safe = safe # flags.4?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageMediaWebPage": + + flags = Int.read(b) + + force_large_media = True if flags & (1 << 0) else False + force_small_media = True if flags & (1 << 1) else False + manual = True if flags & (1 << 3) else False + safe = True if flags & (1 << 4) else False + webpage = TLObject.read(b) + + return MessageMediaWebPage(webpage=webpage, force_large_media=force_large_media, force_small_media=force_small_media, manual=manual, safe=safe) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.force_large_media else 0 + flags |= (1 << 1) if self.force_small_media else 0 + flags |= (1 << 3) if self.manual else 0 + flags |= (1 << 4) if self.safe else 0 + b.write(Int(flags)) + + b.write(self.webpage.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_peer_reaction.py b/pyrogram/raw/types/message_peer_reaction.py new file mode 100644 index 00000000..baeb332e --- /dev/null +++ b/pyrogram/raw/types/message_peer_reaction.py @@ -0,0 +1,90 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessagePeerReaction(TLObject): # type: ignore + """How a certain peer reacted to the message + + Constructor of :obj:`~pyrogram.raw.base.MessagePeerReaction`. + + Details: + - Layer: ``224`` + - ID: ``8C79B63C`` + + Parameters: + peer_id (:obj:`Peer `): + Peer that reacted to the message + + date (``int`` ``32-bit``): + When was this reaction added + + reaction (:obj:`Reaction `): + Reaction emoji + + big (``bool``, *optional*): + Whether the specified message reaction » should elicit a bigger and longer reaction + + unread (``bool``, *optional*): + Whether the reaction wasn't yet marked as read by the current user + + my (``bool``, *optional*): + Starting from layer 159, messages.sendReaction will send reactions from the peer (user or channel) specified using messages.saveDefaultSendAs. If set, this flag indicates that this reaction was sent by us, even if the peer doesn't point to the current account. + + """ + + __slots__: List[str] = ["peer_id", "date", "reaction", "big", "unread", "my"] + + ID = 0x8c79b63c + QUALNAME = "types.MessagePeerReaction" + + def __init__(self, *, peer_id: "raw.base.Peer", date: int, reaction: "raw.base.Reaction", big: Optional[bool] = None, unread: Optional[bool] = None, my: Optional[bool] = None) -> None: + self.peer_id = peer_id # Peer + self.date = date # int + self.reaction = reaction # Reaction + self.big = big # flags.0?true + self.unread = unread # flags.1?true + self.my = my # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessagePeerReaction": + + flags = Int.read(b) + + big = True if flags & (1 << 0) else False + unread = True if flags & (1 << 1) else False + my = True if flags & (1 << 2) else False + peer_id = TLObject.read(b) + + date = Int.read(b) + + reaction = TLObject.read(b) + + return MessagePeerReaction(peer_id=peer_id, date=date, reaction=reaction, big=big, unread=unread, my=my) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.big else 0 + flags |= (1 << 1) if self.unread else 0 + flags |= (1 << 2) if self.my else 0 + b.write(Int(flags)) + + b.write(self.peer_id.write()) + + b.write(Int(self.date)) + + b.write(self.reaction.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_peer_vote.py b/pyrogram/raw/types/message_peer_vote.py new file mode 100644 index 00000000..fed5f2b5 --- /dev/null +++ b/pyrogram/raw/types/message_peer_vote.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessagePeerVote(TLObject): # type: ignore + """How a peer voted in a poll + + Constructor of :obj:`~pyrogram.raw.base.MessagePeerVote`. + + Details: + - Layer: ``224`` + - ID: ``B6CC2D5C`` + + Parameters: + peer (:obj:`Peer `): + Peer ID + + option (``bytes``): + The option chosen by the peer + + date (``int`` ``32-bit``): + When did the peer cast the vote + + """ + + __slots__: List[str] = ["peer", "option", "date"] + + ID = 0xb6cc2d5c + QUALNAME = "types.MessagePeerVote" + + def __init__(self, *, peer: "raw.base.Peer", option: bytes, date: int) -> None: + self.peer = peer # Peer + self.option = option # bytes + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessagePeerVote": + # No flags + + peer = TLObject.read(b) + + option = Bytes.read(b) + + date = Int.read(b) + + return MessagePeerVote(peer=peer, option=option, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Bytes(self.option)) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_peer_vote_input_option.py b/pyrogram/raw/types/message_peer_vote_input_option.py new file mode 100644 index 00000000..5b0fde88 --- /dev/null +++ b/pyrogram/raw/types/message_peer_vote_input_option.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessagePeerVoteInputOption(TLObject): # type: ignore + """How a peer voted in a poll (reduced constructor, returned if an option was provided to messages.getPollVotes) + + Constructor of :obj:`~pyrogram.raw.base.MessagePeerVote`. + + Details: + - Layer: ``224`` + - ID: ``74CDA504`` + + Parameters: + peer (:obj:`Peer `): + The peer that voted for the queried option + + date (``int`` ``32-bit``): + When did the peer cast the vote + + """ + + __slots__: List[str] = ["peer", "date"] + + ID = 0x74cda504 + QUALNAME = "types.MessagePeerVoteInputOption" + + def __init__(self, *, peer: "raw.base.Peer", date: int) -> None: + self.peer = peer # Peer + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessagePeerVoteInputOption": + # No flags + + peer = TLObject.read(b) + + date = Int.read(b) + + return MessagePeerVoteInputOption(peer=peer, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_peer_vote_multiple.py b/pyrogram/raw/types/message_peer_vote_multiple.py new file mode 100644 index 00000000..9490f5c0 --- /dev/null +++ b/pyrogram/raw/types/message_peer_vote_multiple.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessagePeerVoteMultiple(TLObject): # type: ignore + """How a peer voted in a multiple-choice poll + + Constructor of :obj:`~pyrogram.raw.base.MessagePeerVote`. + + Details: + - Layer: ``224`` + - ID: ``4628F6E6`` + + Parameters: + peer (:obj:`Peer `): + Peer ID + + options (List of ``bytes``): + Options chosen by the peer + + date (``int`` ``32-bit``): + When did the peer cast their votes + + """ + + __slots__: List[str] = ["peer", "options", "date"] + + ID = 0x4628f6e6 + QUALNAME = "types.MessagePeerVoteMultiple" + + def __init__(self, *, peer: "raw.base.Peer", options: List[bytes], date: int) -> None: + self.peer = peer # Peer + self.options = options # Vector + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessagePeerVoteMultiple": + # No flags + + peer = TLObject.read(b) + + options = TLObject.read(b, Bytes) + + date = Int.read(b) + + return MessagePeerVoteMultiple(peer=peer, options=options, date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Vector(self.options, Bytes)) + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_range.py b/pyrogram/raw/types/message_range.py new file mode 100644 index 00000000..e188b4fa --- /dev/null +++ b/pyrogram/raw/types/message_range.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageRange(TLObject): # type: ignore + """Indicates a range of chat messages + + Constructor of :obj:`~pyrogram.raw.base.MessageRange`. + + Details: + - Layer: ``224`` + - ID: ``AE30253`` + + Parameters: + min_id (``int`` ``32-bit``): + Start of range (message ID) + + max_id (``int`` ``32-bit``): + End of range (message ID) + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSplitRanges + """ + + __slots__: List[str] = ["min_id", "max_id"] + + ID = 0xae30253 + QUALNAME = "types.MessageRange" + + def __init__(self, *, min_id: int, max_id: int) -> None: + self.min_id = min_id # int + self.max_id = max_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageRange": + # No flags + + min_id = Int.read(b) + + max_id = Int.read(b) + + return MessageRange(min_id=min_id, max_id=max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.min_id)) + + b.write(Int(self.max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_reactions.py b/pyrogram/raw/types/message_reactions.py new file mode 100644 index 00000000..9fceca12 --- /dev/null +++ b/pyrogram/raw/types/message_reactions.py @@ -0,0 +1,94 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReactions(TLObject): # type: ignore + """Message reactions » + + Constructor of :obj:`~pyrogram.raw.base.MessageReactions`. + + Details: + - Layer: ``224`` + - ID: ``A339F0B`` + + Parameters: + results (List of :obj:`ReactionCount `): + Reactions + + min (``bool``, *optional*): + Similar to min objects, used for message reaction » constructors that are the same for all users so they don't have the reactions sent by the current user (you can use messages.getMessagesReactions to get the full reaction info). + + can_see_list (``bool``, *optional*): + Whether messages.getMessageReactionsList can be used to see how each specific peer reacted to the message + + reactions_as_tags (``bool``, *optional*): + + + recent_reactions (List of :obj:`MessagePeerReaction `, *optional*): + List of recent peers and their reactions + + top_reactors (List of :obj:`MessageReactor `, *optional*): + N/A + + """ + + __slots__: List[str] = ["results", "min", "can_see_list", "reactions_as_tags", "recent_reactions", "top_reactors"] + + ID = 0xa339f0b + QUALNAME = "types.MessageReactions" + + def __init__(self, *, results: List["raw.base.ReactionCount"], min: Optional[bool] = None, can_see_list: Optional[bool] = None, reactions_as_tags: Optional[bool] = None, recent_reactions: Optional[List["raw.base.MessagePeerReaction"]] = None, top_reactors: Optional[List["raw.base.MessageReactor"]] = None) -> None: + self.results = results # Vector + self.min = min # flags.0?true + self.can_see_list = can_see_list # flags.2?true + self.reactions_as_tags = reactions_as_tags # flags.3?true + self.recent_reactions = recent_reactions # flags.1?Vector + self.top_reactors = top_reactors # flags.4?Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReactions": + + flags = Int.read(b) + + min = True if flags & (1 << 0) else False + can_see_list = True if flags & (1 << 2) else False + reactions_as_tags = True if flags & (1 << 3) else False + results = TLObject.read(b) + + recent_reactions = TLObject.read(b) if flags & (1 << 1) else [] + + top_reactors = TLObject.read(b) if flags & (1 << 4) else [] + + return MessageReactions(results=results, min=min, can_see_list=can_see_list, reactions_as_tags=reactions_as_tags, recent_reactions=recent_reactions, top_reactors=top_reactors) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.min else 0 + flags |= (1 << 2) if self.can_see_list else 0 + flags |= (1 << 3) if self.reactions_as_tags else 0 + flags |= (1 << 1) if self.recent_reactions else 0 + flags |= (1 << 4) if self.top_reactors else 0 + b.write(Int(flags)) + + b.write(Vector(self.results)) + + if self.recent_reactions is not None: + b.write(Vector(self.recent_reactions)) + + if self.top_reactors is not None: + b.write(Vector(self.top_reactors)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_reactor.py b/pyrogram/raw/types/message_reactor.py new file mode 100644 index 00000000..72b62ccd --- /dev/null +++ b/pyrogram/raw/types/message_reactor.py @@ -0,0 +1,84 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReactor(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageReactor`. + + Details: + - Layer: ``224`` + - ID: ``4BA3A95A`` + + Parameters: + count (``int`` ``32-bit``): + N/A + + top (``bool``, *optional*): + N/A + + my (``bool``, *optional*): + N/A + + anonymous (``bool``, *optional*): + N/A + + peer_id (:obj:`Peer `, *optional*): + N/A + + """ + + __slots__: List[str] = ["count", "top", "my", "anonymous", "peer_id"] + + ID = 0x4ba3a95a + QUALNAME = "types.MessageReactor" + + def __init__(self, *, count: int, top: Optional[bool] = None, my: Optional[bool] = None, anonymous: Optional[bool] = None, peer_id: "raw.base.Peer" = None) -> None: + self.count = count # int + self.top = top # flags.0?true + self.my = my # flags.1?true + self.anonymous = anonymous # flags.2?true + self.peer_id = peer_id # flags.3?Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReactor": + + flags = Int.read(b) + + top = True if flags & (1 << 0) else False + my = True if flags & (1 << 1) else False + anonymous = True if flags & (1 << 2) else False + peer_id = TLObject.read(b) if flags & (1 << 3) else None + + count = Int.read(b) + + return MessageReactor(count=count, top=top, my=my, anonymous=anonymous, peer_id=peer_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.top else 0 + flags |= (1 << 1) if self.my else 0 + flags |= (1 << 2) if self.anonymous else 0 + flags |= (1 << 3) if self.peer_id is not None else 0 + b.write(Int(flags)) + + if self.peer_id is not None: + b.write(self.peer_id.write()) + + b.write(Int(self.count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_replies.py b/pyrogram/raw/types/message_replies.py new file mode 100644 index 00000000..9e3c65fe --- /dev/null +++ b/pyrogram/raw/types/message_replies.py @@ -0,0 +1,107 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReplies(TLObject): # type: ignore + """Info about the comment section of a channel post, or a simple message thread + + Constructor of :obj:`~pyrogram.raw.base.MessageReplies`. + + Details: + - Layer: ``224`` + - ID: ``83D60FC2`` + + Parameters: + replies (``int`` ``32-bit``): + Contains the total number of replies in this thread or comment section. + + replies_pts (``int`` ``32-bit``): + PTS of the message that started this thread. + + comments (``bool``, *optional*): + Whether this constructor contains information about the comment section of a channel post, or a simple message thread + + recent_repliers (List of :obj:`Peer `, *optional*): + For channel post comments, contains information about the last few comment posters for a specific thread, to show a small list of commenter profile pictures in client previews. + + channel_id (``int`` ``64-bit``, *optional*): + For channel post comments, contains the ID of the associated discussion supergroup + + max_id (``int`` ``32-bit``, *optional*): + ID of the latest message in this thread or comment section. + + read_max_id (``int`` ``32-bit``, *optional*): + Contains the ID of the latest read message in this thread or comment section. + + """ + + __slots__: List[str] = ["replies", "replies_pts", "comments", "recent_repliers", "channel_id", "max_id", "read_max_id"] + + ID = 0x83d60fc2 + QUALNAME = "types.MessageReplies" + + def __init__(self, *, replies: int, replies_pts: int, comments: Optional[bool] = None, recent_repliers: Optional[List["raw.base.Peer"]] = None, channel_id: Optional[int] = None, max_id: Optional[int] = None, read_max_id: Optional[int] = None) -> None: + self.replies = replies # int + self.replies_pts = replies_pts # int + self.comments = comments # flags.0?true + self.recent_repliers = recent_repliers # flags.1?Vector + self.channel_id = channel_id # flags.0?long + self.max_id = max_id # flags.2?int + self.read_max_id = read_max_id # flags.3?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReplies": + + flags = Int.read(b) + + comments = True if flags & (1 << 0) else False + replies = Int.read(b) + + replies_pts = Int.read(b) + + recent_repliers = TLObject.read(b) if flags & (1 << 1) else [] + + channel_id = Long.read(b) if flags & (1 << 0) else None + max_id = Int.read(b) if flags & (1 << 2) else None + read_max_id = Int.read(b) if flags & (1 << 3) else None + return MessageReplies(replies=replies, replies_pts=replies_pts, comments=comments, recent_repliers=recent_repliers, channel_id=channel_id, max_id=max_id, read_max_id=read_max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.comments else 0 + flags |= (1 << 1) if self.recent_repliers else 0 + flags |= (1 << 0) if self.channel_id is not None else 0 + flags |= (1 << 2) if self.max_id is not None else 0 + flags |= (1 << 3) if self.read_max_id is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.replies)) + + b.write(Int(self.replies_pts)) + + if self.recent_repliers is not None: + b.write(Vector(self.recent_repliers)) + + if self.channel_id is not None: + b.write(Long(self.channel_id)) + + if self.max_id is not None: + b.write(Int(self.max_id)) + + if self.read_max_id is not None: + b.write(Int(self.read_max_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_reply_header.py b/pyrogram/raw/types/message_reply_header.py new file mode 100644 index 00000000..ec0b64e5 --- /dev/null +++ b/pyrogram/raw/types/message_reply_header.py @@ -0,0 +1,151 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReplyHeader(TLObject): # type: ignore + """Message replies and thread information + + Constructor of :obj:`~pyrogram.raw.base.MessageReplyHeader`. + + Details: + - Layer: ``224`` + - ID: ``6917560B`` + + Parameters: + reply_to_scheduled (``bool``, *optional*): + This is a reply to a scheduled message. + + forum_topic (``bool``, *optional*): + Whether this message was sent in a forum topic (except for the General topic). + + quote (``bool``, *optional*): + Whether this message is quoting a part of another message. + + reply_to_msg_id (``int`` ``32-bit``, *optional*): + ID of message to which this message is replying + + reply_to_peer_id (:obj:`Peer `, *optional*): + For replies sent in channel discussion threads of which the current user is not a member, the discussion group ID + + reply_from (:obj:`MessageFwdHeader `, *optional*): + When replying to a message sent by a certain peer to another chat, contains info about the peer that originally sent the message to that other chat. + + reply_media (:obj:`MessageMedia `, *optional*): + When replying to a media sent by a certain peer to another chat, contains the media of the replied-to message. + + reply_to_top_id (``int`` ``32-bit``, *optional*): + ID of the message that started this message thread + + quote_text (``str``, *optional*): + Used to quote-reply to only a certain section (specified here) of the original message. + + quote_entities (List of :obj:`MessageEntity `, *optional*): + Message entities for styled text from the quote_text field. + + quote_offset (``int`` ``32-bit``, *optional*): + Offset of the message quote_text within the original message (in UTF-16 code units). + + todo_item_id (``int`` ``32-bit``, *optional*): + N/A + + """ + + __slots__: List[str] = ["reply_to_scheduled", "forum_topic", "quote", "reply_to_msg_id", "reply_to_peer_id", "reply_from", "reply_media", "reply_to_top_id", "quote_text", "quote_entities", "quote_offset", "todo_item_id"] + + ID = 0x6917560b + QUALNAME = "types.MessageReplyHeader" + + def __init__(self, *, reply_to_scheduled: Optional[bool] = None, forum_topic: Optional[bool] = None, quote: Optional[bool] = None, reply_to_msg_id: Optional[int] = None, reply_to_peer_id: "raw.base.Peer" = None, reply_from: "raw.base.MessageFwdHeader" = None, reply_media: "raw.base.MessageMedia" = None, reply_to_top_id: Optional[int] = None, quote_text: Optional[str] = None, quote_entities: Optional[List["raw.base.MessageEntity"]] = None, quote_offset: Optional[int] = None, todo_item_id: Optional[int] = None) -> None: + self.reply_to_scheduled = reply_to_scheduled # flags.2?true + self.forum_topic = forum_topic # flags.3?true + self.quote = quote # flags.9?true + self.reply_to_msg_id = reply_to_msg_id # flags.4?int + self.reply_to_peer_id = reply_to_peer_id # flags.0?Peer + self.reply_from = reply_from # flags.5?MessageFwdHeader + self.reply_media = reply_media # flags.8?MessageMedia + self.reply_to_top_id = reply_to_top_id # flags.1?int + self.quote_text = quote_text # flags.6?string + self.quote_entities = quote_entities # flags.7?Vector + self.quote_offset = quote_offset # flags.10?int + self.todo_item_id = todo_item_id # flags.11?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReplyHeader": + + flags = Int.read(b) + + reply_to_scheduled = True if flags & (1 << 2) else False + forum_topic = True if flags & (1 << 3) else False + quote = True if flags & (1 << 9) else False + reply_to_msg_id = Int.read(b) if flags & (1 << 4) else None + reply_to_peer_id = TLObject.read(b) if flags & (1 << 0) else None + + reply_from = TLObject.read(b) if flags & (1 << 5) else None + + reply_media = TLObject.read(b) if flags & (1 << 8) else None + + reply_to_top_id = Int.read(b) if flags & (1 << 1) else None + quote_text = String.read(b) if flags & (1 << 6) else None + quote_entities = TLObject.read(b) if flags & (1 << 7) else [] + + quote_offset = Int.read(b) if flags & (1 << 10) else None + todo_item_id = Int.read(b) if flags & (1 << 11) else None + return MessageReplyHeader(reply_to_scheduled=reply_to_scheduled, forum_topic=forum_topic, quote=quote, reply_to_msg_id=reply_to_msg_id, reply_to_peer_id=reply_to_peer_id, reply_from=reply_from, reply_media=reply_media, reply_to_top_id=reply_to_top_id, quote_text=quote_text, quote_entities=quote_entities, quote_offset=quote_offset, todo_item_id=todo_item_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 2) if self.reply_to_scheduled else 0 + flags |= (1 << 3) if self.forum_topic else 0 + flags |= (1 << 9) if self.quote else 0 + flags |= (1 << 4) if self.reply_to_msg_id is not None else 0 + flags |= (1 << 0) if self.reply_to_peer_id is not None else 0 + flags |= (1 << 5) if self.reply_from is not None else 0 + flags |= (1 << 8) if self.reply_media is not None else 0 + flags |= (1 << 1) if self.reply_to_top_id is not None else 0 + flags |= (1 << 6) if self.quote_text is not None else 0 + flags |= (1 << 7) if self.quote_entities else 0 + flags |= (1 << 10) if self.quote_offset is not None else 0 + flags |= (1 << 11) if self.todo_item_id is not None else 0 + b.write(Int(flags)) + + if self.reply_to_msg_id is not None: + b.write(Int(self.reply_to_msg_id)) + + if self.reply_to_peer_id is not None: + b.write(self.reply_to_peer_id.write()) + + if self.reply_from is not None: + b.write(self.reply_from.write()) + + if self.reply_media is not None: + b.write(self.reply_media.write()) + + if self.reply_to_top_id is not None: + b.write(Int(self.reply_to_top_id)) + + if self.quote_text is not None: + b.write(String(self.quote_text)) + + if self.quote_entities is not None: + b.write(Vector(self.quote_entities)) + + if self.quote_offset is not None: + b.write(Int(self.quote_offset)) + + if self.todo_item_id is not None: + b.write(Int(self.todo_item_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_reply_story_header.py b/pyrogram/raw/types/message_reply_story_header.py new file mode 100644 index 00000000..9b661e76 --- /dev/null +++ b/pyrogram/raw/types/message_reply_story_header.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReplyStoryHeader(TLObject): # type: ignore + """Represents a reply to a story + + Constructor of :obj:`~pyrogram.raw.base.MessageReplyHeader`. + + Details: + - Layer: ``224`` + - ID: ``E5AF939`` + + Parameters: + peer (:obj:`Peer `): + + + story_id (``int`` ``32-bit``): + Story ID + + """ + + __slots__: List[str] = ["peer", "story_id"] + + ID = 0xe5af939 + QUALNAME = "types.MessageReplyStoryHeader" + + def __init__(self, *, peer: "raw.base.Peer", story_id: int) -> None: + self.peer = peer # Peer + self.story_id = story_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReplyStoryHeader": + # No flags + + peer = TLObject.read(b) + + story_id = Int.read(b) + + return MessageReplyStoryHeader(peer=peer, story_id=story_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.story_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_report_option.py b/pyrogram/raw/types/message_report_option.py new file mode 100644 index 00000000..bed2de72 --- /dev/null +++ b/pyrogram/raw/types/message_report_option.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReportOption(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MessageReportOption`. + + Details: + - Layer: ``224`` + - ID: ``7903E3D9`` + + Parameters: + text (``str``): + N/A + + option (``bytes``): + N/A + + """ + + __slots__: List[str] = ["text", "option"] + + ID = 0x7903e3d9 + QUALNAME = "types.MessageReportOption" + + def __init__(self, *, text: str, option: bytes) -> None: + self.text = text # string + self.option = option # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReportOption": + # No flags + + text = String.read(b) + + option = Bytes.read(b) + + return MessageReportOption(text=text, option=option) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.text)) + + b.write(Bytes(self.option)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_service.py b/pyrogram/raw/types/message_service.py new file mode 100644 index 00000000..beabfc4e --- /dev/null +++ b/pyrogram/raw/types/message_service.py @@ -0,0 +1,171 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageService(TLObject): # type: ignore + """Indicates a service message + + Constructor of :obj:`~pyrogram.raw.base.Message`. + + Details: + - Layer: ``224`` + - ID: ``7A800E0A`` + + Parameters: + id (``int`` ``32-bit``): + Message ID + + peer_id (:obj:`Peer `): + Sender of service message + + date (``int`` ``32-bit``): + Message date + + action (:obj:`MessageAction `): + Event connected with the service message + + out (``bool``, *optional*): + Whether the message is outgoing + + mentioned (``bool``, *optional*): + Whether we were mentioned in the message + + media_unread (``bool``, *optional*): + Whether the message contains unread media + + reactions_are_possible (``bool``, *optional*): + N/A + + silent (``bool``, *optional*): + Whether the message is silent + + post (``bool``, *optional*): + Whether it's a channel post + + legacy (``bool``, *optional*): + This is a legacy message: it has to be refetched with the new layer + + from_id (:obj:`Peer `, *optional*): + ID of the sender of this message + + saved_peer_id (:obj:`Peer `, *optional*): + N/A + + reply_to (:obj:`MessageReplyHeader `, *optional*): + Reply (thread) information + + reactions (:obj:`MessageReactions `, *optional*): + N/A + + ttl_period (``int`` ``32-bit``, *optional*): + Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. + + """ + + __slots__: List[str] = ["id", "peer_id", "date", "action", "out", "mentioned", "media_unread", "reactions_are_possible", "silent", "post", "legacy", "from_id", "saved_peer_id", "reply_to", "reactions", "ttl_period"] + + ID = 0x7a800e0a + QUALNAME = "types.MessageService" + + def __init__(self, *, id: int, peer_id: "raw.base.Peer", date: int, action: "raw.base.MessageAction", out: Optional[bool] = None, mentioned: Optional[bool] = None, media_unread: Optional[bool] = None, reactions_are_possible: Optional[bool] = None, silent: Optional[bool] = None, post: Optional[bool] = None, legacy: Optional[bool] = None, from_id: "raw.base.Peer" = None, saved_peer_id: "raw.base.Peer" = None, reply_to: "raw.base.MessageReplyHeader" = None, reactions: "raw.base.MessageReactions" = None, ttl_period: Optional[int] = None) -> None: + self.id = id # int + self.peer_id = peer_id # Peer + self.date = date # int + self.action = action # MessageAction + self.out = out # flags.1?true + self.mentioned = mentioned # flags.4?true + self.media_unread = media_unread # flags.5?true + self.reactions_are_possible = reactions_are_possible # flags.9?true + self.silent = silent # flags.13?true + self.post = post # flags.14?true + self.legacy = legacy # flags.19?true + self.from_id = from_id # flags.8?Peer + self.saved_peer_id = saved_peer_id # flags.28?Peer + self.reply_to = reply_to # flags.3?MessageReplyHeader + self.reactions = reactions # flags.20?MessageReactions + self.ttl_period = ttl_period # flags.25?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageService": + + flags = Int.read(b) + + out = True if flags & (1 << 1) else False + mentioned = True if flags & (1 << 4) else False + media_unread = True if flags & (1 << 5) else False + reactions_are_possible = True if flags & (1 << 9) else False + silent = True if flags & (1 << 13) else False + post = True if flags & (1 << 14) else False + legacy = True if flags & (1 << 19) else False + id = Int.read(b) + + from_id = TLObject.read(b) if flags & (1 << 8) else None + + peer_id = TLObject.read(b) + + saved_peer_id = TLObject.read(b) if flags & (1 << 28) else None + + reply_to = TLObject.read(b) if flags & (1 << 3) else None + + date = Int.read(b) + + action = TLObject.read(b) + + reactions = TLObject.read(b) if flags & (1 << 20) else None + + ttl_period = Int.read(b) if flags & (1 << 25) else None + return MessageService(id=id, peer_id=peer_id, date=date, action=action, out=out, mentioned=mentioned, media_unread=media_unread, reactions_are_possible=reactions_are_possible, silent=silent, post=post, legacy=legacy, from_id=from_id, saved_peer_id=saved_peer_id, reply_to=reply_to, reactions=reactions, ttl_period=ttl_period) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.out else 0 + flags |= (1 << 4) if self.mentioned else 0 + flags |= (1 << 5) if self.media_unread else 0 + flags |= (1 << 9) if self.reactions_are_possible else 0 + flags |= (1 << 13) if self.silent else 0 + flags |= (1 << 14) if self.post else 0 + flags |= (1 << 19) if self.legacy else 0 + flags |= (1 << 8) if self.from_id is not None else 0 + flags |= (1 << 28) if self.saved_peer_id is not None else 0 + flags |= (1 << 3) if self.reply_to is not None else 0 + flags |= (1 << 20) if self.reactions is not None else 0 + flags |= (1 << 25) if self.ttl_period is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.id)) + + if self.from_id is not None: + b.write(self.from_id.write()) + + b.write(self.peer_id.write()) + + if self.saved_peer_id is not None: + b.write(self.saved_peer_id.write()) + + if self.reply_to is not None: + b.write(self.reply_to.write()) + + b.write(Int(self.date)) + + b.write(self.action.write()) + + if self.reactions is not None: + b.write(self.reactions.write()) + + if self.ttl_period is not None: + b.write(Int(self.ttl_period)) + + return b.getvalue() diff --git a/pyrogram/raw/types/message_views.py b/pyrogram/raw/types/message_views.py new file mode 100644 index 00000000..0a5ea378 --- /dev/null +++ b/pyrogram/raw/types/message_views.py @@ -0,0 +1,76 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageViews(TLObject): # type: ignore + """View, forward counter + info about replies of a specific message + + Constructor of :obj:`~pyrogram.raw.base.MessageViews`. + + Details: + - Layer: ``224`` + - ID: ``455B853D`` + + Parameters: + views (``int`` ``32-bit``, *optional*): + View count of message + + forwards (``int`` ``32-bit``, *optional*): + Forward count of message + + replies (:obj:`MessageReplies `, *optional*): + Reply and thread information of message + + """ + + __slots__: List[str] = ["views", "forwards", "replies"] + + ID = 0x455b853d + QUALNAME = "types.MessageViews" + + def __init__(self, *, views: Optional[int] = None, forwards: Optional[int] = None, replies: "raw.base.MessageReplies" = None) -> None: + self.views = views # flags.0?int + self.forwards = forwards # flags.1?int + self.replies = replies # flags.2?MessageReplies + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageViews": + + flags = Int.read(b) + + views = Int.read(b) if flags & (1 << 0) else None + forwards = Int.read(b) if flags & (1 << 1) else None + replies = TLObject.read(b) if flags & (1 << 2) else None + + return MessageViews(views=views, forwards=forwards, replies=replies) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.views is not None else 0 + flags |= (1 << 1) if self.forwards is not None else 0 + flags |= (1 << 2) if self.replies is not None else 0 + b.write(Int(flags)) + + if self.views is not None: + b.write(Int(self.views)) + + if self.forwards is not None: + b.write(Int(self.forwards)) + + if self.replies is not None: + b.write(self.replies.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/__init__.py b/pyrogram/raw/types/messages/__init__.py new file mode 100644 index 00000000..7a761adf --- /dev/null +++ b/pyrogram/raw/types/messages/__init__.py @@ -0,0 +1,217 @@ +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + +from .dialogs import Dialogs +from .dialogs_slice import DialogsSlice +from .dialogs_not_modified import DialogsNotModified +from .messages import Messages +from .messages_slice import MessagesSlice +from .channel_messages import ChannelMessages +from .messages_not_modified import MessagesNotModified +from .chats import Chats +from .chats_slice import ChatsSlice +from .chat_full import ChatFull +from .affected_history import AffectedHistory +from .dh_config_not_modified import DhConfigNotModified +from .dh_config import DhConfig +from .sent_encrypted_message import SentEncryptedMessage +from .sent_encrypted_file import SentEncryptedFile +from .stickers_not_modified import StickersNotModified +from .stickers import Stickers +from .all_stickers_not_modified import AllStickersNotModified +from .all_stickers import AllStickers +from .affected_messages import AffectedMessages +from .sticker_set import StickerSet +from .sticker_set_not_modified import StickerSetNotModified +from .saved_gifs_not_modified import SavedGifsNotModified +from .saved_gifs import SavedGifs +from .bot_results import BotResults +from .bot_callback_answer import BotCallbackAnswer +from .message_edit_data import MessageEditData +from .peer_dialogs import PeerDialogs +from .featured_stickers_not_modified import FeaturedStickersNotModified +from .featured_stickers import FeaturedStickers +from .recent_stickers_not_modified import RecentStickersNotModified +from .recent_stickers import RecentStickers +from .archived_stickers import ArchivedStickers +from .sticker_set_install_result_success import StickerSetInstallResultSuccess +from .sticker_set_install_result_archive import StickerSetInstallResultArchive +from .high_scores import HighScores +from .faved_stickers_not_modified import FavedStickersNotModified +from .faved_stickers import FavedStickers +from .found_sticker_sets_not_modified import FoundStickerSetsNotModified +from .found_sticker_sets import FoundStickerSets +from .search_counter import SearchCounter +from .inactive_chats import InactiveChats +from .votes_list import VotesList +from .message_views import MessageViews +from .discussion_message import DiscussionMessage +from .history_import import HistoryImport +from .history_import_parsed import HistoryImportParsed +from .affected_found_messages import AffectedFoundMessages +from .exported_chat_invites import ExportedChatInvites +from .exported_chat_invite import ExportedChatInvite +from .exported_chat_invite_replaced import ExportedChatInviteReplaced +from .chat_invite_importers import ChatInviteImporters +from .chat_admins_with_invites import ChatAdminsWithInvites +from .checked_history_import_peer import CheckedHistoryImportPeer +from .sponsored_messages import SponsoredMessages +from .sponsored_messages_empty import SponsoredMessagesEmpty +from .search_results_calendar import SearchResultsCalendar +from .search_results_positions import SearchResultsPositions +from .peer_settings import PeerSettings +from .message_reactions_list import MessageReactionsList +from .available_reactions_not_modified import AvailableReactionsNotModified +from .available_reactions import AvailableReactions +from .transcribed_audio import TranscribedAudio +from .reactions_not_modified import ReactionsNotModified +from .reactions import Reactions +from .forum_topics import ForumTopics +from .emoji_groups_not_modified import EmojiGroupsNotModified +from .emoji_groups import EmojiGroups +from .translate_result import TranslateResult +from .bot_app import BotApp +from .web_page import WebPage +from .saved_dialogs import SavedDialogs +from .saved_dialogs_slice import SavedDialogsSlice +from .saved_dialogs_not_modified import SavedDialogsNotModified +from .saved_reaction_tags_not_modified import SavedReactionTagsNotModified +from .saved_reaction_tags import SavedReactionTags +from .quick_replies import QuickReplies +from .quick_replies_not_modified import QuickRepliesNotModified +from .dialog_filters import DialogFilters +from .my_stickers import MyStickers +from .invited_users import InvitedUsers +from .available_effects_not_modified import AvailableEffectsNotModified +from .available_effects import AvailableEffects +from .bot_prepared_inline_message import BotPreparedInlineMessage +from .prepared_inline_message import PreparedInlineMessage +from .found_stickers_not_modified import FoundStickersNotModified +from .found_stickers import FoundStickers +from .web_page_preview import WebPagePreview +from .emoji_game_outcome import EmojiGameOutcome +from .emoji_game_unavailable import EmojiGameUnavailable +from .emoji_game_dice_info import EmojiGameDiceInfo +from .message_empty import MessageEmpty +from .web_view_result import WebViewResult + + +__all__ = [ + "Dialogs", + "DialogsSlice", + "DialogsNotModified", + "Messages", + "MessagesSlice", + "ChannelMessages", + "MessagesNotModified", + "Chats", + "ChatsSlice", + "ChatFull", + "AffectedHistory", + "DhConfigNotModified", + "DhConfig", + "SentEncryptedMessage", + "SentEncryptedFile", + "StickersNotModified", + "Stickers", + "AllStickersNotModified", + "AllStickers", + "AffectedMessages", + "StickerSet", + "StickerSetNotModified", + "SavedGifsNotModified", + "SavedGifs", + "BotResults", + "BotCallbackAnswer", + "MessageEditData", + "PeerDialogs", + "FeaturedStickersNotModified", + "FeaturedStickers", + "RecentStickersNotModified", + "RecentStickers", + "ArchivedStickers", + "StickerSetInstallResultSuccess", + "StickerSetInstallResultArchive", + "HighScores", + "FavedStickersNotModified", + "FavedStickers", + "FoundStickerSetsNotModified", + "FoundStickerSets", + "SearchCounter", + "InactiveChats", + "VotesList", + "MessageViews", + "DiscussionMessage", + "HistoryImport", + "HistoryImportParsed", + "AffectedFoundMessages", + "ExportedChatInvites", + "ExportedChatInvite", + "ExportedChatInviteReplaced", + "ChatInviteImporters", + "ChatAdminsWithInvites", + "CheckedHistoryImportPeer", + "SponsoredMessages", + "SponsoredMessagesEmpty", + "SearchResultsCalendar", + "SearchResultsPositions", + "PeerSettings", + "MessageReactionsList", + "AvailableReactionsNotModified", + "AvailableReactions", + "TranscribedAudio", + "ReactionsNotModified", + "Reactions", + "ForumTopics", + "EmojiGroupsNotModified", + "EmojiGroups", + "TranslateResult", + "BotApp", + "WebPage", + "SavedDialogs", + "SavedDialogsSlice", + "SavedDialogsNotModified", + "SavedReactionTagsNotModified", + "SavedReactionTags", + "QuickReplies", + "QuickRepliesNotModified", + "DialogFilters", + "MyStickers", + "InvitedUsers", + "AvailableEffectsNotModified", + "AvailableEffects", + "BotPreparedInlineMessage", + "PreparedInlineMessage", + "FoundStickersNotModified", + "FoundStickers", + "WebPagePreview", + "EmojiGameOutcome", + "EmojiGameUnavailable", + "EmojiGameDiceInfo", + "MessageEmpty", + "WebViewResult", + "help", + "storage", + "auth", + "contacts", + "messages", + "updates", + "photos", + "upload", + "account", + "channels", + "payments", + "phone", + "stats", + "stickers", + "users", + "chatlists", + "bots", + "stories", + "premium", + "smsjobs", + "fragment", +] diff --git a/pyrogram/raw/types/messages/affected_found_messages.py b/pyrogram/raw/types/messages/affected_found_messages.py new file mode 100644 index 00000000..81965dbc --- /dev/null +++ b/pyrogram/raw/types/messages/affected_found_messages.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AffectedFoundMessages(TLObject): # type: ignore + """Messages found and affected by changes + + Constructor of :obj:`~pyrogram.raw.base.messages.AffectedFoundMessages`. + + Details: + - Layer: ``224`` + - ID: ``EF8D3E6C`` + + Parameters: + pts (``int`` ``32-bit``): + Event count after generation + + pts_count (``int`` ``32-bit``): + Number of events that were generated + + offset (``int`` ``32-bit``): + If bigger than zero, the request must be repeated to remove more messages + + messages (List of ``int`` ``32-bit``): + Affected message IDs + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.DeletePhoneCallHistory + """ + + __slots__: List[str] = ["pts", "pts_count", "offset", "messages"] + + ID = 0xef8d3e6c + QUALNAME = "types.messages.AffectedFoundMessages" + + def __init__(self, *, pts: int, pts_count: int, offset: int, messages: List[int]) -> None: + self.pts = pts # int + self.pts_count = pts_count # int + self.offset = offset # int + self.messages = messages # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AffectedFoundMessages": + # No flags + + pts = Int.read(b) + + pts_count = Int.read(b) + + offset = Int.read(b) + + messages = TLObject.read(b, Int) + + return AffectedFoundMessages(pts=pts, pts_count=pts_count, offset=offset, messages=messages) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.pts)) + + b.write(Int(self.pts_count)) + + b.write(Int(self.offset)) + + b.write(Vector(self.messages, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/affected_history.py b/pyrogram/raw/types/messages/affected_history.py new file mode 100644 index 00000000..10d28204 --- /dev/null +++ b/pyrogram/raw/types/messages/affected_history.py @@ -0,0 +1,85 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AffectedHistory(TLObject): # type: ignore + """Affected part of communication history with the user or in a chat. + + Constructor of :obj:`~pyrogram.raw.base.messages.AffectedHistory`. + + Details: + - Layer: ``224`` + - ID: ``B45C69D1`` + + Parameters: + pts (``int`` ``32-bit``): + Number of events occurred in a text box + + pts_count (``int`` ``32-bit``): + Number of affected events + + offset (``int`` ``32-bit``): + If a parameter contains positive value, it is necessary to repeat the method call using the given value; during the proceeding of all the history the value itself shall gradually decrease + + Functions: + This object can be returned by 7 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.DeleteHistory + messages.ReadMentions + messages.UnpinAllMessages + messages.ReadReactions + messages.DeleteSavedHistory + messages.DeleteTopicHistory + channels.DeleteParticipantHistory + """ + + __slots__: List[str] = ["pts", "pts_count", "offset"] + + ID = 0xb45c69d1 + QUALNAME = "types.messages.AffectedHistory" + + def __init__(self, *, pts: int, pts_count: int, offset: int) -> None: + self.pts = pts # int + self.pts_count = pts_count # int + self.offset = offset # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AffectedHistory": + # No flags + + pts = Int.read(b) + + pts_count = Int.read(b) + + offset = Int.read(b) + + return AffectedHistory(pts=pts, pts_count=pts_count, offset=offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.pts)) + + b.write(Int(self.pts_count)) + + b.write(Int(self.offset)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/affected_messages.py b/pyrogram/raw/types/messages/affected_messages.py new file mode 100644 index 00000000..f3de54f9 --- /dev/null +++ b/pyrogram/raw/types/messages/affected_messages.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AffectedMessages(TLObject): # type: ignore + """Events affected by operation + + Constructor of :obj:`~pyrogram.raw.base.messages.AffectedMessages`. + + Details: + - Layer: ``224`` + - ID: ``84D19185`` + + Parameters: + pts (``int`` ``32-bit``): + Event count after generation + + pts_count (``int`` ``32-bit``): + Number of events that were generated + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.ReadHistory + messages.DeleteMessages + messages.ReadMessageContents + channels.DeleteMessages + """ + + __slots__: List[str] = ["pts", "pts_count"] + + ID = 0x84d19185 + QUALNAME = "types.messages.AffectedMessages" + + def __init__(self, *, pts: int, pts_count: int) -> None: + self.pts = pts # int + self.pts_count = pts_count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AffectedMessages": + # No flags + + pts = Int.read(b) + + pts_count = Int.read(b) + + return AffectedMessages(pts=pts, pts_count=pts_count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.pts)) + + b.write(Int(self.pts_count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/all_stickers.py b/pyrogram/raw/types/messages/all_stickers.py new file mode 100644 index 00000000..49d85c96 --- /dev/null +++ b/pyrogram/raw/types/messages/all_stickers.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AllStickers(TLObject): # type: ignore + """Info about all installed stickers + + Constructor of :obj:`~pyrogram.raw.base.messages.AllStickers`. + + Details: + - Layer: ``224`` + - ID: ``CDBBCEBB`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + sets (List of :obj:`StickerSet `): + All stickersets + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAllStickers + messages.GetMaskStickers + messages.GetEmojiStickers + """ + + __slots__: List[str] = ["hash", "sets"] + + ID = 0xcdbbcebb + QUALNAME = "types.messages.AllStickers" + + def __init__(self, *, hash: int, sets: List["raw.base.StickerSet"]) -> None: + self.hash = hash # long + self.sets = sets # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AllStickers": + # No flags + + hash = Long.read(b) + + sets = TLObject.read(b) + + return AllStickers(hash=hash, sets=sets) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.sets)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/all_stickers_not_modified.py b/pyrogram/raw/types/messages/all_stickers_not_modified.py new file mode 100644 index 00000000..cc529bd4 --- /dev/null +++ b/pyrogram/raw/types/messages/all_stickers_not_modified.py @@ -0,0 +1,60 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AllStickersNotModified(TLObject): # type: ignore + """Info about all installed stickers hasn't changed + + Constructor of :obj:`~pyrogram.raw.base.messages.AllStickers`. + + Details: + - Layer: ``224`` + - ID: ``E86602C3`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAllStickers + messages.GetMaskStickers + messages.GetEmojiStickers + """ + + __slots__: List[str] = [] + + ID = 0xe86602c3 + QUALNAME = "types.messages.AllStickersNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AllStickersNotModified": + # No flags + + return AllStickersNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/archived_stickers.py b/pyrogram/raw/types/messages/archived_stickers.py new file mode 100644 index 00000000..767a796b --- /dev/null +++ b/pyrogram/raw/types/messages/archived_stickers.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ArchivedStickers(TLObject): # type: ignore + """Archived stickersets + + Constructor of :obj:`~pyrogram.raw.base.messages.ArchivedStickers`. + + Details: + - Layer: ``224`` + - ID: ``4FCBA9C8`` + + Parameters: + count (``int`` ``32-bit``): + Number of archived stickers + + sets (List of :obj:`StickerSetCovered `): + Archived stickersets + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetArchivedStickers + """ + + __slots__: List[str] = ["count", "sets"] + + ID = 0x4fcba9c8 + QUALNAME = "types.messages.ArchivedStickers" + + def __init__(self, *, count: int, sets: List["raw.base.StickerSetCovered"]) -> None: + self.count = count # int + self.sets = sets # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ArchivedStickers": + # No flags + + count = Int.read(b) + + sets = TLObject.read(b) + + return ArchivedStickers(count=count, sets=sets) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.sets)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/available_effects.py b/pyrogram/raw/types/messages/available_effects.py new file mode 100644 index 00000000..1cff01ec --- /dev/null +++ b/pyrogram/raw/types/messages/available_effects.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AvailableEffects(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.AvailableEffects`. + + Details: + - Layer: ``224`` + - ID: ``BDDB616E`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + effects (List of :obj:`AvailableEffect `): + + + documents (List of :obj:`Document `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAvailableEffects + """ + + __slots__: List[str] = ["hash", "effects", "documents"] + + ID = 0xbddb616e + QUALNAME = "types.messages.AvailableEffects" + + def __init__(self, *, hash: int, effects: List["raw.base.AvailableEffect"], documents: List["raw.base.Document"]) -> None: + self.hash = hash # int + self.effects = effects # Vector + self.documents = documents # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AvailableEffects": + # No flags + + hash = Int.read(b) + + effects = TLObject.read(b) + + documents = TLObject.read(b) + + return AvailableEffects(hash=hash, effects=effects, documents=documents) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + b.write(Vector(self.effects)) + + b.write(Vector(self.documents)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/available_effects_not_modified.py b/pyrogram/raw/types/messages/available_effects_not_modified.py new file mode 100644 index 00000000..36802dbf --- /dev/null +++ b/pyrogram/raw/types/messages/available_effects_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AvailableEffectsNotModified(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.AvailableEffects`. + + Details: + - Layer: ``224`` + - ID: ``D1ED9A5B`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAvailableEffects + """ + + __slots__: List[str] = [] + + ID = 0xd1ed9a5b + QUALNAME = "types.messages.AvailableEffectsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AvailableEffectsNotModified": + # No flags + + return AvailableEffectsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/available_reactions.py b/pyrogram/raw/types/messages/available_reactions.py new file mode 100644 index 00000000..ff5a2aba --- /dev/null +++ b/pyrogram/raw/types/messages/available_reactions.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AvailableReactions(TLObject): # type: ignore + """Animations and metadata associated with message reactions » + + Constructor of :obj:`~pyrogram.raw.base.messages.AvailableReactions`. + + Details: + - Layer: ``224`` + - ID: ``768E3AAD`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + reactions (List of :obj:`AvailableReaction `): + Animations and metadata associated with message reactions » + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAvailableReactions + """ + + __slots__: List[str] = ["hash", "reactions"] + + ID = 0x768e3aad + QUALNAME = "types.messages.AvailableReactions" + + def __init__(self, *, hash: int, reactions: List["raw.base.AvailableReaction"]) -> None: + self.hash = hash # int + self.reactions = reactions # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AvailableReactions": + # No flags + + hash = Int.read(b) + + reactions = TLObject.read(b) + + return AvailableReactions(hash=hash, reactions=reactions) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + b.write(Vector(self.reactions)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/available_reactions_not_modified.py b/pyrogram/raw/types/messages/available_reactions_not_modified.py new file mode 100644 index 00000000..b4e53b68 --- /dev/null +++ b/pyrogram/raw/types/messages/available_reactions_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class AvailableReactionsNotModified(TLObject): # type: ignore + """No new reactions are available + + Constructor of :obj:`~pyrogram.raw.base.messages.AvailableReactions`. + + Details: + - Layer: ``224`` + - ID: ``9F071957`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAvailableReactions + """ + + __slots__: List[str] = [] + + ID = 0x9f071957 + QUALNAME = "types.messages.AvailableReactionsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "AvailableReactionsNotModified": + # No flags + + return AvailableReactionsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/bot_app.py b/pyrogram/raw/types/messages/bot_app.py new file mode 100644 index 00000000..e15bbfcb --- /dev/null +++ b/pyrogram/raw/types/messages/bot_app.py @@ -0,0 +1,83 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotApp(TLObject): # type: ignore + """Contains information about a direct link Mini App + + Constructor of :obj:`~pyrogram.raw.base.messages.BotApp`. + + Details: + - Layer: ``224`` + - ID: ``EB50ADF5`` + + Parameters: + app (:obj:`BotApp `): + Bot app information + + inactive (``bool``, *optional*): + Whether the web app was never used by the user, and confirmation must be asked from the user before opening it. + + request_write_access (``bool``, *optional*): + The bot is asking permission to send messages to the user: if the user agrees, set the write_allowed flag when invoking messages.requestAppWebView. + + has_settings (``bool``, *optional*): + Deprecated flag, can be ignored. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetBotApp + """ + + __slots__: List[str] = ["app", "inactive", "request_write_access", "has_settings"] + + ID = 0xeb50adf5 + QUALNAME = "types.messages.BotApp" + + def __init__(self, *, app: "raw.base.BotApp", inactive: Optional[bool] = None, request_write_access: Optional[bool] = None, has_settings: Optional[bool] = None) -> None: + self.app = app # BotApp + self.inactive = inactive # flags.0?true + self.request_write_access = request_write_access # flags.1?true + self.has_settings = has_settings # flags.2?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotApp": + + flags = Int.read(b) + + inactive = True if flags & (1 << 0) else False + request_write_access = True if flags & (1 << 1) else False + has_settings = True if flags & (1 << 2) else False + app = TLObject.read(b) + + return BotApp(app=app, inactive=inactive, request_write_access=request_write_access, has_settings=has_settings) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.inactive else 0 + flags |= (1 << 1) if self.request_write_access else 0 + flags |= (1 << 2) if self.has_settings else 0 + b.write(Int(flags)) + + b.write(self.app.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/bot_callback_answer.py b/pyrogram/raw/types/messages/bot_callback_answer.py new file mode 100644 index 00000000..e957cc0a --- /dev/null +++ b/pyrogram/raw/types/messages/bot_callback_answer.py @@ -0,0 +1,101 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotCallbackAnswer(TLObject): # type: ignore + """Callback answer sent by the bot in response to a button press + + Constructor of :obj:`~pyrogram.raw.base.messages.BotCallbackAnswer`. + + Details: + - Layer: ``224`` + - ID: ``36585EA4`` + + Parameters: + cache_time (``int`` ``32-bit``): + For how long should this answer be cached + + alert (``bool``, *optional*): + Whether an alert should be shown to the user instead of a toast notification + + has_url (``bool``, *optional*): + Whether an URL is present + + native_ui (``bool``, *optional*): + Whether to show games in WebView or in native UI. + + message (``str``, *optional*): + Alert to show + + url (``str``, *optional*): + URL to open + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetBotCallbackAnswer + """ + + __slots__: List[str] = ["cache_time", "alert", "has_url", "native_ui", "message", "url"] + + ID = 0x36585ea4 + QUALNAME = "types.messages.BotCallbackAnswer" + + def __init__(self, *, cache_time: int, alert: Optional[bool] = None, has_url: Optional[bool] = None, native_ui: Optional[bool] = None, message: Optional[str] = None, url: Optional[str] = None) -> None: + self.cache_time = cache_time # int + self.alert = alert # flags.1?true + self.has_url = has_url # flags.3?true + self.native_ui = native_ui # flags.4?true + self.message = message # flags.0?string + self.url = url # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotCallbackAnswer": + + flags = Int.read(b) + + alert = True if flags & (1 << 1) else False + has_url = True if flags & (1 << 3) else False + native_ui = True if flags & (1 << 4) else False + message = String.read(b) if flags & (1 << 0) else None + url = String.read(b) if flags & (1 << 2) else None + cache_time = Int.read(b) + + return BotCallbackAnswer(cache_time=cache_time, alert=alert, has_url=has_url, native_ui=native_ui, message=message, url=url) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.alert else 0 + flags |= (1 << 3) if self.has_url else 0 + flags |= (1 << 4) if self.native_ui else 0 + flags |= (1 << 0) if self.message is not None else 0 + flags |= (1 << 2) if self.url is not None else 0 + b.write(Int(flags)) + + if self.message is not None: + b.write(String(self.message)) + + if self.url is not None: + b.write(String(self.url)) + + b.write(Int(self.cache_time)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/bot_prepared_inline_message.py b/pyrogram/raw/types/messages/bot_prepared_inline_message.py new file mode 100644 index 00000000..20b3d01e --- /dev/null +++ b/pyrogram/raw/types/messages/bot_prepared_inline_message.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotPreparedInlineMessage(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.BotPreparedInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``8ECF0511`` + + Parameters: + id (``str``): + N/A + + expire_date (``int`` ``32-bit``): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SavePreparedInlineMessage + """ + + __slots__: List[str] = ["id", "expire_date"] + + ID = 0x8ecf0511 + QUALNAME = "types.messages.BotPreparedInlineMessage" + + def __init__(self, *, id: str, expire_date: int) -> None: + self.id = id # string + self.expire_date = expire_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotPreparedInlineMessage": + # No flags + + id = String.read(b) + + expire_date = Int.read(b) + + return BotPreparedInlineMessage(id=id, expire_date=expire_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.id)) + + b.write(Int(self.expire_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/bot_results.py b/pyrogram/raw/types/messages/bot_results.py new file mode 100644 index 00000000..732a9cd7 --- /dev/null +++ b/pyrogram/raw/types/messages/bot_results.py @@ -0,0 +1,124 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class BotResults(TLObject): # type: ignore + """Result of a query to an inline bot + + Constructor of :obj:`~pyrogram.raw.base.messages.BotResults`. + + Details: + - Layer: ``224`` + - ID: ``E021F2F6`` + + Parameters: + query_id (``int`` ``64-bit``): + Query ID + + results (List of :obj:`BotInlineResult `): + The results + + cache_time (``int`` ``32-bit``): + Caching validity of the results + + users (List of :obj:`User `): + Users mentioned in the results + + gallery (``bool``, *optional*): + Whether the result is a picture gallery + + next_offset (``str``, *optional*): + The next offset to use when navigating through results + + switch_pm (:obj:`InlineBotSwitchPM `, *optional*): + Shown as a button on top of the remaining inline result list; if clicked, redirects the user to a private chat with the bot with the specified start parameter. + + switch_webview (:obj:`InlineBotWebView `, *optional*): + Shown as a button on top of the remaining inline result list; if clicked, opens the specified inline mode mini app. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetInlineBotResults + """ + + __slots__: List[str] = ["query_id", "results", "cache_time", "users", "gallery", "next_offset", "switch_pm", "switch_webview"] + + ID = 0xe021f2f6 + QUALNAME = "types.messages.BotResults" + + def __init__(self, *, query_id: int, results: List["raw.base.BotInlineResult"], cache_time: int, users: List["raw.base.User"], gallery: Optional[bool] = None, next_offset: Optional[str] = None, switch_pm: "raw.base.InlineBotSwitchPM" = None, switch_webview: "raw.base.InlineBotWebView" = None) -> None: + self.query_id = query_id # long + self.results = results # Vector + self.cache_time = cache_time # int + self.users = users # Vector + self.gallery = gallery # flags.0?true + self.next_offset = next_offset # flags.1?string + self.switch_pm = switch_pm # flags.2?InlineBotSwitchPM + self.switch_webview = switch_webview # flags.3?InlineBotWebView + + @staticmethod + def read(b: BytesIO, *args: Any) -> "BotResults": + + flags = Int.read(b) + + gallery = True if flags & (1 << 0) else False + query_id = Long.read(b) + + next_offset = String.read(b) if flags & (1 << 1) else None + switch_pm = TLObject.read(b) if flags & (1 << 2) else None + + switch_webview = TLObject.read(b) if flags & (1 << 3) else None + + results = TLObject.read(b) + + cache_time = Int.read(b) + + users = TLObject.read(b) + + return BotResults(query_id=query_id, results=results, cache_time=cache_time, users=users, gallery=gallery, next_offset=next_offset, switch_pm=switch_pm, switch_webview=switch_webview) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.gallery else 0 + flags |= (1 << 1) if self.next_offset is not None else 0 + flags |= (1 << 2) if self.switch_pm is not None else 0 + flags |= (1 << 3) if self.switch_webview is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.query_id)) + + if self.next_offset is not None: + b.write(String(self.next_offset)) + + if self.switch_pm is not None: + b.write(self.switch_pm.write()) + + if self.switch_webview is not None: + b.write(self.switch_webview.write()) + + b.write(Vector(self.results)) + + b.write(Int(self.cache_time)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/channel_messages.py b/pyrogram/raw/types/messages/channel_messages.py new file mode 100644 index 00000000..d34e5efb --- /dev/null +++ b/pyrogram/raw/types/messages/channel_messages.py @@ -0,0 +1,134 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChannelMessages(TLObject): # type: ignore + """Channel messages + + Constructor of :obj:`~pyrogram.raw.base.messages.Messages`. + + Details: + - Layer: ``224`` + - ID: ``C776BA4E`` + + Parameters: + pts (``int`` ``32-bit``): + Event count after generation + + count (``int`` ``32-bit``): + Total number of results were found server-side (may not be all included here) + + messages (List of :obj:`Message `): + Found messages + + topics (List of :obj:`ForumTopic `): + Forum topic information + + chats (List of :obj:`Chat `): + Chats + + users (List of :obj:`User `): + Users + + inexact (``bool``, *optional*): + If set, returned results may be inexact + + offset_id_offset (``int`` ``32-bit``, *optional*): + Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}. + + Functions: + This object can be returned by 15 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessages + messages.GetHistory + messages.Search + messages.SearchGlobal + messages.GetUnreadMentions + messages.GetRecentLocations + messages.GetScheduledHistory + messages.GetScheduledMessages + messages.GetReplies + messages.GetUnreadReactions + messages.SearchSentMedia + messages.GetSavedHistory + messages.GetQuickReplyMessages + channels.GetMessages + channels.SearchPosts + """ + + __slots__: List[str] = ["pts", "count", "messages", "topics", "chats", "users", "inexact", "offset_id_offset"] + + ID = 0xc776ba4e + QUALNAME = "types.messages.ChannelMessages" + + def __init__(self, *, pts: int, count: int, messages: List["raw.base.Message"], topics: List["raw.base.ForumTopic"], chats: List["raw.base.Chat"], users: List["raw.base.User"], inexact: Optional[bool] = None, offset_id_offset: Optional[int] = None) -> None: + self.pts = pts # int + self.count = count # int + self.messages = messages # Vector + self.topics = topics # Vector + self.chats = chats # Vector + self.users = users # Vector + self.inexact = inexact # flags.1?true + self.offset_id_offset = offset_id_offset # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChannelMessages": + + flags = Int.read(b) + + inexact = True if flags & (1 << 1) else False + pts = Int.read(b) + + count = Int.read(b) + + offset_id_offset = Int.read(b) if flags & (1 << 2) else None + messages = TLObject.read(b) + + topics = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChannelMessages(pts=pts, count=count, messages=messages, topics=topics, chats=chats, users=users, inexact=inexact, offset_id_offset=offset_id_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.inexact else 0 + flags |= (1 << 2) if self.offset_id_offset is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.pts)) + + b.write(Int(self.count)) + + if self.offset_id_offset is not None: + b.write(Int(self.offset_id_offset)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.topics)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/chat_admins_with_invites.py b/pyrogram/raw/types/messages/chat_admins_with_invites.py new file mode 100644 index 00000000..274eec21 --- /dev/null +++ b/pyrogram/raw/types/messages/chat_admins_with_invites.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatAdminsWithInvites(TLObject): # type: ignore + """Info about chat invites generated by admins. + + Constructor of :obj:`~pyrogram.raw.base.messages.ChatAdminsWithInvites`. + + Details: + - Layer: ``224`` + - ID: ``B69B72D7`` + + Parameters: + admins (List of :obj:`ChatAdminWithInvites `): + Info about chat invites generated by admins. + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetAdminsWithInvites + """ + + __slots__: List[str] = ["admins", "users"] + + ID = 0xb69b72d7 + QUALNAME = "types.messages.ChatAdminsWithInvites" + + def __init__(self, *, admins: List["raw.base.ChatAdminWithInvites"], users: List["raw.base.User"]) -> None: + self.admins = admins # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatAdminsWithInvites": + # No flags + + admins = TLObject.read(b) + + users = TLObject.read(b) + + return ChatAdminsWithInvites(admins=admins, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.admins)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/chat_full.py b/pyrogram/raw/types/messages/chat_full.py new file mode 100644 index 00000000..821d25f3 --- /dev/null +++ b/pyrogram/raw/types/messages/chat_full.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatFull(TLObject): # type: ignore + """Full info about a channel, supergroup, gigagroup or basic group. + + Constructor of :obj:`~pyrogram.raw.base.messages.ChatFull`. + + Details: + - Layer: ``224`` + - ID: ``E5D7D19C`` + + Parameters: + full_chat (:obj:`ChatFull `): + Full info + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetFullChat + channels.GetFullChannel + """ + + __slots__: List[str] = ["full_chat", "chats", "users"] + + ID = 0xe5d7d19c + QUALNAME = "types.messages.ChatFull" + + def __init__(self, *, full_chat: "raw.base.ChatFull", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.full_chat = full_chat # ChatFull + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatFull": + # No flags + + full_chat = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return ChatFull(full_chat=full_chat, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.full_chat.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/chat_invite_importers.py b/pyrogram/raw/types/messages/chat_invite_importers.py new file mode 100644 index 00000000..16439497 --- /dev/null +++ b/pyrogram/raw/types/messages/chat_invite_importers.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatInviteImporters(TLObject): # type: ignore + """Info about the users that joined the chat using a specific chat invite + + Constructor of :obj:`~pyrogram.raw.base.messages.ChatInviteImporters`. + + Details: + - Layer: ``224`` + - ID: ``81B6B00A`` + + Parameters: + count (``int`` ``32-bit``): + Number of users that joined + + importers (List of :obj:`ChatInviteImporter `): + The users that joined + + users (List of :obj:`User `): + The users that joined + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetChatInviteImporters + """ + + __slots__: List[str] = ["count", "importers", "users"] + + ID = 0x81b6b00a + QUALNAME = "types.messages.ChatInviteImporters" + + def __init__(self, *, count: int, importers: List["raw.base.ChatInviteImporter"], users: List["raw.base.User"]) -> None: + self.count = count # int + self.importers = importers # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatInviteImporters": + # No flags + + count = Int.read(b) + + importers = TLObject.read(b) + + users = TLObject.read(b) + + return ChatInviteImporters(count=count, importers=importers, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.importers)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/chats.py b/pyrogram/raw/types/messages/chats.py new file mode 100644 index 00000000..c5e86fef --- /dev/null +++ b/pyrogram/raw/types/messages/chats.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Chats(TLObject): # type: ignore + """List of chats with auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.messages.Chats`. + + Details: + - Layer: ``224`` + - ID: ``64FF9FD5`` + + Parameters: + chats (List of :obj:`Chat `): + List of chats + + Functions: + This object can be returned by 9 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetChats + messages.GetCommonChats + messages.GetAllChats + channels.GetChannels + channels.GetAdminedPublicChannels + channels.GetLeftChannels + channels.GetGroupsForDiscussion + channels.GetChannelRecommendations + stories.GetChatsToSend + """ + + __slots__: List[str] = ["chats"] + + ID = 0x64ff9fd5 + QUALNAME = "types.messages.Chats" + + def __init__(self, *, chats: List["raw.base.Chat"]) -> None: + self.chats = chats # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Chats": + # No flags + + chats = TLObject.read(b) + + return Chats(chats=chats) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.chats)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/chats_slice.py b/pyrogram/raw/types/messages/chats_slice.py new file mode 100644 index 00000000..fd98683d --- /dev/null +++ b/pyrogram/raw/types/messages/chats_slice.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ChatsSlice(TLObject): # type: ignore + """Partial list of chats, more would have to be fetched with pagination + + Constructor of :obj:`~pyrogram.raw.base.messages.Chats`. + + Details: + - Layer: ``224`` + - ID: ``9CD81144`` + + Parameters: + count (``int`` ``32-bit``): + Total number of results that were found server-side (not all are included in chats) + + chats (List of :obj:`Chat `): + Chats + + Functions: + This object can be returned by 9 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetChats + messages.GetCommonChats + messages.GetAllChats + channels.GetChannels + channels.GetAdminedPublicChannels + channels.GetLeftChannels + channels.GetGroupsForDiscussion + channels.GetChannelRecommendations + stories.GetChatsToSend + """ + + __slots__: List[str] = ["count", "chats"] + + ID = 0x9cd81144 + QUALNAME = "types.messages.ChatsSlice" + + def __init__(self, *, count: int, chats: List["raw.base.Chat"]) -> None: + self.count = count # int + self.chats = chats # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ChatsSlice": + # No flags + + count = Int.read(b) + + chats = TLObject.read(b) + + return ChatsSlice(count=count, chats=chats) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.chats)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/checked_history_import_peer.py b/pyrogram/raw/types/messages/checked_history_import_peer.py new file mode 100644 index 00000000..0bccc6f6 --- /dev/null +++ b/pyrogram/raw/types/messages/checked_history_import_peer.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class CheckedHistoryImportPeer(TLObject): # type: ignore + """Contains a confirmation text to be shown to the user, upon importing chat history, click here for more info ». + + Constructor of :obj:`~pyrogram.raw.base.messages.CheckedHistoryImportPeer`. + + Details: + - Layer: ``224`` + - ID: ``A24DE717`` + + Parameters: + confirm_text (``str``): + A confirmation text to be shown to the user, upon importing chat history ». + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.CheckHistoryImportPeer + """ + + __slots__: List[str] = ["confirm_text"] + + ID = 0xa24de717 + QUALNAME = "types.messages.CheckedHistoryImportPeer" + + def __init__(self, *, confirm_text: str) -> None: + self.confirm_text = confirm_text # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "CheckedHistoryImportPeer": + # No flags + + confirm_text = String.read(b) + + return CheckedHistoryImportPeer(confirm_text=confirm_text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.confirm_text)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/dh_config.py b/pyrogram/raw/types/messages/dh_config.py new file mode 100644 index 00000000..195344ea --- /dev/null +++ b/pyrogram/raw/types/messages/dh_config.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DhConfig(TLObject): # type: ignore + """New set of configuring parameters. + + Constructor of :obj:`~pyrogram.raw.base.messages.DhConfig`. + + Details: + - Layer: ``224`` + - ID: ``2C221EDD`` + + Parameters: + g (``int`` ``32-bit``): + New value prime, see Wikipedia + + p (``bytes``): + New value primitive root, see Wikipedia + + version (``int`` ``32-bit``): + Version of set of parameters + + random (``bytes``): + Random sequence of bytes of assigned length + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDhConfig + """ + + __slots__: List[str] = ["g", "p", "version", "random"] + + ID = 0x2c221edd + QUALNAME = "types.messages.DhConfig" + + def __init__(self, *, g: int, p: bytes, version: int, random: bytes) -> None: + self.g = g # int + self.p = p # bytes + self.version = version # int + self.random = random # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DhConfig": + # No flags + + g = Int.read(b) + + p = Bytes.read(b) + + version = Int.read(b) + + random = Bytes.read(b) + + return DhConfig(g=g, p=p, version=version, random=random) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.g)) + + b.write(Bytes(self.p)) + + b.write(Int(self.version)) + + b.write(Bytes(self.random)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/dh_config_not_modified.py b/pyrogram/raw/types/messages/dh_config_not_modified.py new file mode 100644 index 00000000..a3065c88 --- /dev/null +++ b/pyrogram/raw/types/messages/dh_config_not_modified.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DhConfigNotModified(TLObject): # type: ignore + """Configuring parameters did not change. + + Constructor of :obj:`~pyrogram.raw.base.messages.DhConfig`. + + Details: + - Layer: ``224`` + - ID: ``C0E24635`` + + Parameters: + random (``bytes``): + Random sequence of bytes of assigned length + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDhConfig + """ + + __slots__: List[str] = ["random"] + + ID = 0xc0e24635 + QUALNAME = "types.messages.DhConfigNotModified" + + def __init__(self, *, random: bytes) -> None: + self.random = random # bytes + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DhConfigNotModified": + # No flags + + random = Bytes.read(b) + + return DhConfigNotModified(random=random) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.random)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/dialog_filters.py b/pyrogram/raw/types/messages/dialog_filters.py new file mode 100644 index 00000000..4d32b0f3 --- /dev/null +++ b/pyrogram/raw/types/messages/dialog_filters.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogFilters(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.DialogFilters`. + + Details: + - Layer: ``224`` + - ID: ``2AD93719`` + + Parameters: + filters (List of :obj:`DialogFilter `): + + + tags_enabled (``bool``, *optional*): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDialogFilters + """ + + __slots__: List[str] = ["filters", "tags_enabled"] + + ID = 0x2ad93719 + QUALNAME = "types.messages.DialogFilters" + + def __init__(self, *, filters: List["raw.base.DialogFilter"], tags_enabled: Optional[bool] = None) -> None: + self.filters = filters # Vector + self.tags_enabled = tags_enabled # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogFilters": + + flags = Int.read(b) + + tags_enabled = True if flags & (1 << 0) else False + filters = TLObject.read(b) + + return DialogFilters(filters=filters, tags_enabled=tags_enabled) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.tags_enabled else 0 + b.write(Int(flags)) + + b.write(Vector(self.filters)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/dialogs.py b/pyrogram/raw/types/messages/dialogs.py new file mode 100644 index 00000000..e26e36c9 --- /dev/null +++ b/pyrogram/raw/types/messages/dialogs.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Dialogs(TLObject): # type: ignore + """Full list of chats with messages and auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.messages.Dialogs`. + + Details: + - Layer: ``224`` + - ID: ``15BA6C40`` + + Parameters: + dialogs (List of :obj:`Dialog `): + List of chats + + messages (List of :obj:`Message `): + List of last messages from each chat + + chats (List of :obj:`Chat `): + List of groups mentioned in the chats + + users (List of :obj:`User `): + List of users mentioned in messages and groups + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDialogs + """ + + __slots__: List[str] = ["dialogs", "messages", "chats", "users"] + + ID = 0x15ba6c40 + QUALNAME = "types.messages.Dialogs" + + def __init__(self, *, dialogs: List["raw.base.Dialog"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.dialogs = dialogs # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Dialogs": + # No flags + + dialogs = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return Dialogs(dialogs=dialogs, messages=messages, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.dialogs)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/dialogs_not_modified.py b/pyrogram/raw/types/messages/dialogs_not_modified.py new file mode 100644 index 00000000..8ac50689 --- /dev/null +++ b/pyrogram/raw/types/messages/dialogs_not_modified.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogsNotModified(TLObject): # type: ignore + """Dialogs haven't changed + + Constructor of :obj:`~pyrogram.raw.base.messages.Dialogs`. + + Details: + - Layer: ``224`` + - ID: ``F0E3E596`` + + Parameters: + count (``int`` ``32-bit``): + Number of dialogs found server-side by the query + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDialogs + """ + + __slots__: List[str] = ["count"] + + ID = 0xf0e3e596 + QUALNAME = "types.messages.DialogsNotModified" + + def __init__(self, *, count: int) -> None: + self.count = count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogsNotModified": + # No flags + + count = Int.read(b) + + return DialogsNotModified(count=count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/dialogs_slice.py b/pyrogram/raw/types/messages/dialogs_slice.py new file mode 100644 index 00000000..59a78987 --- /dev/null +++ b/pyrogram/raw/types/messages/dialogs_slice.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DialogsSlice(TLObject): # type: ignore + """Incomplete list of dialogs with messages and auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.messages.Dialogs`. + + Details: + - Layer: ``224`` + - ID: ``71E094F3`` + + Parameters: + count (``int`` ``32-bit``): + Total number of dialogs + + dialogs (List of :obj:`Dialog `): + List of dialogs + + messages (List of :obj:`Message `): + List of last messages from dialogs + + chats (List of :obj:`Chat `): + List of chats mentioned in dialogs + + users (List of :obj:`User `): + List of users mentioned in messages and chats + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDialogs + """ + + __slots__: List[str] = ["count", "dialogs", "messages", "chats", "users"] + + ID = 0x71e094f3 + QUALNAME = "types.messages.DialogsSlice" + + def __init__(self, *, count: int, dialogs: List["raw.base.Dialog"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.count = count # int + self.dialogs = dialogs # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DialogsSlice": + # No flags + + count = Int.read(b) + + dialogs = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return DialogsSlice(count=count, dialogs=dialogs, messages=messages, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.dialogs)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/discussion_message.py b/pyrogram/raw/types/messages/discussion_message.py new file mode 100644 index 00000000..d4d8efc7 --- /dev/null +++ b/pyrogram/raw/types/messages/discussion_message.py @@ -0,0 +1,116 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class DiscussionMessage(TLObject): # type: ignore + """Information about a message thread + + Constructor of :obj:`~pyrogram.raw.base.messages.DiscussionMessage`. + + Details: + - Layer: ``224`` + - ID: ``A6341782`` + + Parameters: + messages (List of :obj:`Message `): + The messages from which the thread starts. The messages are returned in reverse chronological order (i.e., in order of decreasing message ID). + + unread_count (``int`` ``32-bit``): + Number of unread messages + + chats (List of :obj:`Chat `): + Chats mentioned in constructor + + users (List of :obj:`User `): + Users mentioned in constructor + + max_id (``int`` ``32-bit``, *optional*): + Message ID of latest reply in this thread + + read_inbox_max_id (``int`` ``32-bit``, *optional*): + Message ID of latest read incoming message in this thread + + read_outbox_max_id (``int`` ``32-bit``, *optional*): + Message ID of latest read outgoing message in this thread + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetDiscussionMessage + """ + + __slots__: List[str] = ["messages", "unread_count", "chats", "users", "max_id", "read_inbox_max_id", "read_outbox_max_id"] + + ID = 0xa6341782 + QUALNAME = "types.messages.DiscussionMessage" + + def __init__(self, *, messages: List["raw.base.Message"], unread_count: int, chats: List["raw.base.Chat"], users: List["raw.base.User"], max_id: Optional[int] = None, read_inbox_max_id: Optional[int] = None, read_outbox_max_id: Optional[int] = None) -> None: + self.messages = messages # Vector + self.unread_count = unread_count # int + self.chats = chats # Vector + self.users = users # Vector + self.max_id = max_id # flags.0?int + self.read_inbox_max_id = read_inbox_max_id # flags.1?int + self.read_outbox_max_id = read_outbox_max_id # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "DiscussionMessage": + + flags = Int.read(b) + + messages = TLObject.read(b) + + max_id = Int.read(b) if flags & (1 << 0) else None + read_inbox_max_id = Int.read(b) if flags & (1 << 1) else None + read_outbox_max_id = Int.read(b) if flags & (1 << 2) else None + unread_count = Int.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return DiscussionMessage(messages=messages, unread_count=unread_count, chats=chats, users=users, max_id=max_id, read_inbox_max_id=read_inbox_max_id, read_outbox_max_id=read_outbox_max_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.max_id is not None else 0 + flags |= (1 << 1) if self.read_inbox_max_id is not None else 0 + flags |= (1 << 2) if self.read_outbox_max_id is not None else 0 + b.write(Int(flags)) + + b.write(Vector(self.messages)) + + if self.max_id is not None: + b.write(Int(self.max_id)) + + if self.read_inbox_max_id is not None: + b.write(Int(self.read_inbox_max_id)) + + if self.read_outbox_max_id is not None: + b.write(Int(self.read_outbox_max_id)) + + b.write(Int(self.unread_count)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/emoji_game_dice_info.py b/pyrogram/raw/types/messages/emoji_game_dice_info.py new file mode 100644 index 00000000..469682a4 --- /dev/null +++ b/pyrogram/raw/types/messages/emoji_game_dice_info.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGameDiceInfo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.EmojiGameInfo`. + + Details: + - Layer: ``224`` + - ID: ``44E56023`` + + Parameters: + game_hash (``str``): + N/A + + prev_stake (``int`` ``64-bit``): + N/A + + current_streak (``int`` ``32-bit``): + N/A + + params (List of ``int`` ``32-bit``): + N/A + + plays_left (``int`` ``32-bit``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiGameInfo + """ + + __slots__: List[str] = ["game_hash", "prev_stake", "current_streak", "params", "plays_left"] + + ID = 0x44e56023 + QUALNAME = "types.messages.EmojiGameDiceInfo" + + def __init__(self, *, game_hash: str, prev_stake: int, current_streak: int, params: List[int], plays_left: Optional[int] = None) -> None: + self.game_hash = game_hash # string + self.prev_stake = prev_stake # long + self.current_streak = current_streak # int + self.params = params # Vector + self.plays_left = plays_left # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGameDiceInfo": + + flags = Int.read(b) + + game_hash = String.read(b) + + prev_stake = Long.read(b) + + current_streak = Int.read(b) + + params = TLObject.read(b, Int) + + plays_left = Int.read(b) if flags & (1 << 0) else None + return EmojiGameDiceInfo(game_hash=game_hash, prev_stake=prev_stake, current_streak=current_streak, params=params, plays_left=plays_left) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.plays_left is not None else 0 + b.write(Int(flags)) + + b.write(String(self.game_hash)) + + b.write(Long(self.prev_stake)) + + b.write(Int(self.current_streak)) + + b.write(Vector(self.params, Int)) + + if self.plays_left is not None: + b.write(Int(self.plays_left)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/emoji_game_outcome.py b/pyrogram/raw/types/messages/emoji_game_outcome.py new file mode 100644 index 00000000..5d695def --- /dev/null +++ b/pyrogram/raw/types/messages/emoji_game_outcome.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGameOutcome(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.EmojiGameOutcome`. + + Details: + - Layer: ``224`` + - ID: ``DA2AD647`` + + Parameters: + seed (``bytes``): + N/A + + stake_ton_amount (``int`` ``64-bit``): + N/A + + ton_amount (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["seed", "stake_ton_amount", "ton_amount"] + + ID = 0xda2ad647 + QUALNAME = "types.messages.EmojiGameOutcome" + + def __init__(self, *, seed: bytes, stake_ton_amount: int, ton_amount: int) -> None: + self.seed = seed # bytes + self.stake_ton_amount = stake_ton_amount # long + self.ton_amount = ton_amount # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGameOutcome": + # No flags + + seed = Bytes.read(b) + + stake_ton_amount = Long.read(b) + + ton_amount = Long.read(b) + + return EmojiGameOutcome(seed=seed, stake_ton_amount=stake_ton_amount, ton_amount=ton_amount) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Bytes(self.seed)) + + b.write(Long(self.stake_ton_amount)) + + b.write(Long(self.ton_amount)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/emoji_game_unavailable.py b/pyrogram/raw/types/messages/emoji_game_unavailable.py new file mode 100644 index 00000000..0cb623f2 --- /dev/null +++ b/pyrogram/raw/types/messages/emoji_game_unavailable.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGameUnavailable(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.EmojiGameInfo`. + + Details: + - Layer: ``224`` + - ID: ``59E65335`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiGameInfo + """ + + __slots__: List[str] = [] + + ID = 0x59e65335 + QUALNAME = "types.messages.EmojiGameUnavailable" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGameUnavailable": + # No flags + + return EmojiGameUnavailable() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/emoji_groups.py b/pyrogram/raw/types/messages/emoji_groups.py new file mode 100644 index 00000000..8541237c --- /dev/null +++ b/pyrogram/raw/types/messages/emoji_groups.py @@ -0,0 +1,74 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGroups(TLObject): # type: ignore + """Represents a list of emoji categories. + + Constructor of :obj:`~pyrogram.raw.base.messages.EmojiGroups`. + + Details: + - Layer: ``224`` + - ID: ``881FB94B`` + + Parameters: + hash (``int`` ``32-bit``): + Hash for pagination, for more info click here + + groups (List of :obj:`EmojiGroup `): + A list of emoji categories. + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiGroups + messages.GetEmojiStatusGroups + messages.GetEmojiProfilePhotoGroups + messages.GetEmojiStickerGroups + """ + + __slots__: List[str] = ["hash", "groups"] + + ID = 0x881fb94b + QUALNAME = "types.messages.EmojiGroups" + + def __init__(self, *, hash: int, groups: List["raw.base.EmojiGroup"]) -> None: + self.hash = hash # int + self.groups = groups # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGroups": + # No flags + + hash = Int.read(b) + + groups = TLObject.read(b) + + return EmojiGroups(hash=hash, groups=groups) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.hash)) + + b.write(Vector(self.groups)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/emoji_groups_not_modified.py b/pyrogram/raw/types/messages/emoji_groups_not_modified.py new file mode 100644 index 00000000..e9fc7189 --- /dev/null +++ b/pyrogram/raw/types/messages/emoji_groups_not_modified.py @@ -0,0 +1,61 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class EmojiGroupsNotModified(TLObject): # type: ignore + """The list of emoji categories hasn't changed. + + Constructor of :obj:`~pyrogram.raw.base.messages.EmojiGroups`. + + Details: + - Layer: ``224`` + - ID: ``6FB4AD87`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 4 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetEmojiGroups + messages.GetEmojiStatusGroups + messages.GetEmojiProfilePhotoGroups + messages.GetEmojiStickerGroups + """ + + __slots__: List[str] = [] + + ID = 0x6fb4ad87 + QUALNAME = "types.messages.EmojiGroupsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "EmojiGroupsNotModified": + # No flags + + return EmojiGroupsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/exported_chat_invite.py b/pyrogram/raw/types/messages/exported_chat_invite.py new file mode 100644 index 00000000..f97e0c4c --- /dev/null +++ b/pyrogram/raw/types/messages/exported_chat_invite.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedChatInvite(TLObject): # type: ignore + """Info about a chat invite + + Constructor of :obj:`~pyrogram.raw.base.messages.ExportedChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``1871BE50`` + + Parameters: + invite (:obj:`ExportedChatInvite `): + Info about the chat invite + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetExportedChatInvite + messages.EditExportedChatInvite + """ + + __slots__: List[str] = ["invite", "users"] + + ID = 0x1871be50 + QUALNAME = "types.messages.ExportedChatInvite" + + def __init__(self, *, invite: "raw.base.ExportedChatInvite", users: List["raw.base.User"]) -> None: + self.invite = invite # ExportedChatInvite + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedChatInvite": + # No flags + + invite = TLObject.read(b) + + users = TLObject.read(b) + + return ExportedChatInvite(invite=invite, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.invite.write()) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/exported_chat_invite_replaced.py b/pyrogram/raw/types/messages/exported_chat_invite_replaced.py new file mode 100644 index 00000000..1cc77595 --- /dev/null +++ b/pyrogram/raw/types/messages/exported_chat_invite_replaced.py @@ -0,0 +1,80 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedChatInviteReplaced(TLObject): # type: ignore + """The specified chat invite was replaced with another one + + Constructor of :obj:`~pyrogram.raw.base.messages.ExportedChatInvite`. + + Details: + - Layer: ``224`` + - ID: ``222600EF`` + + Parameters: + invite (:obj:`ExportedChatInvite `): + The replaced chat invite + + new_invite (:obj:`ExportedChatInvite `): + The invite that replaces the previous invite + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetExportedChatInvite + messages.EditExportedChatInvite + """ + + __slots__: List[str] = ["invite", "new_invite", "users"] + + ID = 0x222600ef + QUALNAME = "types.messages.ExportedChatInviteReplaced" + + def __init__(self, *, invite: "raw.base.ExportedChatInvite", new_invite: "raw.base.ExportedChatInvite", users: List["raw.base.User"]) -> None: + self.invite = invite # ExportedChatInvite + self.new_invite = new_invite # ExportedChatInvite + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedChatInviteReplaced": + # No flags + + invite = TLObject.read(b) + + new_invite = TLObject.read(b) + + users = TLObject.read(b) + + return ExportedChatInviteReplaced(invite=invite, new_invite=new_invite, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.invite.write()) + + b.write(self.new_invite.write()) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/exported_chat_invites.py b/pyrogram/raw/types/messages/exported_chat_invites.py new file mode 100644 index 00000000..c67f6716 --- /dev/null +++ b/pyrogram/raw/types/messages/exported_chat_invites.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ExportedChatInvites(TLObject): # type: ignore + """Info about chat invites exported by a certain admin. + + Constructor of :obj:`~pyrogram.raw.base.messages.ExportedChatInvites`. + + Details: + - Layer: ``224`` + - ID: ``BDC62DCC`` + + Parameters: + count (``int`` ``32-bit``): + Number of invites exported by the admin + + invites (List of :obj:`ExportedChatInvite `): + Exported invites + + users (List of :obj:`User `): + Info about the admin + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetExportedChatInvites + """ + + __slots__: List[str] = ["count", "invites", "users"] + + ID = 0xbdc62dcc + QUALNAME = "types.messages.ExportedChatInvites" + + def __init__(self, *, count: int, invites: List["raw.base.ExportedChatInvite"], users: List["raw.base.User"]) -> None: + self.count = count # int + self.invites = invites # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ExportedChatInvites": + # No flags + + count = Int.read(b) + + invites = TLObject.read(b) + + users = TLObject.read(b) + + return ExportedChatInvites(count=count, invites=invites, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.invites)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/faved_stickers.py b/pyrogram/raw/types/messages/faved_stickers.py new file mode 100644 index 00000000..445b3cd1 --- /dev/null +++ b/pyrogram/raw/types/messages/faved_stickers.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FavedStickers(TLObject): # type: ignore + """Favorited stickers + + Constructor of :obj:`~pyrogram.raw.base.messages.FavedStickers`. + + Details: + - Layer: ``224`` + - ID: ``2CB51097`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + packs (List of :obj:`StickerPack `): + Emojis associated to stickers + + stickers (List of :obj:`Document `): + Favorited stickers + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetFavedStickers + """ + + __slots__: List[str] = ["hash", "packs", "stickers"] + + ID = 0x2cb51097 + QUALNAME = "types.messages.FavedStickers" + + def __init__(self, *, hash: int, packs: List["raw.base.StickerPack"], stickers: List["raw.base.Document"]) -> None: + self.hash = hash # long + self.packs = packs # Vector + self.stickers = stickers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FavedStickers": + # No flags + + hash = Long.read(b) + + packs = TLObject.read(b) + + stickers = TLObject.read(b) + + return FavedStickers(hash=hash, packs=packs, stickers=stickers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.packs)) + + b.write(Vector(self.stickers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/faved_stickers_not_modified.py b/pyrogram/raw/types/messages/faved_stickers_not_modified.py new file mode 100644 index 00000000..bdcbd51e --- /dev/null +++ b/pyrogram/raw/types/messages/faved_stickers_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FavedStickersNotModified(TLObject): # type: ignore + """No new favorited stickers were found + + Constructor of :obj:`~pyrogram.raw.base.messages.FavedStickers`. + + Details: + - Layer: ``224`` + - ID: ``9E8FA6D3`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetFavedStickers + """ + + __slots__: List[str] = [] + + ID = 0x9e8fa6d3 + QUALNAME = "types.messages.FavedStickersNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FavedStickersNotModified": + # No flags + + return FavedStickersNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/featured_stickers.py b/pyrogram/raw/types/messages/featured_stickers.py new file mode 100644 index 00000000..d402508e --- /dev/null +++ b/pyrogram/raw/types/messages/featured_stickers.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FeaturedStickers(TLObject): # type: ignore + """Featured stickersets + + Constructor of :obj:`~pyrogram.raw.base.messages.FeaturedStickers`. + + Details: + - Layer: ``224`` + - ID: ``BE382906`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + count (``int`` ``32-bit``): + Total number of featured stickers + + sets (List of :obj:`StickerSetCovered `): + Featured stickersets + + unread (List of ``int`` ``64-bit``): + IDs of new featured stickersets + + premium (``bool``, *optional*): + Whether this is a premium stickerset + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetFeaturedStickers + messages.GetOldFeaturedStickers + messages.GetFeaturedEmojiStickers + """ + + __slots__: List[str] = ["hash", "count", "sets", "unread", "premium"] + + ID = 0xbe382906 + QUALNAME = "types.messages.FeaturedStickers" + + def __init__(self, *, hash: int, count: int, sets: List["raw.base.StickerSetCovered"], unread: List[int], premium: Optional[bool] = None) -> None: + self.hash = hash # long + self.count = count # int + self.sets = sets # Vector + self.unread = unread # Vector + self.premium = premium # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FeaturedStickers": + + flags = Int.read(b) + + premium = True if flags & (1 << 0) else False + hash = Long.read(b) + + count = Int.read(b) + + sets = TLObject.read(b) + + unread = TLObject.read(b, Long) + + return FeaturedStickers(hash=hash, count=count, sets=sets, unread=unread, premium=premium) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.premium else 0 + b.write(Int(flags)) + + b.write(Long(self.hash)) + + b.write(Int(self.count)) + + b.write(Vector(self.sets)) + + b.write(Vector(self.unread, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/featured_stickers_not_modified.py b/pyrogram/raw/types/messages/featured_stickers_not_modified.py new file mode 100644 index 00000000..823bb8da --- /dev/null +++ b/pyrogram/raw/types/messages/featured_stickers_not_modified.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FeaturedStickersNotModified(TLObject): # type: ignore + """Featured stickers haven't changed + + Constructor of :obj:`~pyrogram.raw.base.messages.FeaturedStickers`. + + Details: + - Layer: ``224`` + - ID: ``C6DC0C66`` + + Parameters: + count (``int`` ``32-bit``): + Total number of featured stickers + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetFeaturedStickers + messages.GetOldFeaturedStickers + messages.GetFeaturedEmojiStickers + """ + + __slots__: List[str] = ["count"] + + ID = 0xc6dc0c66 + QUALNAME = "types.messages.FeaturedStickersNotModified" + + def __init__(self, *, count: int) -> None: + self.count = count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FeaturedStickersNotModified": + # No flags + + count = Int.read(b) + + return FeaturedStickersNotModified(count=count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/forum_topics.py b/pyrogram/raw/types/messages/forum_topics.py new file mode 100644 index 00000000..3bc7c7df --- /dev/null +++ b/pyrogram/raw/types/messages/forum_topics.py @@ -0,0 +1,112 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ForumTopics(TLObject): # type: ignore + """Contains information about multiple forum topics + + Constructor of :obj:`~pyrogram.raw.base.messages.ForumTopics`. + + Details: + - Layer: ``224`` + - ID: ``367617D3`` + + Parameters: + count (``int`` ``32-bit``): + Total number of topics matching query; may be more than the topics contained in topics, in which case pagination is required. + + topics (List of :obj:`ForumTopic `): + Forum topics + + messages (List of :obj:`Message `): + Related messages (contains the messages mentioned by forumTopic.top_message). + + chats (List of :obj:`Chat `): + Related chats + + users (List of :obj:`User `): + Related users + + pts (``int`` ``32-bit``): + Event count after generation + + order_by_create_date (``bool``, *optional*): + Whether the returned topics are ordered by creation date; if set, pagination by offset_date should use forumTopic.date; otherwise topics are ordered by the last message date, so paginate by the date of the message referenced by forumTopic.top_message. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetForumTopics + messages.GetForumTopicsByID + """ + + __slots__: List[str] = ["count", "topics", "messages", "chats", "users", "pts", "order_by_create_date"] + + ID = 0x367617d3 + QUALNAME = "types.messages.ForumTopics" + + def __init__(self, *, count: int, topics: List["raw.base.ForumTopic"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"], pts: int, order_by_create_date: Optional[bool] = None) -> None: + self.count = count # int + self.topics = topics # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + self.pts = pts # int + self.order_by_create_date = order_by_create_date # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ForumTopics": + + flags = Int.read(b) + + order_by_create_date = True if flags & (1 << 0) else False + count = Int.read(b) + + topics = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + pts = Int.read(b) + + return ForumTopics(count=count, topics=topics, messages=messages, chats=chats, users=users, pts=pts, order_by_create_date=order_by_create_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.order_by_create_date else 0 + b.write(Int(flags)) + + b.write(Int(self.count)) + + b.write(Vector(self.topics)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + b.write(Int(self.pts)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/found_sticker_sets.py b/pyrogram/raw/types/messages/found_sticker_sets.py new file mode 100644 index 00000000..215930c1 --- /dev/null +++ b/pyrogram/raw/types/messages/found_sticker_sets.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FoundStickerSets(TLObject): # type: ignore + """Found stickersets + + Constructor of :obj:`~pyrogram.raw.base.messages.FoundStickerSets`. + + Details: + - Layer: ``224`` + - ID: ``8AF09DD2`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + sets (List of :obj:`StickerSetCovered `): + Found stickersets + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SearchStickerSets + messages.SearchEmojiStickerSets + """ + + __slots__: List[str] = ["hash", "sets"] + + ID = 0x8af09dd2 + QUALNAME = "types.messages.FoundStickerSets" + + def __init__(self, *, hash: int, sets: List["raw.base.StickerSetCovered"]) -> None: + self.hash = hash # long + self.sets = sets # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FoundStickerSets": + # No flags + + hash = Long.read(b) + + sets = TLObject.read(b) + + return FoundStickerSets(hash=hash, sets=sets) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.sets)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/found_sticker_sets_not_modified.py b/pyrogram/raw/types/messages/found_sticker_sets_not_modified.py new file mode 100644 index 00000000..1e523ade --- /dev/null +++ b/pyrogram/raw/types/messages/found_sticker_sets_not_modified.py @@ -0,0 +1,59 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FoundStickerSetsNotModified(TLObject): # type: ignore + """No further results were found + + Constructor of :obj:`~pyrogram.raw.base.messages.FoundStickerSets`. + + Details: + - Layer: ``224`` + - ID: ``D54B65D`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SearchStickerSets + messages.SearchEmojiStickerSets + """ + + __slots__: List[str] = [] + + ID = 0xd54b65d + QUALNAME = "types.messages.FoundStickerSetsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FoundStickerSetsNotModified": + # No flags + + return FoundStickerSetsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/found_stickers.py b/pyrogram/raw/types/messages/found_stickers.py new file mode 100644 index 00000000..f9cf26e0 --- /dev/null +++ b/pyrogram/raw/types/messages/found_stickers.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FoundStickers(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.FoundStickers`. + + Details: + - Layer: ``224`` + - ID: ``82C9E290`` + + Parameters: + hash (``int`` ``64-bit``): + N/A + + stickers (List of :obj:`Document `): + N/A + + next_offset (``int`` ``32-bit``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SearchStickers + """ + + __slots__: List[str] = ["hash", "stickers", "next_offset"] + + ID = 0x82c9e290 + QUALNAME = "types.messages.FoundStickers" + + def __init__(self, *, hash: int, stickers: List["raw.base.Document"], next_offset: Optional[int] = None) -> None: + self.hash = hash # long + self.stickers = stickers # Vector + self.next_offset = next_offset # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FoundStickers": + + flags = Int.read(b) + + next_offset = Int.read(b) if flags & (1 << 0) else None + hash = Long.read(b) + + stickers = TLObject.read(b) + + return FoundStickers(hash=hash, stickers=stickers, next_offset=next_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.next_offset is not None else 0 + b.write(Int(flags)) + + if self.next_offset is not None: + b.write(Int(self.next_offset)) + + b.write(Long(self.hash)) + + b.write(Vector(self.stickers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/found_stickers_not_modified.py b/pyrogram/raw/types/messages/found_stickers_not_modified.py new file mode 100644 index 00000000..7015724f --- /dev/null +++ b/pyrogram/raw/types/messages/found_stickers_not_modified.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class FoundStickersNotModified(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.FoundStickers`. + + Details: + - Layer: ``224`` + - ID: ``6010C534`` + + Parameters: + next_offset (``int`` ``32-bit``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SearchStickers + """ + + __slots__: List[str] = ["next_offset"] + + ID = 0x6010c534 + QUALNAME = "types.messages.FoundStickersNotModified" + + def __init__(self, *, next_offset: Optional[int] = None) -> None: + self.next_offset = next_offset # flags.0?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "FoundStickersNotModified": + + flags = Int.read(b) + + next_offset = Int.read(b) if flags & (1 << 0) else None + return FoundStickersNotModified(next_offset=next_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.next_offset is not None else 0 + b.write(Int(flags)) + + if self.next_offset is not None: + b.write(Int(self.next_offset)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/high_scores.py b/pyrogram/raw/types/messages/high_scores.py new file mode 100644 index 00000000..d963414b --- /dev/null +++ b/pyrogram/raw/types/messages/high_scores.py @@ -0,0 +1,72 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HighScores(TLObject): # type: ignore + """Highscores in a game + + Constructor of :obj:`~pyrogram.raw.base.messages.HighScores`. + + Details: + - Layer: ``224`` + - ID: ``9A3BFD99`` + + Parameters: + scores (List of :obj:`HighScore `): + Highscores + + users (List of :obj:`User `): + Users, associated to the highscores + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetGameHighScores + messages.GetInlineGameHighScores + """ + + __slots__: List[str] = ["scores", "users"] + + ID = 0x9a3bfd99 + QUALNAME = "types.messages.HighScores" + + def __init__(self, *, scores: List["raw.base.HighScore"], users: List["raw.base.User"]) -> None: + self.scores = scores # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HighScores": + # No flags + + scores = TLObject.read(b) + + users = TLObject.read(b) + + return HighScores(scores=scores, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.scores)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/history_import.py b/pyrogram/raw/types/messages/history_import.py new file mode 100644 index 00000000..a2dca836 --- /dev/null +++ b/pyrogram/raw/types/messages/history_import.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HistoryImport(TLObject): # type: ignore + """ID of a specific chat import session, click here for more info ». + + Constructor of :obj:`~pyrogram.raw.base.messages.HistoryImport`. + + Details: + - Layer: ``224`` + - ID: ``1662AF0B`` + + Parameters: + id (``int`` ``64-bit``): + History import ID + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.InitHistoryImport + """ + + __slots__: List[str] = ["id"] + + ID = 0x1662af0b + QUALNAME = "types.messages.HistoryImport" + + def __init__(self, *, id: int) -> None: + self.id = id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HistoryImport": + # No flags + + id = Long.read(b) + + return HistoryImport(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/history_import_parsed.py b/pyrogram/raw/types/messages/history_import_parsed.py new file mode 100644 index 00000000..0a06cbd6 --- /dev/null +++ b/pyrogram/raw/types/messages/history_import_parsed.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class HistoryImportParsed(TLObject): # type: ignore + """Contains information about a chat export file generated by a foreign chat app, click here for more info. +If neither the pm or group flags are set, the specified chat export was generated from a chat of unknown type. + + Constructor of :obj:`~pyrogram.raw.base.messages.HistoryImportParsed`. + + Details: + - Layer: ``224`` + - ID: ``5E0FB7B9`` + + Parameters: + pm (``bool``, *optional*): + The chat export file was generated from a private chat. + + group (``bool``, *optional*): + The chat export file was generated from a group chat. + + title (``str``, *optional*): + Title of the chat. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.CheckHistoryImport + """ + + __slots__: List[str] = ["pm", "group", "title"] + + ID = 0x5e0fb7b9 + QUALNAME = "types.messages.HistoryImportParsed" + + def __init__(self, *, pm: Optional[bool] = None, group: Optional[bool] = None, title: Optional[str] = None) -> None: + self.pm = pm # flags.0?true + self.group = group # flags.1?true + self.title = title # flags.2?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "HistoryImportParsed": + + flags = Int.read(b) + + pm = True if flags & (1 << 0) else False + group = True if flags & (1 << 1) else False + title = String.read(b) if flags & (1 << 2) else None + return HistoryImportParsed(pm=pm, group=group, title=title) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.pm else 0 + flags |= (1 << 1) if self.group else 0 + flags |= (1 << 2) if self.title is not None else 0 + b.write(Int(flags)) + + if self.title is not None: + b.write(String(self.title)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/inactive_chats.py b/pyrogram/raw/types/messages/inactive_chats.py new file mode 100644 index 00000000..e92c930e --- /dev/null +++ b/pyrogram/raw/types/messages/inactive_chats.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InactiveChats(TLObject): # type: ignore + """Inactive chat list + + Constructor of :obj:`~pyrogram.raw.base.messages.InactiveChats`. + + Details: + - Layer: ``224`` + - ID: ``A927FEC5`` + + Parameters: + dates (List of ``int`` ``32-bit``): + When was the chat last active + + chats (List of :obj:`Chat `): + Chat list + + users (List of :obj:`User `): + Users mentioned in the chat list + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + channels.GetInactiveChannels + """ + + __slots__: List[str] = ["dates", "chats", "users"] + + ID = 0xa927fec5 + QUALNAME = "types.messages.InactiveChats" + + def __init__(self, *, dates: List[int], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.dates = dates # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InactiveChats": + # No flags + + dates = TLObject.read(b, Int) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return InactiveChats(dates=dates, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.dates, Int)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/invited_users.py b/pyrogram/raw/types/messages/invited_users.py new file mode 100644 index 00000000..56ce3d0c --- /dev/null +++ b/pyrogram/raw/types/messages/invited_users.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class InvitedUsers(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.InvitedUsers`. + + Details: + - Layer: ``224`` + - ID: ``7F5DEFA6`` + + Parameters: + updates (:obj:`Updates `): + + + missing_invitees (List of :obj:`MissingInvitee `): + + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.AddChatUser + messages.CreateChat + channels.InviteToChannel + """ + + __slots__: List[str] = ["updates", "missing_invitees"] + + ID = 0x7f5defa6 + QUALNAME = "types.messages.InvitedUsers" + + def __init__(self, *, updates: "raw.base.Updates", missing_invitees: List["raw.base.MissingInvitee"]) -> None: + self.updates = updates # Updates + self.missing_invitees = missing_invitees # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "InvitedUsers": + # No flags + + updates = TLObject.read(b) + + missing_invitees = TLObject.read(b) + + return InvitedUsers(updates=updates, missing_invitees=missing_invitees) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.updates.write()) + + b.write(Vector(self.missing_invitees)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/message_edit_data.py b/pyrogram/raw/types/messages/message_edit_data.py new file mode 100644 index 00000000..f957f882 --- /dev/null +++ b/pyrogram/raw/types/messages/message_edit_data.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEditData(TLObject): # type: ignore + """Message edit data for media + + Constructor of :obj:`~pyrogram.raw.base.messages.MessageEditData`. + + Details: + - Layer: ``224`` + - ID: ``26B5DDE6`` + + Parameters: + caption (``bool``, *optional*): + Media caption, if the specified media's caption can be edited + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessageEditData + """ + + __slots__: List[str] = ["caption"] + + ID = 0x26b5dde6 + QUALNAME = "types.messages.MessageEditData" + + def __init__(self, *, caption: Optional[bool] = None) -> None: + self.caption = caption # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEditData": + + flags = Int.read(b) + + caption = True if flags & (1 << 0) else False + return MessageEditData(caption=caption) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.caption else 0 + b.write(Int(flags)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/message_empty.py b/pyrogram/raw/types/messages/message_empty.py new file mode 100644 index 00000000..18487637 --- /dev/null +++ b/pyrogram/raw/types/messages/message_empty.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageEmpty(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.MessageEmpty`. + + Details: + - Layer: ``224`` + - ID: ``3F4E0648`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x3f4e0648 + QUALNAME = "types.messages.MessageEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageEmpty": + # No flags + + return MessageEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/message_reactions_list.py b/pyrogram/raw/types/messages/message_reactions_list.py new file mode 100644 index 00000000..dc4ccbab --- /dev/null +++ b/pyrogram/raw/types/messages/message_reactions_list.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageReactionsList(TLObject): # type: ignore + """List of peers that reacted to a specific message + + Constructor of :obj:`~pyrogram.raw.base.messages.MessageReactionsList`. + + Details: + - Layer: ``224`` + - ID: ``31BD492D`` + + Parameters: + count (``int`` ``32-bit``): + Total number of reactions matching query + + reactions (List of :obj:`MessagePeerReaction `): + List of peers that reacted to a specific message + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + next_offset (``str``, *optional*): + If set, indicates the next offset to use to load more results by invoking messages.getMessageReactionsList. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessageReactionsList + """ + + __slots__: List[str] = ["count", "reactions", "chats", "users", "next_offset"] + + ID = 0x31bd492d + QUALNAME = "types.messages.MessageReactionsList" + + def __init__(self, *, count: int, reactions: List["raw.base.MessagePeerReaction"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None: + self.count = count # int + self.reactions = reactions # Vector + self.chats = chats # Vector + self.users = users # Vector + self.next_offset = next_offset # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageReactionsList": + + flags = Int.read(b) + + count = Int.read(b) + + reactions = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + next_offset = String.read(b) if flags & (1 << 0) else None + return MessageReactionsList(count=count, reactions=reactions, chats=chats, users=users, next_offset=next_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.next_offset is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.count)) + + b.write(Vector(self.reactions)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + if self.next_offset is not None: + b.write(String(self.next_offset)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/message_views.py b/pyrogram/raw/types/messages/message_views.py new file mode 100644 index 00000000..16ff6f46 --- /dev/null +++ b/pyrogram/raw/types/messages/message_views.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessageViews(TLObject): # type: ignore + """View, forward counter + info about replies + + Constructor of :obj:`~pyrogram.raw.base.messages.MessageViews`. + + Details: + - Layer: ``224`` + - ID: ``B6C4F543`` + + Parameters: + views (List of :obj:`MessageViews `): + View, forward counter + info about replies + + chats (List of :obj:`Chat `): + Chats mentioned in constructor + + users (List of :obj:`User `): + Users mentioned in constructor + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessagesViews + """ + + __slots__: List[str] = ["views", "chats", "users"] + + ID = 0xb6c4f543 + QUALNAME = "types.messages.MessageViews" + + def __init__(self, *, views: List["raw.base.MessageViews"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.views = views # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessageViews": + # No flags + + views = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return MessageViews(views=views, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.views)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/messages.py b/pyrogram/raw/types/messages/messages.py new file mode 100644 index 00000000..47684e20 --- /dev/null +++ b/pyrogram/raw/types/messages/messages.py @@ -0,0 +1,101 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Messages(TLObject): # type: ignore + """Full list of messages with auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.messages.Messages`. + + Details: + - Layer: ``224`` + - ID: ``1D73E7EA`` + + Parameters: + messages (List of :obj:`Message `): + List of messages + + topics (List of :obj:`ForumTopic `): + N/A + + chats (List of :obj:`Chat `): + List of chats mentioned in dialogs + + users (List of :obj:`User `): + List of users mentioned in messages and chats + + Functions: + This object can be returned by 15 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessages + messages.GetHistory + messages.Search + messages.SearchGlobal + messages.GetUnreadMentions + messages.GetRecentLocations + messages.GetScheduledHistory + messages.GetScheduledMessages + messages.GetReplies + messages.GetUnreadReactions + messages.SearchSentMedia + messages.GetSavedHistory + messages.GetQuickReplyMessages + channels.GetMessages + channels.SearchPosts + """ + + __slots__: List[str] = ["messages", "topics", "chats", "users"] + + ID = 0x1d73e7ea + QUALNAME = "types.messages.Messages" + + def __init__(self, *, messages: List["raw.base.Message"], topics: List["raw.base.ForumTopic"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.messages = messages # Vector + self.topics = topics # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Messages": + # No flags + + messages = TLObject.read(b) + + topics = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return Messages(messages=messages, topics=topics, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.messages)) + + b.write(Vector(self.topics)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/messages_not_modified.py b/pyrogram/raw/types/messages/messages_not_modified.py new file mode 100644 index 00000000..7787c119 --- /dev/null +++ b/pyrogram/raw/types/messages/messages_not_modified.py @@ -0,0 +1,77 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessagesNotModified(TLObject): # type: ignore + """No new messages matching the query were found + + Constructor of :obj:`~pyrogram.raw.base.messages.Messages`. + + Details: + - Layer: ``224`` + - ID: ``74535F21`` + + Parameters: + count (``int`` ``32-bit``): + Number of results found server-side by the given query + + Functions: + This object can be returned by 15 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessages + messages.GetHistory + messages.Search + messages.SearchGlobal + messages.GetUnreadMentions + messages.GetRecentLocations + messages.GetScheduledHistory + messages.GetScheduledMessages + messages.GetReplies + messages.GetUnreadReactions + messages.SearchSentMedia + messages.GetSavedHistory + messages.GetQuickReplyMessages + channels.GetMessages + channels.SearchPosts + """ + + __slots__: List[str] = ["count"] + + ID = 0x74535f21 + QUALNAME = "types.messages.MessagesNotModified" + + def __init__(self, *, count: int) -> None: + self.count = count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessagesNotModified": + # No flags + + count = Int.read(b) + + return MessagesNotModified(count=count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/messages_slice.py b/pyrogram/raw/types/messages/messages_slice.py new file mode 100644 index 00000000..1f9ed3f9 --- /dev/null +++ b/pyrogram/raw/types/messages/messages_slice.py @@ -0,0 +1,145 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MessagesSlice(TLObject): # type: ignore + """Incomplete list of messages and auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.messages.Messages`. + + Details: + - Layer: ``224`` + - ID: ``5F206716`` + + Parameters: + count (``int`` ``32-bit``): + Total number of messages in the list + + messages (List of :obj:`Message `): + List of messages + + topics (List of :obj:`ForumTopic `): + N/A + + chats (List of :obj:`Chat `): + List of chats mentioned in messages + + users (List of :obj:`User `): + List of users mentioned in messages and chats + + inexact (``bool``, *optional*): + If set, indicates that the results may be inexact + + next_rate (``int`` ``32-bit``, *optional*): + Rate to use in the offset_rate parameter in the next call to messages.searchGlobal + + offset_id_offset (``int`` ``32-bit``, *optional*): + Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if the result was fetched using offset_id, and we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}. + + search_flood (:obj:`SearchPostsFlood `, *optional*): + N/A + + Functions: + This object can be returned by 15 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMessages + messages.GetHistory + messages.Search + messages.SearchGlobal + messages.GetUnreadMentions + messages.GetRecentLocations + messages.GetScheduledHistory + messages.GetScheduledMessages + messages.GetReplies + messages.GetUnreadReactions + messages.SearchSentMedia + messages.GetSavedHistory + messages.GetQuickReplyMessages + channels.GetMessages + channels.SearchPosts + """ + + __slots__: List[str] = ["count", "messages", "topics", "chats", "users", "inexact", "next_rate", "offset_id_offset", "search_flood"] + + ID = 0x5f206716 + QUALNAME = "types.messages.MessagesSlice" + + def __init__(self, *, count: int, messages: List["raw.base.Message"], topics: List["raw.base.ForumTopic"], chats: List["raw.base.Chat"], users: List["raw.base.User"], inexact: Optional[bool] = None, next_rate: Optional[int] = None, offset_id_offset: Optional[int] = None, search_flood: "raw.base.SearchPostsFlood" = None) -> None: + self.count = count # int + self.messages = messages # Vector + self.topics = topics # Vector + self.chats = chats # Vector + self.users = users # Vector + self.inexact = inexact # flags.1?true + self.next_rate = next_rate # flags.0?int + self.offset_id_offset = offset_id_offset # flags.2?int + self.search_flood = search_flood # flags.3?SearchPostsFlood + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MessagesSlice": + + flags = Int.read(b) + + inexact = True if flags & (1 << 1) else False + count = Int.read(b) + + next_rate = Int.read(b) if flags & (1 << 0) else None + offset_id_offset = Int.read(b) if flags & (1 << 2) else None + search_flood = TLObject.read(b) if flags & (1 << 3) else None + + messages = TLObject.read(b) + + topics = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return MessagesSlice(count=count, messages=messages, topics=topics, chats=chats, users=users, inexact=inexact, next_rate=next_rate, offset_id_offset=offset_id_offset, search_flood=search_flood) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.inexact else 0 + flags |= (1 << 0) if self.next_rate is not None else 0 + flags |= (1 << 2) if self.offset_id_offset is not None else 0 + flags |= (1 << 3) if self.search_flood is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.count)) + + if self.next_rate is not None: + b.write(Int(self.next_rate)) + + if self.offset_id_offset is not None: + b.write(Int(self.offset_id_offset)) + + if self.search_flood is not None: + b.write(self.search_flood.write()) + + b.write(Vector(self.messages)) + + b.write(Vector(self.topics)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/my_stickers.py b/pyrogram/raw/types/messages/my_stickers.py new file mode 100644 index 00000000..3ef00a70 --- /dev/null +++ b/pyrogram/raw/types/messages/my_stickers.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MyStickers(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.MyStickers`. + + Details: + - Layer: ``224`` + - ID: ``FAFF629D`` + + Parameters: + count (``int`` ``32-bit``): + + + sets (List of :obj:`StickerSetCovered `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetMyStickers + """ + + __slots__: List[str] = ["count", "sets"] + + ID = 0xfaff629d + QUALNAME = "types.messages.MyStickers" + + def __init__(self, *, count: int, sets: List["raw.base.StickerSetCovered"]) -> None: + self.count = count # int + self.sets = sets # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MyStickers": + # No flags + + count = Int.read(b) + + sets = TLObject.read(b) + + return MyStickers(count=count, sets=sets) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.sets)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/peer_dialogs.py b/pyrogram/raw/types/messages/peer_dialogs.py new file mode 100644 index 00000000..c7a7247d --- /dev/null +++ b/pyrogram/raw/types/messages/peer_dialogs.py @@ -0,0 +1,96 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerDialogs(TLObject): # type: ignore + """Dialog info of multiple peers + + Constructor of :obj:`~pyrogram.raw.base.messages.PeerDialogs`. + + Details: + - Layer: ``224`` + - ID: ``3371C354`` + + Parameters: + dialogs (List of :obj:`Dialog `): + Dialog info + + messages (List of :obj:`Message `): + Messages mentioned in dialog info + + chats (List of :obj:`Chat `): + Chats + + users (List of :obj:`User `): + Users + + state (:obj:`updates.State `): + Current update state of dialog + + Functions: + This object can be returned by 2 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetPeerDialogs + messages.GetPinnedDialogs + """ + + __slots__: List[str] = ["dialogs", "messages", "chats", "users", "state"] + + ID = 0x3371c354 + QUALNAME = "types.messages.PeerDialogs" + + def __init__(self, *, dialogs: List["raw.base.Dialog"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"], state: "raw.base.updates.State") -> None: + self.dialogs = dialogs # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + self.state = state # updates.State + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerDialogs": + # No flags + + dialogs = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + state = TLObject.read(b) + + return PeerDialogs(dialogs=dialogs, messages=messages, chats=chats, users=users, state=state) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.dialogs)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + b.write(self.state.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/peer_settings.py b/pyrogram/raw/types/messages/peer_settings.py new file mode 100644 index 00000000..b6acae34 --- /dev/null +++ b/pyrogram/raw/types/messages/peer_settings.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PeerSettings(TLObject): # type: ignore + """Peer settings + + Constructor of :obj:`~pyrogram.raw.base.messages.PeerSettings`. + + Details: + - Layer: ``224`` + - ID: ``6880B94D`` + + Parameters: + settings (:obj:`PeerSettings `): + Peer settings + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetPeerSettings + """ + + __slots__: List[str] = ["settings", "chats", "users"] + + ID = 0x6880b94d + QUALNAME = "types.messages.PeerSettings" + + def __init__(self, *, settings: "raw.base.PeerSettings", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.settings = settings # PeerSettings + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PeerSettings": + # No flags + + settings = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return PeerSettings(settings=settings, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.settings.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/prepared_inline_message.py b/pyrogram/raw/types/messages/prepared_inline_message.py new file mode 100644 index 00000000..812699c3 --- /dev/null +++ b/pyrogram/raw/types/messages/prepared_inline_message.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PreparedInlineMessage(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.PreparedInlineMessage`. + + Details: + - Layer: ``224`` + - ID: ``FF57708D`` + + Parameters: + query_id (``int`` ``64-bit``): + N/A + + result (:obj:`BotInlineResult `): + N/A + + peer_types (List of :obj:`InlineQueryPeerType `): + N/A + + cache_time (``int`` ``32-bit``): + N/A + + users (List of :obj:`User `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetPreparedInlineMessage + """ + + __slots__: List[str] = ["query_id", "result", "peer_types", "cache_time", "users"] + + ID = 0xff57708d + QUALNAME = "types.messages.PreparedInlineMessage" + + def __init__(self, *, query_id: int, result: "raw.base.BotInlineResult", peer_types: List["raw.base.InlineQueryPeerType"], cache_time: int, users: List["raw.base.User"]) -> None: + self.query_id = query_id # long + self.result = result # BotInlineResult + self.peer_types = peer_types # Vector + self.cache_time = cache_time # int + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PreparedInlineMessage": + # No flags + + query_id = Long.read(b) + + result = TLObject.read(b) + + peer_types = TLObject.read(b) + + cache_time = Int.read(b) + + users = TLObject.read(b) + + return PreparedInlineMessage(query_id=query_id, result=result, peer_types=peer_types, cache_time=cache_time, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.query_id)) + + b.write(self.result.write()) + + b.write(Vector(self.peer_types)) + + b.write(Int(self.cache_time)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/quick_replies.py b/pyrogram/raw/types/messages/quick_replies.py new file mode 100644 index 00000000..d8e8b5ff --- /dev/null +++ b/pyrogram/raw/types/messages/quick_replies.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class QuickReplies(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.QuickReplies`. + + Details: + - Layer: ``224`` + - ID: ``C68D6695`` + + Parameters: + quick_replies (List of :obj:`QuickReply `): + + + messages (List of :obj:`Message `): + + + chats (List of :obj:`Chat `): + + + users (List of :obj:`User `): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetQuickReplies + """ + + __slots__: List[str] = ["quick_replies", "messages", "chats", "users"] + + ID = 0xc68d6695 + QUALNAME = "types.messages.QuickReplies" + + def __init__(self, *, quick_replies: List["raw.base.QuickReply"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.quick_replies = quick_replies # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "QuickReplies": + # No flags + + quick_replies = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return QuickReplies(quick_replies=quick_replies, messages=messages, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.quick_replies)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/quick_replies_not_modified.py b/pyrogram/raw/types/messages/quick_replies_not_modified.py new file mode 100644 index 00000000..b652e579 --- /dev/null +++ b/pyrogram/raw/types/messages/quick_replies_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class QuickRepliesNotModified(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.QuickReplies`. + + Details: + - Layer: ``224`` + - ID: ``5F91EB5B`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetQuickReplies + """ + + __slots__: List[str] = [] + + ID = 0x5f91eb5b + QUALNAME = "types.messages.QuickRepliesNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "QuickRepliesNotModified": + # No flags + + return QuickRepliesNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/reactions.py b/pyrogram/raw/types/messages/reactions.py new file mode 100644 index 00000000..c302e873 --- /dev/null +++ b/pyrogram/raw/types/messages/reactions.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Reactions(TLObject): # type: ignore + """List of message reactions + + Constructor of :obj:`~pyrogram.raw.base.messages.Reactions`. + + Details: + - Layer: ``224`` + - ID: ``EAFDF716`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + reactions (List of :obj:`Reaction `): + Reactions + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetTopReactions + messages.GetRecentReactions + messages.GetDefaultTagReactions + """ + + __slots__: List[str] = ["hash", "reactions"] + + ID = 0xeafdf716 + QUALNAME = "types.messages.Reactions" + + def __init__(self, *, hash: int, reactions: List["raw.base.Reaction"]) -> None: + self.hash = hash # long + self.reactions = reactions # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Reactions": + # No flags + + hash = Long.read(b) + + reactions = TLObject.read(b) + + return Reactions(hash=hash, reactions=reactions) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.reactions)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/reactions_not_modified.py b/pyrogram/raw/types/messages/reactions_not_modified.py new file mode 100644 index 00000000..e9bc2f19 --- /dev/null +++ b/pyrogram/raw/types/messages/reactions_not_modified.py @@ -0,0 +1,60 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class ReactionsNotModified(TLObject): # type: ignore + """The server-side list of message reactions hasn't changed + + Constructor of :obj:`~pyrogram.raw.base.messages.Reactions`. + + Details: + - Layer: ``224`` + - ID: ``B06FDBDF`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetTopReactions + messages.GetRecentReactions + messages.GetDefaultTagReactions + """ + + __slots__: List[str] = [] + + ID = 0xb06fdbdf + QUALNAME = "types.messages.ReactionsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "ReactionsNotModified": + # No flags + + return ReactionsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/recent_stickers.py b/pyrogram/raw/types/messages/recent_stickers.py new file mode 100644 index 00000000..22d436ad --- /dev/null +++ b/pyrogram/raw/types/messages/recent_stickers.py @@ -0,0 +1,87 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RecentStickers(TLObject): # type: ignore + """Recently used stickers + + Constructor of :obj:`~pyrogram.raw.base.messages.RecentStickers`. + + Details: + - Layer: ``224`` + - ID: ``88D37C56`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + packs (List of :obj:`StickerPack `): + Emojis associated to stickers + + stickers (List of :obj:`Document `): + Recent stickers + + dates (List of ``int`` ``32-bit``): + When was each sticker last used + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetRecentStickers + """ + + __slots__: List[str] = ["hash", "packs", "stickers", "dates"] + + ID = 0x88d37c56 + QUALNAME = "types.messages.RecentStickers" + + def __init__(self, *, hash: int, packs: List["raw.base.StickerPack"], stickers: List["raw.base.Document"], dates: List[int]) -> None: + self.hash = hash # long + self.packs = packs # Vector + self.stickers = stickers # Vector + self.dates = dates # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RecentStickers": + # No flags + + hash = Long.read(b) + + packs = TLObject.read(b) + + stickers = TLObject.read(b) + + dates = TLObject.read(b, Int) + + return RecentStickers(hash=hash, packs=packs, stickers=stickers, dates=dates) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.packs)) + + b.write(Vector(self.stickers)) + + b.write(Vector(self.dates, Int)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/recent_stickers_not_modified.py b/pyrogram/raw/types/messages/recent_stickers_not_modified.py new file mode 100644 index 00000000..074f80bd --- /dev/null +++ b/pyrogram/raw/types/messages/recent_stickers_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class RecentStickersNotModified(TLObject): # type: ignore + """No new recent sticker was found + + Constructor of :obj:`~pyrogram.raw.base.messages.RecentStickers`. + + Details: + - Layer: ``224`` + - ID: ``B17F890`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetRecentStickers + """ + + __slots__: List[str] = [] + + ID = 0xb17f890 + QUALNAME = "types.messages.RecentStickersNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "RecentStickersNotModified": + # No flags + + return RecentStickersNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_dialogs.py b/pyrogram/raw/types/messages/saved_dialogs.py new file mode 100644 index 00000000..9c977cb5 --- /dev/null +++ b/pyrogram/raw/types/messages/saved_dialogs.py @@ -0,0 +1,89 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedDialogs(TLObject): # type: ignore + """Represents some saved message dialogs ». + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedDialogs`. + + Details: + - Layer: ``224`` + - ID: ``F83AE221`` + + Parameters: + dialogs (List of :obj:`SavedDialog `): + Saved message dialogs ». + + messages (List of :obj:`Message `): + List of last messages from each saved dialog + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedDialogs + messages.GetPinnedSavedDialogs + messages.GetSavedDialogsByID + """ + + __slots__: List[str] = ["dialogs", "messages", "chats", "users"] + + ID = 0xf83ae221 + QUALNAME = "types.messages.SavedDialogs" + + def __init__(self, *, dialogs: List["raw.base.SavedDialog"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.dialogs = dialogs # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedDialogs": + # No flags + + dialogs = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return SavedDialogs(dialogs=dialogs, messages=messages, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.dialogs)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_dialogs_not_modified.py b/pyrogram/raw/types/messages/saved_dialogs_not_modified.py new file mode 100644 index 00000000..45d18f9c --- /dev/null +++ b/pyrogram/raw/types/messages/saved_dialogs_not_modified.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedDialogsNotModified(TLObject): # type: ignore + """The saved dialogs haven't changed + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedDialogs`. + + Details: + - Layer: ``224`` + - ID: ``C01F6FE8`` + + Parameters: + count (``int`` ``32-bit``): + Number of saved dialogs found server-side by the query + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedDialogs + messages.GetPinnedSavedDialogs + messages.GetSavedDialogsByID + """ + + __slots__: List[str] = ["count"] + + ID = 0xc01f6fe8 + QUALNAME = "types.messages.SavedDialogsNotModified" + + def __init__(self, *, count: int) -> None: + self.count = count # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedDialogsNotModified": + # No flags + + count = Int.read(b) + + return SavedDialogsNotModified(count=count) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_dialogs_slice.py b/pyrogram/raw/types/messages/saved_dialogs_slice.py new file mode 100644 index 00000000..7014913b --- /dev/null +++ b/pyrogram/raw/types/messages/saved_dialogs_slice.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedDialogsSlice(TLObject): # type: ignore + """Incomplete list of saved message dialogs » with messages and auxiliary data. + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedDialogs`. + + Details: + - Layer: ``224`` + - ID: ``44BA9DD9`` + + Parameters: + count (``int`` ``32-bit``): + Total number of saved message dialogs + + dialogs (List of :obj:`SavedDialog `): + List of saved message dialogs + + messages (List of :obj:`Message `): + List of last messages from dialogs + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedDialogs + messages.GetPinnedSavedDialogs + messages.GetSavedDialogsByID + """ + + __slots__: List[str] = ["count", "dialogs", "messages", "chats", "users"] + + ID = 0x44ba9dd9 + QUALNAME = "types.messages.SavedDialogsSlice" + + def __init__(self, *, count: int, dialogs: List["raw.base.SavedDialog"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.count = count # int + self.dialogs = dialogs # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedDialogsSlice": + # No flags + + count = Int.read(b) + + dialogs = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return SavedDialogsSlice(count=count, dialogs=dialogs, messages=messages, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.dialogs)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_gifs.py b/pyrogram/raw/types/messages/saved_gifs.py new file mode 100644 index 00000000..51d87613 --- /dev/null +++ b/pyrogram/raw/types/messages/saved_gifs.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedGifs(TLObject): # type: ignore + """Saved gifs + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedGifs`. + + Details: + - Layer: ``224`` + - ID: ``84A02A0D`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + gifs (List of :obj:`Document `): + List of saved gifs + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedGifs + """ + + __slots__: List[str] = ["hash", "gifs"] + + ID = 0x84a02a0d + QUALNAME = "types.messages.SavedGifs" + + def __init__(self, *, hash: int, gifs: List["raw.base.Document"]) -> None: + self.hash = hash # long + self.gifs = gifs # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedGifs": + # No flags + + hash = Long.read(b) + + gifs = TLObject.read(b) + + return SavedGifs(hash=hash, gifs=gifs) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.gifs)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_gifs_not_modified.py b/pyrogram/raw/types/messages/saved_gifs_not_modified.py new file mode 100644 index 00000000..4b783154 --- /dev/null +++ b/pyrogram/raw/types/messages/saved_gifs_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedGifsNotModified(TLObject): # type: ignore + """No new saved gifs were found + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedGifs`. + + Details: + - Layer: ``224`` + - ID: ``E8025CA2`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedGifs + """ + + __slots__: List[str] = [] + + ID = 0xe8025ca2 + QUALNAME = "types.messages.SavedGifsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedGifsNotModified": + # No flags + + return SavedGifsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_reaction_tags.py b/pyrogram/raw/types/messages/saved_reaction_tags.py new file mode 100644 index 00000000..c32610ba --- /dev/null +++ b/pyrogram/raw/types/messages/saved_reaction_tags.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedReactionTags(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedReactionTags`. + + Details: + - Layer: ``224`` + - ID: ``3259950A`` + + Parameters: + tags (List of :obj:`SavedReactionTag `): + + + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedReactionTags + """ + + __slots__: List[str] = ["tags", "hash"] + + ID = 0x3259950a + QUALNAME = "types.messages.SavedReactionTags" + + def __init__(self, *, tags: List["raw.base.SavedReactionTag"], hash: int) -> None: + self.tags = tags # Vector + self.hash = hash # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedReactionTags": + # No flags + + tags = TLObject.read(b) + + hash = Long.read(b) + + return SavedReactionTags(tags=tags, hash=hash) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.tags)) + + b.write(Long(self.hash)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/saved_reaction_tags_not_modified.py b/pyrogram/raw/types/messages/saved_reaction_tags_not_modified.py new file mode 100644 index 00000000..38d12fc6 --- /dev/null +++ b/pyrogram/raw/types/messages/saved_reaction_tags_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SavedReactionTagsNotModified(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.messages.SavedReactionTags`. + + Details: + - Layer: ``224`` + - ID: ``889B59EF`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSavedReactionTags + """ + + __slots__: List[str] = [] + + ID = 0x889b59ef + QUALNAME = "types.messages.SavedReactionTagsNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SavedReactionTagsNotModified": + # No flags + + return SavedReactionTagsNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/search_counter.py b/pyrogram/raw/types/messages/search_counter.py new file mode 100644 index 00000000..768e4c87 --- /dev/null +++ b/pyrogram/raw/types/messages/search_counter.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchCounter(TLObject): # type: ignore + """Indicates how many results would be found by a messages.search call with the same parameters + + Constructor of :obj:`~pyrogram.raw.base.messages.SearchCounter`. + + Details: + - Layer: ``224`` + - ID: ``E844EBFF`` + + Parameters: + filter (:obj:`MessagesFilter `): + Provided message filter + + count (``int`` ``32-bit``): + Number of results that were found server-side + + inexact (``bool``, *optional*): + If set, the results may be inexact + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSearchCounters + """ + + __slots__: List[str] = ["filter", "count", "inexact"] + + ID = 0xe844ebff + QUALNAME = "types.messages.SearchCounter" + + def __init__(self, *, filter: "raw.base.MessagesFilter", count: int, inexact: Optional[bool] = None) -> None: + self.filter = filter # MessagesFilter + self.count = count # int + self.inexact = inexact # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchCounter": + + flags = Int.read(b) + + inexact = True if flags & (1 << 1) else False + filter = TLObject.read(b) + + count = Int.read(b) + + return SearchCounter(filter=filter, count=count, inexact=inexact) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 1) if self.inexact else 0 + b.write(Int(flags)) + + b.write(self.filter.write()) + + b.write(Int(self.count)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/search_results_calendar.py b/pyrogram/raw/types/messages/search_results_calendar.py new file mode 100644 index 00000000..1b6b5810 --- /dev/null +++ b/pyrogram/raw/types/messages/search_results_calendar.py @@ -0,0 +1,128 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchResultsCalendar(TLObject): # type: ignore + """Information about found messages sent on a specific day + + Constructor of :obj:`~pyrogram.raw.base.messages.SearchResultsCalendar`. + + Details: + - Layer: ``224`` + - ID: ``147EE23C`` + + Parameters: + count (``int`` ``32-bit``): + Total number of results matching query + + min_date (``int`` ``32-bit``): + Starting timestamp of attached messages + + min_msg_id (``int`` ``32-bit``): + Ending timestamp of attached messages + + periods (List of :obj:`SearchResultsCalendarPeriod `): + Used to split the messages by days: multiple SearchResultsCalendarPeriod constructors are returned, each containing information about the first, last and total number of messages matching the filter that were sent on a specific day. This information can be easily used to split the returned messages by day. + + messages (List of :obj:`Message `): + Messages + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Mentioned users + + inexact (``bool``, *optional*): + If set, indicates that the results may be inexact + + offset_id_offset (``int`` ``32-bit``, *optional*): + Indicates the absolute position of messages[0] within the total result set with count count. This is useful, for example, if we need to display a progress/total counter (like photo 134 of 200, for all media in a chat, we could simply use photo ${offset_id_offset} of ${count}. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSearchResultsCalendar + """ + + __slots__: List[str] = ["count", "min_date", "min_msg_id", "periods", "messages", "chats", "users", "inexact", "offset_id_offset"] + + ID = 0x147ee23c + QUALNAME = "types.messages.SearchResultsCalendar" + + def __init__(self, *, count: int, min_date: int, min_msg_id: int, periods: List["raw.base.SearchResultsCalendarPeriod"], messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"], inexact: Optional[bool] = None, offset_id_offset: Optional[int] = None) -> None: + self.count = count # int + self.min_date = min_date # int + self.min_msg_id = min_msg_id # int + self.periods = periods # Vector + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + self.inexact = inexact # flags.0?true + self.offset_id_offset = offset_id_offset # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchResultsCalendar": + + flags = Int.read(b) + + inexact = True if flags & (1 << 0) else False + count = Int.read(b) + + min_date = Int.read(b) + + min_msg_id = Int.read(b) + + offset_id_offset = Int.read(b) if flags & (1 << 1) else None + periods = TLObject.read(b) + + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return SearchResultsCalendar(count=count, min_date=min_date, min_msg_id=min_msg_id, periods=periods, messages=messages, chats=chats, users=users, inexact=inexact, offset_id_offset=offset_id_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.inexact else 0 + flags |= (1 << 1) if self.offset_id_offset is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.count)) + + b.write(Int(self.min_date)) + + b.write(Int(self.min_msg_id)) + + if self.offset_id_offset is not None: + b.write(Int(self.offset_id_offset)) + + b.write(Vector(self.periods)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/search_results_positions.py b/pyrogram/raw/types/messages/search_results_positions.py new file mode 100644 index 00000000..1422df53 --- /dev/null +++ b/pyrogram/raw/types/messages/search_results_positions.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SearchResultsPositions(TLObject): # type: ignore + """Information about sparse positions of messages + + Constructor of :obj:`~pyrogram.raw.base.messages.SearchResultsPositions`. + + Details: + - Layer: ``224`` + - ID: ``53B22BAF`` + + Parameters: + count (``int`` ``32-bit``): + Total number of found messages + + positions (List of :obj:`SearchResultsPosition `): + List of message positions + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSearchResultsPositions + """ + + __slots__: List[str] = ["count", "positions"] + + ID = 0x53b22baf + QUALNAME = "types.messages.SearchResultsPositions" + + def __init__(self, *, count: int, positions: List["raw.base.SearchResultsPosition"]) -> None: + self.count = count # int + self.positions = positions # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SearchResultsPositions": + # No flags + + count = Int.read(b) + + positions = TLObject.read(b) + + return SearchResultsPositions(count=count, positions=positions) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.count)) + + b.write(Vector(self.positions)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sent_encrypted_file.py b/pyrogram/raw/types/messages/sent_encrypted_file.py new file mode 100644 index 00000000..d63af699 --- /dev/null +++ b/pyrogram/raw/types/messages/sent_encrypted_file.py @@ -0,0 +1,73 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentEncryptedFile(TLObject): # type: ignore + """Message with a file enclosure sent to a protected chat + + Constructor of :obj:`~pyrogram.raw.base.messages.SentEncryptedMessage`. + + Details: + - Layer: ``224`` + - ID: ``9493FF32`` + + Parameters: + date (``int`` ``32-bit``): + Sending date + + file (:obj:`EncryptedFile `): + Attached file + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SendEncrypted + messages.SendEncryptedFile + messages.SendEncryptedService + """ + + __slots__: List[str] = ["date", "file"] + + ID = 0x9493ff32 + QUALNAME = "types.messages.SentEncryptedFile" + + def __init__(self, *, date: int, file: "raw.base.EncryptedFile") -> None: + self.date = date # int + self.file = file # EncryptedFile + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentEncryptedFile": + # No flags + + date = Int.read(b) + + file = TLObject.read(b) + + return SentEncryptedFile(date=date, file=file) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.date)) + + b.write(self.file.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sent_encrypted_message.py b/pyrogram/raw/types/messages/sent_encrypted_message.py new file mode 100644 index 00000000..320626c0 --- /dev/null +++ b/pyrogram/raw/types/messages/sent_encrypted_message.py @@ -0,0 +1,65 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SentEncryptedMessage(TLObject): # type: ignore + """Message without file attachments sent to an encrypted file. + + Constructor of :obj:`~pyrogram.raw.base.messages.SentEncryptedMessage`. + + Details: + - Layer: ``224`` + - ID: ``560F8935`` + + Parameters: + date (``int`` ``32-bit``): + Date of sending + + Functions: + This object can be returned by 3 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.SendEncrypted + messages.SendEncryptedFile + messages.SendEncryptedService + """ + + __slots__: List[str] = ["date"] + + ID = 0x560f8935 + QUALNAME = "types.messages.SentEncryptedMessage" + + def __init__(self, *, date: int) -> None: + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SentEncryptedMessage": + # No flags + + date = Int.read(b) + + return SentEncryptedMessage(date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sponsored_messages.py b/pyrogram/raw/types/messages/sponsored_messages.py new file mode 100644 index 00000000..e96a0298 --- /dev/null +++ b/pyrogram/raw/types/messages/sponsored_messages.py @@ -0,0 +1,108 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredMessages(TLObject): # type: ignore + """A set of sponsored messages associated to a channel + + Constructor of :obj:`~pyrogram.raw.base.messages.SponsoredMessages`. + + Details: + - Layer: ``224`` + - ID: ``FFDA656D`` + + Parameters: + messages (List of :obj:`SponsoredMessage `): + Sponsored messages + + chats (List of :obj:`Chat `): + Chats mentioned in the sponsored messages + + users (List of :obj:`User `): + Users mentioned in the sponsored messages + + posts_between (``int`` ``32-bit``, *optional*): + If set, specifies the minimum number of messages between shown sponsored messages; otherwise, only one sponsored message must be shown after all ordinary messages. + + start_delay (``int`` ``32-bit``, *optional*): + N/A + + between_delay (``int`` ``32-bit``, *optional*): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSponsoredMessages + """ + + __slots__: List[str] = ["messages", "chats", "users", "posts_between", "start_delay", "between_delay"] + + ID = 0xffda656d + QUALNAME = "types.messages.SponsoredMessages" + + def __init__(self, *, messages: List["raw.base.SponsoredMessage"], chats: List["raw.base.Chat"], users: List["raw.base.User"], posts_between: Optional[int] = None, start_delay: Optional[int] = None, between_delay: Optional[int] = None) -> None: + self.messages = messages # Vector + self.chats = chats # Vector + self.users = users # Vector + self.posts_between = posts_between # flags.0?int + self.start_delay = start_delay # flags.1?int + self.between_delay = between_delay # flags.2?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredMessages": + + flags = Int.read(b) + + posts_between = Int.read(b) if flags & (1 << 0) else None + start_delay = Int.read(b) if flags & (1 << 1) else None + between_delay = Int.read(b) if flags & (1 << 2) else None + messages = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return SponsoredMessages(messages=messages, chats=chats, users=users, posts_between=posts_between, start_delay=start_delay, between_delay=between_delay) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.posts_between is not None else 0 + flags |= (1 << 1) if self.start_delay is not None else 0 + flags |= (1 << 2) if self.between_delay is not None else 0 + b.write(Int(flags)) + + if self.posts_between is not None: + b.write(Int(self.posts_between)) + + if self.start_delay is not None: + b.write(Int(self.start_delay)) + + if self.between_delay is not None: + b.write(Int(self.between_delay)) + + b.write(Vector(self.messages)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sponsored_messages_empty.py b/pyrogram/raw/types/messages/sponsored_messages_empty.py new file mode 100644 index 00000000..5ad87e0a --- /dev/null +++ b/pyrogram/raw/types/messages/sponsored_messages_empty.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class SponsoredMessagesEmpty(TLObject): # type: ignore + """No sponsored messages are available. + + Constructor of :obj:`~pyrogram.raw.base.messages.SponsoredMessages`. + + Details: + - Layer: ``224`` + - ID: ``1839490F`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetSponsoredMessages + """ + + __slots__: List[str] = [] + + ID = 0x1839490f + QUALNAME = "types.messages.SponsoredMessagesEmpty" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "SponsoredMessagesEmpty": + # No flags + + return SponsoredMessagesEmpty() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sticker_set.py b/pyrogram/raw/types/messages/sticker_set.py new file mode 100644 index 00000000..800923e9 --- /dev/null +++ b/pyrogram/raw/types/messages/sticker_set.py @@ -0,0 +1,95 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StickerSet(TLObject): # type: ignore + """Stickerset and stickers inside it + + Constructor of :obj:`~pyrogram.raw.base.messages.StickerSet`. + + Details: + - Layer: ``224`` + - ID: ``6E153F16`` + + Parameters: + set (:obj:`StickerSet `): + The stickerset + + packs (List of :obj:`StickerPack `): + Emoji info for stickers + + keywords (List of :obj:`StickerKeyword `): + Keywords for some or every sticker in the stickerset. + + documents (List of :obj:`Document `): + Stickers in stickerset + + Functions: + This object can be returned by 9 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetStickerSet + stickers.CreateStickerSet + stickers.RemoveStickerFromSet + stickers.ChangeStickerPosition + stickers.AddStickerToSet + stickers.SetStickerSetThumb + stickers.ChangeSticker + stickers.RenameStickerSet + stickers.ReplaceSticker + """ + + __slots__: List[str] = ["set", "packs", "keywords", "documents"] + + ID = 0x6e153f16 + QUALNAME = "types.messages.StickerSet" + + def __init__(self, *, set: "raw.base.StickerSet", packs: List["raw.base.StickerPack"], keywords: List["raw.base.StickerKeyword"], documents: List["raw.base.Document"]) -> None: + self.set = set # StickerSet + self.packs = packs # Vector + self.keywords = keywords # Vector + self.documents = documents # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StickerSet": + # No flags + + set = TLObject.read(b) + + packs = TLObject.read(b) + + keywords = TLObject.read(b) + + documents = TLObject.read(b) + + return StickerSet(set=set, packs=packs, keywords=keywords, documents=documents) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.set.write()) + + b.write(Vector(self.packs)) + + b.write(Vector(self.keywords)) + + b.write(Vector(self.documents)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sticker_set_install_result_archive.py b/pyrogram/raw/types/messages/sticker_set_install_result_archive.py new file mode 100644 index 00000000..886616d2 --- /dev/null +++ b/pyrogram/raw/types/messages/sticker_set_install_result_archive.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StickerSetInstallResultArchive(TLObject): # type: ignore + """The stickerset was installed, but since there are too many stickersets some were archived + + Constructor of :obj:`~pyrogram.raw.base.messages.StickerSetInstallResult`. + + Details: + - Layer: ``224`` + - ID: ``35E410A8`` + + Parameters: + sets (List of :obj:`StickerSetCovered `): + Archived stickersets + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.InstallStickerSet + """ + + __slots__: List[str] = ["sets"] + + ID = 0x35e410a8 + QUALNAME = "types.messages.StickerSetInstallResultArchive" + + def __init__(self, *, sets: List["raw.base.StickerSetCovered"]) -> None: + self.sets = sets # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StickerSetInstallResultArchive": + # No flags + + sets = TLObject.read(b) + + return StickerSetInstallResultArchive(sets=sets) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.sets)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sticker_set_install_result_success.py b/pyrogram/raw/types/messages/sticker_set_install_result_success.py new file mode 100644 index 00000000..beac60ef --- /dev/null +++ b/pyrogram/raw/types/messages/sticker_set_install_result_success.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StickerSetInstallResultSuccess(TLObject): # type: ignore + """The stickerset was installed successfully + + Constructor of :obj:`~pyrogram.raw.base.messages.StickerSetInstallResult`. + + Details: + - Layer: ``224`` + - ID: ``38641628`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.InstallStickerSet + """ + + __slots__: List[str] = [] + + ID = 0x38641628 + QUALNAME = "types.messages.StickerSetInstallResultSuccess" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StickerSetInstallResultSuccess": + # No flags + + return StickerSetInstallResultSuccess() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/sticker_set_not_modified.py b/pyrogram/raw/types/messages/sticker_set_not_modified.py new file mode 100644 index 00000000..d310e3c0 --- /dev/null +++ b/pyrogram/raw/types/messages/sticker_set_not_modified.py @@ -0,0 +1,66 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StickerSetNotModified(TLObject): # type: ignore + """The stickerset hasn't changed + + Constructor of :obj:`~pyrogram.raw.base.messages.StickerSet`. + + Details: + - Layer: ``224`` + - ID: ``D3F924EB`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 9 functions. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetStickerSet + stickers.CreateStickerSet + stickers.RemoveStickerFromSet + stickers.ChangeStickerPosition + stickers.AddStickerToSet + stickers.SetStickerSetThumb + stickers.ChangeSticker + stickers.RenameStickerSet + stickers.ReplaceSticker + """ + + __slots__: List[str] = [] + + ID = 0xd3f924eb + QUALNAME = "types.messages.StickerSetNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StickerSetNotModified": + # No flags + + return StickerSetNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/stickers.py b/pyrogram/raw/types/messages/stickers.py new file mode 100644 index 00000000..b91e7696 --- /dev/null +++ b/pyrogram/raw/types/messages/stickers.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Stickers(TLObject): # type: ignore + """Found stickers + + Constructor of :obj:`~pyrogram.raw.base.messages.Stickers`. + + Details: + - Layer: ``224`` + - ID: ``30A6EC7E`` + + Parameters: + hash (``int`` ``64-bit``): + Hash for pagination, for more info click here + + stickers (List of :obj:`Document `): + Stickers + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetStickers + """ + + __slots__: List[str] = ["hash", "stickers"] + + ID = 0x30a6ec7e + QUALNAME = "types.messages.Stickers" + + def __init__(self, *, hash: int, stickers: List["raw.base.Document"]) -> None: + self.hash = hash # long + self.stickers = stickers # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Stickers": + # No flags + + hash = Long.read(b) + + stickers = TLObject.read(b) + + return Stickers(hash=hash, stickers=stickers) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.hash)) + + b.write(Vector(self.stickers)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/stickers_not_modified.py b/pyrogram/raw/types/messages/stickers_not_modified.py new file mode 100644 index 00000000..5e59ea2b --- /dev/null +++ b/pyrogram/raw/types/messages/stickers_not_modified.py @@ -0,0 +1,58 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class StickersNotModified(TLObject): # type: ignore + """No new stickers were found for the given query + + Constructor of :obj:`~pyrogram.raw.base.messages.Stickers`. + + Details: + - Layer: ``224`` + - ID: ``F1749A22`` + + Parameters: + No parameters required. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetStickers + """ + + __slots__: List[str] = [] + + ID = 0xf1749a22 + QUALNAME = "types.messages.StickersNotModified" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "StickersNotModified": + # No flags + + return StickersNotModified() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/transcribed_audio.py b/pyrogram/raw/types/messages/transcribed_audio.py new file mode 100644 index 00000000..1a99f147 --- /dev/null +++ b/pyrogram/raw/types/messages/transcribed_audio.py @@ -0,0 +1,97 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TranscribedAudio(TLObject): # type: ignore + """Transcribed text from a voice message » + + Constructor of :obj:`~pyrogram.raw.base.messages.TranscribedAudio`. + + Details: + - Layer: ``224`` + - ID: ``CFB9D957`` + + Parameters: + transcription_id (``int`` ``64-bit``): + Transcription ID + + text (``str``): + Transcripted text + + pending (``bool``, *optional*): + Whether the transcription is partial because audio transcription is still in progress, if set the user may receive further updateTranscribedAudio updates with the updated transcription. + + trial_remains_num (``int`` ``32-bit``, *optional*): + For non-Premium users, this flag will be set, indicating the remaining transcriptions in the free trial period. + + trial_remains_until_date (``int`` ``32-bit``, *optional*): + For non-Premium users, this flag will be set, indicating the date when the trial_remains_num counter will be reset to the maximum value of transcribe_audio_trial_weekly_number. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.TranscribeAudio + """ + + __slots__: List[str] = ["transcription_id", "text", "pending", "trial_remains_num", "trial_remains_until_date"] + + ID = 0xcfb9d957 + QUALNAME = "types.messages.TranscribedAudio" + + def __init__(self, *, transcription_id: int, text: str, pending: Optional[bool] = None, trial_remains_num: Optional[int] = None, trial_remains_until_date: Optional[int] = None) -> None: + self.transcription_id = transcription_id # long + self.text = text # string + self.pending = pending # flags.0?true + self.trial_remains_num = trial_remains_num # flags.1?int + self.trial_remains_until_date = trial_remains_until_date # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TranscribedAudio": + + flags = Int.read(b) + + pending = True if flags & (1 << 0) else False + transcription_id = Long.read(b) + + text = String.read(b) + + trial_remains_num = Int.read(b) if flags & (1 << 1) else None + trial_remains_until_date = Int.read(b) if flags & (1 << 1) else None + return TranscribedAudio(transcription_id=transcription_id, text=text, pending=pending, trial_remains_num=trial_remains_num, trial_remains_until_date=trial_remains_until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.pending else 0 + flags |= (1 << 1) if self.trial_remains_num is not None else 0 + flags |= (1 << 1) if self.trial_remains_until_date is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.transcription_id)) + + b.write(String(self.text)) + + if self.trial_remains_num is not None: + b.write(Int(self.trial_remains_num)) + + if self.trial_remains_until_date is not None: + b.write(Int(self.trial_remains_until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/translate_result.py b/pyrogram/raw/types/messages/translate_result.py new file mode 100644 index 00000000..75f99099 --- /dev/null +++ b/pyrogram/raw/types/messages/translate_result.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class TranslateResult(TLObject): # type: ignore + """Translated text with entities + + Constructor of :obj:`~pyrogram.raw.base.messages.TranslatedText`. + + Details: + - Layer: ``224`` + - ID: ``33DB32F8`` + + Parameters: + result (List of :obj:`TextWithEntities `): + Text+entities, for each input message. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.TranslateText + """ + + __slots__: List[str] = ["result"] + + ID = 0x33db32f8 + QUALNAME = "types.messages.TranslateResult" + + def __init__(self, *, result: List["raw.base.TextWithEntities"]) -> None: + self.result = result # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "TranslateResult": + # No flags + + result = TLObject.read(b) + + return TranslateResult(result=result) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.result)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/votes_list.py b/pyrogram/raw/types/messages/votes_list.py new file mode 100644 index 00000000..04c9e4b6 --- /dev/null +++ b/pyrogram/raw/types/messages/votes_list.py @@ -0,0 +1,98 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class VotesList(TLObject): # type: ignore + """How users voted in a poll + + Constructor of :obj:`~pyrogram.raw.base.messages.VotesList`. + + Details: + - Layer: ``224`` + - ID: ``4899484E`` + + Parameters: + count (``int`` ``32-bit``): + Total number of votes for all options (or only for the chosen option, if provided to messages.getPollVotes) + + votes (List of :obj:`MessagePeerVote `): + Vote info for each user + + chats (List of :obj:`Chat `): + Mentioned chats + + users (List of :obj:`User `): + Info about users that voted in the poll + + next_offset (``str``, *optional*): + Offset to use with the next messages.getPollVotes request, empty string if no more results are available. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetPollVotes + """ + + __slots__: List[str] = ["count", "votes", "chats", "users", "next_offset"] + + ID = 0x4899484e + QUALNAME = "types.messages.VotesList" + + def __init__(self, *, count: int, votes: List["raw.base.MessagePeerVote"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None: + self.count = count # int + self.votes = votes # Vector + self.chats = chats # Vector + self.users = users # Vector + self.next_offset = next_offset # flags.0?string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "VotesList": + + flags = Int.read(b) + + count = Int.read(b) + + votes = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + next_offset = String.read(b) if flags & (1 << 0) else None + return VotesList(count=count, votes=votes, chats=chats, users=users, next_offset=next_offset) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.next_offset is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.count)) + + b.write(Vector(self.votes)) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + if self.next_offset is not None: + b.write(String(self.next_offset)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/web_page.py b/pyrogram/raw/types/messages/web_page.py new file mode 100644 index 00000000..fa18d1ed --- /dev/null +++ b/pyrogram/raw/types/messages/web_page.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class WebPage(TLObject): # type: ignore + """Represents an Instant View webpage. + + Constructor of :obj:`~pyrogram.raw.base.messages.WebPage`. + + Details: + - Layer: ``224`` + - ID: ``FD5E12BD`` + + Parameters: + webpage (:obj:`WebPage `): + The instant view webpage. + + chats (List of :obj:`Chat `): + Chats mentioned in the webpage. + + users (List of :obj:`User `): + Users mentioned in the webpage. + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetWebPage + """ + + __slots__: List[str] = ["webpage", "chats", "users"] + + ID = 0xfd5e12bd + QUALNAME = "types.messages.WebPage" + + def __init__(self, *, webpage: "raw.base.WebPage", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.webpage = webpage # WebPage + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "WebPage": + # No flags + + webpage = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return WebPage(webpage=webpage, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.webpage.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/web_page_preview.py b/pyrogram/raw/types/messages/web_page_preview.py new file mode 100644 index 00000000..ca98202d --- /dev/null +++ b/pyrogram/raw/types/messages/web_page_preview.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class WebPagePreview(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.WebPagePreview`. + + Details: + - Layer: ``224`` + - ID: ``8C9A88AC`` + + Parameters: + media (:obj:`MessageMedia `): + N/A + + chats (List of :obj:`Chat `): + N/A + + users (List of :obj:`User `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetWebPagePreview + """ + + __slots__: List[str] = ["media", "chats", "users"] + + ID = 0x8c9a88ac + QUALNAME = "types.messages.WebPagePreview" + + def __init__(self, *, media: "raw.base.MessageMedia", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None: + self.media = media # MessageMedia + self.chats = chats # Vector + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "WebPagePreview": + # No flags + + media = TLObject.read(b) + + chats = TLObject.read(b) + + users = TLObject.read(b) + + return WebPagePreview(media=media, chats=chats, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.media.write()) + + b.write(Vector(self.chats)) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/messages/web_view_result.py b/pyrogram/raw/types/messages/web_view_result.py new file mode 100644 index 00000000..8c283a28 --- /dev/null +++ b/pyrogram/raw/types/messages/web_view_result.py @@ -0,0 +1,71 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class WebViewResult(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.messages.WebViewResult`. + + Details: + - Layer: ``224`` + - ID: ``AADF159B`` + + Parameters: + result (:obj:`BotInlineResult `): + N/A + + users (List of :obj:`User `): + N/A + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetWebViewResult + """ + + __slots__: List[str] = ["result", "users"] + + ID = 0xaadf159b + QUALNAME = "types.messages.WebViewResult" + + def __init__(self, *, result: "raw.base.BotInlineResult", users: List["raw.base.User"]) -> None: + self.result = result # BotInlineResult + self.users = users # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "WebViewResult": + # No flags + + result = TLObject.read(b) + + users = TLObject.read(b) + + return WebViewResult(result=result, users=users) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.result.write()) + + b.write(Vector(self.users)) + + return b.getvalue() diff --git a/pyrogram/raw/types/missing_invitee.py b/pyrogram/raw/types/missing_invitee.py new file mode 100644 index 00000000..06a03bfd --- /dev/null +++ b/pyrogram/raw/types/missing_invitee.py @@ -0,0 +1,68 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MissingInvitee(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.MissingInvitee`. + + Details: + - Layer: ``224`` + - ID: ``628C9224`` + + Parameters: + user_id (``int`` ``64-bit``): + + + premium_would_allow_invite (``bool``, *optional*): + + + premium_required_for_pm (``bool``, *optional*): + + + """ + + __slots__: List[str] = ["user_id", "premium_would_allow_invite", "premium_required_for_pm"] + + ID = 0x628c9224 + QUALNAME = "types.MissingInvitee" + + def __init__(self, *, user_id: int, premium_would_allow_invite: Optional[bool] = None, premium_required_for_pm: Optional[bool] = None) -> None: + self.user_id = user_id # long + self.premium_would_allow_invite = premium_would_allow_invite # flags.0?true + self.premium_required_for_pm = premium_required_for_pm # flags.1?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MissingInvitee": + + flags = Int.read(b) + + premium_would_allow_invite = True if flags & (1 << 0) else False + premium_required_for_pm = True if flags & (1 << 1) else False + user_id = Long.read(b) + + return MissingInvitee(user_id=user_id, premium_would_allow_invite=premium_would_allow_invite, premium_required_for_pm=premium_required_for_pm) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.premium_would_allow_invite else 0 + flags |= (1 << 1) if self.premium_required_for_pm else 0 + b.write(Int(flags)) + + b.write(Long(self.user_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/mono_forum_dialog.py b/pyrogram/raw/types/mono_forum_dialog.py new file mode 100644 index 00000000..7d91e3e1 --- /dev/null +++ b/pyrogram/raw/types/mono_forum_dialog.py @@ -0,0 +1,118 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MonoForumDialog(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.SavedDialog`. + + Details: + - Layer: ``224`` + - ID: ``64407EA7`` + + Parameters: + peer (:obj:`Peer `): + N/A + + top_message (``int`` ``32-bit``): + N/A + + read_inbox_max_id (``int`` ``32-bit``): + N/A + + read_outbox_max_id (``int`` ``32-bit``): + N/A + + unread_count (``int`` ``32-bit``): + N/A + + unread_reactions_count (``int`` ``32-bit``): + N/A + + unread_mark (``bool``, *optional*): + N/A + + nopaid_messages_exception (``bool``, *optional*): + N/A + + draft (:obj:`DraftMessage `, *optional*): + N/A + + """ + + __slots__: List[str] = ["peer", "top_message", "read_inbox_max_id", "read_outbox_max_id", "unread_count", "unread_reactions_count", "unread_mark", "nopaid_messages_exception", "draft"] + + ID = 0x64407ea7 + QUALNAME = "types.MonoForumDialog" + + def __init__(self, *, peer: "raw.base.Peer", top_message: int, read_inbox_max_id: int, read_outbox_max_id: int, unread_count: int, unread_reactions_count: int, unread_mark: Optional[bool] = None, nopaid_messages_exception: Optional[bool] = None, draft: "raw.base.DraftMessage" = None) -> None: + self.peer = peer # Peer + self.top_message = top_message # int + self.read_inbox_max_id = read_inbox_max_id # int + self.read_outbox_max_id = read_outbox_max_id # int + self.unread_count = unread_count # int + self.unread_reactions_count = unread_reactions_count # int + self.unread_mark = unread_mark # flags.3?true + self.nopaid_messages_exception = nopaid_messages_exception # flags.4?true + self.draft = draft # flags.1?DraftMessage + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MonoForumDialog": + + flags = Int.read(b) + + unread_mark = True if flags & (1 << 3) else False + nopaid_messages_exception = True if flags & (1 << 4) else False + peer = TLObject.read(b) + + top_message = Int.read(b) + + read_inbox_max_id = Int.read(b) + + read_outbox_max_id = Int.read(b) + + unread_count = Int.read(b) + + unread_reactions_count = Int.read(b) + + draft = TLObject.read(b) if flags & (1 << 1) else None + + return MonoForumDialog(peer=peer, top_message=top_message, read_inbox_max_id=read_inbox_max_id, read_outbox_max_id=read_outbox_max_id, unread_count=unread_count, unread_reactions_count=unread_reactions_count, unread_mark=unread_mark, nopaid_messages_exception=nopaid_messages_exception, draft=draft) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 3) if self.unread_mark else 0 + flags |= (1 << 4) if self.nopaid_messages_exception else 0 + flags |= (1 << 1) if self.draft is not None else 0 + b.write(Int(flags)) + + b.write(self.peer.write()) + + b.write(Int(self.top_message)) + + b.write(Int(self.read_inbox_max_id)) + + b.write(Int(self.read_outbox_max_id)) + + b.write(Int(self.unread_count)) + + b.write(Int(self.unread_reactions_count)) + + if self.draft is not None: + b.write(self.draft.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/msg_detailed_info.py b/pyrogram/raw/types/msg_detailed_info.py new file mode 100644 index 00000000..514069f0 --- /dev/null +++ b/pyrogram/raw/types/msg_detailed_info.py @@ -0,0 +1,78 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgDetailedInfo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgDetailedInfo`. + + Details: + - Layer: ``224`` + - ID: ``276D3EC6`` + + Parameters: + msg_id (``int`` ``64-bit``): + N/A + + answer_msg_id (``int`` ``64-bit``): + N/A + + bytes (``int`` ``32-bit``): + N/A + + status (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_id", "answer_msg_id", "bytes", "status"] + + ID = 0x276d3ec6 + QUALNAME = "types.MsgDetailedInfo" + + def __init__(self, *, msg_id: int, answer_msg_id: int, bytes: int, status: int) -> None: + self.msg_id = msg_id # long + self.answer_msg_id = answer_msg_id # long + self.bytes = bytes # int + self.status = status # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgDetailedInfo": + # No flags + + msg_id = Long.read(b) + + answer_msg_id = Long.read(b) + + bytes = Int.read(b) + + status = Int.read(b) + + return MsgDetailedInfo(msg_id=msg_id, answer_msg_id=answer_msg_id, bytes=bytes, status=status) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.msg_id)) + + b.write(Long(self.answer_msg_id)) + + b.write(Int(self.bytes)) + + b.write(Int(self.status)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msg_new_detailed_info.py b/pyrogram/raw/types/msg_new_detailed_info.py new file mode 100644 index 00000000..a0dabd96 --- /dev/null +++ b/pyrogram/raw/types/msg_new_detailed_info.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgNewDetailedInfo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgDetailedInfo`. + + Details: + - Layer: ``224`` + - ID: ``809DB6DF`` + + Parameters: + answer_msg_id (``int`` ``64-bit``): + N/A + + bytes (``int`` ``32-bit``): + N/A + + status (``int`` ``32-bit``): + N/A + + """ + + __slots__: List[str] = ["answer_msg_id", "bytes", "status"] + + ID = 0x809db6df + QUALNAME = "types.MsgNewDetailedInfo" + + def __init__(self, *, answer_msg_id: int, bytes: int, status: int) -> None: + self.answer_msg_id = answer_msg_id # long + self.bytes = bytes # int + self.status = status # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgNewDetailedInfo": + # No flags + + answer_msg_id = Long.read(b) + + bytes = Int.read(b) + + status = Int.read(b) + + return MsgNewDetailedInfo(answer_msg_id=answer_msg_id, bytes=bytes, status=status) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.answer_msg_id)) + + b.write(Int(self.bytes)) + + b.write(Int(self.status)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msg_resend_ans_req.py b/pyrogram/raw/types/msg_resend_ans_req.py new file mode 100644 index 00000000..d3f0da0b --- /dev/null +++ b/pyrogram/raw/types/msg_resend_ans_req.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgResendAnsReq(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgResendReq`. + + Details: + - Layer: ``224`` + - ID: ``8610BAEB`` + + Parameters: + msg_ids (List of ``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_ids"] + + ID = 0x8610baeb + QUALNAME = "types.MsgResendAnsReq" + + def __init__(self, *, msg_ids: List[int]) -> None: + self.msg_ids = msg_ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgResendAnsReq": + # No flags + + msg_ids = TLObject.read(b, Long) + + return MsgResendAnsReq(msg_ids=msg_ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.msg_ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msg_resend_req.py b/pyrogram/raw/types/msg_resend_req.py new file mode 100644 index 00000000..8146cc61 --- /dev/null +++ b/pyrogram/raw/types/msg_resend_req.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgResendReq(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgResendReq`. + + Details: + - Layer: ``224`` + - ID: ``7D861A08`` + + Parameters: + msg_ids (List of ``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_ids"] + + ID = 0x7d861a08 + QUALNAME = "types.MsgResendReq" + + def __init__(self, *, msg_ids: List[int]) -> None: + self.msg_ids = msg_ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgResendReq": + # No flags + + msg_ids = TLObject.read(b, Long) + + return MsgResendReq(msg_ids=msg_ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.msg_ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msgs_ack.py b/pyrogram/raw/types/msgs_ack.py new file mode 100644 index 00000000..ae892afe --- /dev/null +++ b/pyrogram/raw/types/msgs_ack.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgsAck(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgsAck`. + + Details: + - Layer: ``224`` + - ID: ``62D6B459`` + + Parameters: + msg_ids (List of ``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_ids"] + + ID = 0x62d6b459 + QUALNAME = "types.MsgsAck" + + def __init__(self, *, msg_ids: List[int]) -> None: + self.msg_ids = msg_ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgsAck": + # No flags + + msg_ids = TLObject.read(b, Long) + + return MsgsAck(msg_ids=msg_ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.msg_ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msgs_all_info.py b/pyrogram/raw/types/msgs_all_info.py new file mode 100644 index 00000000..57561455 --- /dev/null +++ b/pyrogram/raw/types/msgs_all_info.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgsAllInfo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgsAllInfo`. + + Details: + - Layer: ``224`` + - ID: ``8CC0D131`` + + Parameters: + msg_ids (List of ``int`` ``64-bit``): + N/A + + info (``str``): + N/A + + """ + + __slots__: List[str] = ["msg_ids", "info"] + + ID = 0x8cc0d131 + QUALNAME = "types.MsgsAllInfo" + + def __init__(self, *, msg_ids: List[int], info: str) -> None: + self.msg_ids = msg_ids # Vector + self.info = info # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgsAllInfo": + # No flags + + msg_ids = TLObject.read(b, Long) + + info = String.read(b) + + return MsgsAllInfo(msg_ids=msg_ids, info=info) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.msg_ids, Long)) + + b.write(String(self.info)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msgs_state_info.py b/pyrogram/raw/types/msgs_state_info.py new file mode 100644 index 00000000..f034be32 --- /dev/null +++ b/pyrogram/raw/types/msgs_state_info.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgsStateInfo(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgsStateInfo`. + + Details: + - Layer: ``224`` + - ID: ``04DEB57D`` + + Parameters: + req_msg_id (``int`` ``64-bit``): + N/A + + info (``str``): + N/A + + """ + + __slots__: List[str] = ["req_msg_id", "info"] + + ID = 0x04deb57d + QUALNAME = "types.MsgsStateInfo" + + def __init__(self, *, req_msg_id: int, info: str) -> None: + self.req_msg_id = req_msg_id # long + self.info = info # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgsStateInfo": + # No flags + + req_msg_id = Long.read(b) + + info = String.read(b) + + return MsgsStateInfo(req_msg_id=req_msg_id, info=info) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.req_msg_id)) + + b.write(String(self.info)) + + return b.getvalue() diff --git a/pyrogram/raw/types/msgs_state_req.py b/pyrogram/raw/types/msgs_state_req.py new file mode 100644 index 00000000..0be76a4c --- /dev/null +++ b/pyrogram/raw/types/msgs_state_req.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MsgsStateReq(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.MsgsStateReq`. + + Details: + - Layer: ``224`` + - ID: ``DA69FB52`` + + Parameters: + msg_ids (List of ``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["msg_ids"] + + ID = 0xda69fb52 + QUALNAME = "types.MsgsStateReq" + + def __init__(self, *, msg_ids: List[int]) -> None: + self.msg_ids = msg_ids # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MsgsStateReq": + # No flags + + msg_ids = TLObject.read(b, Long) + + return MsgsStateReq(msg_ids=msg_ids) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.msg_ids, Long)) + + return b.getvalue() diff --git a/pyrogram/raw/types/my_boost.py b/pyrogram/raw/types/my_boost.py new file mode 100644 index 00000000..13f91446 --- /dev/null +++ b/pyrogram/raw/types/my_boost.py @@ -0,0 +1,91 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class MyBoost(TLObject): # type: ignore + """Contains information about a single boost slot ». + + Constructor of :obj:`~pyrogram.raw.base.MyBoost`. + + Details: + - Layer: ``224`` + - ID: ``C448415C`` + + Parameters: + slot (``int`` ``32-bit``): + Boost slot ID » + + date (``int`` ``32-bit``): + When (unixtime) we started boosting the peer, 0 otherwise. + + expires (``int`` ``32-bit``): + Indicates the (unixtime) expiration date of the boost in peer (0 if peer is not set). + + peer (:obj:`Peer `, *optional*): + If set, indicates this slot is currently occupied, i.e. we are boosting this peer. Note that we can assign multiple boost slots to the same peer. + + cooldown_until_date (``int`` ``32-bit``, *optional*): + If peer is set, indicates the (unixtime) date after which this boost can be reassigned to another channel. + + """ + + __slots__: List[str] = ["slot", "date", "expires", "peer", "cooldown_until_date"] + + ID = 0xc448415c + QUALNAME = "types.MyBoost" + + def __init__(self, *, slot: int, date: int, expires: int, peer: "raw.base.Peer" = None, cooldown_until_date: Optional[int] = None) -> None: + self.slot = slot # int + self.date = date # int + self.expires = expires # int + self.peer = peer # flags.0?Peer + self.cooldown_until_date = cooldown_until_date # flags.1?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "MyBoost": + + flags = Int.read(b) + + slot = Int.read(b) + + peer = TLObject.read(b) if flags & (1 << 0) else None + + date = Int.read(b) + + expires = Int.read(b) + + cooldown_until_date = Int.read(b) if flags & (1 << 1) else None + return MyBoost(slot=slot, date=date, expires=expires, peer=peer, cooldown_until_date=cooldown_until_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.peer is not None else 0 + flags |= (1 << 1) if self.cooldown_until_date is not None else 0 + b.write(Int(flags)) + + b.write(Int(self.slot)) + + if self.peer is not None: + b.write(self.peer.write()) + + b.write(Int(self.date)) + + b.write(Int(self.expires)) + + if self.cooldown_until_date is not None: + b.write(Int(self.cooldown_until_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/nearest_dc.py b/pyrogram/raw/types/nearest_dc.py new file mode 100644 index 00000000..461ee576 --- /dev/null +++ b/pyrogram/raw/types/nearest_dc.py @@ -0,0 +1,79 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NearestDc(TLObject): # type: ignore + """Nearest data center, according to geo-ip. + + Constructor of :obj:`~pyrogram.raw.base.NearestDc`. + + Details: + - Layer: ``224`` + - ID: ``8E1A1775`` + + Parameters: + country (``str``): + Country code determined by geo-ip + + this_dc (``int`` ``32-bit``): + Number of current data center + + nearest_dc (``int`` ``32-bit``): + Number of nearest data center + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + help.GetNearestDc + """ + + __slots__: List[str] = ["country", "this_dc", "nearest_dc"] + + ID = 0x8e1a1775 + QUALNAME = "types.NearestDc" + + def __init__(self, *, country: str, this_dc: int, nearest_dc: int) -> None: + self.country = country # string + self.this_dc = this_dc # int + self.nearest_dc = nearest_dc # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NearestDc": + # No flags + + country = String.read(b) + + this_dc = Int.read(b) + + nearest_dc = Int.read(b) + + return NearestDc(country=country, this_dc=this_dc, nearest_dc=nearest_dc) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.country)) + + b.write(Int(self.this_dc)) + + b.write(Int(self.nearest_dc)) + + return b.getvalue() diff --git a/pyrogram/raw/types/new_session_created.py b/pyrogram/raw/types/new_session_created.py new file mode 100644 index 00000000..8dda3548 --- /dev/null +++ b/pyrogram/raw/types/new_session_created.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NewSessionCreated(TLObject): # type: ignore + """Telegram API type. + + Constructor of :obj:`~pyrogram.raw.base.NewSession`. + + Details: + - Layer: ``224`` + - ID: ``9EC20908`` + + Parameters: + first_msg_id (``int`` ``64-bit``): + N/A + + unique_id (``int`` ``64-bit``): + N/A + + server_salt (``int`` ``64-bit``): + N/A + + """ + + __slots__: List[str] = ["first_msg_id", "unique_id", "server_salt"] + + ID = 0x9ec20908 + QUALNAME = "types.NewSessionCreated" + + def __init__(self, *, first_msg_id: int, unique_id: int, server_salt: int) -> None: + self.first_msg_id = first_msg_id # long + self.unique_id = unique_id # long + self.server_salt = server_salt # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NewSessionCreated": + # No flags + + first_msg_id = Long.read(b) + + unique_id = Long.read(b) + + server_salt = Long.read(b) + + return NewSessionCreated(first_msg_id=first_msg_id, unique_id=unique_id, server_salt=server_salt) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.first_msg_id)) + + b.write(Long(self.unique_id)) + + b.write(Long(self.server_salt)) + + return b.getvalue() diff --git a/pyrogram/raw/types/notification_sound_default.py b/pyrogram/raw/types/notification_sound_default.py new file mode 100644 index 00000000..14c7bed0 --- /dev/null +++ b/pyrogram/raw/types/notification_sound_default.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotificationSoundDefault(TLObject): # type: ignore + """Indicates the default notification sound should be used + + Constructor of :obj:`~pyrogram.raw.base.NotificationSound`. + + Details: + - Layer: ``224`` + - ID: ``97E8BEBE`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x97e8bebe + QUALNAME = "types.NotificationSoundDefault" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotificationSoundDefault": + # No flags + + return NotificationSoundDefault() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/notification_sound_local.py b/pyrogram/raw/types/notification_sound_local.py new file mode 100644 index 00000000..9da6d69c --- /dev/null +++ b/pyrogram/raw/types/notification_sound_local.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotificationSoundLocal(TLObject): # type: ignore + """Indicates a specific local notification sound should be used + + Constructor of :obj:`~pyrogram.raw.base.NotificationSound`. + + Details: + - Layer: ``224`` + - ID: ``830B9AE4`` + + Parameters: + title (``str``): + Notification sound title + + data (``str``): + Notification sound identifier (arbitrary data used by the client to identify a specific local notification sound) + + """ + + __slots__: List[str] = ["title", "data"] + + ID = 0x830b9ae4 + QUALNAME = "types.NotificationSoundLocal" + + def __init__(self, *, title: str, data: str) -> None: + self.title = title # string + self.data = data # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotificationSoundLocal": + # No flags + + title = String.read(b) + + data = String.read(b) + + return NotificationSoundLocal(title=title, data=data) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.title)) + + b.write(String(self.data)) + + return b.getvalue() diff --git a/pyrogram/raw/types/notification_sound_none.py b/pyrogram/raw/types/notification_sound_none.py new file mode 100644 index 00000000..b6a0c47b --- /dev/null +++ b/pyrogram/raw/types/notification_sound_none.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotificationSoundNone(TLObject): # type: ignore + """No notification sound should be used + + Constructor of :obj:`~pyrogram.raw.base.NotificationSound`. + + Details: + - Layer: ``224`` + - ID: ``6F0C34DF`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0x6f0c34df + QUALNAME = "types.NotificationSoundNone" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotificationSoundNone": + # No flags + + return NotificationSoundNone() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/notification_sound_ringtone.py b/pyrogram/raw/types/notification_sound_ringtone.py new file mode 100644 index 00000000..2dce6e8e --- /dev/null +++ b/pyrogram/raw/types/notification_sound_ringtone.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotificationSoundRingtone(TLObject): # type: ignore + """A specific previously uploaded notification sound should be used + + Constructor of :obj:`~pyrogram.raw.base.NotificationSound`. + + Details: + - Layer: ``224`` + - ID: ``FF6C8049`` + + Parameters: + id (``int`` ``64-bit``): + Document ID of notification sound uploaded using account.uploadRingtone + + """ + + __slots__: List[str] = ["id"] + + ID = 0xff6c8049 + QUALNAME = "types.NotificationSoundRingtone" + + def __init__(self, *, id: int) -> None: + self.id = id # long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotificationSoundRingtone": + # No flags + + id = Long.read(b) + + return NotificationSoundRingtone(id=id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/notify_broadcasts.py b/pyrogram/raw/types/notify_broadcasts.py new file mode 100644 index 00000000..8b57a793 --- /dev/null +++ b/pyrogram/raw/types/notify_broadcasts.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotifyBroadcasts(TLObject): # type: ignore + """Channel notification settings + + Constructor of :obj:`~pyrogram.raw.base.NotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``D612E8EF`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xd612e8ef + QUALNAME = "types.NotifyBroadcasts" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotifyBroadcasts": + # No flags + + return NotifyBroadcasts() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/notify_chats.py b/pyrogram/raw/types/notify_chats.py new file mode 100644 index 00000000..f5a5a2a8 --- /dev/null +++ b/pyrogram/raw/types/notify_chats.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotifyChats(TLObject): # type: ignore + """Notifications generated by all groups. + + Constructor of :obj:`~pyrogram.raw.base.NotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``C007CEC3`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xc007cec3 + QUALNAME = "types.NotifyChats" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotifyChats": + # No flags + + return NotifyChats() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/notify_forum_topic.py b/pyrogram/raw/types/notify_forum_topic.py new file mode 100644 index 00000000..5d91a49f --- /dev/null +++ b/pyrogram/raw/types/notify_forum_topic.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotifyForumTopic(TLObject): # type: ignore + """Notifications generated by a topic in a forum. + + Constructor of :obj:`~pyrogram.raw.base.NotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``226E6308`` + + Parameters: + peer (:obj:`Peer `): + Forum ID + + top_msg_id (``int`` ``32-bit``): + Topic ID + + """ + + __slots__: List[str] = ["peer", "top_msg_id"] + + ID = 0x226e6308 + QUALNAME = "types.NotifyForumTopic" + + def __init__(self, *, peer: "raw.base.Peer", top_msg_id: int) -> None: + self.peer = peer # Peer + self.top_msg_id = top_msg_id # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotifyForumTopic": + # No flags + + peer = TLObject.read(b) + + top_msg_id = Int.read(b) + + return NotifyForumTopic(peer=peer, top_msg_id=top_msg_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + b.write(Int(self.top_msg_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/notify_peer.py b/pyrogram/raw/types/notify_peer.py new file mode 100644 index 00000000..dfb9f979 --- /dev/null +++ b/pyrogram/raw/types/notify_peer.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotifyPeer(TLObject): # type: ignore + """Notifications generated by a certain user or group. + + Constructor of :obj:`~pyrogram.raw.base.NotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``9FD40BD8`` + + Parameters: + peer (:obj:`Peer `): + user or group + + """ + + __slots__: List[str] = ["peer"] + + ID = 0x9fd40bd8 + QUALNAME = "types.NotifyPeer" + + def __init__(self, *, peer: "raw.base.Peer") -> None: + self.peer = peer # Peer + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotifyPeer": + # No flags + + peer = TLObject.read(b) + + return NotifyPeer(peer=peer) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.peer.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/notify_users.py b/pyrogram/raw/types/notify_users.py new file mode 100644 index 00000000..de740c6a --- /dev/null +++ b/pyrogram/raw/types/notify_users.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class NotifyUsers(TLObject): # type: ignore + """Notifications generated by all users. + + Constructor of :obj:`~pyrogram.raw.base.NotifyPeer`. + + Details: + - Layer: ``224`` + - ID: ``B4C83B4C`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xb4c83b4c + QUALNAME = "types.NotifyUsers" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "NotifyUsers": + # No flags + + return NotifyUsers() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/outbox_read_date.py b/pyrogram/raw/types/outbox_read_date.py new file mode 100644 index 00000000..3f753d98 --- /dev/null +++ b/pyrogram/raw/types/outbox_read_date.py @@ -0,0 +1,63 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class OutboxReadDate(TLObject): # type: ignore + """{schema} + + Constructor of :obj:`~pyrogram.raw.base.OutboxReadDate`. + + Details: + - Layer: ``224`` + - ID: ``3BB842AC`` + + Parameters: + date (``int`` ``32-bit``): + + + Functions: + This object can be returned by 1 function. + + .. currentmodule:: pyrogram.raw.functions + + .. autosummary:: + :nosignatures: + + messages.GetOutboxReadDate + """ + + __slots__: List[str] = ["date"] + + ID = 0x3bb842ac + QUALNAME = "types.OutboxReadDate" + + def __init__(self, *, date: int) -> None: + self.date = date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "OutboxReadDate": + # No flags + + date = Int.read(b) + + return OutboxReadDate(date=date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Int(self.date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page.py b/pyrogram/raw/types/page.py new file mode 100644 index 00000000..fccb12d9 --- /dev/null +++ b/pyrogram/raw/types/page.py @@ -0,0 +1,107 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class Page(TLObject): # type: ignore + """Instant view page + + Constructor of :obj:`~pyrogram.raw.base.Page`. + + Details: + - Layer: ``224`` + - ID: ``98657F0D`` + + Parameters: + url (``str``): + Original page HTTP URL + + blocks (List of :obj:`PageBlock `): + Page elements (like with HTML elements, only as TL constructors) + + photos (List of :obj:`Photo `): + Photos in page + + documents (List of :obj:`Document `): + Media in page + + part (``bool``, *optional*): + Indicates that not full page preview is available to the client and it will need to fetch full Instant View from the server using messages.getWebPagePreview. + + rtl (``bool``, *optional*): + Whether the page contains RTL text + + v2 (``bool``, *optional*): + Whether this is an IV v2 page + + views (``int`` ``32-bit``, *optional*): + View count + + """ + + __slots__: List[str] = ["url", "blocks", "photos", "documents", "part", "rtl", "v2", "views"] + + ID = 0x98657f0d + QUALNAME = "types.Page" + + def __init__(self, *, url: str, blocks: List["raw.base.PageBlock"], photos: List["raw.base.Photo"], documents: List["raw.base.Document"], part: Optional[bool] = None, rtl: Optional[bool] = None, v2: Optional[bool] = None, views: Optional[int] = None) -> None: + self.url = url # string + self.blocks = blocks # Vector + self.photos = photos # Vector + self.documents = documents # Vector + self.part = part # flags.0?true + self.rtl = rtl # flags.1?true + self.v2 = v2 # flags.2?true + self.views = views # flags.3?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "Page": + + flags = Int.read(b) + + part = True if flags & (1 << 0) else False + rtl = True if flags & (1 << 1) else False + v2 = True if flags & (1 << 2) else False + url = String.read(b) + + blocks = TLObject.read(b) + + photos = TLObject.read(b) + + documents = TLObject.read(b) + + views = Int.read(b) if flags & (1 << 3) else None + return Page(url=url, blocks=blocks, photos=photos, documents=documents, part=part, rtl=rtl, v2=v2, views=views) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.part else 0 + flags |= (1 << 1) if self.rtl else 0 + flags |= (1 << 2) if self.v2 else 0 + flags |= (1 << 3) if self.views is not None else 0 + b.write(Int(flags)) + + b.write(String(self.url)) + + b.write(Vector(self.blocks)) + + b.write(Vector(self.photos)) + + b.write(Vector(self.documents)) + + if self.views is not None: + b.write(Int(self.views)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_anchor.py b/pyrogram/raw/types/page_block_anchor.py new file mode 100644 index 00000000..c8c510f9 --- /dev/null +++ b/pyrogram/raw/types/page_block_anchor.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockAnchor(TLObject): # type: ignore + """Link to section within the page itself (like anchor) + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``CE0D37B0`` + + Parameters: + name (``str``): + Name of target section + + """ + + __slots__: List[str] = ["name"] + + ID = 0xce0d37b0 + QUALNAME = "types.PageBlockAnchor" + + def __init__(self, *, name: str) -> None: + self.name = name # string + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockAnchor": + # No flags + + name = String.read(b) + + return PageBlockAnchor(name=name) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.name)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_audio.py b/pyrogram/raw/types/page_block_audio.py new file mode 100644 index 00000000..96118321 --- /dev/null +++ b/pyrogram/raw/types/page_block_audio.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockAudio(TLObject): # type: ignore + """Audio + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``804361EA`` + + Parameters: + audio_id (``int`` ``64-bit``): + Audio ID (to be fetched from the container page constructor + + caption (:obj:`PageCaption `): + Audio caption + + """ + + __slots__: List[str] = ["audio_id", "caption"] + + ID = 0x804361ea + QUALNAME = "types.PageBlockAudio" + + def __init__(self, *, audio_id: int, caption: "raw.base.PageCaption") -> None: + self.audio_id = audio_id # long + self.caption = caption # PageCaption + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockAudio": + # No flags + + audio_id = Long.read(b) + + caption = TLObject.read(b) + + return PageBlockAudio(audio_id=audio_id, caption=caption) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Long(self.audio_id)) + + b.write(self.caption.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_author_date.py b/pyrogram/raw/types/page_block_author_date.py new file mode 100644 index 00000000..11cde586 --- /dev/null +++ b/pyrogram/raw/types/page_block_author_date.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockAuthorDate(TLObject): # type: ignore + """Author and date of creation of article + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``BAAFE5E0`` + + Parameters: + author (:obj:`RichText `): + Author name + + published_date (``int`` ``32-bit``): + Date of publication + + """ + + __slots__: List[str] = ["author", "published_date"] + + ID = 0xbaafe5e0 + QUALNAME = "types.PageBlockAuthorDate" + + def __init__(self, *, author: "raw.base.RichText", published_date: int) -> None: + self.author = author # RichText + self.published_date = published_date # int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockAuthorDate": + # No flags + + author = TLObject.read(b) + + published_date = Int.read(b) + + return PageBlockAuthorDate(author=author, published_date=published_date) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.author.write()) + + b.write(Int(self.published_date)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_blockquote.py b/pyrogram/raw/types/page_block_blockquote.py new file mode 100644 index 00000000..931be0b0 --- /dev/null +++ b/pyrogram/raw/types/page_block_blockquote.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockBlockquote(TLObject): # type: ignore + """Quote (equivalent to the HTML
) + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``263D7C26`` + + Parameters: + text (:obj:`RichText `): + Quote contents + + caption (:obj:`RichText `): + Caption + + """ + + __slots__: List[str] = ["text", "caption"] + + ID = 0x263d7c26 + QUALNAME = "types.PageBlockBlockquote" + + def __init__(self, *, text: "raw.base.RichText", caption: "raw.base.RichText") -> None: + self.text = text # RichText + self.caption = caption # RichText + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockBlockquote": + # No flags + + text = TLObject.read(b) + + caption = TLObject.read(b) + + return PageBlockBlockquote(text=text, caption=caption) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.text.write()) + + b.write(self.caption.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_channel.py b/pyrogram/raw/types/page_block_channel.py new file mode 100644 index 00000000..8b83ef4d --- /dev/null +++ b/pyrogram/raw/types/page_block_channel.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockChannel(TLObject): # type: ignore + """Reference to a telegram channel + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``EF1751B5`` + + Parameters: + channel (:obj:`Chat `): + The channel/supergroup/chat + + """ + + __slots__: List[str] = ["channel"] + + ID = 0xef1751b5 + QUALNAME = "types.PageBlockChannel" + + def __init__(self, *, channel: "raw.base.Chat") -> None: + self.channel = channel # Chat + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockChannel": + # No flags + + channel = TLObject.read(b) + + return PageBlockChannel(channel=channel) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.channel.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_collage.py b/pyrogram/raw/types/page_block_collage.py new file mode 100644 index 00000000..009345d2 --- /dev/null +++ b/pyrogram/raw/types/page_block_collage.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockCollage(TLObject): # type: ignore + """Collage of media + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``65A0FA4D`` + + Parameters: + items (List of :obj:`PageBlock `): + Media elements + + caption (:obj:`PageCaption `): + Caption + + """ + + __slots__: List[str] = ["items", "caption"] + + ID = 0x65a0fa4d + QUALNAME = "types.PageBlockCollage" + + def __init__(self, *, items: List["raw.base.PageBlock"], caption: "raw.base.PageCaption") -> None: + self.items = items # Vector + self.caption = caption # PageCaption + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockCollage": + # No flags + + items = TLObject.read(b) + + caption = TLObject.read(b) + + return PageBlockCollage(items=items, caption=caption) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.items)) + + b.write(self.caption.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_cover.py b/pyrogram/raw/types/page_block_cover.py new file mode 100644 index 00000000..edfbbea4 --- /dev/null +++ b/pyrogram/raw/types/page_block_cover.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockCover(TLObject): # type: ignore + """A page cover + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``39F23300`` + + Parameters: + cover (:obj:`PageBlock `): + Cover + + """ + + __slots__: List[str] = ["cover"] + + ID = 0x39f23300 + QUALNAME = "types.PageBlockCover" + + def __init__(self, *, cover: "raw.base.PageBlock") -> None: + self.cover = cover # PageBlock + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockCover": + # No flags + + cover = TLObject.read(b) + + return PageBlockCover(cover=cover) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.cover.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_details.py b/pyrogram/raw/types/page_block_details.py new file mode 100644 index 00000000..207b61eb --- /dev/null +++ b/pyrogram/raw/types/page_block_details.py @@ -0,0 +1,70 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockDetails(TLObject): # type: ignore + """A collapsible details block + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``76768BED`` + + Parameters: + blocks (List of :obj:`PageBlock `): + Block contents + + title (:obj:`RichText `): + Always visible heading for the block + + open (``bool``, *optional*): + Whether the block is open by default + + """ + + __slots__: List[str] = ["blocks", "title", "open"] + + ID = 0x76768bed + QUALNAME = "types.PageBlockDetails" + + def __init__(self, *, blocks: List["raw.base.PageBlock"], title: "raw.base.RichText", open: Optional[bool] = None) -> None: + self.blocks = blocks # Vector + self.title = title # RichText + self.open = open # flags.0?true + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockDetails": + + flags = Int.read(b) + + open = True if flags & (1 << 0) else False + blocks = TLObject.read(b) + + title = TLObject.read(b) + + return PageBlockDetails(blocks=blocks, title=title, open=open) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.open else 0 + b.write(Int(flags)) + + b.write(Vector(self.blocks)) + + b.write(self.title.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_divider.py b/pyrogram/raw/types/page_block_divider.py new file mode 100644 index 00000000..ea5399d1 --- /dev/null +++ b/pyrogram/raw/types/page_block_divider.py @@ -0,0 +1,49 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockDivider(TLObject): # type: ignore + """An empty block separating a page + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``DB20B188`` + + Parameters: + No parameters required. + + """ + + __slots__: List[str] = [] + + ID = 0xdb20b188 + QUALNAME = "types.PageBlockDivider" + + def __init__(self) -> None: + pass + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockDivider": + # No flags + + return PageBlockDivider() + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_embed.py b/pyrogram/raw/types/page_block_embed.py new file mode 100644 index 00000000..480e6f30 --- /dev/null +++ b/pyrogram/raw/types/page_block_embed.py @@ -0,0 +1,113 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockEmbed(TLObject): # type: ignore + """An embedded webpage + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``A8718DC5`` + + Parameters: + caption (:obj:`PageCaption `): + Caption + + full_width (``bool``, *optional*): + Whether the block should be full width + + allow_scrolling (``bool``, *optional*): + Whether scrolling should be allowed + + url (``str``, *optional*): + Web page URL, if available + + html (``str``, *optional*): + HTML-markup of the embedded page + + poster_photo_id (``int`` ``64-bit``, *optional*): + Poster photo, if available + + w (``int`` ``32-bit``, *optional*): + Block width, if known + + h (``int`` ``32-bit``, *optional*): + Block height, if known + + """ + + __slots__: List[str] = ["caption", "full_width", "allow_scrolling", "url", "html", "poster_photo_id", "w", "h"] + + ID = 0xa8718dc5 + QUALNAME = "types.PageBlockEmbed" + + def __init__(self, *, caption: "raw.base.PageCaption", full_width: Optional[bool] = None, allow_scrolling: Optional[bool] = None, url: Optional[str] = None, html: Optional[str] = None, poster_photo_id: Optional[int] = None, w: Optional[int] = None, h: Optional[int] = None) -> None: + self.caption = caption # PageCaption + self.full_width = full_width # flags.0?true + self.allow_scrolling = allow_scrolling # flags.3?true + self.url = url # flags.1?string + self.html = html # flags.2?string + self.poster_photo_id = poster_photo_id # flags.4?long + self.w = w # flags.5?int + self.h = h # flags.5?int + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockEmbed": + + flags = Int.read(b) + + full_width = True if flags & (1 << 0) else False + allow_scrolling = True if flags & (1 << 3) else False + url = String.read(b) if flags & (1 << 1) else None + html = String.read(b) if flags & (1 << 2) else None + poster_photo_id = Long.read(b) if flags & (1 << 4) else None + w = Int.read(b) if flags & (1 << 5) else None + h = Int.read(b) if flags & (1 << 5) else None + caption = TLObject.read(b) + + return PageBlockEmbed(caption=caption, full_width=full_width, allow_scrolling=allow_scrolling, url=url, html=html, poster_photo_id=poster_photo_id, w=w, h=h) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.full_width else 0 + flags |= (1 << 3) if self.allow_scrolling else 0 + flags |= (1 << 1) if self.url is not None else 0 + flags |= (1 << 2) if self.html is not None else 0 + flags |= (1 << 4) if self.poster_photo_id is not None else 0 + flags |= (1 << 5) if self.w is not None else 0 + flags |= (1 << 5) if self.h is not None else 0 + b.write(Int(flags)) + + if self.url is not None: + b.write(String(self.url)) + + if self.html is not None: + b.write(String(self.html)) + + if self.poster_photo_id is not None: + b.write(Long(self.poster_photo_id)) + + if self.w is not None: + b.write(Int(self.w)) + + if self.h is not None: + b.write(Int(self.h)) + + b.write(self.caption.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_embed_post.py b/pyrogram/raw/types/page_block_embed_post.py new file mode 100644 index 00000000..c7118205 --- /dev/null +++ b/pyrogram/raw/types/page_block_embed_post.py @@ -0,0 +1,102 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockEmbedPost(TLObject): # type: ignore + """An embedded post + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``F259A80B`` + + Parameters: + url (``str``): + Web page URL + + webpage_id (``int`` ``64-bit``): + ID of generated webpage preview + + author_photo_id (``int`` ``64-bit``): + ID of the author's photo + + author (``str``): + Author name + + date (``int`` ``32-bit``): + Creation date + + blocks (List of :obj:`PageBlock `): + Post contents + + caption (:obj:`PageCaption `): + Caption + + """ + + __slots__: List[str] = ["url", "webpage_id", "author_photo_id", "author", "date", "blocks", "caption"] + + ID = 0xf259a80b + QUALNAME = "types.PageBlockEmbedPost" + + def __init__(self, *, url: str, webpage_id: int, author_photo_id: int, author: str, date: int, blocks: List["raw.base.PageBlock"], caption: "raw.base.PageCaption") -> None: + self.url = url # string + self.webpage_id = webpage_id # long + self.author_photo_id = author_photo_id # long + self.author = author # string + self.date = date # int + self.blocks = blocks # Vector + self.caption = caption # PageCaption + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockEmbedPost": + # No flags + + url = String.read(b) + + webpage_id = Long.read(b) + + author_photo_id = Long.read(b) + + author = String.read(b) + + date = Int.read(b) + + blocks = TLObject.read(b) + + caption = TLObject.read(b) + + return PageBlockEmbedPost(url=url, webpage_id=webpage_id, author_photo_id=author_photo_id, author=author, date=date, blocks=blocks, caption=caption) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(String(self.url)) + + b.write(Long(self.webpage_id)) + + b.write(Long(self.author_photo_id)) + + b.write(String(self.author)) + + b.write(Int(self.date)) + + b.write(Vector(self.blocks)) + + b.write(self.caption.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_footer.py b/pyrogram/raw/types/page_block_footer.py new file mode 100644 index 00000000..e098b727 --- /dev/null +++ b/pyrogram/raw/types/page_block_footer.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockFooter(TLObject): # type: ignore + """Page footer + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``48870999`` + + Parameters: + text (:obj:`RichText `): + Contents + + """ + + __slots__: List[str] = ["text"] + + ID = 0x48870999 + QUALNAME = "types.PageBlockFooter" + + def __init__(self, *, text: "raw.base.RichText") -> None: + self.text = text # RichText + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockFooter": + # No flags + + text = TLObject.read(b) + + return PageBlockFooter(text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.text.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_header.py b/pyrogram/raw/types/page_block_header.py new file mode 100644 index 00000000..f7bde69f --- /dev/null +++ b/pyrogram/raw/types/page_block_header.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockHeader(TLObject): # type: ignore + """Page header + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``BFD064EC`` + + Parameters: + text (:obj:`RichText `): + Contents + + """ + + __slots__: List[str] = ["text"] + + ID = 0xbfd064ec + QUALNAME = "types.PageBlockHeader" + + def __init__(self, *, text: "raw.base.RichText") -> None: + self.text = text # RichText + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockHeader": + # No flags + + text = TLObject.read(b) + + return PageBlockHeader(text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.text.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_kicker.py b/pyrogram/raw/types/page_block_kicker.py new file mode 100644 index 00000000..633b928f --- /dev/null +++ b/pyrogram/raw/types/page_block_kicker.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockKicker(TLObject): # type: ignore + """Kicker + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``1E148390`` + + Parameters: + text (:obj:`RichText `): + Contents + + """ + + __slots__: List[str] = ["text"] + + ID = 0x1e148390 + QUALNAME = "types.PageBlockKicker" + + def __init__(self, *, text: "raw.base.RichText") -> None: + self.text = text # RichText + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockKicker": + # No flags + + text = TLObject.read(b) + + return PageBlockKicker(text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.text.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_list.py b/pyrogram/raw/types/page_block_list.py new file mode 100644 index 00000000..d56ec9fb --- /dev/null +++ b/pyrogram/raw/types/page_block_list.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockList(TLObject): # type: ignore + """Unordered list of IV blocks + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``E4E88011`` + + Parameters: + items (List of :obj:`PageListItem `): + List of blocks in an IV page + + """ + + __slots__: List[str] = ["items"] + + ID = 0xe4e88011 + QUALNAME = "types.PageBlockList" + + def __init__(self, *, items: List["raw.base.PageListItem"]) -> None: + self.items = items # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockList": + # No flags + + items = TLObject.read(b) + + return PageBlockList(items=items) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.items)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_map.py b/pyrogram/raw/types/page_block_map.py new file mode 100644 index 00000000..42e4e512 --- /dev/null +++ b/pyrogram/raw/types/page_block_map.py @@ -0,0 +1,86 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockMap(TLObject): # type: ignore + """A map + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``A44F3EF6`` + + Parameters: + geo (:obj:`GeoPoint `): + Location of the map center + + zoom (``int`` ``32-bit``): + Map zoom level; 13-20 + + w (``int`` ``32-bit``): + Map width in pixels before applying scale; 16-102 + + h (``int`` ``32-bit``): + Map height in pixels before applying scale; 16-1024 + + caption (:obj:`PageCaption `): + Caption + + """ + + __slots__: List[str] = ["geo", "zoom", "w", "h", "caption"] + + ID = 0xa44f3ef6 + QUALNAME = "types.PageBlockMap" + + def __init__(self, *, geo: "raw.base.GeoPoint", zoom: int, w: int, h: int, caption: "raw.base.PageCaption") -> None: + self.geo = geo # GeoPoint + self.zoom = zoom # int + self.w = w # int + self.h = h # int + self.caption = caption # PageCaption + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockMap": + # No flags + + geo = TLObject.read(b) + + zoom = Int.read(b) + + w = Int.read(b) + + h = Int.read(b) + + caption = TLObject.read(b) + + return PageBlockMap(geo=geo, zoom=zoom, w=w, h=h, caption=caption) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.geo.write()) + + b.write(Int(self.zoom)) + + b.write(Int(self.w)) + + b.write(Int(self.h)) + + b.write(self.caption.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_ordered_list.py b/pyrogram/raw/types/page_block_ordered_list.py new file mode 100644 index 00000000..7a5f68e9 --- /dev/null +++ b/pyrogram/raw/types/page_block_ordered_list.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockOrderedList(TLObject): # type: ignore + """Ordered list of IV blocks + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``9A8AE1E1`` + + Parameters: + items (List of :obj:`PageListOrderedItem `): + List items + + """ + + __slots__: List[str] = ["items"] + + ID = 0x9a8ae1e1 + QUALNAME = "types.PageBlockOrderedList" + + def __init__(self, *, items: List["raw.base.PageListOrderedItem"]) -> None: + self.items = items # Vector + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockOrderedList": + # No flags + + items = TLObject.read(b) + + return PageBlockOrderedList(items=items) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(Vector(self.items)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_paragraph.py b/pyrogram/raw/types/page_block_paragraph.py new file mode 100644 index 00000000..88aaa1a3 --- /dev/null +++ b/pyrogram/raw/types/page_block_paragraph.py @@ -0,0 +1,54 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockParagraph(TLObject): # type: ignore + """A paragraph + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``467A0766`` + + Parameters: + text (:obj:`RichText `): + Text + + """ + + __slots__: List[str] = ["text"] + + ID = 0x467a0766 + QUALNAME = "types.PageBlockParagraph" + + def __init__(self, *, text: "raw.base.RichText") -> None: + self.text = text # RichText + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockParagraph": + # No flags + + text = TLObject.read(b) + + return PageBlockParagraph(text=text) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + # No flags + + b.write(self.text.write()) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_photo.py b/pyrogram/raw/types/page_block_photo.py new file mode 100644 index 00000000..d5831073 --- /dev/null +++ b/pyrogram/raw/types/page_block_photo.py @@ -0,0 +1,82 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockPhoto(TLObject): # type: ignore + """A photo + + Constructor of :obj:`~pyrogram.raw.base.PageBlock`. + + Details: + - Layer: ``224`` + - ID: ``1759C560`` + + Parameters: + photo_id (``int`` ``64-bit``): + Photo ID + + caption (:obj:`PageCaption `): + Caption + + url (``str``, *optional*): + HTTP URL of page the photo leads to when clicked + + webpage_id (``int`` ``64-bit``, *optional*): + ID of preview of the page the photo leads to when clicked + + """ + + __slots__: List[str] = ["photo_id", "caption", "url", "webpage_id"] + + ID = 0x1759c560 + QUALNAME = "types.PageBlockPhoto" + + def __init__(self, *, photo_id: int, caption: "raw.base.PageCaption", url: Optional[str] = None, webpage_id: Optional[int] = None) -> None: + self.photo_id = photo_id # long + self.caption = caption # PageCaption + self.url = url # flags.0?string + self.webpage_id = webpage_id # flags.0?long + + @staticmethod + def read(b: BytesIO, *args: Any) -> "PageBlockPhoto": + + flags = Int.read(b) + + photo_id = Long.read(b) + + caption = TLObject.read(b) + + url = String.read(b) if flags & (1 << 0) else None + webpage_id = Long.read(b) if flags & (1 << 0) else None + return PageBlockPhoto(photo_id=photo_id, caption=caption, url=url, webpage_id=webpage_id) + + def write(self, *args) -> bytes: + b = BytesIO() + b.write(Int(self.ID, False)) + + flags = 0 + flags |= (1 << 0) if self.url is not None else 0 + flags |= (1 << 0) if self.webpage_id is not None else 0 + b.write(Int(flags)) + + b.write(Long(self.photo_id)) + + b.write(self.caption.write()) + + if self.url is not None: + b.write(String(self.url)) + + if self.webpage_id is not None: + b.write(Long(self.webpage_id)) + + return b.getvalue() diff --git a/pyrogram/raw/types/page_block_preformatted.py b/pyrogram/raw/types/page_block_preformatted.py new file mode 100644 index 00000000..c2793b83 --- /dev/null +++ b/pyrogram/raw/types/page_block_preformatted.py @@ -0,0 +1,62 @@ +from io import BytesIO + +from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector +from pyrogram.raw.core import TLObject +from pyrogram import raw +from typing import List, Optional, Any + +# # # # # # # # # # # # # # # # # # # # # # # # +# !!! WARNING !!! # +# This is a generated file! # +# All changes made in this file will be lost! # +# # # # # # # # # # # # # # # # # # # # # # # # + + +class PageBlockPreformatted(TLObject): # type: ignore + """Preformatted (
 text)
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C070D93E``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+        language (``str``):
+            Programming language of preformatted text
+
+    """
+
+    __slots__: List[str] = ["text", "language"]
+
+    ID = 0xc070d93e
+    QUALNAME = "types.PageBlockPreformatted"
+
+    def __init__(self, *, text: "raw.base.RichText", language: str) -> None:
+        self.text = text  # RichText
+        self.language = language  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockPreformatted":
+        # No flags
+
+        text = TLObject.read(b)
+
+        language = String.read(b)
+
+        return PageBlockPreformatted(text=text, language=language)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(String(self.language))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_pullquote.py b/pyrogram/raw/types/page_block_pullquote.py
new file mode 100644
index 00000000..ae31f0c6
--- /dev/null
+++ b/pyrogram/raw/types/page_block_pullquote.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockPullquote(TLObject):  # type: ignore
+    """Pullquote
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4F4456D3``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+        caption (:obj:`RichText `):
+            Caption
+
+    """
+
+    __slots__: List[str] = ["text", "caption"]
+
+    ID = 0x4f4456d3
+    QUALNAME = "types.PageBlockPullquote"
+
+    def __init__(self, *, text: "raw.base.RichText", caption: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+        self.caption = caption  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockPullquote":
+        # No flags
+
+        text = TLObject.read(b)
+
+        caption = TLObject.read(b)
+
+        return PageBlockPullquote(text=text, caption=caption)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(self.caption.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_related_articles.py b/pyrogram/raw/types/page_block_related_articles.py
new file mode 100644
index 00000000..8a93f0fa
--- /dev/null
+++ b/pyrogram/raw/types/page_block_related_articles.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockRelatedArticles(TLObject):  # type: ignore
+    """Related articles
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``16115A96``
+
+    Parameters:
+        title (:obj:`RichText `):
+            Title
+
+        articles (List of :obj:`PageRelatedArticle `):
+            Related articles
+
+    """
+
+    __slots__: List[str] = ["title", "articles"]
+
+    ID = 0x16115a96
+    QUALNAME = "types.PageBlockRelatedArticles"
+
+    def __init__(self, *, title: "raw.base.RichText", articles: List["raw.base.PageRelatedArticle"]) -> None:
+        self.title = title  # RichText
+        self.articles = articles  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockRelatedArticles":
+        # No flags
+
+        title = TLObject.read(b)
+
+        articles = TLObject.read(b)
+
+        return PageBlockRelatedArticles(title=title, articles=articles)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.title.write())
+
+        b.write(Vector(self.articles))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_slideshow.py b/pyrogram/raw/types/page_block_slideshow.py
new file mode 100644
index 00000000..1170d803
--- /dev/null
+++ b/pyrogram/raw/types/page_block_slideshow.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockSlideshow(TLObject):  # type: ignore
+    """Slideshow
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``31F9590``
+
+    Parameters:
+        items (List of :obj:`PageBlock `):
+            Slideshow items
+
+        caption (:obj:`PageCaption `):
+            Caption
+
+    """
+
+    __slots__: List[str] = ["items", "caption"]
+
+    ID = 0x31f9590
+    QUALNAME = "types.PageBlockSlideshow"
+
+    def __init__(self, *, items: List["raw.base.PageBlock"], caption: "raw.base.PageCaption") -> None:
+        self.items = items  # Vector
+        self.caption = caption  # PageCaption
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockSlideshow":
+        # No flags
+
+        items = TLObject.read(b)
+
+        caption = TLObject.read(b)
+
+        return PageBlockSlideshow(items=items, caption=caption)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.items))
+
+        b.write(self.caption.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_subheader.py b/pyrogram/raw/types/page_block_subheader.py
new file mode 100644
index 00000000..52d97e48
--- /dev/null
+++ b/pyrogram/raw/types/page_block_subheader.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockSubheader(TLObject):  # type: ignore
+    """Subheader
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F12BB6E1``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Subheader
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0xf12bb6e1
+    QUALNAME = "types.PageBlockSubheader"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockSubheader":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return PageBlockSubheader(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_subtitle.py b/pyrogram/raw/types/page_block_subtitle.py
new file mode 100644
index 00000000..e2a816bc
--- /dev/null
+++ b/pyrogram/raw/types/page_block_subtitle.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockSubtitle(TLObject):  # type: ignore
+    """Subtitle
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8FFA9A1F``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x8ffa9a1f
+    QUALNAME = "types.PageBlockSubtitle"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockSubtitle":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return PageBlockSubtitle(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_table.py b/pyrogram/raw/types/page_block_table.py
new file mode 100644
index 00000000..7e4404f9
--- /dev/null
+++ b/pyrogram/raw/types/page_block_table.py
@@ -0,0 +1,76 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockTable(TLObject):  # type: ignore
+    """Table
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BF4DEA82``
+
+    Parameters:
+        title (:obj:`RichText `):
+            Title
+
+        rows (List of :obj:`PageTableRow `):
+            Table rows
+
+        bordered (``bool``, *optional*):
+            Does the table have a visible border?
+
+        striped (``bool``, *optional*):
+            Is the table striped?
+
+    """
+
+    __slots__: List[str] = ["title", "rows", "bordered", "striped"]
+
+    ID = 0xbf4dea82
+    QUALNAME = "types.PageBlockTable"
+
+    def __init__(self, *, title: "raw.base.RichText", rows: List["raw.base.PageTableRow"], bordered: Optional[bool] = None, striped: Optional[bool] = None) -> None:
+        self.title = title  # RichText
+        self.rows = rows  # Vector
+        self.bordered = bordered  # flags.0?true
+        self.striped = striped  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockTable":
+
+        flags = Int.read(b)
+
+        bordered = True if flags & (1 << 0) else False
+        striped = True if flags & (1 << 1) else False
+        title = TLObject.read(b)
+
+        rows = TLObject.read(b)
+
+        return PageBlockTable(title=title, rows=rows, bordered=bordered, striped=striped)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.bordered else 0
+        flags |= (1 << 1) if self.striped else 0
+        b.write(Int(flags))
+
+        b.write(self.title.write())
+
+        b.write(Vector(self.rows))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_title.py b/pyrogram/raw/types/page_block_title.py
new file mode 100644
index 00000000..6dbaaa02
--- /dev/null
+++ b/pyrogram/raw/types/page_block_title.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockTitle(TLObject):  # type: ignore
+    """Title
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``70ABC3FD``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Title
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x70abc3fd
+    QUALNAME = "types.PageBlockTitle"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockTitle":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return PageBlockTitle(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_unsupported.py b/pyrogram/raw/types/page_block_unsupported.py
new file mode 100644
index 00000000..7e6d2a1e
--- /dev/null
+++ b/pyrogram/raw/types/page_block_unsupported.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockUnsupported(TLObject):  # type: ignore
+    """Unsupported IV element
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``13567E8A``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x13567e8a
+    QUALNAME = "types.PageBlockUnsupported"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockUnsupported":
+        # No flags
+
+        return PageBlockUnsupported()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_block_video.py b/pyrogram/raw/types/page_block_video.py
new file mode 100644
index 00000000..1d6c4ac3
--- /dev/null
+++ b/pyrogram/raw/types/page_block_video.py
@@ -0,0 +1,76 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageBlockVideo(TLObject):  # type: ignore
+    """Video
+
+    Constructor of :obj:`~pyrogram.raw.base.PageBlock`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7C8FE7B6``
+
+    Parameters:
+        video_id (``int`` ``64-bit``):
+            Video ID
+
+        caption (:obj:`PageCaption `):
+            Caption
+
+        autoplay (``bool``, *optional*):
+            Whether the video is set to autoplay
+
+        loop (``bool``, *optional*):
+            Whether the video is set to loop
+
+    """
+
+    __slots__: List[str] = ["video_id", "caption", "autoplay", "loop"]
+
+    ID = 0x7c8fe7b6
+    QUALNAME = "types.PageBlockVideo"
+
+    def __init__(self, *, video_id: int, caption: "raw.base.PageCaption", autoplay: Optional[bool] = None, loop: Optional[bool] = None) -> None:
+        self.video_id = video_id  # long
+        self.caption = caption  # PageCaption
+        self.autoplay = autoplay  # flags.0?true
+        self.loop = loop  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageBlockVideo":
+
+        flags = Int.read(b)
+
+        autoplay = True if flags & (1 << 0) else False
+        loop = True if flags & (1 << 1) else False
+        video_id = Long.read(b)
+
+        caption = TLObject.read(b)
+
+        return PageBlockVideo(video_id=video_id, caption=caption, autoplay=autoplay, loop=loop)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.autoplay else 0
+        flags |= (1 << 1) if self.loop else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.video_id))
+
+        b.write(self.caption.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_caption.py b/pyrogram/raw/types/page_caption.py
new file mode 100644
index 00000000..d6e7a30e
--- /dev/null
+++ b/pyrogram/raw/types/page_caption.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageCaption(TLObject):  # type: ignore
+    """Page caption
+
+    Constructor of :obj:`~pyrogram.raw.base.PageCaption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6F747657``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Caption
+
+        credit (:obj:`RichText `):
+            Credits
+
+    """
+
+    __slots__: List[str] = ["text", "credit"]
+
+    ID = 0x6f747657
+    QUALNAME = "types.PageCaption"
+
+    def __init__(self, *, text: "raw.base.RichText", credit: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+        self.credit = credit  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageCaption":
+        # No flags
+
+        text = TLObject.read(b)
+
+        credit = TLObject.read(b)
+
+        return PageCaption(text=text, credit=credit)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(self.credit.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_list_item_blocks.py b/pyrogram/raw/types/page_list_item_blocks.py
new file mode 100644
index 00000000..91f90f85
--- /dev/null
+++ b/pyrogram/raw/types/page_list_item_blocks.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageListItemBlocks(TLObject):  # type: ignore
+    """List item
+
+    Constructor of :obj:`~pyrogram.raw.base.PageListItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``25E073FC``
+
+    Parameters:
+        blocks (List of :obj:`PageBlock `):
+            Blocks
+
+    """
+
+    __slots__: List[str] = ["blocks"]
+
+    ID = 0x25e073fc
+    QUALNAME = "types.PageListItemBlocks"
+
+    def __init__(self, *, blocks: List["raw.base.PageBlock"]) -> None:
+        self.blocks = blocks  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageListItemBlocks":
+        # No flags
+
+        blocks = TLObject.read(b)
+
+        return PageListItemBlocks(blocks=blocks)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.blocks))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_list_item_text.py b/pyrogram/raw/types/page_list_item_text.py
new file mode 100644
index 00000000..2b913547
--- /dev/null
+++ b/pyrogram/raw/types/page_list_item_text.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageListItemText(TLObject):  # type: ignore
+    """List item
+
+    Constructor of :obj:`~pyrogram.raw.base.PageListItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B92FB6CD``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0xb92fb6cd
+    QUALNAME = "types.PageListItemText"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageListItemText":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return PageListItemText(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_list_ordered_item_blocks.py b/pyrogram/raw/types/page_list_ordered_item_blocks.py
new file mode 100644
index 00000000..189b15ea
--- /dev/null
+++ b/pyrogram/raw/types/page_list_ordered_item_blocks.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageListOrderedItemBlocks(TLObject):  # type: ignore
+    """Ordered list of IV blocks
+
+    Constructor of :obj:`~pyrogram.raw.base.PageListOrderedItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``98DD8936``
+
+    Parameters:
+        num (``str``):
+            Number of element within ordered list
+
+        blocks (List of :obj:`PageBlock `):
+            Item contents
+
+    """
+
+    __slots__: List[str] = ["num", "blocks"]
+
+    ID = 0x98dd8936
+    QUALNAME = "types.PageListOrderedItemBlocks"
+
+    def __init__(self, *, num: str, blocks: List["raw.base.PageBlock"]) -> None:
+        self.num = num  # string
+        self.blocks = blocks  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageListOrderedItemBlocks":
+        # No flags
+
+        num = String.read(b)
+
+        blocks = TLObject.read(b)
+
+        return PageListOrderedItemBlocks(num=num, blocks=blocks)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.num))
+
+        b.write(Vector(self.blocks))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_list_ordered_item_text.py b/pyrogram/raw/types/page_list_ordered_item_text.py
new file mode 100644
index 00000000..15e1aaa1
--- /dev/null
+++ b/pyrogram/raw/types/page_list_ordered_item_text.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageListOrderedItemText(TLObject):  # type: ignore
+    """Ordered list of text items
+
+    Constructor of :obj:`~pyrogram.raw.base.PageListOrderedItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5E068047``
+
+    Parameters:
+        num (``str``):
+            Number of element within ordered list
+
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["num", "text"]
+
+    ID = 0x5e068047
+    QUALNAME = "types.PageListOrderedItemText"
+
+    def __init__(self, *, num: str, text: "raw.base.RichText") -> None:
+        self.num = num  # string
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageListOrderedItemText":
+        # No flags
+
+        num = String.read(b)
+
+        text = TLObject.read(b)
+
+        return PageListOrderedItemText(num=num, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.num))
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_related_article.py b/pyrogram/raw/types/page_related_article.py
new file mode 100644
index 00000000..835019bf
--- /dev/null
+++ b/pyrogram/raw/types/page_related_article.py
@@ -0,0 +1,109 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageRelatedArticle(TLObject):  # type: ignore
+    """Related article
+
+    Constructor of :obj:`~pyrogram.raw.base.PageRelatedArticle`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B390DC08``
+
+    Parameters:
+        url (``str``):
+            URL of article
+
+        webpage_id (``int`` ``64-bit``):
+            Webpage ID of generated IV preview
+
+        title (``str``, *optional*):
+            Title
+
+        description (``str``, *optional*):
+            Description
+
+        photo_id (``int`` ``64-bit``, *optional*):
+            ID of preview photo
+
+        author (``str``, *optional*):
+            Author name
+
+        published_date (``int`` ``32-bit``, *optional*):
+            Date of publication
+
+    """
+
+    __slots__: List[str] = ["url", "webpage_id", "title", "description", "photo_id", "author", "published_date"]
+
+    ID = 0xb390dc08
+    QUALNAME = "types.PageRelatedArticle"
+
+    def __init__(self, *, url: str, webpage_id: int, title: Optional[str] = None, description: Optional[str] = None, photo_id: Optional[int] = None, author: Optional[str] = None, published_date: Optional[int] = None) -> None:
+        self.url = url  # string
+        self.webpage_id = webpage_id  # long
+        self.title = title  # flags.0?string
+        self.description = description  # flags.1?string
+        self.photo_id = photo_id  # flags.2?long
+        self.author = author  # flags.3?string
+        self.published_date = published_date  # flags.4?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageRelatedArticle":
+
+        flags = Int.read(b)
+
+        url = String.read(b)
+
+        webpage_id = Long.read(b)
+
+        title = String.read(b) if flags & (1 << 0) else None
+        description = String.read(b) if flags & (1 << 1) else None
+        photo_id = Long.read(b) if flags & (1 << 2) else None
+        author = String.read(b) if flags & (1 << 3) else None
+        published_date = Int.read(b) if flags & (1 << 4) else None
+        return PageRelatedArticle(url=url, webpage_id=webpage_id, title=title, description=description, photo_id=photo_id, author=author, published_date=published_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.title is not None else 0
+        flags |= (1 << 1) if self.description is not None else 0
+        flags |= (1 << 2) if self.photo_id is not None else 0
+        flags |= (1 << 3) if self.author is not None else 0
+        flags |= (1 << 4) if self.published_date is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.url))
+
+        b.write(Long(self.webpage_id))
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.description is not None:
+            b.write(String(self.description))
+
+        if self.photo_id is not None:
+            b.write(Long(self.photo_id))
+
+        if self.author is not None:
+            b.write(String(self.author))
+
+        if self.published_date is not None:
+            b.write(Int(self.published_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_table_cell.py b/pyrogram/raw/types/page_table_cell.py
new file mode 100644
index 00000000..6b0554b3
--- /dev/null
+++ b/pyrogram/raw/types/page_table_cell.py
@@ -0,0 +1,106 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageTableCell(TLObject):  # type: ignore
+    """Table cell
+
+    Constructor of :obj:`~pyrogram.raw.base.PageTableCell`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``34566B6A``
+
+    Parameters:
+        header (``bool``, *optional*):
+            Is this element part of the column header
+
+        align_center (``bool``, *optional*):
+            Horizontally centered block
+
+        align_right (``bool``, *optional*):
+            Right-aligned block
+
+        valign_middle (``bool``, *optional*):
+            Vertically centered block
+
+        valign_bottom (``bool``, *optional*):
+            Block vertically-aligned to the bottom
+
+        text (:obj:`RichText `, *optional*):
+            Content
+
+        colspan (``int`` ``32-bit``, *optional*):
+            For how many columns should this cell extend
+
+        rowspan (``int`` ``32-bit``, *optional*):
+            For how many rows should this cell extend
+
+    """
+
+    __slots__: List[str] = ["header", "align_center", "align_right", "valign_middle", "valign_bottom", "text", "colspan", "rowspan"]
+
+    ID = 0x34566b6a
+    QUALNAME = "types.PageTableCell"
+
+    def __init__(self, *, header: Optional[bool] = None, align_center: Optional[bool] = None, align_right: Optional[bool] = None, valign_middle: Optional[bool] = None, valign_bottom: Optional[bool] = None, text: "raw.base.RichText" = None, colspan: Optional[int] = None, rowspan: Optional[int] = None) -> None:
+        self.header = header  # flags.0?true
+        self.align_center = align_center  # flags.3?true
+        self.align_right = align_right  # flags.4?true
+        self.valign_middle = valign_middle  # flags.5?true
+        self.valign_bottom = valign_bottom  # flags.6?true
+        self.text = text  # flags.7?RichText
+        self.colspan = colspan  # flags.1?int
+        self.rowspan = rowspan  # flags.2?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageTableCell":
+
+        flags = Int.read(b)
+
+        header = True if flags & (1 << 0) else False
+        align_center = True if flags & (1 << 3) else False
+        align_right = True if flags & (1 << 4) else False
+        valign_middle = True if flags & (1 << 5) else False
+        valign_bottom = True if flags & (1 << 6) else False
+        text = TLObject.read(b) if flags & (1 << 7) else None
+
+        colspan = Int.read(b) if flags & (1 << 1) else None
+        rowspan = Int.read(b) if flags & (1 << 2) else None
+        return PageTableCell(header=header, align_center=align_center, align_right=align_right, valign_middle=valign_middle, valign_bottom=valign_bottom, text=text, colspan=colspan, rowspan=rowspan)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.header else 0
+        flags |= (1 << 3) if self.align_center else 0
+        flags |= (1 << 4) if self.align_right else 0
+        flags |= (1 << 5) if self.valign_middle else 0
+        flags |= (1 << 6) if self.valign_bottom else 0
+        flags |= (1 << 7) if self.text is not None else 0
+        flags |= (1 << 1) if self.colspan is not None else 0
+        flags |= (1 << 2) if self.rowspan is not None else 0
+        b.write(Int(flags))
+
+        if self.text is not None:
+            b.write(self.text.write())
+
+        if self.colspan is not None:
+            b.write(Int(self.colspan))
+
+        if self.rowspan is not None:
+            b.write(Int(self.rowspan))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/page_table_row.py b/pyrogram/raw/types/page_table_row.py
new file mode 100644
index 00000000..fd5970ae
--- /dev/null
+++ b/pyrogram/raw/types/page_table_row.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PageTableRow(TLObject):  # type: ignore
+    """Table row
+
+    Constructor of :obj:`~pyrogram.raw.base.PageTableRow`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E0C0C5E5``
+
+    Parameters:
+        cells (List of :obj:`PageTableCell `):
+            Table cells
+
+    """
+
+    __slots__: List[str] = ["cells"]
+
+    ID = 0xe0c0c5e5
+    QUALNAME = "types.PageTableRow"
+
+    def __init__(self, *, cells: List["raw.base.PageTableCell"]) -> None:
+        self.cells = cells  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PageTableRow":
+        # No flags
+
+        cells = TLObject.read(b)
+
+        return PageTableRow(cells=cells)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.cells))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/paid_reaction_privacy_anonymous.py b/pyrogram/raw/types/paid_reaction_privacy_anonymous.py
new file mode 100644
index 00000000..02f7731e
--- /dev/null
+++ b/pyrogram/raw/types/paid_reaction_privacy_anonymous.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaidReactionPrivacyAnonymous(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PaidReactionPrivacy`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1F0C1AD9``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x1f0c1ad9
+    QUALNAME = "types.PaidReactionPrivacyAnonymous"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaidReactionPrivacyAnonymous":
+        # No flags
+
+        return PaidReactionPrivacyAnonymous()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/paid_reaction_privacy_default.py b/pyrogram/raw/types/paid_reaction_privacy_default.py
new file mode 100644
index 00000000..de7e8297
--- /dev/null
+++ b/pyrogram/raw/types/paid_reaction_privacy_default.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaidReactionPrivacyDefault(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PaidReactionPrivacy`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``206AD49E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x206ad49e
+    QUALNAME = "types.PaidReactionPrivacyDefault"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaidReactionPrivacyDefault":
+        # No flags
+
+        return PaidReactionPrivacyDefault()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/paid_reaction_privacy_peer.py b/pyrogram/raw/types/paid_reaction_privacy_peer.py
new file mode 100644
index 00000000..3d3c19de
--- /dev/null
+++ b/pyrogram/raw/types/paid_reaction_privacy_peer.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaidReactionPrivacyPeer(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PaidReactionPrivacy`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DC6CFCF0``
+
+    Parameters:
+        peer (:obj:`InputPeer `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer"]
+
+    ID = 0xdc6cfcf0
+    QUALNAME = "types.PaidReactionPrivacyPeer"
+
+    def __init__(self, *, peer: "raw.base.InputPeer") -> None:
+        self.peer = peer  # InputPeer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaidReactionPrivacyPeer":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        return PaidReactionPrivacyPeer(peer=peer)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/passkey.py b/pyrogram/raw/types/passkey.py
new file mode 100644
index 00000000..61c99a0a
--- /dev/null
+++ b/pyrogram/raw/types/passkey.py
@@ -0,0 +1,99 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Passkey(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Passkey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``98613EBF``
+
+    Parameters:
+        id (``str``):
+            N/A
+
+        name (``str``):
+            N/A
+
+        date (``int`` ``32-bit``):
+            N/A
+
+        software_emoji_id (``int`` ``64-bit``, *optional*):
+            N/A
+
+        last_usage_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.RegisterPasskey
+    """
+
+    __slots__: List[str] = ["id", "name", "date", "software_emoji_id", "last_usage_date"]
+
+    ID = 0x98613ebf
+    QUALNAME = "types.Passkey"
+
+    def __init__(self, *, id: str, name: str, date: int, software_emoji_id: Optional[int] = None, last_usage_date: Optional[int] = None) -> None:
+        self.id = id  # string
+        self.name = name  # string
+        self.date = date  # int
+        self.software_emoji_id = software_emoji_id  # flags.0?long
+        self.last_usage_date = last_usage_date  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Passkey":
+
+        flags = Int.read(b)
+
+        id = String.read(b)
+
+        name = String.read(b)
+
+        date = Int.read(b)
+
+        software_emoji_id = Long.read(b) if flags & (1 << 0) else None
+        last_usage_date = Int.read(b) if flags & (1 << 1) else None
+        return Passkey(id=id, name=name, date=date, software_emoji_id=software_emoji_id, last_usage_date=last_usage_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.software_emoji_id is not None else 0
+        flags |= (1 << 1) if self.last_usage_date is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.id))
+
+        b.write(String(self.name))
+
+        b.write(Int(self.date))
+
+        if self.software_emoji_id is not None:
+            b.write(Long(self.software_emoji_id))
+
+        if self.last_usage_date is not None:
+            b.write(Int(self.last_usage_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/password_kdf_algo_sha256_sha256_pbkdf2_hmacsha512iter100000_sha256_mod_pow.py b/pyrogram/raw/types/password_kdf_algo_sha256_sha256_pbkdf2_hmacsha512iter100000_sha256_mod_pow.py
new file mode 100644
index 00000000..a18bca3e
--- /dev/null
+++ b/pyrogram/raw/types/password_kdf_algo_sha256_sha256_pbkdf2_hmacsha512iter100000_sha256_mod_pow.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(TLObject):  # type: ignore
+    """This key derivation algorithm defines that SRP 2FA login must be used
+
+    Constructor of :obj:`~pyrogram.raw.base.PasswordKdfAlgo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3A912D4A``
+
+    Parameters:
+        salt1 (``bytes``):
+            One of two salts used by the derivation function (see SRP 2FA login)
+
+        salt2 (``bytes``):
+            One of two salts used by the derivation function (see SRP 2FA login)
+
+        g (``int`` ``32-bit``):
+            Base (see SRP 2FA login)
+
+        p (``bytes``):
+            2048-bit modulus (see SRP 2FA login)
+
+    """
+
+    __slots__: List[str] = ["salt1", "salt2", "g", "p"]
+
+    ID = 0x3a912d4a
+    QUALNAME = "types.PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow"
+
+    def __init__(self, *, salt1: bytes, salt2: bytes, g: int, p: bytes) -> None:
+        self.salt1 = salt1  # bytes
+        self.salt2 = salt2  # bytes
+        self.g = g  # int
+        self.p = p  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow":
+        # No flags
+
+        salt1 = Bytes.read(b)
+
+        salt2 = Bytes.read(b)
+
+        g = Int.read(b)
+
+        p = Bytes.read(b)
+
+        return PasswordKdfAlgoSHA256SHA256PBKDF2HMACSHA512iter100000SHA256ModPow(salt1=salt1, salt2=salt2, g=g, p=p)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.salt1))
+
+        b.write(Bytes(self.salt2))
+
+        b.write(Int(self.g))
+
+        b.write(Bytes(self.p))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/password_kdf_algo_unknown.py b/pyrogram/raw/types/password_kdf_algo_unknown.py
new file mode 100644
index 00000000..2f250cbd
--- /dev/null
+++ b/pyrogram/raw/types/password_kdf_algo_unknown.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PasswordKdfAlgoUnknown(TLObject):  # type: ignore
+    """Unknown KDF (most likely, the client is outdated and does not support the specified KDF algorithm)
+
+    Constructor of :obj:`~pyrogram.raw.base.PasswordKdfAlgo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D45AB096``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xd45ab096
+    QUALNAME = "types.PasswordKdfAlgoUnknown"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PasswordKdfAlgoUnknown":
+        # No flags
+
+        return PasswordKdfAlgoUnknown()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payment_charge.py b/pyrogram/raw/types/payment_charge.py
new file mode 100644
index 00000000..18129558
--- /dev/null
+++ b/pyrogram/raw/types/payment_charge.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentCharge(TLObject):  # type: ignore
+    """Payment identifier
+
+    Constructor of :obj:`~pyrogram.raw.base.PaymentCharge`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EA02C27E``
+
+    Parameters:
+        id (``str``):
+            Telegram payment identifier
+
+        provider_charge_id (``str``):
+            Provider payment identifier
+
+    """
+
+    __slots__: List[str] = ["id", "provider_charge_id"]
+
+    ID = 0xea02c27e
+    QUALNAME = "types.PaymentCharge"
+
+    def __init__(self, *, id: str, provider_charge_id: str) -> None:
+        self.id = id  # string
+        self.provider_charge_id = provider_charge_id  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentCharge":
+        # No flags
+
+        id = String.read(b)
+
+        provider_charge_id = String.read(b)
+
+        return PaymentCharge(id=id, provider_charge_id=provider_charge_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.id))
+
+        b.write(String(self.provider_charge_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payment_form_method.py b/pyrogram/raw/types/payment_form_method.py
new file mode 100644
index 00000000..561c3bd3
--- /dev/null
+++ b/pyrogram/raw/types/payment_form_method.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentFormMethod(TLObject):  # type: ignore
+    """Represents an additional payment method
+
+    Constructor of :obj:`~pyrogram.raw.base.PaymentFormMethod`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``88F8F21B``
+
+    Parameters:
+        url (``str``):
+            URL to open in a webview to process the payment
+
+        title (``str``):
+            Payment method description
+
+    """
+
+    __slots__: List[str] = ["url", "title"]
+
+    ID = 0x88f8f21b
+    QUALNAME = "types.PaymentFormMethod"
+
+    def __init__(self, *, url: str, title: str) -> None:
+        self.url = url  # string
+        self.title = title  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentFormMethod":
+        # No flags
+
+        url = String.read(b)
+
+        title = String.read(b)
+
+        return PaymentFormMethod(url=url, title=title)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(String(self.title))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payment_requested_info.py b/pyrogram/raw/types/payment_requested_info.py
new file mode 100644
index 00000000..b1e689aa
--- /dev/null
+++ b/pyrogram/raw/types/payment_requested_info.py
@@ -0,0 +1,85 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentRequestedInfo(TLObject):  # type: ignore
+    """Order info provided by the user
+
+    Constructor of :obj:`~pyrogram.raw.base.PaymentRequestedInfo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``909C3F94``
+
+    Parameters:
+        name (``str``, *optional*):
+            User's full name
+
+        phone (``str``, *optional*):
+            User's phone number
+
+        email (``str``, *optional*):
+            User's email address
+
+        shipping_address (:obj:`PostAddress `, *optional*):
+            User's shipping address
+
+    """
+
+    __slots__: List[str] = ["name", "phone", "email", "shipping_address"]
+
+    ID = 0x909c3f94
+    QUALNAME = "types.PaymentRequestedInfo"
+
+    def __init__(self, *, name: Optional[str] = None, phone: Optional[str] = None, email: Optional[str] = None, shipping_address: "raw.base.PostAddress" = None) -> None:
+        self.name = name  # flags.0?string
+        self.phone = phone  # flags.1?string
+        self.email = email  # flags.2?string
+        self.shipping_address = shipping_address  # flags.3?PostAddress
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentRequestedInfo":
+
+        flags = Int.read(b)
+
+        name = String.read(b) if flags & (1 << 0) else None
+        phone = String.read(b) if flags & (1 << 1) else None
+        email = String.read(b) if flags & (1 << 2) else None
+        shipping_address = TLObject.read(b) if flags & (1 << 3) else None
+
+        return PaymentRequestedInfo(name=name, phone=phone, email=email, shipping_address=shipping_address)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.name is not None else 0
+        flags |= (1 << 1) if self.phone is not None else 0
+        flags |= (1 << 2) if self.email is not None else 0
+        flags |= (1 << 3) if self.shipping_address is not None else 0
+        b.write(Int(flags))
+
+        if self.name is not None:
+            b.write(String(self.name))
+
+        if self.phone is not None:
+            b.write(String(self.phone))
+
+        if self.email is not None:
+            b.write(String(self.email))
+
+        if self.shipping_address is not None:
+            b.write(self.shipping_address.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payment_saved_credentials_card.py b/pyrogram/raw/types/payment_saved_credentials_card.py
new file mode 100644
index 00000000..26f3a2d4
--- /dev/null
+++ b/pyrogram/raw/types/payment_saved_credentials_card.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentSavedCredentialsCard(TLObject):  # type: ignore
+    """Saved credit card
+
+    Constructor of :obj:`~pyrogram.raw.base.PaymentSavedCredentials`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CDC27A1F``
+
+    Parameters:
+        id (``str``):
+            Card ID
+
+        title (``str``):
+            Title
+
+    """
+
+    __slots__: List[str] = ["id", "title"]
+
+    ID = 0xcdc27a1f
+    QUALNAME = "types.PaymentSavedCredentialsCard"
+
+    def __init__(self, *, id: str, title: str) -> None:
+        self.id = id  # string
+        self.title = title  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentSavedCredentialsCard":
+        # No flags
+
+        id = String.read(b)
+
+        title = String.read(b)
+
+        return PaymentSavedCredentialsCard(id=id, title=title)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.id))
+
+        b.write(String(self.title))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/__init__.py b/pyrogram/raw/types/payments/__init__.py
new file mode 100644
index 00000000..67f6542d
--- /dev/null
+++ b/pyrogram/raw/types/payments/__init__.py
@@ -0,0 +1,105 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .payment_form import PaymentForm
+from .payment_form_stars import PaymentFormStars
+from .payment_form_star_gift import PaymentFormStarGift
+from .validated_requested_info import ValidatedRequestedInfo
+from .payment_result import PaymentResult
+from .payment_verification_needed import PaymentVerificationNeeded
+from .payment_receipt import PaymentReceipt
+from .payment_receipt_stars import PaymentReceiptStars
+from .saved_info import SavedInfo
+from .bank_card_data import BankCardData
+from .exported_invoice import ExportedInvoice
+from .checked_gift_code import CheckedGiftCode
+from .giveaway_info import GiveawayInfo
+from .giveaway_info_results import GiveawayInfoResults
+from .stars_status import StarsStatus
+from .stars_revenue_stats import StarsRevenueStats
+from .stars_revenue_withdrawal_url import StarsRevenueWithdrawalUrl
+from .stars_revenue_ads_account_url import StarsRevenueAdsAccountUrl
+from .star_gifts_not_modified import StarGiftsNotModified
+from .star_gifts import StarGifts
+from .connected_star_ref_bots import ConnectedStarRefBots
+from .suggested_star_ref_bots import SuggestedStarRefBots
+from .star_gift_upgrade_preview import StarGiftUpgradePreview
+from .unique_star_gift import UniqueStarGift
+from .saved_star_gifts import SavedStarGifts
+from .star_gift_withdrawal_url import StarGiftWithdrawalUrl
+from .resale_star_gifts import ResaleStarGifts
+from .star_gift_collections_not_modified import StarGiftCollectionsNotModified
+from .star_gift_collections import StarGiftCollections
+from .unique_star_gift_value_info import UniqueStarGiftValueInfo
+from .check_can_send_gift_result_ok import CheckCanSendGiftResultOk
+from .check_can_send_gift_result_fail import CheckCanSendGiftResultFail
+from .star_gift_auction_state import StarGiftAuctionState
+from .star_gift_auction_acquired_gifts import StarGiftAuctionAcquiredGifts
+from .star_gift_active_auctions_not_modified import StarGiftActiveAuctionsNotModified
+from .star_gift_active_auctions import StarGiftActiveAuctions
+from .star_gift_upgrade_attributes import StarGiftUpgradeAttributes
+
+
+__all__ = [
+    "PaymentForm",
+    "PaymentFormStars",
+    "PaymentFormStarGift",
+    "ValidatedRequestedInfo",
+    "PaymentResult",
+    "PaymentVerificationNeeded",
+    "PaymentReceipt",
+    "PaymentReceiptStars",
+    "SavedInfo",
+    "BankCardData",
+    "ExportedInvoice",
+    "CheckedGiftCode",
+    "GiveawayInfo",
+    "GiveawayInfoResults",
+    "StarsStatus",
+    "StarsRevenueStats",
+    "StarsRevenueWithdrawalUrl",
+    "StarsRevenueAdsAccountUrl",
+    "StarGiftsNotModified",
+    "StarGifts",
+    "ConnectedStarRefBots",
+    "SuggestedStarRefBots",
+    "StarGiftUpgradePreview",
+    "UniqueStarGift",
+    "SavedStarGifts",
+    "StarGiftWithdrawalUrl",
+    "ResaleStarGifts",
+    "StarGiftCollectionsNotModified",
+    "StarGiftCollections",
+    "UniqueStarGiftValueInfo",
+    "CheckCanSendGiftResultOk",
+    "CheckCanSendGiftResultFail",
+    "StarGiftAuctionState",
+    "StarGiftAuctionAcquiredGifts",
+    "StarGiftActiveAuctionsNotModified",
+    "StarGiftActiveAuctions",
+    "StarGiftUpgradeAttributes",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/payments/bank_card_data.py b/pyrogram/raw/types/payments/bank_card_data.py
new file mode 100644
index 00000000..7655dabc
--- /dev/null
+++ b/pyrogram/raw/types/payments/bank_card_data.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class BankCardData(TLObject):  # type: ignore
+    """Credit card info, provided by the card's bank(s)
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.BankCardData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3E24E573``
+
+    Parameters:
+        title (``str``):
+            Credit card title
+
+        open_urls (List of :obj:`BankCardOpenUrl `):
+            Info URL(s) provided by the card's bank(s)
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetBankCardData
+    """
+
+    __slots__: List[str] = ["title", "open_urls"]
+
+    ID = 0x3e24e573
+    QUALNAME = "types.payments.BankCardData"
+
+    def __init__(self, *, title: str, open_urls: List["raw.base.BankCardOpenUrl"]) -> None:
+        self.title = title  # string
+        self.open_urls = open_urls  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "BankCardData":
+        # No flags
+
+        title = String.read(b)
+
+        open_urls = TLObject.read(b)
+
+        return BankCardData(title=title, open_urls=open_urls)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.title))
+
+        b.write(Vector(self.open_urls))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/check_can_send_gift_result_fail.py b/pyrogram/raw/types/payments/check_can_send_gift_result_fail.py
new file mode 100644
index 00000000..cd7339ae
--- /dev/null
+++ b/pyrogram/raw/types/payments/check_can_send_gift_result_fail.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class CheckCanSendGiftResultFail(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.CheckCanSendGiftResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D5E58274``
+
+    Parameters:
+        reason (:obj:`TextWithEntities `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.CheckCanSendGift
+    """
+
+    __slots__: List[str] = ["reason"]
+
+    ID = 0xd5e58274
+    QUALNAME = "types.payments.CheckCanSendGiftResultFail"
+
+    def __init__(self, *, reason: "raw.base.TextWithEntities") -> None:
+        self.reason = reason  # TextWithEntities
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "CheckCanSendGiftResultFail":
+        # No flags
+
+        reason = TLObject.read(b)
+
+        return CheckCanSendGiftResultFail(reason=reason)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.reason.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/check_can_send_gift_result_ok.py b/pyrogram/raw/types/payments/check_can_send_gift_result_ok.py
new file mode 100644
index 00000000..c125fa3f
--- /dev/null
+++ b/pyrogram/raw/types/payments/check_can_send_gift_result_ok.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class CheckCanSendGiftResultOk(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.CheckCanSendGiftResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``374FA7AD``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.CheckCanSendGift
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x374fa7ad
+    QUALNAME = "types.payments.CheckCanSendGiftResultOk"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "CheckCanSendGiftResultOk":
+        # No flags
+
+        return CheckCanSendGiftResultOk()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/checked_gift_code.py b/pyrogram/raw/types/payments/checked_gift_code.py
new file mode 100644
index 00000000..3d422de7
--- /dev/null
+++ b/pyrogram/raw/types/payments/checked_gift_code.py
@@ -0,0 +1,132 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class CheckedGiftCode(TLObject):  # type: ignore
+    """Contains info about a Telegram Premium giftcode link.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.CheckedGiftCode`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EB983F8F``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+            Creation date of the gift code.
+
+        days (``int`` ``32-bit``):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        via_giveaway (``bool``, *optional*):
+            Whether this giftcode was created by a giveaway.
+
+        from_id (:obj:`Peer `, *optional*):
+            The peer that created the gift code.
+
+        giveaway_msg_id (``int`` ``32-bit``, *optional*):
+            Message ID of the giveaway in the channel specified in from_id.
+
+        to_id (``int`` ``64-bit``, *optional*):
+            The destination user of the gift.
+
+        used_date (``int`` ``32-bit``, *optional*):
+            When was the giftcode imported, if it was imported.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.CheckGiftCode
+    """
+
+    __slots__: List[str] = ["date", "days", "chats", "users", "via_giveaway", "from_id", "giveaway_msg_id", "to_id", "used_date"]
+
+    ID = 0xeb983f8f
+    QUALNAME = "types.payments.CheckedGiftCode"
+
+    def __init__(self, *, date: int, days: int, chats: List["raw.base.Chat"], users: List["raw.base.User"], via_giveaway: Optional[bool] = None, from_id: "raw.base.Peer" = None, giveaway_msg_id: Optional[int] = None, to_id: Optional[int] = None, used_date: Optional[int] = None) -> None:
+        self.date = date  # int
+        self.days = days  # int
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.via_giveaway = via_giveaway  # flags.2?true
+        self.from_id = from_id  # flags.4?Peer
+        self.giveaway_msg_id = giveaway_msg_id  # flags.3?int
+        self.to_id = to_id  # flags.0?long
+        self.used_date = used_date  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "CheckedGiftCode":
+
+        flags = Int.read(b)
+
+        via_giveaway = True if flags & (1 << 2) else False
+        from_id = TLObject.read(b) if flags & (1 << 4) else None
+
+        giveaway_msg_id = Int.read(b) if flags & (1 << 3) else None
+        to_id = Long.read(b) if flags & (1 << 0) else None
+        date = Int.read(b)
+
+        days = Int.read(b)
+
+        used_date = Int.read(b) if flags & (1 << 1) else None
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return CheckedGiftCode(date=date, days=days, chats=chats, users=users, via_giveaway=via_giveaway, from_id=from_id, giveaway_msg_id=giveaway_msg_id, to_id=to_id, used_date=used_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.via_giveaway else 0
+        flags |= (1 << 4) if self.from_id is not None else 0
+        flags |= (1 << 3) if self.giveaway_msg_id is not None else 0
+        flags |= (1 << 0) if self.to_id is not None else 0
+        flags |= (1 << 1) if self.used_date is not None else 0
+        b.write(Int(flags))
+
+        if self.from_id is not None:
+            b.write(self.from_id.write())
+
+        if self.giveaway_msg_id is not None:
+            b.write(Int(self.giveaway_msg_id))
+
+        if self.to_id is not None:
+            b.write(Long(self.to_id))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.days))
+
+        if self.used_date is not None:
+            b.write(Int(self.used_date))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/connected_star_ref_bots.py b/pyrogram/raw/types/payments/connected_star_ref_bots.py
new file mode 100644
index 00000000..e17cbc42
--- /dev/null
+++ b/pyrogram/raw/types/payments/connected_star_ref_bots.py
@@ -0,0 +1,82 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ConnectedStarRefBots(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.ConnectedStarRefBots`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``98D5EA1D``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        connected_bots (List of :obj:`ConnectedBotStarRef `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+    Functions:
+        This object can be returned by 4 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetConnectedStarRefBots
+            payments.GetConnectedStarRefBot
+            payments.ConnectStarRefBot
+            payments.EditConnectedStarRefBot
+    """
+
+    __slots__: List[str] = ["count", "connected_bots", "users"]
+
+    ID = 0x98d5ea1d
+    QUALNAME = "types.payments.ConnectedStarRefBots"
+
+    def __init__(self, *, count: int, connected_bots: List["raw.base.ConnectedBotStarRef"], users: List["raw.base.User"]) -> None:
+        self.count = count  # int
+        self.connected_bots = connected_bots  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ConnectedStarRefBots":
+        # No flags
+
+        count = Int.read(b)
+
+        connected_bots = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return ConnectedStarRefBots(count=count, connected_bots=connected_bots, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.connected_bots))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/exported_invoice.py b/pyrogram/raw/types/payments/exported_invoice.py
new file mode 100644
index 00000000..e9de6964
--- /dev/null
+++ b/pyrogram/raw/types/payments/exported_invoice.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ExportedInvoice(TLObject):  # type: ignore
+    """Exported invoice deep link
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.ExportedInvoice`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AED0CBD9``
+
+    Parameters:
+        url (``str``):
+            Exported invoice deep link
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.ExportInvoice
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0xaed0cbd9
+    QUALNAME = "types.payments.ExportedInvoice"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ExportedInvoice":
+        # No flags
+
+        url = String.read(b)
+
+        return ExportedInvoice(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/giveaway_info.py b/pyrogram/raw/types/payments/giveaway_info.py
new file mode 100644
index 00000000..e9fed020
--- /dev/null
+++ b/pyrogram/raw/types/payments/giveaway_info.py
@@ -0,0 +1,104 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GiveawayInfo(TLObject):  # type: ignore
+    """Contains info about an ongoing giveaway.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.GiveawayInfo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4367DAA0``
+
+    Parameters:
+        start_date (``int`` ``32-bit``):
+            When was the giveaway started
+
+        participating (``bool``, *optional*):
+            The current user is participating in the giveaway.
+
+        preparing_results (``bool``, *optional*):
+            If set, the giveaway has ended and the results are being prepared.
+
+        joined_too_early_date (``int`` ``32-bit``, *optional*):
+            The current user can't participate in the giveaway, because they were already a member of the channel when the giveaway started, and the only_new_subscribers was set when starting the giveaway.
+
+        admin_disallowed_chat_id (``int`` ``64-bit``, *optional*):
+            If set, the current user can't participate in the giveaway, because they are an administrator in one of the channels (ID specified in this flag) that created the giveaway.
+
+        disallowed_country (``str``, *optional*):
+            If set, the current user can't participate in this giveaway, because their phone number is from the specified disallowed country (specified as a two-letter ISO 3166-1 alpha-2 country code).
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetGiveawayInfo
+    """
+
+    __slots__: List[str] = ["start_date", "participating", "preparing_results", "joined_too_early_date", "admin_disallowed_chat_id", "disallowed_country"]
+
+    ID = 0x4367daa0
+    QUALNAME = "types.payments.GiveawayInfo"
+
+    def __init__(self, *, start_date: int, participating: Optional[bool] = None, preparing_results: Optional[bool] = None, joined_too_early_date: Optional[int] = None, admin_disallowed_chat_id: Optional[int] = None, disallowed_country: Optional[str] = None) -> None:
+        self.start_date = start_date  # int
+        self.participating = participating  # flags.0?true
+        self.preparing_results = preparing_results  # flags.3?true
+        self.joined_too_early_date = joined_too_early_date  # flags.1?int
+        self.admin_disallowed_chat_id = admin_disallowed_chat_id  # flags.2?long
+        self.disallowed_country = disallowed_country  # flags.4?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GiveawayInfo":
+
+        flags = Int.read(b)
+
+        participating = True if flags & (1 << 0) else False
+        preparing_results = True if flags & (1 << 3) else False
+        start_date = Int.read(b)
+
+        joined_too_early_date = Int.read(b) if flags & (1 << 1) else None
+        admin_disallowed_chat_id = Long.read(b) if flags & (1 << 2) else None
+        disallowed_country = String.read(b) if flags & (1 << 4) else None
+        return GiveawayInfo(start_date=start_date, participating=participating, preparing_results=preparing_results, joined_too_early_date=joined_too_early_date, admin_disallowed_chat_id=admin_disallowed_chat_id, disallowed_country=disallowed_country)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.participating else 0
+        flags |= (1 << 3) if self.preparing_results else 0
+        flags |= (1 << 1) if self.joined_too_early_date is not None else 0
+        flags |= (1 << 2) if self.admin_disallowed_chat_id is not None else 0
+        flags |= (1 << 4) if self.disallowed_country is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.start_date))
+
+        if self.joined_too_early_date is not None:
+            b.write(Int(self.joined_too_early_date))
+
+        if self.admin_disallowed_chat_id is not None:
+            b.write(Long(self.admin_disallowed_chat_id))
+
+        if self.disallowed_country is not None:
+            b.write(String(self.disallowed_country))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/giveaway_info_results.py b/pyrogram/raw/types/payments/giveaway_info_results.py
new file mode 100644
index 00000000..62fc6567
--- /dev/null
+++ b/pyrogram/raw/types/payments/giveaway_info_results.py
@@ -0,0 +1,120 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GiveawayInfoResults(TLObject):  # type: ignore
+    """A giveaway has ended.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.GiveawayInfo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E175E66F``
+
+    Parameters:
+        start_date (``int`` ``32-bit``):
+            Start date of the giveaway
+
+        finish_date (``int`` ``32-bit``):
+            End date of the giveaway. May be bigger than the end date specified in parameters of the giveaway.
+
+        winners_count (``int`` ``32-bit``):
+            Number of winners in the giveaway
+
+        winner (``bool``, *optional*):
+            Whether we're one of the winners of this giveaway.
+
+        refunded (``bool``, *optional*):
+            Whether the giveaway was canceled and was fully refunded.
+
+        gift_code_slug (``str``, *optional*):
+            If we're one of the winners of this giveaway, contains the Premium gift code, see here » for more info on the full giveaway flow.
+
+        stars_prize (``int`` ``64-bit``, *optional*):
+            N/A
+
+        activated_count (``int`` ``32-bit``, *optional*):
+            Number of winners, which activated their gift codes.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetGiveawayInfo
+    """
+
+    __slots__: List[str] = ["start_date", "finish_date", "winners_count", "winner", "refunded", "gift_code_slug", "stars_prize", "activated_count"]
+
+    ID = 0xe175e66f
+    QUALNAME = "types.payments.GiveawayInfoResults"
+
+    def __init__(self, *, start_date: int, finish_date: int, winners_count: int, winner: Optional[bool] = None, refunded: Optional[bool] = None, gift_code_slug: Optional[str] = None, stars_prize: Optional[int] = None, activated_count: Optional[int] = None) -> None:
+        self.start_date = start_date  # int
+        self.finish_date = finish_date  # int
+        self.winners_count = winners_count  # int
+        self.winner = winner  # flags.0?true
+        self.refunded = refunded  # flags.1?true
+        self.gift_code_slug = gift_code_slug  # flags.3?string
+        self.stars_prize = stars_prize  # flags.4?long
+        self.activated_count = activated_count  # flags.2?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GiveawayInfoResults":
+
+        flags = Int.read(b)
+
+        winner = True if flags & (1 << 0) else False
+        refunded = True if flags & (1 << 1) else False
+        start_date = Int.read(b)
+
+        gift_code_slug = String.read(b) if flags & (1 << 3) else None
+        stars_prize = Long.read(b) if flags & (1 << 4) else None
+        finish_date = Int.read(b)
+
+        winners_count = Int.read(b)
+
+        activated_count = Int.read(b) if flags & (1 << 2) else None
+        return GiveawayInfoResults(start_date=start_date, finish_date=finish_date, winners_count=winners_count, winner=winner, refunded=refunded, gift_code_slug=gift_code_slug, stars_prize=stars_prize, activated_count=activated_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.winner else 0
+        flags |= (1 << 1) if self.refunded else 0
+        flags |= (1 << 3) if self.gift_code_slug is not None else 0
+        flags |= (1 << 4) if self.stars_prize is not None else 0
+        flags |= (1 << 2) if self.activated_count is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.start_date))
+
+        if self.gift_code_slug is not None:
+            b.write(String(self.gift_code_slug))
+
+        if self.stars_prize is not None:
+            b.write(Long(self.stars_prize))
+
+        b.write(Int(self.finish_date))
+
+        b.write(Int(self.winners_count))
+
+        if self.activated_count is not None:
+            b.write(Int(self.activated_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_form.py b/pyrogram/raw/types/payments/payment_form.py
new file mode 100644
index 00000000..366a89ed
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_form.py
@@ -0,0 +1,192 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentForm(TLObject):  # type: ignore
+    """Payment form
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentForm`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A0058751``
+
+    Parameters:
+        form_id (``int`` ``64-bit``):
+            Form ID
+
+        bot_id (``int`` ``64-bit``):
+            Bot ID
+
+        title (``str``):
+            Form title
+
+        description (``str``):
+            Description
+
+        invoice (:obj:`Invoice `):
+            Invoice
+
+        provider_id (``int`` ``64-bit``):
+            Payment provider ID.
+
+        url (``str``):
+            Payment form URL
+
+        users (List of :obj:`User `):
+            Users
+
+        can_save_credentials (``bool``, *optional*):
+            Whether the user can choose to save credentials.
+
+        password_missing (``bool``, *optional*):
+            Indicates that the user can save payment credentials, but only after setting up a 2FA password (currently the account doesn't have a 2FA password)
+
+        photo (:obj:`WebDocument `, *optional*):
+            Product photo
+
+        native_provider (``str``, *optional*):
+            Payment provider name.One of the following:- stripe
+
+        native_params (:obj:`DataJSON `, *optional*):
+            Contains information about the payment provider, if available, to support it natively without the need for opening the URL.A JSON object that can contain the following fields:- apple_pay_merchant_id: Apple Pay merchant ID- google_pay_public_key: Google Pay public key- need_country: True, if the user country must be provided,- need_zip: True, if the user ZIP/postal code must be provided,- need_cardholder_name: True, if the cardholder name must be provided
+
+        additional_methods (List of :obj:`PaymentFormMethod `, *optional*):
+            Additional payment methods
+
+        saved_info (:obj:`PaymentRequestedInfo `, *optional*):
+            Saved server-side order information
+
+        saved_credentials (List of :obj:`PaymentSavedCredentials `, *optional*):
+            Contains information about saved card credentials
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetPaymentForm
+    """
+
+    __slots__: List[str] = ["form_id", "bot_id", "title", "description", "invoice", "provider_id", "url", "users", "can_save_credentials", "password_missing", "photo", "native_provider", "native_params", "additional_methods", "saved_info", "saved_credentials"]
+
+    ID = 0xa0058751
+    QUALNAME = "types.payments.PaymentForm"
+
+    def __init__(self, *, form_id: int, bot_id: int, title: str, description: str, invoice: "raw.base.Invoice", provider_id: int, url: str, users: List["raw.base.User"], can_save_credentials: Optional[bool] = None, password_missing: Optional[bool] = None, photo: "raw.base.WebDocument" = None, native_provider: Optional[str] = None, native_params: "raw.base.DataJSON" = None, additional_methods: Optional[List["raw.base.PaymentFormMethod"]] = None, saved_info: "raw.base.PaymentRequestedInfo" = None, saved_credentials: Optional[List["raw.base.PaymentSavedCredentials"]] = None) -> None:
+        self.form_id = form_id  # long
+        self.bot_id = bot_id  # long
+        self.title = title  # string
+        self.description = description  # string
+        self.invoice = invoice  # Invoice
+        self.provider_id = provider_id  # long
+        self.url = url  # string
+        self.users = users  # Vector
+        self.can_save_credentials = can_save_credentials  # flags.2?true
+        self.password_missing = password_missing  # flags.3?true
+        self.photo = photo  # flags.5?WebDocument
+        self.native_provider = native_provider  # flags.4?string
+        self.native_params = native_params  # flags.4?DataJSON
+        self.additional_methods = additional_methods  # flags.6?Vector
+        self.saved_info = saved_info  # flags.0?PaymentRequestedInfo
+        self.saved_credentials = saved_credentials  # flags.1?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentForm":
+
+        flags = Int.read(b)
+
+        can_save_credentials = True if flags & (1 << 2) else False
+        password_missing = True if flags & (1 << 3) else False
+        form_id = Long.read(b)
+
+        bot_id = Long.read(b)
+
+        title = String.read(b)
+
+        description = String.read(b)
+
+        photo = TLObject.read(b) if flags & (1 << 5) else None
+
+        invoice = TLObject.read(b)
+
+        provider_id = Long.read(b)
+
+        url = String.read(b)
+
+        native_provider = String.read(b) if flags & (1 << 4) else None
+        native_params = TLObject.read(b) if flags & (1 << 4) else None
+
+        additional_methods = TLObject.read(b) if flags & (1 << 6) else []
+
+        saved_info = TLObject.read(b) if flags & (1 << 0) else None
+
+        saved_credentials = TLObject.read(b) if flags & (1 << 1) else []
+
+        users = TLObject.read(b)
+
+        return PaymentForm(form_id=form_id, bot_id=bot_id, title=title, description=description, invoice=invoice, provider_id=provider_id, url=url, users=users, can_save_credentials=can_save_credentials, password_missing=password_missing, photo=photo, native_provider=native_provider, native_params=native_params, additional_methods=additional_methods, saved_info=saved_info, saved_credentials=saved_credentials)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.can_save_credentials else 0
+        flags |= (1 << 3) if self.password_missing else 0
+        flags |= (1 << 5) if self.photo is not None else 0
+        flags |= (1 << 4) if self.native_provider is not None else 0
+        flags |= (1 << 4) if self.native_params is not None else 0
+        flags |= (1 << 6) if self.additional_methods else 0
+        flags |= (1 << 0) if self.saved_info is not None else 0
+        flags |= (1 << 1) if self.saved_credentials else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.form_id))
+
+        b.write(Long(self.bot_id))
+
+        b.write(String(self.title))
+
+        b.write(String(self.description))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        b.write(self.invoice.write())
+
+        b.write(Long(self.provider_id))
+
+        b.write(String(self.url))
+
+        if self.native_provider is not None:
+            b.write(String(self.native_provider))
+
+        if self.native_params is not None:
+            b.write(self.native_params.write())
+
+        if self.additional_methods is not None:
+            b.write(Vector(self.additional_methods))
+
+        if self.saved_info is not None:
+            b.write(self.saved_info.write())
+
+        if self.saved_credentials is not None:
+            b.write(Vector(self.saved_credentials))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_form_star_gift.py b/pyrogram/raw/types/payments/payment_form_star_gift.py
new file mode 100644
index 00000000..0768a622
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_form_star_gift.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentFormStarGift(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentForm`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B425CFE1``
+
+    Parameters:
+        form_id (``int`` ``64-bit``):
+            N/A
+
+        invoice (:obj:`Invoice `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetPaymentForm
+    """
+
+    __slots__: List[str] = ["form_id", "invoice"]
+
+    ID = 0xb425cfe1
+    QUALNAME = "types.payments.PaymentFormStarGift"
+
+    def __init__(self, *, form_id: int, invoice: "raw.base.Invoice") -> None:
+        self.form_id = form_id  # long
+        self.invoice = invoice  # Invoice
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentFormStarGift":
+        # No flags
+
+        form_id = Long.read(b)
+
+        invoice = TLObject.read(b)
+
+        return PaymentFormStarGift(form_id=form_id, invoice=invoice)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.form_id))
+
+        b.write(self.invoice.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_form_stars.py b/pyrogram/raw/types/payments/payment_form_stars.py
new file mode 100644
index 00000000..80b95903
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_form_stars.py
@@ -0,0 +1,127 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentFormStars(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentForm`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7BF6B15C``
+
+    Parameters:
+        form_id (``int`` ``64-bit``):
+
+
+        bot_id (``int`` ``64-bit``):
+
+
+        title (``str``):
+
+
+        description (``str``):
+
+
+        invoice (:obj:`Invoice `):
+
+
+        users (List of :obj:`User `):
+
+
+        can_save_credentials (``bool``, *optional*):
+            N/A
+
+        password_missing (``bool``, *optional*):
+            N/A
+
+        photo (:obj:`WebDocument `, *optional*):
+
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetPaymentForm
+    """
+
+    __slots__: List[str] = ["form_id", "bot_id", "title", "description", "invoice", "users", "can_save_credentials", "password_missing", "photo"]
+
+    ID = 0x7bf6b15c
+    QUALNAME = "types.payments.PaymentFormStars"
+
+    def __init__(self, *, form_id: int, bot_id: int, title: str, description: str, invoice: "raw.base.Invoice", users: List["raw.base.User"], can_save_credentials: Optional[bool] = None, password_missing: Optional[bool] = None, photo: "raw.base.WebDocument" = None) -> None:
+        self.form_id = form_id  # long
+        self.bot_id = bot_id  # long
+        self.title = title  # string
+        self.description = description  # string
+        self.invoice = invoice  # Invoice
+        self.users = users  # Vector
+        self.can_save_credentials = can_save_credentials  # flags.2?true
+        self.password_missing = password_missing  # flags.3?true
+        self.photo = photo  # flags.5?WebDocument
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentFormStars":
+
+        flags = Int.read(b)
+
+        can_save_credentials = True if flags & (1 << 2) else False
+        password_missing = True if flags & (1 << 3) else False
+        form_id = Long.read(b)
+
+        bot_id = Long.read(b)
+
+        title = String.read(b)
+
+        description = String.read(b)
+
+        photo = TLObject.read(b) if flags & (1 << 5) else None
+
+        invoice = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return PaymentFormStars(form_id=form_id, bot_id=bot_id, title=title, description=description, invoice=invoice, users=users, can_save_credentials=can_save_credentials, password_missing=password_missing, photo=photo)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.can_save_credentials else 0
+        flags |= (1 << 3) if self.password_missing else 0
+        flags |= (1 << 5) if self.photo is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.form_id))
+
+        b.write(Long(self.bot_id))
+
+        b.write(String(self.title))
+
+        b.write(String(self.description))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        b.write(self.invoice.write())
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_receipt.py b/pyrogram/raw/types/payments/payment_receipt.py
new file mode 100644
index 00000000..a6ccfd24
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_receipt.py
@@ -0,0 +1,176 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentReceipt(TLObject):  # type: ignore
+    """Receipt
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentReceipt`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``70C4FE03``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+            Date of generation
+
+        bot_id (``int`` ``64-bit``):
+            Bot ID
+
+        provider_id (``int`` ``64-bit``):
+            Provider ID
+
+        title (``str``):
+            Title
+
+        description (``str``):
+            Description
+
+        invoice (:obj:`Invoice `):
+            Invoice
+
+        currency (``str``):
+            Three-letter ISO 4217 currency code
+
+        total_amount (``int`` ``64-bit``):
+            Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
+
+        credentials_title (``str``):
+            Payment credential name
+
+        users (List of :obj:`User `):
+            Users
+
+        photo (:obj:`WebDocument `, *optional*):
+            Photo
+
+        info (:obj:`PaymentRequestedInfo `, *optional*):
+            Info
+
+        shipping (:obj:`ShippingOption `, *optional*):
+            Selected shipping option
+
+        tip_amount (``int`` ``64-bit``, *optional*):
+            Tipped amount
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetPaymentReceipt
+    """
+
+    __slots__: List[str] = ["date", "bot_id", "provider_id", "title", "description", "invoice", "currency", "total_amount", "credentials_title", "users", "photo", "info", "shipping", "tip_amount"]
+
+    ID = 0x70c4fe03
+    QUALNAME = "types.payments.PaymentReceipt"
+
+    def __init__(self, *, date: int, bot_id: int, provider_id: int, title: str, description: str, invoice: "raw.base.Invoice", currency: str, total_amount: int, credentials_title: str, users: List["raw.base.User"], photo: "raw.base.WebDocument" = None, info: "raw.base.PaymentRequestedInfo" = None, shipping: "raw.base.ShippingOption" = None, tip_amount: Optional[int] = None) -> None:
+        self.date = date  # int
+        self.bot_id = bot_id  # long
+        self.provider_id = provider_id  # long
+        self.title = title  # string
+        self.description = description  # string
+        self.invoice = invoice  # Invoice
+        self.currency = currency  # string
+        self.total_amount = total_amount  # long
+        self.credentials_title = credentials_title  # string
+        self.users = users  # Vector
+        self.photo = photo  # flags.2?WebDocument
+        self.info = info  # flags.0?PaymentRequestedInfo
+        self.shipping = shipping  # flags.1?ShippingOption
+        self.tip_amount = tip_amount  # flags.3?long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentReceipt":
+
+        flags = Int.read(b)
+
+        date = Int.read(b)
+
+        bot_id = Long.read(b)
+
+        provider_id = Long.read(b)
+
+        title = String.read(b)
+
+        description = String.read(b)
+
+        photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        invoice = TLObject.read(b)
+
+        info = TLObject.read(b) if flags & (1 << 0) else None
+
+        shipping = TLObject.read(b) if flags & (1 << 1) else None
+
+        tip_amount = Long.read(b) if flags & (1 << 3) else None
+        currency = String.read(b)
+
+        total_amount = Long.read(b)
+
+        credentials_title = String.read(b)
+
+        users = TLObject.read(b)
+
+        return PaymentReceipt(date=date, bot_id=bot_id, provider_id=provider_id, title=title, description=description, invoice=invoice, currency=currency, total_amount=total_amount, credentials_title=credentials_title, users=users, photo=photo, info=info, shipping=shipping, tip_amount=tip_amount)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.photo is not None else 0
+        flags |= (1 << 0) if self.info is not None else 0
+        flags |= (1 << 1) if self.shipping is not None else 0
+        flags |= (1 << 3) if self.tip_amount is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.bot_id))
+
+        b.write(Long(self.provider_id))
+
+        b.write(String(self.title))
+
+        b.write(String(self.description))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        b.write(self.invoice.write())
+
+        if self.info is not None:
+            b.write(self.info.write())
+
+        if self.shipping is not None:
+            b.write(self.shipping.write())
+
+        if self.tip_amount is not None:
+            b.write(Long(self.tip_amount))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.total_amount))
+
+        b.write(String(self.credentials_title))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_receipt_stars.py b/pyrogram/raw/types/payments/payment_receipt_stars.py
new file mode 100644
index 00000000..17253a04
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_receipt_stars.py
@@ -0,0 +1,139 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentReceiptStars(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentReceipt`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DABBF83A``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+
+
+        bot_id (``int`` ``64-bit``):
+
+
+        title (``str``):
+
+
+        description (``str``):
+
+
+        invoice (:obj:`Invoice `):
+
+
+        currency (``str``):
+
+
+        total_amount (``int`` ``64-bit``):
+
+
+        transaction_id (``str``):
+
+
+        users (List of :obj:`User `):
+
+
+        photo (:obj:`WebDocument `, *optional*):
+
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetPaymentReceipt
+    """
+
+    __slots__: List[str] = ["date", "bot_id", "title", "description", "invoice", "currency", "total_amount", "transaction_id", "users", "photo"]
+
+    ID = 0xdabbf83a
+    QUALNAME = "types.payments.PaymentReceiptStars"
+
+    def __init__(self, *, date: int, bot_id: int, title: str, description: str, invoice: "raw.base.Invoice", currency: str, total_amount: int, transaction_id: str, users: List["raw.base.User"], photo: "raw.base.WebDocument" = None) -> None:
+        self.date = date  # int
+        self.bot_id = bot_id  # long
+        self.title = title  # string
+        self.description = description  # string
+        self.invoice = invoice  # Invoice
+        self.currency = currency  # string
+        self.total_amount = total_amount  # long
+        self.transaction_id = transaction_id  # string
+        self.users = users  # Vector
+        self.photo = photo  # flags.2?WebDocument
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentReceiptStars":
+
+        flags = Int.read(b)
+
+        date = Int.read(b)
+
+        bot_id = Long.read(b)
+
+        title = String.read(b)
+
+        description = String.read(b)
+
+        photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        invoice = TLObject.read(b)
+
+        currency = String.read(b)
+
+        total_amount = Long.read(b)
+
+        transaction_id = String.read(b)
+
+        users = TLObject.read(b)
+
+        return PaymentReceiptStars(date=date, bot_id=bot_id, title=title, description=description, invoice=invoice, currency=currency, total_amount=total_amount, transaction_id=transaction_id, users=users, photo=photo)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.photo is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.bot_id))
+
+        b.write(String(self.title))
+
+        b.write(String(self.description))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        b.write(self.invoice.write())
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.total_amount))
+
+        b.write(String(self.transaction_id))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_result.py b/pyrogram/raw/types/payments/payment_result.py
new file mode 100644
index 00000000..fd0c5254
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_result.py
@@ -0,0 +1,64 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentResult(TLObject):  # type: ignore
+    """Payment result
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4E5F810D``
+
+    Parameters:
+        updates (:obj:`Updates `):
+            Info about the payment
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.SendPaymentForm
+            payments.SendStarsForm
+    """
+
+    __slots__: List[str] = ["updates"]
+
+    ID = 0x4e5f810d
+    QUALNAME = "types.payments.PaymentResult"
+
+    def __init__(self, *, updates: "raw.base.Updates") -> None:
+        self.updates = updates  # Updates
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentResult":
+        # No flags
+
+        updates = TLObject.read(b)
+
+        return PaymentResult(updates=updates)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.updates.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/payment_verification_needed.py b/pyrogram/raw/types/payments/payment_verification_needed.py
new file mode 100644
index 00000000..f047460d
--- /dev/null
+++ b/pyrogram/raw/types/payments/payment_verification_needed.py
@@ -0,0 +1,64 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PaymentVerificationNeeded(TLObject):  # type: ignore
+    """Payment was not successful, additional verification is needed
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.PaymentResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D8411139``
+
+    Parameters:
+        url (``str``):
+            URL for additional payment credentials verification
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.SendPaymentForm
+            payments.SendStarsForm
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0xd8411139
+    QUALNAME = "types.payments.PaymentVerificationNeeded"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PaymentVerificationNeeded":
+        # No flags
+
+        url = String.read(b)
+
+        return PaymentVerificationNeeded(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/resale_star_gifts.py b/pyrogram/raw/types/payments/resale_star_gifts.py
new file mode 100644
index 00000000..e5e6863e
--- /dev/null
+++ b/pyrogram/raw/types/payments/resale_star_gifts.py
@@ -0,0 +1,127 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ResaleStarGifts(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.ResaleStarGifts`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``947A12DF``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        gifts (List of :obj:`StarGift `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        next_offset (``str``, *optional*):
+            N/A
+
+        attributes (List of :obj:`StarGiftAttribute `, *optional*):
+            N/A
+
+        attributes_hash (``int`` ``64-bit``, *optional*):
+            N/A
+
+        counters (List of :obj:`StarGiftAttributeCounter `, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetResaleStarGifts
+    """
+
+    __slots__: List[str] = ["count", "gifts", "chats", "users", "next_offset", "attributes", "attributes_hash", "counters"]
+
+    ID = 0x947a12df
+    QUALNAME = "types.payments.ResaleStarGifts"
+
+    def __init__(self, *, count: int, gifts: List["raw.base.StarGift"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None, attributes: Optional[List["raw.base.StarGiftAttribute"]] = None, attributes_hash: Optional[int] = None, counters: Optional[List["raw.base.StarGiftAttributeCounter"]] = None) -> None:
+        self.count = count  # int
+        self.gifts = gifts  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+        self.attributes = attributes  # flags.1?Vector
+        self.attributes_hash = attributes_hash  # flags.1?long
+        self.counters = counters  # flags.2?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ResaleStarGifts":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        gifts = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        attributes = TLObject.read(b) if flags & (1 << 1) else []
+
+        attributes_hash = Long.read(b) if flags & (1 << 1) else None
+        chats = TLObject.read(b)
+
+        counters = TLObject.read(b) if flags & (1 << 2) else []
+
+        users = TLObject.read(b)
+
+        return ResaleStarGifts(count=count, gifts=gifts, chats=chats, users=users, next_offset=next_offset, attributes=attributes, attributes_hash=attributes_hash, counters=counters)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        flags |= (1 << 1) if self.attributes else 0
+        flags |= (1 << 1) if self.attributes_hash is not None else 0
+        flags |= (1 << 2) if self.counters else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.gifts))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        if self.attributes is not None:
+            b.write(Vector(self.attributes))
+
+        if self.attributes_hash is not None:
+            b.write(Long(self.attributes_hash))
+
+        b.write(Vector(self.chats))
+
+        if self.counters is not None:
+            b.write(Vector(self.counters))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/saved_info.py b/pyrogram/raw/types/payments/saved_info.py
new file mode 100644
index 00000000..c52f92f5
--- /dev/null
+++ b/pyrogram/raw/types/payments/saved_info.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedInfo(TLObject):  # type: ignore
+    """Saved server-side order information
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.SavedInfo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FB8FE43C``
+
+    Parameters:
+        has_saved_credentials (``bool``, *optional*):
+            Whether the user has some saved payment credentials
+
+        saved_info (:obj:`PaymentRequestedInfo `, *optional*):
+            Saved server-side order information
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetSavedInfo
+    """
+
+    __slots__: List[str] = ["has_saved_credentials", "saved_info"]
+
+    ID = 0xfb8fe43c
+    QUALNAME = "types.payments.SavedInfo"
+
+    def __init__(self, *, has_saved_credentials: Optional[bool] = None, saved_info: "raw.base.PaymentRequestedInfo" = None) -> None:
+        self.has_saved_credentials = has_saved_credentials  # flags.1?true
+        self.saved_info = saved_info  # flags.0?PaymentRequestedInfo
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedInfo":
+
+        flags = Int.read(b)
+
+        has_saved_credentials = True if flags & (1 << 1) else False
+        saved_info = TLObject.read(b) if flags & (1 << 0) else None
+
+        return SavedInfo(has_saved_credentials=has_saved_credentials, saved_info=saved_info)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.has_saved_credentials else 0
+        flags |= (1 << 0) if self.saved_info is not None else 0
+        b.write(Int(flags))
+
+        if self.saved_info is not None:
+            b.write(self.saved_info.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/saved_star_gifts.py b/pyrogram/raw/types/payments/saved_star_gifts.py
new file mode 100644
index 00000000..e6034f32
--- /dev/null
+++ b/pyrogram/raw/types/payments/saved_star_gifts.py
@@ -0,0 +1,109 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedStarGifts(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.SavedStarGifts`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``95F389B1``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        gifts (List of :obj:`SavedStarGift `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        chat_notifications_enabled (``bool``, *optional*):
+            N/A
+
+        next_offset (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetCraftStarGifts
+            payments.GetSavedStarGifts
+            payments.GetSavedStarGift
+    """
+
+    __slots__: List[str] = ["count", "gifts", "chats", "users", "chat_notifications_enabled", "next_offset"]
+
+    ID = 0x95f389b1
+    QUALNAME = "types.payments.SavedStarGifts"
+
+    def __init__(self, *, count: int, gifts: List["raw.base.SavedStarGift"], chats: List["raw.base.Chat"], users: List["raw.base.User"], chat_notifications_enabled: Optional[bool] = None, next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.gifts = gifts  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.chat_notifications_enabled = chat_notifications_enabled  # flags.1?Bool
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedStarGifts":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        chat_notifications_enabled = Bool.read(b) if flags & (1 << 1) else None
+        gifts = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return SavedStarGifts(count=count, gifts=gifts, chats=chats, users=users, chat_notifications_enabled=chat_notifications_enabled, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.chat_notifications_enabled is not None else 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        if self.chat_notifications_enabled is not None:
+            b.write(Bool(self.chat_notifications_enabled))
+
+        b.write(Vector(self.gifts))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_active_auctions.py b/pyrogram/raw/types/payments/star_gift_active_auctions.py
new file mode 100644
index 00000000..5bb9883e
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_active_auctions.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftActiveAuctions(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftActiveAuctions`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AEF6ABBC``
+
+    Parameters:
+        auctions (List of :obj:`StarGiftActiveAuctionState `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftActiveAuctions
+    """
+
+    __slots__: List[str] = ["auctions", "users", "chats"]
+
+    ID = 0xaef6abbc
+    QUALNAME = "types.payments.StarGiftActiveAuctions"
+
+    def __init__(self, *, auctions: List["raw.base.StarGiftActiveAuctionState"], users: List["raw.base.User"], chats: List["raw.base.Chat"]) -> None:
+        self.auctions = auctions  # Vector
+        self.users = users  # Vector
+        self.chats = chats  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftActiveAuctions":
+        # No flags
+
+        auctions = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        return StarGiftActiveAuctions(auctions=auctions, users=users, chats=chats)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.auctions))
+
+        b.write(Vector(self.users))
+
+        b.write(Vector(self.chats))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_active_auctions_not_modified.py b/pyrogram/raw/types/payments/star_gift_active_auctions_not_modified.py
new file mode 100644
index 00000000..1d08a54f
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_active_auctions_not_modified.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftActiveAuctionsNotModified(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftActiveAuctions`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DB33DAD0``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftActiveAuctions
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xdb33dad0
+    QUALNAME = "types.payments.StarGiftActiveAuctionsNotModified"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftActiveAuctionsNotModified":
+        # No flags
+
+        return StarGiftActiveAuctionsNotModified()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_auction_acquired_gifts.py b/pyrogram/raw/types/payments/star_gift_auction_acquired_gifts.py
new file mode 100644
index 00000000..d5698392
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_auction_acquired_gifts.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionAcquiredGifts(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftAuctionAcquiredGifts`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7D5BD1F0``
+
+    Parameters:
+        gifts (List of :obj:`StarGiftAuctionAcquiredGift `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftAuctionAcquiredGifts
+    """
+
+    __slots__: List[str] = ["gifts", "users", "chats"]
+
+    ID = 0x7d5bd1f0
+    QUALNAME = "types.payments.StarGiftAuctionAcquiredGifts"
+
+    def __init__(self, *, gifts: List["raw.base.StarGiftAuctionAcquiredGift"], users: List["raw.base.User"], chats: List["raw.base.Chat"]) -> None:
+        self.gifts = gifts  # Vector
+        self.users = users  # Vector
+        self.chats = chats  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionAcquiredGifts":
+        # No flags
+
+        gifts = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        return StarGiftAuctionAcquiredGifts(gifts=gifts, users=users, chats=chats)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.gifts))
+
+        b.write(Vector(self.users))
+
+        b.write(Vector(self.chats))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_auction_state.py b/pyrogram/raw/types/payments/star_gift_auction_state.py
new file mode 100644
index 00000000..79288673
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_auction_state.py
@@ -0,0 +1,103 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionState(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftAuctionState`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6B39F4EC``
+
+    Parameters:
+        gift (:obj:`StarGift `):
+            N/A
+
+        state (:obj:`StarGiftAuctionState `):
+            N/A
+
+        user_state (:obj:`StarGiftAuctionUserState `):
+            N/A
+
+        timeout (``int`` ``32-bit``):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftAuctionState
+    """
+
+    __slots__: List[str] = ["gift", "state", "user_state", "timeout", "users", "chats"]
+
+    ID = 0x6b39f4ec
+    QUALNAME = "types.payments.StarGiftAuctionState"
+
+    def __init__(self, *, gift: "raw.base.StarGift", state: "raw.base.StarGiftAuctionState", user_state: "raw.base.StarGiftAuctionUserState", timeout: int, users: List["raw.base.User"], chats: List["raw.base.Chat"]) -> None:
+        self.gift = gift  # StarGift
+        self.state = state  # StarGiftAuctionState
+        self.user_state = user_state  # StarGiftAuctionUserState
+        self.timeout = timeout  # int
+        self.users = users  # Vector
+        self.chats = chats  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionState":
+        # No flags
+
+        gift = TLObject.read(b)
+
+        state = TLObject.read(b)
+
+        user_state = TLObject.read(b)
+
+        timeout = Int.read(b)
+
+        users = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        return StarGiftAuctionState(gift=gift, state=state, user_state=user_state, timeout=timeout, users=users, chats=chats)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.gift.write())
+
+        b.write(self.state.write())
+
+        b.write(self.user_state.write())
+
+        b.write(Int(self.timeout))
+
+        b.write(Vector(self.users))
+
+        b.write(Vector(self.chats))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_collections.py b/pyrogram/raw/types/payments/star_gift_collections.py
new file mode 100644
index 00000000..651f0544
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_collections.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftCollections(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftCollections`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8A2932F3``
+
+    Parameters:
+        collections (List of :obj:`StarGiftCollection `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftCollections
+    """
+
+    __slots__: List[str] = ["collections"]
+
+    ID = 0x8a2932f3
+    QUALNAME = "types.payments.StarGiftCollections"
+
+    def __init__(self, *, collections: List["raw.base.StarGiftCollection"]) -> None:
+        self.collections = collections  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftCollections":
+        # No flags
+
+        collections = TLObject.read(b)
+
+        return StarGiftCollections(collections=collections)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.collections))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_collections_not_modified.py b/pyrogram/raw/types/payments/star_gift_collections_not_modified.py
new file mode 100644
index 00000000..09435fac
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_collections_not_modified.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftCollectionsNotModified(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftCollections`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A0BA4F17``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftCollections
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa0ba4f17
+    QUALNAME = "types.payments.StarGiftCollectionsNotModified"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftCollectionsNotModified":
+        # No flags
+
+        return StarGiftCollectionsNotModified()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_upgrade_attributes.py b/pyrogram/raw/types/payments/star_gift_upgrade_attributes.py
new file mode 100644
index 00000000..7fc9a30e
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_upgrade_attributes.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftUpgradeAttributes(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftUpgradeAttributes`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``46C6E36F``
+
+    Parameters:
+        attributes (List of :obj:`StarGiftAttribute `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftUpgradeAttributes
+    """
+
+    __slots__: List[str] = ["attributes"]
+
+    ID = 0x46c6e36f
+    QUALNAME = "types.payments.StarGiftUpgradeAttributes"
+
+    def __init__(self, *, attributes: List["raw.base.StarGiftAttribute"]) -> None:
+        self.attributes = attributes  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftUpgradeAttributes":
+        # No flags
+
+        attributes = TLObject.read(b)
+
+        return StarGiftUpgradeAttributes(attributes=attributes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.attributes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_upgrade_preview.py b/pyrogram/raw/types/payments/star_gift_upgrade_preview.py
new file mode 100644
index 00000000..91f190af
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_upgrade_preview.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftUpgradePreview(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftUpgradePreview`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3DE1DFED``
+
+    Parameters:
+        sample_attributes (List of :obj:`StarGiftAttribute `):
+            N/A
+
+        prices (List of :obj:`StarGiftUpgradePrice `):
+            N/A
+
+        next_prices (List of :obj:`StarGiftUpgradePrice `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftUpgradePreview
+    """
+
+    __slots__: List[str] = ["sample_attributes", "prices", "next_prices"]
+
+    ID = 0x3de1dfed
+    QUALNAME = "types.payments.StarGiftUpgradePreview"
+
+    def __init__(self, *, sample_attributes: List["raw.base.StarGiftAttribute"], prices: List["raw.base.StarGiftUpgradePrice"], next_prices: List["raw.base.StarGiftUpgradePrice"]) -> None:
+        self.sample_attributes = sample_attributes  # Vector
+        self.prices = prices  # Vector
+        self.next_prices = next_prices  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftUpgradePreview":
+        # No flags
+
+        sample_attributes = TLObject.read(b)
+
+        prices = TLObject.read(b)
+
+        next_prices = TLObject.read(b)
+
+        return StarGiftUpgradePreview(sample_attributes=sample_attributes, prices=prices, next_prices=next_prices)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.sample_attributes))
+
+        b.write(Vector(self.prices))
+
+        b.write(Vector(self.next_prices))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gift_withdrawal_url.py b/pyrogram/raw/types/payments/star_gift_withdrawal_url.py
new file mode 100644
index 00000000..c43dd5a1
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gift_withdrawal_url.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftWithdrawalUrl(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGiftWithdrawalUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``84AA3A9C``
+
+    Parameters:
+        url (``str``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGiftWithdrawalUrl
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0x84aa3a9c
+    QUALNAME = "types.payments.StarGiftWithdrawalUrl"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftWithdrawalUrl":
+        # No flags
+
+        url = String.read(b)
+
+        return StarGiftWithdrawalUrl(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gifts.py b/pyrogram/raw/types/payments/star_gifts.py
new file mode 100644
index 00000000..68705791
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gifts.py
@@ -0,0 +1,87 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGifts(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGifts`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2ED82995``
+
+    Parameters:
+        hash (``int`` ``32-bit``):
+            N/A
+
+        gifts (List of :obj:`StarGift `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGifts
+    """
+
+    __slots__: List[str] = ["hash", "gifts", "chats", "users"]
+
+    ID = 0x2ed82995
+    QUALNAME = "types.payments.StarGifts"
+
+    def __init__(self, *, hash: int, gifts: List["raw.base.StarGift"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.hash = hash  # int
+        self.gifts = gifts  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGifts":
+        # No flags
+
+        hash = Int.read(b)
+
+        gifts = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return StarGifts(hash=hash, gifts=gifts, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.hash))
+
+        b.write(Vector(self.gifts))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/star_gifts_not_modified.py b/pyrogram/raw/types/payments/star_gifts_not_modified.py
new file mode 100644
index 00000000..2d1f2532
--- /dev/null
+++ b/pyrogram/raw/types/payments/star_gifts_not_modified.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftsNotModified(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarGifts`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A388A368``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarGifts
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa388a368
+    QUALNAME = "types.payments.StarGiftsNotModified"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftsNotModified":
+        # No flags
+
+        return StarGiftsNotModified()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/stars_revenue_ads_account_url.py b/pyrogram/raw/types/payments/stars_revenue_ads_account_url.py
new file mode 100644
index 00000000..0cccdc29
--- /dev/null
+++ b/pyrogram/raw/types/payments/stars_revenue_ads_account_url.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsRevenueAdsAccountUrl(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarsRevenueAdsAccountUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``394E7F21``
+
+    Parameters:
+        url (``str``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsRevenueAdsAccountUrl
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0x394e7f21
+    QUALNAME = "types.payments.StarsRevenueAdsAccountUrl"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsRevenueAdsAccountUrl":
+        # No flags
+
+        url = String.read(b)
+
+        return StarsRevenueAdsAccountUrl(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/stars_revenue_stats.py b/pyrogram/raw/types/payments/stars_revenue_stats.py
new file mode 100644
index 00000000..45057597
--- /dev/null
+++ b/pyrogram/raw/types/payments/stars_revenue_stats.py
@@ -0,0 +1,91 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsRevenueStats(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarsRevenueStats`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6C207376``
+
+    Parameters:
+        revenue_graph (:obj:`StatsGraph `):
+            N/A
+
+        status (:obj:`StarsRevenueStatus `):
+            N/A
+
+        usd_rate (``float`` ``64-bit``):
+            N/A
+
+        top_hours_graph (:obj:`StatsGraph `, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsRevenueStats
+    """
+
+    __slots__: List[str] = ["revenue_graph", "status", "usd_rate", "top_hours_graph"]
+
+    ID = 0x6c207376
+    QUALNAME = "types.payments.StarsRevenueStats"
+
+    def __init__(self, *, revenue_graph: "raw.base.StatsGraph", status: "raw.base.StarsRevenueStatus", usd_rate: float, top_hours_graph: "raw.base.StatsGraph" = None) -> None:
+        self.revenue_graph = revenue_graph  # StatsGraph
+        self.status = status  # StarsRevenueStatus
+        self.usd_rate = usd_rate  # double
+        self.top_hours_graph = top_hours_graph  # flags.0?StatsGraph
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsRevenueStats":
+
+        flags = Int.read(b)
+
+        top_hours_graph = TLObject.read(b) if flags & (1 << 0) else None
+
+        revenue_graph = TLObject.read(b)
+
+        status = TLObject.read(b)
+
+        usd_rate = Double.read(b)
+
+        return StarsRevenueStats(revenue_graph=revenue_graph, status=status, usd_rate=usd_rate, top_hours_graph=top_hours_graph)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.top_hours_graph is not None else 0
+        b.write(Int(flags))
+
+        if self.top_hours_graph is not None:
+            b.write(self.top_hours_graph.write())
+
+        b.write(self.revenue_graph.write())
+
+        b.write(self.status.write())
+
+        b.write(Double(self.usd_rate))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/stars_revenue_withdrawal_url.py b/pyrogram/raw/types/payments/stars_revenue_withdrawal_url.py
new file mode 100644
index 00000000..613066fc
--- /dev/null
+++ b/pyrogram/raw/types/payments/stars_revenue_withdrawal_url.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsRevenueWithdrawalUrl(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarsRevenueWithdrawalUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1DAB80B7``
+
+    Parameters:
+        url (``str``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsRevenueWithdrawalUrl
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0x1dab80b7
+    QUALNAME = "types.payments.StarsRevenueWithdrawalUrl"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsRevenueWithdrawalUrl":
+        # No flags
+
+        url = String.read(b)
+
+        return StarsRevenueWithdrawalUrl(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/stars_status.py b/pyrogram/raw/types/payments/stars_status.py
new file mode 100644
index 00000000..72058058
--- /dev/null
+++ b/pyrogram/raw/types/payments/stars_status.py
@@ -0,0 +1,131 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsStatus(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.StarsStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6C9CE8ED``
+
+    Parameters:
+        balance (:obj:`StarsAmount `):
+
+
+        chats (List of :obj:`Chat `):
+
+
+        users (List of :obj:`User `):
+
+
+        subscriptions (List of :obj:`StarsSubscription `, *optional*):
+            N/A
+
+        subscriptions_next_offset (``str``, *optional*):
+            N/A
+
+        subscriptions_missing_balance (``int`` ``64-bit``, *optional*):
+            N/A
+
+        history (List of :obj:`StarsTransaction `, *optional*):
+
+
+        next_offset (``str``, *optional*):
+
+
+    Functions:
+        This object can be returned by 4 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsStatus
+            payments.GetStarsTransactions
+            payments.GetStarsTransactionsByID
+            payments.GetStarsSubscriptions
+    """
+
+    __slots__: List[str] = ["balance", "chats", "users", "subscriptions", "subscriptions_next_offset", "subscriptions_missing_balance", "history", "next_offset"]
+
+    ID = 0x6c9ce8ed
+    QUALNAME = "types.payments.StarsStatus"
+
+    def __init__(self, *, balance: "raw.base.StarsAmount", chats: List["raw.base.Chat"], users: List["raw.base.User"], subscriptions: Optional[List["raw.base.StarsSubscription"]] = None, subscriptions_next_offset: Optional[str] = None, subscriptions_missing_balance: Optional[int] = None, history: Optional[List["raw.base.StarsTransaction"]] = None, next_offset: Optional[str] = None) -> None:
+        self.balance = balance  # StarsAmount
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.subscriptions = subscriptions  # flags.1?Vector
+        self.subscriptions_next_offset = subscriptions_next_offset  # flags.2?string
+        self.subscriptions_missing_balance = subscriptions_missing_balance  # flags.4?long
+        self.history = history  # flags.3?Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsStatus":
+
+        flags = Int.read(b)
+
+        balance = TLObject.read(b)
+
+        subscriptions = TLObject.read(b) if flags & (1 << 1) else []
+
+        subscriptions_next_offset = String.read(b) if flags & (1 << 2) else None
+        subscriptions_missing_balance = Long.read(b) if flags & (1 << 4) else None
+        history = TLObject.read(b) if flags & (1 << 3) else []
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return StarsStatus(balance=balance, chats=chats, users=users, subscriptions=subscriptions, subscriptions_next_offset=subscriptions_next_offset, subscriptions_missing_balance=subscriptions_missing_balance, history=history, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.subscriptions else 0
+        flags |= (1 << 2) if self.subscriptions_next_offset is not None else 0
+        flags |= (1 << 4) if self.subscriptions_missing_balance is not None else 0
+        flags |= (1 << 3) if self.history else 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.balance.write())
+
+        if self.subscriptions is not None:
+            b.write(Vector(self.subscriptions))
+
+        if self.subscriptions_next_offset is not None:
+            b.write(String(self.subscriptions_next_offset))
+
+        if self.subscriptions_missing_balance is not None:
+            b.write(Long(self.subscriptions_missing_balance))
+
+        if self.history is not None:
+            b.write(Vector(self.history))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/suggested_star_ref_bots.py b/pyrogram/raw/types/payments/suggested_star_ref_bots.py
new file mode 100644
index 00000000..20b31442
--- /dev/null
+++ b/pyrogram/raw/types/payments/suggested_star_ref_bots.py
@@ -0,0 +1,90 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SuggestedStarRefBots(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.SuggestedStarRefBots`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B4D5D859``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        suggested_bots (List of :obj:`StarRefProgram `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        next_offset (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetSuggestedStarRefBots
+    """
+
+    __slots__: List[str] = ["count", "suggested_bots", "users", "next_offset"]
+
+    ID = 0xb4d5d859
+    QUALNAME = "types.payments.SuggestedStarRefBots"
+
+    def __init__(self, *, count: int, suggested_bots: List["raw.base.StarRefProgram"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.suggested_bots = suggested_bots  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SuggestedStarRefBots":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        suggested_bots = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        return SuggestedStarRefBots(count=count, suggested_bots=suggested_bots, users=users, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.suggested_bots))
+
+        b.write(Vector(self.users))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/unique_star_gift.py b/pyrogram/raw/types/payments/unique_star_gift.py
new file mode 100644
index 00000000..b6c03996
--- /dev/null
+++ b/pyrogram/raw/types/payments/unique_star_gift.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UniqueStarGift(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.UniqueStarGift`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``416C56E8``
+
+    Parameters:
+        gift (:obj:`StarGift `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetUniqueStarGift
+    """
+
+    __slots__: List[str] = ["gift", "chats", "users"]
+
+    ID = 0x416c56e8
+    QUALNAME = "types.payments.UniqueStarGift"
+
+    def __init__(self, *, gift: "raw.base.StarGift", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.gift = gift  # StarGift
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UniqueStarGift":
+        # No flags
+
+        gift = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return UniqueStarGift(gift=gift, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.gift.write())
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/unique_star_gift_value_info.py b/pyrogram/raw/types/payments/unique_star_gift_value_info.py
new file mode 100644
index 00000000..fd734806
--- /dev/null
+++ b/pyrogram/raw/types/payments/unique_star_gift_value_info.py
@@ -0,0 +1,172 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UniqueStarGiftValueInfo(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.UniqueStarGiftValueInfo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``512FE446``
+
+    Parameters:
+        currency (``str``):
+            N/A
+
+        value (``int`` ``64-bit``):
+            N/A
+
+        initial_sale_date (``int`` ``32-bit``):
+            N/A
+
+        initial_sale_stars (``int`` ``64-bit``):
+            N/A
+
+        initial_sale_price (``int`` ``64-bit``):
+            N/A
+
+        last_sale_on_fragment (``bool``, *optional*):
+            N/A
+
+        value_is_average (``bool``, *optional*):
+            N/A
+
+        last_sale_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        last_sale_price (``int`` ``64-bit``, *optional*):
+            N/A
+
+        floor_price (``int`` ``64-bit``, *optional*):
+            N/A
+
+        average_price (``int`` ``64-bit``, *optional*):
+            N/A
+
+        listed_count (``int`` ``32-bit``, *optional*):
+            N/A
+
+        fragment_listed_count (``int`` ``32-bit``, *optional*):
+            N/A
+
+        fragment_listed_url (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetUniqueStarGiftValueInfo
+    """
+
+    __slots__: List[str] = ["currency", "value", "initial_sale_date", "initial_sale_stars", "initial_sale_price", "last_sale_on_fragment", "value_is_average", "last_sale_date", "last_sale_price", "floor_price", "average_price", "listed_count", "fragment_listed_count", "fragment_listed_url"]
+
+    ID = 0x512fe446
+    QUALNAME = "types.payments.UniqueStarGiftValueInfo"
+
+    def __init__(self, *, currency: str, value: int, initial_sale_date: int, initial_sale_stars: int, initial_sale_price: int, last_sale_on_fragment: Optional[bool] = None, value_is_average: Optional[bool] = None, last_sale_date: Optional[int] = None, last_sale_price: Optional[int] = None, floor_price: Optional[int] = None, average_price: Optional[int] = None, listed_count: Optional[int] = None, fragment_listed_count: Optional[int] = None, fragment_listed_url: Optional[str] = None) -> None:
+        self.currency = currency  # string
+        self.value = value  # long
+        self.initial_sale_date = initial_sale_date  # int
+        self.initial_sale_stars = initial_sale_stars  # long
+        self.initial_sale_price = initial_sale_price  # long
+        self.last_sale_on_fragment = last_sale_on_fragment  # flags.1?true
+        self.value_is_average = value_is_average  # flags.6?true
+        self.last_sale_date = last_sale_date  # flags.0?int
+        self.last_sale_price = last_sale_price  # flags.0?long
+        self.floor_price = floor_price  # flags.2?long
+        self.average_price = average_price  # flags.3?long
+        self.listed_count = listed_count  # flags.4?int
+        self.fragment_listed_count = fragment_listed_count  # flags.5?int
+        self.fragment_listed_url = fragment_listed_url  # flags.5?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UniqueStarGiftValueInfo":
+
+        flags = Int.read(b)
+
+        last_sale_on_fragment = True if flags & (1 << 1) else False
+        value_is_average = True if flags & (1 << 6) else False
+        currency = String.read(b)
+
+        value = Long.read(b)
+
+        initial_sale_date = Int.read(b)
+
+        initial_sale_stars = Long.read(b)
+
+        initial_sale_price = Long.read(b)
+
+        last_sale_date = Int.read(b) if flags & (1 << 0) else None
+        last_sale_price = Long.read(b) if flags & (1 << 0) else None
+        floor_price = Long.read(b) if flags & (1 << 2) else None
+        average_price = Long.read(b) if flags & (1 << 3) else None
+        listed_count = Int.read(b) if flags & (1 << 4) else None
+        fragment_listed_count = Int.read(b) if flags & (1 << 5) else None
+        fragment_listed_url = String.read(b) if flags & (1 << 5) else None
+        return UniqueStarGiftValueInfo(currency=currency, value=value, initial_sale_date=initial_sale_date, initial_sale_stars=initial_sale_stars, initial_sale_price=initial_sale_price, last_sale_on_fragment=last_sale_on_fragment, value_is_average=value_is_average, last_sale_date=last_sale_date, last_sale_price=last_sale_price, floor_price=floor_price, average_price=average_price, listed_count=listed_count, fragment_listed_count=fragment_listed_count, fragment_listed_url=fragment_listed_url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.last_sale_on_fragment else 0
+        flags |= (1 << 6) if self.value_is_average else 0
+        flags |= (1 << 0) if self.last_sale_date is not None else 0
+        flags |= (1 << 0) if self.last_sale_price is not None else 0
+        flags |= (1 << 2) if self.floor_price is not None else 0
+        flags |= (1 << 3) if self.average_price is not None else 0
+        flags |= (1 << 4) if self.listed_count is not None else 0
+        flags |= (1 << 5) if self.fragment_listed_count is not None else 0
+        flags |= (1 << 5) if self.fragment_listed_url is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.value))
+
+        b.write(Int(self.initial_sale_date))
+
+        b.write(Long(self.initial_sale_stars))
+
+        b.write(Long(self.initial_sale_price))
+
+        if self.last_sale_date is not None:
+            b.write(Int(self.last_sale_date))
+
+        if self.last_sale_price is not None:
+            b.write(Long(self.last_sale_price))
+
+        if self.floor_price is not None:
+            b.write(Long(self.floor_price))
+
+        if self.average_price is not None:
+            b.write(Long(self.average_price))
+
+        if self.listed_count is not None:
+            b.write(Int(self.listed_count))
+
+        if self.fragment_listed_count is not None:
+            b.write(Int(self.fragment_listed_count))
+
+        if self.fragment_listed_url is not None:
+            b.write(String(self.fragment_listed_url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/payments/validated_requested_info.py b/pyrogram/raw/types/payments/validated_requested_info.py
new file mode 100644
index 00000000..1534ace5
--- /dev/null
+++ b/pyrogram/raw/types/payments/validated_requested_info.py
@@ -0,0 +1,76 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ValidatedRequestedInfo(TLObject):  # type: ignore
+    """Validated user-provided info
+
+    Constructor of :obj:`~pyrogram.raw.base.payments.ValidatedRequestedInfo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D1451883``
+
+    Parameters:
+        id (``str``, *optional*):
+            ID
+
+        shipping_options (List of :obj:`ShippingOption `, *optional*):
+            Shipping options
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.ValidateRequestedInfo
+    """
+
+    __slots__: List[str] = ["id", "shipping_options"]
+
+    ID = 0xd1451883
+    QUALNAME = "types.payments.ValidatedRequestedInfo"
+
+    def __init__(self, *, id: Optional[str] = None, shipping_options: Optional[List["raw.base.ShippingOption"]] = None) -> None:
+        self.id = id  # flags.0?string
+        self.shipping_options = shipping_options  # flags.1?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ValidatedRequestedInfo":
+
+        flags = Int.read(b)
+
+        id = String.read(b) if flags & (1 << 0) else None
+        shipping_options = TLObject.read(b) if flags & (1 << 1) else []
+
+        return ValidatedRequestedInfo(id=id, shipping_options=shipping_options)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.id is not None else 0
+        flags |= (1 << 1) if self.shipping_options else 0
+        b.write(Int(flags))
+
+        if self.id is not None:
+            b.write(String(self.id))
+
+        if self.shipping_options is not None:
+            b.write(Vector(self.shipping_options))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_blocked.py b/pyrogram/raw/types/peer_blocked.py
new file mode 100644
index 00000000..fdb00758
--- /dev/null
+++ b/pyrogram/raw/types/peer_blocked.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerBlocked(TLObject):  # type: ignore
+    """Information about a blocked peer
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerBlocked`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E8FD8014``
+
+    Parameters:
+        peer_id (:obj:`Peer `):
+            Peer ID
+
+        date (``int`` ``32-bit``):
+            When was the peer blocked
+
+    """
+
+    __slots__: List[str] = ["peer_id", "date"]
+
+    ID = 0xe8fd8014
+    QUALNAME = "types.PeerBlocked"
+
+    def __init__(self, *, peer_id: "raw.base.Peer", date: int) -> None:
+        self.peer_id = peer_id  # Peer
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerBlocked":
+        # No flags
+
+        peer_id = TLObject.read(b)
+
+        date = Int.read(b)
+
+        return PeerBlocked(peer_id=peer_id, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer_id.write())
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_channel.py b/pyrogram/raw/types/peer_channel.py
new file mode 100644
index 00000000..9e8f5635
--- /dev/null
+++ b/pyrogram/raw/types/peer_channel.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerChannel(TLObject):  # type: ignore
+    """Channel/supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.Peer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A2A5371E``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            chatlists.GetLeaveChatlistSuggestions
+    """
+
+    __slots__: List[str] = ["channel_id"]
+
+    ID = 0xa2a5371e
+    QUALNAME = "types.PeerChannel"
+
+    def __init__(self, *, channel_id: int) -> None:
+        self.channel_id = channel_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerChannel":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        return PeerChannel(channel_id=channel_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_chat.py b/pyrogram/raw/types/peer_chat.py
new file mode 100644
index 00000000..f2e327a3
--- /dev/null
+++ b/pyrogram/raw/types/peer_chat.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerChat(TLObject):  # type: ignore
+    """Group.
+
+    Constructor of :obj:`~pyrogram.raw.base.Peer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``36C6019A``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Group identifier
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            chatlists.GetLeaveChatlistSuggestions
+    """
+
+    __slots__: List[str] = ["chat_id"]
+
+    ID = 0x36c6019a
+    QUALNAME = "types.PeerChat"
+
+    def __init__(self, *, chat_id: int) -> None:
+        self.chat_id = chat_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerChat":
+        # No flags
+
+        chat_id = Long.read(b)
+
+        return PeerChat(chat_id=chat_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.chat_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_color.py b/pyrogram/raw/types/peer_color.py
new file mode 100644
index 00000000..29271925
--- /dev/null
+++ b/pyrogram/raw/types/peer_color.py
@@ -0,0 +1,66 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerColor(TLObject):  # type: ignore
+    """Represents a color palette ».
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerColor`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B54B5ACF``
+
+    Parameters:
+        color (``int`` ``32-bit``, *optional*):
+            Color palette ID, see here » for more info; if not set, the default palette should be used.
+
+        background_emoji_id (``int`` ``64-bit``, *optional*):
+            Optional custom emoji ID used to generate the pattern.
+
+    """
+
+    __slots__: List[str] = ["color", "background_emoji_id"]
+
+    ID = 0xb54b5acf
+    QUALNAME = "types.PeerColor"
+
+    def __init__(self, *, color: Optional[int] = None, background_emoji_id: Optional[int] = None) -> None:
+        self.color = color  # flags.0?int
+        self.background_emoji_id = background_emoji_id  # flags.1?long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerColor":
+
+        flags = Int.read(b)
+
+        color = Int.read(b) if flags & (1 << 0) else None
+        background_emoji_id = Long.read(b) if flags & (1 << 1) else None
+        return PeerColor(color=color, background_emoji_id=background_emoji_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.color is not None else 0
+        flags |= (1 << 1) if self.background_emoji_id is not None else 0
+        b.write(Int(flags))
+
+        if self.color is not None:
+            b.write(Int(self.color))
+
+        if self.background_emoji_id is not None:
+            b.write(Long(self.background_emoji_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_color_collectible.py b/pyrogram/raw/types/peer_color_collectible.py
new file mode 100644
index 00000000..77ac47c4
--- /dev/null
+++ b/pyrogram/raw/types/peer_color_collectible.py
@@ -0,0 +1,107 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerColorCollectible(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerColor`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B9C0639A``
+
+    Parameters:
+        collectible_id (``int`` ``64-bit``):
+            N/A
+
+        gift_emoji_id (``int`` ``64-bit``):
+            N/A
+
+        background_emoji_id (``int`` ``64-bit``):
+            N/A
+
+        accent_color (``int`` ``32-bit``):
+            N/A
+
+        colors (List of ``int`` ``32-bit``):
+            N/A
+
+        dark_accent_color (``int`` ``32-bit``, *optional*):
+            N/A
+
+        dark_colors (List of ``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["collectible_id", "gift_emoji_id", "background_emoji_id", "accent_color", "colors", "dark_accent_color", "dark_colors"]
+
+    ID = 0xb9c0639a
+    QUALNAME = "types.PeerColorCollectible"
+
+    def __init__(self, *, collectible_id: int, gift_emoji_id: int, background_emoji_id: int, accent_color: int, colors: List[int], dark_accent_color: Optional[int] = None, dark_colors: Optional[List[int]] = None) -> None:
+        self.collectible_id = collectible_id  # long
+        self.gift_emoji_id = gift_emoji_id  # long
+        self.background_emoji_id = background_emoji_id  # long
+        self.accent_color = accent_color  # int
+        self.colors = colors  # Vector
+        self.dark_accent_color = dark_accent_color  # flags.0?int
+        self.dark_colors = dark_colors  # flags.1?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerColorCollectible":
+
+        flags = Int.read(b)
+
+        collectible_id = Long.read(b)
+
+        gift_emoji_id = Long.read(b)
+
+        background_emoji_id = Long.read(b)
+
+        accent_color = Int.read(b)
+
+        colors = TLObject.read(b, Int)
+
+        dark_accent_color = Int.read(b) if flags & (1 << 0) else None
+        dark_colors = TLObject.read(b, Int) if flags & (1 << 1) else []
+
+        return PeerColorCollectible(collectible_id=collectible_id, gift_emoji_id=gift_emoji_id, background_emoji_id=background_emoji_id, accent_color=accent_color, colors=colors, dark_accent_color=dark_accent_color, dark_colors=dark_colors)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.dark_accent_color is not None else 0
+        flags |= (1 << 1) if self.dark_colors else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.collectible_id))
+
+        b.write(Long(self.gift_emoji_id))
+
+        b.write(Long(self.background_emoji_id))
+
+        b.write(Int(self.accent_color))
+
+        b.write(Vector(self.colors, Int))
+
+        if self.dark_accent_color is not None:
+            b.write(Int(self.dark_accent_color))
+
+        if self.dark_colors is not None:
+            b.write(Vector(self.dark_colors, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_located.py b/pyrogram/raw/types/peer_located.py
new file mode 100644
index 00000000..25cb0db7
--- /dev/null
+++ b/pyrogram/raw/types/peer_located.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerLocated(TLObject):  # type: ignore
+    """Peer geolocated nearby
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerLocated`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CA461B5D``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        expires (``int`` ``32-bit``):
+            Validity period of current data
+
+        distance (``int`` ``32-bit``):
+            Distance from the peer in meters
+
+    """
+
+    __slots__: List[str] = ["peer", "expires", "distance"]
+
+    ID = 0xca461b5d
+    QUALNAME = "types.PeerLocated"
+
+    def __init__(self, *, peer: "raw.base.Peer", expires: int, distance: int) -> None:
+        self.peer = peer  # Peer
+        self.expires = expires  # int
+        self.distance = distance  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerLocated":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        expires = Int.read(b)
+
+        distance = Int.read(b)
+
+        return PeerLocated(peer=peer, expires=expires, distance=distance)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.expires))
+
+        b.write(Int(self.distance))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_notify_settings.py b/pyrogram/raw/types/peer_notify_settings.py
new file mode 100644
index 00000000..73ee0073
--- /dev/null
+++ b/pyrogram/raw/types/peer_notify_settings.py
@@ -0,0 +1,162 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerNotifySettings(TLObject):  # type: ignore
+    """Notification settings.
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerNotifySettings`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``99622C0C``
+
+    Parameters:
+        show_previews (``bool``, *optional*):
+            (Ternary value) If set, indicates whether or not to display previews of messages in notifications; otherwise the default behavior should be used.
+
+        silent (``bool``, *optional*):
+            (Ternary value) If set, indicates whether to mute or unmute the peer; otherwise the default behavior should be used.
+
+        mute_until (``int`` ``32-bit``, *optional*):
+            Mute all notifications until this date
+
+        ios_sound (:obj:`NotificationSound `, *optional*):
+            Notification sound for the official iOS application
+
+        android_sound (:obj:`NotificationSound `, *optional*):
+            Notification sound for the official android application
+
+        other_sound (:obj:`NotificationSound `, *optional*):
+            Notification sound for other applications
+
+        stories_muted (``bool``, *optional*):
+            Whether story notifications should be disabled.
+
+        stories_hide_sender (``bool``, *optional*):
+            Whether the sender name should be displayed in story notifications.
+
+        stories_ios_sound (:obj:`NotificationSound `, *optional*):
+            Sound for story notifications on the official iOS application
+
+        stories_android_sound (:obj:`NotificationSound `, *optional*):
+            Sound for story notifications on the official Android application
+
+        stories_other_sound (:obj:`NotificationSound `, *optional*):
+            Sound for story notifications on other applications
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifySettings
+    """
+
+    __slots__: List[str] = ["show_previews", "silent", "mute_until", "ios_sound", "android_sound", "other_sound", "stories_muted", "stories_hide_sender", "stories_ios_sound", "stories_android_sound", "stories_other_sound"]
+
+    ID = 0x99622c0c
+    QUALNAME = "types.PeerNotifySettings"
+
+    def __init__(self, *, show_previews: Optional[bool] = None, silent: Optional[bool] = None, mute_until: Optional[int] = None, ios_sound: "raw.base.NotificationSound" = None, android_sound: "raw.base.NotificationSound" = None, other_sound: "raw.base.NotificationSound" = None, stories_muted: Optional[bool] = None, stories_hide_sender: Optional[bool] = None, stories_ios_sound: "raw.base.NotificationSound" = None, stories_android_sound: "raw.base.NotificationSound" = None, stories_other_sound: "raw.base.NotificationSound" = None) -> None:
+        self.show_previews = show_previews  # flags.0?Bool
+        self.silent = silent  # flags.1?Bool
+        self.mute_until = mute_until  # flags.2?int
+        self.ios_sound = ios_sound  # flags.3?NotificationSound
+        self.android_sound = android_sound  # flags.4?NotificationSound
+        self.other_sound = other_sound  # flags.5?NotificationSound
+        self.stories_muted = stories_muted  # flags.6?Bool
+        self.stories_hide_sender = stories_hide_sender  # flags.7?Bool
+        self.stories_ios_sound = stories_ios_sound  # flags.8?NotificationSound
+        self.stories_android_sound = stories_android_sound  # flags.9?NotificationSound
+        self.stories_other_sound = stories_other_sound  # flags.10?NotificationSound
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerNotifySettings":
+
+        flags = Int.read(b)
+
+        show_previews = Bool.read(b) if flags & (1 << 0) else None
+        silent = Bool.read(b) if flags & (1 << 1) else None
+        mute_until = Int.read(b) if flags & (1 << 2) else None
+        ios_sound = TLObject.read(b) if flags & (1 << 3) else None
+
+        android_sound = TLObject.read(b) if flags & (1 << 4) else None
+
+        other_sound = TLObject.read(b) if flags & (1 << 5) else None
+
+        stories_muted = Bool.read(b) if flags & (1 << 6) else None
+        stories_hide_sender = Bool.read(b) if flags & (1 << 7) else None
+        stories_ios_sound = TLObject.read(b) if flags & (1 << 8) else None
+
+        stories_android_sound = TLObject.read(b) if flags & (1 << 9) else None
+
+        stories_other_sound = TLObject.read(b) if flags & (1 << 10) else None
+
+        return PeerNotifySettings(show_previews=show_previews, silent=silent, mute_until=mute_until, ios_sound=ios_sound, android_sound=android_sound, other_sound=other_sound, stories_muted=stories_muted, stories_hide_sender=stories_hide_sender, stories_ios_sound=stories_ios_sound, stories_android_sound=stories_android_sound, stories_other_sound=stories_other_sound)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.show_previews is not None else 0
+        flags |= (1 << 1) if self.silent is not None else 0
+        flags |= (1 << 2) if self.mute_until is not None else 0
+        flags |= (1 << 3) if self.ios_sound is not None else 0
+        flags |= (1 << 4) if self.android_sound is not None else 0
+        flags |= (1 << 5) if self.other_sound is not None else 0
+        flags |= (1 << 6) if self.stories_muted is not None else 0
+        flags |= (1 << 7) if self.stories_hide_sender is not None else 0
+        flags |= (1 << 8) if self.stories_ios_sound is not None else 0
+        flags |= (1 << 9) if self.stories_android_sound is not None else 0
+        flags |= (1 << 10) if self.stories_other_sound is not None else 0
+        b.write(Int(flags))
+
+        if self.show_previews is not None:
+            b.write(Bool(self.show_previews))
+
+        if self.silent is not None:
+            b.write(Bool(self.silent))
+
+        if self.mute_until is not None:
+            b.write(Int(self.mute_until))
+
+        if self.ios_sound is not None:
+            b.write(self.ios_sound.write())
+
+        if self.android_sound is not None:
+            b.write(self.android_sound.write())
+
+        if self.other_sound is not None:
+            b.write(self.other_sound.write())
+
+        if self.stories_muted is not None:
+            b.write(Bool(self.stories_muted))
+
+        if self.stories_hide_sender is not None:
+            b.write(Bool(self.stories_hide_sender))
+
+        if self.stories_ios_sound is not None:
+            b.write(self.stories_ios_sound.write())
+
+        if self.stories_android_sound is not None:
+            b.write(self.stories_android_sound.write())
+
+        if self.stories_other_sound is not None:
+            b.write(self.stories_other_sound.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_self_located.py b/pyrogram/raw/types/peer_self_located.py
new file mode 100644
index 00000000..0744015c
--- /dev/null
+++ b/pyrogram/raw/types/peer_self_located.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerSelfLocated(TLObject):  # type: ignore
+    """Current peer
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerLocated`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F8EC284B``
+
+    Parameters:
+        expires (``int`` ``32-bit``):
+            Expiry of geolocation info for current peer
+
+    """
+
+    __slots__: List[str] = ["expires"]
+
+    ID = 0xf8ec284b
+    QUALNAME = "types.PeerSelfLocated"
+
+    def __init__(self, *, expires: int) -> None:
+        self.expires = expires  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerSelfLocated":
+        # No flags
+
+        expires = Int.read(b)
+
+        return PeerSelfLocated(expires=expires)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.expires))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_settings.py b/pyrogram/raw/types/peer_settings.py
new file mode 100644
index 00000000..df37f7a2
--- /dev/null
+++ b/pyrogram/raw/types/peer_settings.py
@@ -0,0 +1,204 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerSettings(TLObject):  # type: ignore
+    """List of actions that are possible when interacting with this user, to be shown as suggested actions in the chat action bar », see here » for more info.
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerSettings`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F47741F7``
+
+    Parameters:
+        report_spam (``bool``, *optional*):
+            Whether we can still report the user for spam
+
+        add_contact (``bool``, *optional*):
+            Whether we can add the user as contact
+
+        block_contact (``bool``, *optional*):
+            Whether we can block the user
+
+        share_contact (``bool``, *optional*):
+            Whether we can share the user's contact
+
+        need_contacts_exception (``bool``, *optional*):
+            Whether a special exception for contacts is needed
+
+        report_geo (``bool``, *optional*):
+            Whether we can report a geogroup as irrelevant for this location
+
+        autoarchived (``bool``, *optional*):
+            Whether this peer was automatically archived according to privacy settings and can be unarchived
+
+        invite_members (``bool``, *optional*):
+            If set, this is a recently created group chat to which new members can be invited
+
+        request_chat_broadcast (``bool``, *optional*):
+            This flag is set if request_chat_title and request_chat_date fields are set and the join request » is related to a channel (otherwise if only the request fields are set, the join request » is related to a chat).
+
+        business_bot_paused (``bool``, *optional*):
+
+
+        business_bot_can_reply (``bool``, *optional*):
+
+
+        geo_distance (``int`` ``32-bit``, *optional*):
+            Distance in meters between us and this peer
+
+        request_chat_title (``str``, *optional*):
+            If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the chat/channel's title.
+
+        request_chat_date (``int`` ``32-bit``, *optional*):
+            If set, this is a private chat with an administrator of a chat or channel to which the user sent a join request, and this field contains the timestamp when the join request » was sent.
+
+        business_bot_id (``int`` ``64-bit``, *optional*):
+
+
+        business_bot_manage_url (``str``, *optional*):
+
+
+        charge_paid_message_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        registration_month (``str``, *optional*):
+            N/A
+
+        phone_country (``str``, *optional*):
+            N/A
+
+        name_change_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        photo_change_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["report_spam", "add_contact", "block_contact", "share_contact", "need_contacts_exception", "report_geo", "autoarchived", "invite_members", "request_chat_broadcast", "business_bot_paused", "business_bot_can_reply", "geo_distance", "request_chat_title", "request_chat_date", "business_bot_id", "business_bot_manage_url", "charge_paid_message_stars", "registration_month", "phone_country", "name_change_date", "photo_change_date"]
+
+    ID = 0xf47741f7
+    QUALNAME = "types.PeerSettings"
+
+    def __init__(self, *, report_spam: Optional[bool] = None, add_contact: Optional[bool] = None, block_contact: Optional[bool] = None, share_contact: Optional[bool] = None, need_contacts_exception: Optional[bool] = None, report_geo: Optional[bool] = None, autoarchived: Optional[bool] = None, invite_members: Optional[bool] = None, request_chat_broadcast: Optional[bool] = None, business_bot_paused: Optional[bool] = None, business_bot_can_reply: Optional[bool] = None, geo_distance: Optional[int] = None, request_chat_title: Optional[str] = None, request_chat_date: Optional[int] = None, business_bot_id: Optional[int] = None, business_bot_manage_url: Optional[str] = None, charge_paid_message_stars: Optional[int] = None, registration_month: Optional[str] = None, phone_country: Optional[str] = None, name_change_date: Optional[int] = None, photo_change_date: Optional[int] = None) -> None:
+        self.report_spam = report_spam  # flags.0?true
+        self.add_contact = add_contact  # flags.1?true
+        self.block_contact = block_contact  # flags.2?true
+        self.share_contact = share_contact  # flags.3?true
+        self.need_contacts_exception = need_contacts_exception  # flags.4?true
+        self.report_geo = report_geo  # flags.5?true
+        self.autoarchived = autoarchived  # flags.7?true
+        self.invite_members = invite_members  # flags.8?true
+        self.request_chat_broadcast = request_chat_broadcast  # flags.10?true
+        self.business_bot_paused = business_bot_paused  # flags.11?true
+        self.business_bot_can_reply = business_bot_can_reply  # flags.12?true
+        self.geo_distance = geo_distance  # flags.6?int
+        self.request_chat_title = request_chat_title  # flags.9?string
+        self.request_chat_date = request_chat_date  # flags.9?int
+        self.business_bot_id = business_bot_id  # flags.13?long
+        self.business_bot_manage_url = business_bot_manage_url  # flags.13?string
+        self.charge_paid_message_stars = charge_paid_message_stars  # flags.14?long
+        self.registration_month = registration_month  # flags.15?string
+        self.phone_country = phone_country  # flags.16?string
+        self.name_change_date = name_change_date  # flags.17?int
+        self.photo_change_date = photo_change_date  # flags.18?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerSettings":
+
+        flags = Int.read(b)
+
+        report_spam = True if flags & (1 << 0) else False
+        add_contact = True if flags & (1 << 1) else False
+        block_contact = True if flags & (1 << 2) else False
+        share_contact = True if flags & (1 << 3) else False
+        need_contacts_exception = True if flags & (1 << 4) else False
+        report_geo = True if flags & (1 << 5) else False
+        autoarchived = True if flags & (1 << 7) else False
+        invite_members = True if flags & (1 << 8) else False
+        request_chat_broadcast = True if flags & (1 << 10) else False
+        business_bot_paused = True if flags & (1 << 11) else False
+        business_bot_can_reply = True if flags & (1 << 12) else False
+        geo_distance = Int.read(b) if flags & (1 << 6) else None
+        request_chat_title = String.read(b) if flags & (1 << 9) else None
+        request_chat_date = Int.read(b) if flags & (1 << 9) else None
+        business_bot_id = Long.read(b) if flags & (1 << 13) else None
+        business_bot_manage_url = String.read(b) if flags & (1 << 13) else None
+        charge_paid_message_stars = Long.read(b) if flags & (1 << 14) else None
+        registration_month = String.read(b) if flags & (1 << 15) else None
+        phone_country = String.read(b) if flags & (1 << 16) else None
+        name_change_date = Int.read(b) if flags & (1 << 17) else None
+        photo_change_date = Int.read(b) if flags & (1 << 18) else None
+        return PeerSettings(report_spam=report_spam, add_contact=add_contact, block_contact=block_contact, share_contact=share_contact, need_contacts_exception=need_contacts_exception, report_geo=report_geo, autoarchived=autoarchived, invite_members=invite_members, request_chat_broadcast=request_chat_broadcast, business_bot_paused=business_bot_paused, business_bot_can_reply=business_bot_can_reply, geo_distance=geo_distance, request_chat_title=request_chat_title, request_chat_date=request_chat_date, business_bot_id=business_bot_id, business_bot_manage_url=business_bot_manage_url, charge_paid_message_stars=charge_paid_message_stars, registration_month=registration_month, phone_country=phone_country, name_change_date=name_change_date, photo_change_date=photo_change_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.report_spam else 0
+        flags |= (1 << 1) if self.add_contact else 0
+        flags |= (1 << 2) if self.block_contact else 0
+        flags |= (1 << 3) if self.share_contact else 0
+        flags |= (1 << 4) if self.need_contacts_exception else 0
+        flags |= (1 << 5) if self.report_geo else 0
+        flags |= (1 << 7) if self.autoarchived else 0
+        flags |= (1 << 8) if self.invite_members else 0
+        flags |= (1 << 10) if self.request_chat_broadcast else 0
+        flags |= (1 << 11) if self.business_bot_paused else 0
+        flags |= (1 << 12) if self.business_bot_can_reply else 0
+        flags |= (1 << 6) if self.geo_distance is not None else 0
+        flags |= (1 << 9) if self.request_chat_title is not None else 0
+        flags |= (1 << 9) if self.request_chat_date is not None else 0
+        flags |= (1 << 13) if self.business_bot_id is not None else 0
+        flags |= (1 << 13) if self.business_bot_manage_url is not None else 0
+        flags |= (1 << 14) if self.charge_paid_message_stars is not None else 0
+        flags |= (1 << 15) if self.registration_month is not None else 0
+        flags |= (1 << 16) if self.phone_country is not None else 0
+        flags |= (1 << 17) if self.name_change_date is not None else 0
+        flags |= (1 << 18) if self.photo_change_date is not None else 0
+        b.write(Int(flags))
+
+        if self.geo_distance is not None:
+            b.write(Int(self.geo_distance))
+
+        if self.request_chat_title is not None:
+            b.write(String(self.request_chat_title))
+
+        if self.request_chat_date is not None:
+            b.write(Int(self.request_chat_date))
+
+        if self.business_bot_id is not None:
+            b.write(Long(self.business_bot_id))
+
+        if self.business_bot_manage_url is not None:
+            b.write(String(self.business_bot_manage_url))
+
+        if self.charge_paid_message_stars is not None:
+            b.write(Long(self.charge_paid_message_stars))
+
+        if self.registration_month is not None:
+            b.write(String(self.registration_month))
+
+        if self.phone_country is not None:
+            b.write(String(self.phone_country))
+
+        if self.name_change_date is not None:
+            b.write(Int(self.name_change_date))
+
+        if self.photo_change_date is not None:
+            b.write(Int(self.photo_change_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_stories.py b/pyrogram/raw/types/peer_stories.py
new file mode 100644
index 00000000..db0b07fd
--- /dev/null
+++ b/pyrogram/raw/types/peer_stories.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerStories(TLObject):  # type: ignore
+    """Stories associated to a peer
+
+    Constructor of :obj:`~pyrogram.raw.base.PeerStories`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9A35E999``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The peer
+
+        stories (List of :obj:`StoryItem `):
+            Stories
+
+        max_read_id (``int`` ``32-bit``, *optional*):
+            If set, contains the ID of the maximum read story
+
+    """
+
+    __slots__: List[str] = ["peer", "stories", "max_read_id"]
+
+    ID = 0x9a35e999
+    QUALNAME = "types.PeerStories"
+
+    def __init__(self, *, peer: "raw.base.Peer", stories: List["raw.base.StoryItem"], max_read_id: Optional[int] = None) -> None:
+        self.peer = peer  # Peer
+        self.stories = stories  # Vector
+        self.max_read_id = max_read_id  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerStories":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        max_read_id = Int.read(b) if flags & (1 << 0) else None
+        stories = TLObject.read(b)
+
+        return PeerStories(peer=peer, stories=stories, max_read_id=max_read_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.max_read_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        if self.max_read_id is not None:
+            b.write(Int(self.max_read_id))
+
+        b.write(Vector(self.stories))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/peer_user.py b/pyrogram/raw/types/peer_user.py
new file mode 100644
index 00000000..5a24572d
--- /dev/null
+++ b/pyrogram/raw/types/peer_user.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerUser(TLObject):  # type: ignore
+    """Chat partner
+
+    Constructor of :obj:`~pyrogram.raw.base.Peer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``59511722``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User identifier
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            chatlists.GetLeaveChatlistSuggestions
+    """
+
+    __slots__: List[str] = ["user_id"]
+
+    ID = 0x59511722
+    QUALNAME = "types.PeerUser"
+
+    def __init__(self, *, user_id: int) -> None:
+        self.user_id = user_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerUser":
+        # No flags
+
+        user_id = Long.read(b)
+
+        return PeerUser(user_id=user_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/pending_suggestion.py b/pyrogram/raw/types/pending_suggestion.py
new file mode 100644
index 00000000..9cc9409a
--- /dev/null
+++ b/pyrogram/raw/types/pending_suggestion.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PendingSuggestion(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PendingSuggestion`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E7E82E12``
+
+    Parameters:
+        suggestion (``str``):
+            N/A
+
+        title (:obj:`TextWithEntities `):
+            N/A
+
+        description (:obj:`TextWithEntities `):
+            N/A
+
+        url (``str``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["suggestion", "title", "description", "url"]
+
+    ID = 0xe7e82e12
+    QUALNAME = "types.PendingSuggestion"
+
+    def __init__(self, *, suggestion: str, title: "raw.base.TextWithEntities", description: "raw.base.TextWithEntities", url: str) -> None:
+        self.suggestion = suggestion  # string
+        self.title = title  # TextWithEntities
+        self.description = description  # TextWithEntities
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PendingSuggestion":
+        # No flags
+
+        suggestion = String.read(b)
+
+        title = TLObject.read(b)
+
+        description = TLObject.read(b)
+
+        url = String.read(b)
+
+        return PendingSuggestion(suggestion=suggestion, title=title, description=description, url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.suggestion))
+
+        b.write(self.title.write())
+
+        b.write(self.description.write())
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/__init__.py b/pyrogram/raw/types/phone/__init__.py
new file mode 100644
index 00000000..f2b82238
--- /dev/null
+++ b/pyrogram/raw/types/phone/__init__.py
@@ -0,0 +1,47 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .phone_call import PhoneCall
+from .group_call import GroupCall
+from .group_participants import GroupParticipants
+from .join_as_peers import JoinAsPeers
+from .exported_group_call_invite import ExportedGroupCallInvite
+from .group_call_stream_channels import GroupCallStreamChannels
+from .group_call_stream_rtmp_url import GroupCallStreamRtmpUrl
+from .group_call_stars import GroupCallStars
+
+
+__all__ = [
+    "PhoneCall",
+    "GroupCall",
+    "GroupParticipants",
+    "JoinAsPeers",
+    "ExportedGroupCallInvite",
+    "GroupCallStreamChannels",
+    "GroupCallStreamRtmpUrl",
+    "GroupCallStars",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/phone/exported_group_call_invite.py b/pyrogram/raw/types/phone/exported_group_call_invite.py
new file mode 100644
index 00000000..a34b6c62
--- /dev/null
+++ b/pyrogram/raw/types/phone/exported_group_call_invite.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ExportedGroupCallInvite(TLObject):  # type: ignore
+    """An invite to a group call or livestream
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.ExportedGroupCallInvite`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``204BD158``
+
+    Parameters:
+        link (``str``):
+            Invite link
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.ExportGroupCallInvite
+    """
+
+    __slots__: List[str] = ["link"]
+
+    ID = 0x204bd158
+    QUALNAME = "types.phone.ExportedGroupCallInvite"
+
+    def __init__(self, *, link: str) -> None:
+        self.link = link  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ExportedGroupCallInvite":
+        # No flags
+
+        link = String.read(b)
+
+        return ExportedGroupCallInvite(link=link)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.link))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/group_call.py b/pyrogram/raw/types/phone/group_call.py
new file mode 100644
index 00000000..152c31a3
--- /dev/null
+++ b/pyrogram/raw/types/phone/group_call.py
@@ -0,0 +1,95 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GroupCall(TLObject):  # type: ignore
+    """Contains info about a group call, and partial info about its participants.
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.GroupCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9E727AAD``
+
+    Parameters:
+        call (:obj:`GroupCall `):
+            Info about the group call
+
+        participants (List of :obj:`GroupCallParticipant `):
+            A partial list of participants.
+
+        participants_next_offset (``str``):
+            Next offset to use when fetching the remaining participants using phone.getGroupParticipants
+
+        chats (List of :obj:`Chat `):
+            Chats mentioned in the participants vector
+
+        users (List of :obj:`User `):
+            Users mentioned in the participants vector
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.GetGroupCall
+    """
+
+    __slots__: List[str] = ["call", "participants", "participants_next_offset", "chats", "users"]
+
+    ID = 0x9e727aad
+    QUALNAME = "types.phone.GroupCall"
+
+    def __init__(self, *, call: "raw.base.GroupCall", participants: List["raw.base.GroupCallParticipant"], participants_next_offset: str, chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.call = call  # GroupCall
+        self.participants = participants  # Vector
+        self.participants_next_offset = participants_next_offset  # string
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GroupCall":
+        # No flags
+
+        call = TLObject.read(b)
+
+        participants = TLObject.read(b)
+
+        participants_next_offset = String.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return GroupCall(call=call, participants=participants, participants_next_offset=participants_next_offset, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.call.write())
+
+        b.write(Vector(self.participants))
+
+        b.write(String(self.participants_next_offset))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/group_call_stars.py b/pyrogram/raw/types/phone/group_call_stars.py
new file mode 100644
index 00000000..df250740
--- /dev/null
+++ b/pyrogram/raw/types/phone/group_call_stars.py
@@ -0,0 +1,87 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GroupCallStars(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.GroupCallStars`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9D1DBD26``
+
+    Parameters:
+        total_stars (``int`` ``64-bit``):
+            N/A
+
+        top_donors (List of :obj:`GroupCallDonor `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.GetGroupCallStars
+    """
+
+    __slots__: List[str] = ["total_stars", "top_donors", "chats", "users"]
+
+    ID = 0x9d1dbd26
+    QUALNAME = "types.phone.GroupCallStars"
+
+    def __init__(self, *, total_stars: int, top_donors: List["raw.base.GroupCallDonor"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.total_stars = total_stars  # long
+        self.top_donors = top_donors  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GroupCallStars":
+        # No flags
+
+        total_stars = Long.read(b)
+
+        top_donors = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return GroupCallStars(total_stars=total_stars, top_donors=top_donors, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.total_stars))
+
+        b.write(Vector(self.top_donors))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/group_call_stream_channels.py b/pyrogram/raw/types/phone/group_call_stream_channels.py
new file mode 100644
index 00000000..0789d552
--- /dev/null
+++ b/pyrogram/raw/types/phone/group_call_stream_channels.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GroupCallStreamChannels(TLObject):  # type: ignore
+    """Info about RTMP streams in a group call or livestream
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.GroupCallStreamChannels`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D0E482B2``
+
+    Parameters:
+        channels (List of :obj:`GroupCallStreamChannel `):
+            RTMP streams
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.GetGroupCallStreamChannels
+    """
+
+    __slots__: List[str] = ["channels"]
+
+    ID = 0xd0e482b2
+    QUALNAME = "types.phone.GroupCallStreamChannels"
+
+    def __init__(self, *, channels: List["raw.base.GroupCallStreamChannel"]) -> None:
+        self.channels = channels  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GroupCallStreamChannels":
+        # No flags
+
+        channels = TLObject.read(b)
+
+        return GroupCallStreamChannels(channels=channels)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.channels))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/group_call_stream_rtmp_url.py b/pyrogram/raw/types/phone/group_call_stream_rtmp_url.py
new file mode 100644
index 00000000..1e56ccec
--- /dev/null
+++ b/pyrogram/raw/types/phone/group_call_stream_rtmp_url.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GroupCallStreamRtmpUrl(TLObject):  # type: ignore
+    """RTMP URL and stream key to be used in streaming software
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.GroupCallStreamRtmpUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2DBF3432``
+
+    Parameters:
+        url (``str``):
+            RTMP URL
+
+        key (``str``):
+            Stream key
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.GetGroupCallStreamRtmpUrl
+    """
+
+    __slots__: List[str] = ["url", "key"]
+
+    ID = 0x2dbf3432
+    QUALNAME = "types.phone.GroupCallStreamRtmpUrl"
+
+    def __init__(self, *, url: str, key: str) -> None:
+        self.url = url  # string
+        self.key = key  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GroupCallStreamRtmpUrl":
+        # No flags
+
+        url = String.read(b)
+
+        key = String.read(b)
+
+        return GroupCallStreamRtmpUrl(url=url, key=key)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(String(self.key))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/group_participants.py b/pyrogram/raw/types/phone/group_participants.py
new file mode 100644
index 00000000..606f33c5
--- /dev/null
+++ b/pyrogram/raw/types/phone/group_participants.py
@@ -0,0 +1,103 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class GroupParticipants(TLObject):  # type: ignore
+    """Info about the participants of a group call or livestream
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.GroupParticipants`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F47751B6``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Number of participants
+
+        participants (List of :obj:`GroupCallParticipant `):
+            List of participants
+
+        next_offset (``str``):
+            If not empty, the specified list of participants is partial, and more participants can be fetched specifying this parameter as offset in phone.getGroupParticipants.
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        version (``int`` ``32-bit``):
+            Version info
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.GetGroupParticipants
+    """
+
+    __slots__: List[str] = ["count", "participants", "next_offset", "chats", "users", "version"]
+
+    ID = 0xf47751b6
+    QUALNAME = "types.phone.GroupParticipants"
+
+    def __init__(self, *, count: int, participants: List["raw.base.GroupCallParticipant"], next_offset: str, chats: List["raw.base.Chat"], users: List["raw.base.User"], version: int) -> None:
+        self.count = count  # int
+        self.participants = participants  # Vector
+        self.next_offset = next_offset  # string
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.version = version  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "GroupParticipants":
+        # No flags
+
+        count = Int.read(b)
+
+        participants = TLObject.read(b)
+
+        next_offset = String.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        version = Int.read(b)
+
+        return GroupParticipants(count=count, participants=participants, next_offset=next_offset, chats=chats, users=users, version=version)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.participants))
+
+        b.write(String(self.next_offset))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        b.write(Int(self.version))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/join_as_peers.py b/pyrogram/raw/types/phone/join_as_peers.py
new file mode 100644
index 00000000..47fd2f10
--- /dev/null
+++ b/pyrogram/raw/types/phone/join_as_peers.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class JoinAsPeers(TLObject):  # type: ignore
+    """A list of peers that can be used to join a group call, presenting yourself as a specific user/channel.
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.JoinAsPeers`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AFE5623F``
+
+    Parameters:
+        peers (List of :obj:`Peer `):
+            Peers
+
+        chats (List of :obj:`Chat `):
+            Chats mentioned in the peers vector
+
+        users (List of :obj:`User `):
+            Users mentioned in the peers vector
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.GetGroupCallJoinAs
+    """
+
+    __slots__: List[str] = ["peers", "chats", "users"]
+
+    ID = 0xafe5623f
+    QUALNAME = "types.phone.JoinAsPeers"
+
+    def __init__(self, *, peers: List["raw.base.Peer"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.peers = peers  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "JoinAsPeers":
+        # No flags
+
+        peers = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return JoinAsPeers(peers=peers, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.peers))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone/phone_call.py b/pyrogram/raw/types/phone/phone_call.py
new file mode 100644
index 00000000..f2d6743e
--- /dev/null
+++ b/pyrogram/raw/types/phone/phone_call.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCall(TLObject):  # type: ignore
+    """A VoIP phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.phone.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EC82E140``
+
+    Parameters:
+        phone_call (:obj:`PhoneCall `):
+            The VoIP phone call
+
+        users (List of :obj:`User `):
+            VoIP phone call participants
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            phone.RequestCall
+            phone.AcceptCall
+            phone.ConfirmCall
+    """
+
+    __slots__: List[str] = ["phone_call", "users"]
+
+    ID = 0xec82e140
+    QUALNAME = "types.phone.PhoneCall"
+
+    def __init__(self, *, phone_call: "raw.base.PhoneCall", users: List["raw.base.User"]) -> None:
+        self.phone_call = phone_call  # PhoneCall
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCall":
+        # No flags
+
+        phone_call = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return PhoneCall(phone_call=phone_call, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.phone_call.write())
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call.py b/pyrogram/raw/types/phone_call.py
new file mode 100644
index 00000000..b98569c7
--- /dev/null
+++ b/pyrogram/raw/types/phone_call.py
@@ -0,0 +1,156 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCall(TLObject):  # type: ignore
+    """Phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``30535AF5``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Call ID
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        date (``int`` ``32-bit``):
+            Date of creation of the call
+
+        admin_id (``int`` ``64-bit``):
+            User ID of the creator of the call
+
+        participant_id (``int`` ``64-bit``):
+            User ID of the other participant in the call
+
+        g_a_or_b (``bytes``):
+            Parameter for key exchange
+
+        key_fingerprint (``int`` ``64-bit``):
+            Key fingerprint
+
+        protocol (:obj:`PhoneCallProtocol `):
+            Call protocol info to be passed to libtgvoip
+
+        connections (List of :obj:`PhoneConnection `):
+            List of endpoints the user can connect to to exchange call data
+
+        start_date (``int`` ``32-bit``):
+            When was the call actually started
+
+        p2p_allowed (``bool``, *optional*):
+            Whether P2P connection to the other peer is allowed
+
+        video (``bool``, *optional*):
+            Whether this is a video call
+
+        conference_supported (``bool``, *optional*):
+            N/A
+
+        custom_parameters (:obj:`DataJSON `, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id", "g_a_or_b", "key_fingerprint", "protocol", "connections", "start_date", "p2p_allowed", "video", "conference_supported", "custom_parameters"]
+
+    ID = 0x30535af5
+    QUALNAME = "types.PhoneCall"
+
+    def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int, g_a_or_b: bytes, key_fingerprint: int, protocol: "raw.base.PhoneCallProtocol", connections: List["raw.base.PhoneConnection"], start_date: int, p2p_allowed: Optional[bool] = None, video: Optional[bool] = None, conference_supported: Optional[bool] = None, custom_parameters: "raw.base.DataJSON" = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.date = date  # int
+        self.admin_id = admin_id  # long
+        self.participant_id = participant_id  # long
+        self.g_a_or_b = g_a_or_b  # bytes
+        self.key_fingerprint = key_fingerprint  # long
+        self.protocol = protocol  # PhoneCallProtocol
+        self.connections = connections  # Vector
+        self.start_date = start_date  # int
+        self.p2p_allowed = p2p_allowed  # flags.5?true
+        self.video = video  # flags.6?true
+        self.conference_supported = conference_supported  # flags.8?true
+        self.custom_parameters = custom_parameters  # flags.7?DataJSON
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCall":
+
+        flags = Int.read(b)
+
+        p2p_allowed = True if flags & (1 << 5) else False
+        video = True if flags & (1 << 6) else False
+        conference_supported = True if flags & (1 << 8) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        date = Int.read(b)
+
+        admin_id = Long.read(b)
+
+        participant_id = Long.read(b)
+
+        g_a_or_b = Bytes.read(b)
+
+        key_fingerprint = Long.read(b)
+
+        protocol = TLObject.read(b)
+
+        connections = TLObject.read(b)
+
+        start_date = Int.read(b)
+
+        custom_parameters = TLObject.read(b) if flags & (1 << 7) else None
+
+        return PhoneCall(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id, g_a_or_b=g_a_or_b, key_fingerprint=key_fingerprint, protocol=protocol, connections=connections, start_date=start_date, p2p_allowed=p2p_allowed, video=video, conference_supported=conference_supported, custom_parameters=custom_parameters)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 5) if self.p2p_allowed else 0
+        flags |= (1 << 6) if self.video else 0
+        flags |= (1 << 8) if self.conference_supported else 0
+        flags |= (1 << 7) if self.custom_parameters is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.admin_id))
+
+        b.write(Long(self.participant_id))
+
+        b.write(Bytes(self.g_a_or_b))
+
+        b.write(Long(self.key_fingerprint))
+
+        b.write(self.protocol.write())
+
+        b.write(Vector(self.connections))
+
+        b.write(Int(self.start_date))
+
+        if self.custom_parameters is not None:
+            b.write(self.custom_parameters.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_accepted.py b/pyrogram/raw/types/phone_call_accepted.py
new file mode 100644
index 00000000..6da772c6
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_accepted.py
@@ -0,0 +1,110 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallAccepted(TLObject):  # type: ignore
+    """An accepted phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3660C311``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID of accepted phone call
+
+        access_hash (``int`` ``64-bit``):
+            Access hash of phone call
+
+        date (``int`` ``32-bit``):
+            When was the call accepted
+
+        admin_id (``int`` ``64-bit``):
+            ID of the call creator
+
+        participant_id (``int`` ``64-bit``):
+            ID of the other user in the call
+
+        g_b (``bytes``):
+            B parameter for secure E2E phone call key exchange
+
+        protocol (:obj:`PhoneCallProtocol `):
+            Protocol to use for phone call
+
+        video (``bool``, *optional*):
+            Whether this is a video call
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id", "g_b", "protocol", "video"]
+
+    ID = 0x3660c311
+    QUALNAME = "types.PhoneCallAccepted"
+
+    def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int, g_b: bytes, protocol: "raw.base.PhoneCallProtocol", video: Optional[bool] = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.date = date  # int
+        self.admin_id = admin_id  # long
+        self.participant_id = participant_id  # long
+        self.g_b = g_b  # bytes
+        self.protocol = protocol  # PhoneCallProtocol
+        self.video = video  # flags.6?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallAccepted":
+
+        flags = Int.read(b)
+
+        video = True if flags & (1 << 6) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        date = Int.read(b)
+
+        admin_id = Long.read(b)
+
+        participant_id = Long.read(b)
+
+        g_b = Bytes.read(b)
+
+        protocol = TLObject.read(b)
+
+        return PhoneCallAccepted(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id, g_b=g_b, protocol=protocol, video=video)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 6) if self.video else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.admin_id))
+
+        b.write(Long(self.participant_id))
+
+        b.write(Bytes(self.g_b))
+
+        b.write(self.protocol.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_discard_reason_busy.py b/pyrogram/raw/types/phone_call_discard_reason_busy.py
new file mode 100644
index 00000000..1c9eae9a
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_discard_reason_busy.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallDiscardReasonBusy(TLObject):  # type: ignore
+    """The phone call was discarded because the user is busy in another call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCallDiscardReason`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FAF7E8C9``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfaf7e8c9
+    QUALNAME = "types.PhoneCallDiscardReasonBusy"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallDiscardReasonBusy":
+        # No flags
+
+        return PhoneCallDiscardReasonBusy()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_discard_reason_disconnect.py b/pyrogram/raw/types/phone_call_discard_reason_disconnect.py
new file mode 100644
index 00000000..e023ac2d
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_discard_reason_disconnect.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallDiscardReasonDisconnect(TLObject):  # type: ignore
+    """The phone call was disconnected
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCallDiscardReason`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E095C1A0``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xe095c1a0
+    QUALNAME = "types.PhoneCallDiscardReasonDisconnect"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallDiscardReasonDisconnect":
+        # No flags
+
+        return PhoneCallDiscardReasonDisconnect()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_discard_reason_hangup.py b/pyrogram/raw/types/phone_call_discard_reason_hangup.py
new file mode 100644
index 00000000..4b21f9d8
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_discard_reason_hangup.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallDiscardReasonHangup(TLObject):  # type: ignore
+    """The phone call was ended normally
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCallDiscardReason`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``57ADC690``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x57adc690
+    QUALNAME = "types.PhoneCallDiscardReasonHangup"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallDiscardReasonHangup":
+        # No flags
+
+        return PhoneCallDiscardReasonHangup()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_discard_reason_migrate_conference_call.py b/pyrogram/raw/types/phone_call_discard_reason_migrate_conference_call.py
new file mode 100644
index 00000000..c6c28364
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_discard_reason_migrate_conference_call.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallDiscardReasonMigrateConferenceCall(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCallDiscardReason`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9FBBF1F7``
+
+    Parameters:
+        slug (``str``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["slug"]
+
+    ID = 0x9fbbf1f7
+    QUALNAME = "types.PhoneCallDiscardReasonMigrateConferenceCall"
+
+    def __init__(self, *, slug: str) -> None:
+        self.slug = slug  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallDiscardReasonMigrateConferenceCall":
+        # No flags
+
+        slug = String.read(b)
+
+        return PhoneCallDiscardReasonMigrateConferenceCall(slug=slug)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.slug))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_discard_reason_missed.py b/pyrogram/raw/types/phone_call_discard_reason_missed.py
new file mode 100644
index 00000000..85ca8568
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_discard_reason_missed.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallDiscardReasonMissed(TLObject):  # type: ignore
+    """The phone call was missed
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCallDiscardReason`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``85E42301``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x85e42301
+    QUALNAME = "types.PhoneCallDiscardReasonMissed"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallDiscardReasonMissed":
+        # No flags
+
+        return PhoneCallDiscardReasonMissed()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_discarded.py b/pyrogram/raw/types/phone_call_discarded.py
new file mode 100644
index 00000000..156d9c73
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_discarded.py
@@ -0,0 +1,93 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallDiscarded(TLObject):  # type: ignore
+    """Indicates a discarded phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``50CA4DE1``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Call ID
+
+        need_rating (``bool``, *optional*):
+            Whether the server required the user to rate the call
+
+        need_debug (``bool``, *optional*):
+            Whether the server required the client to send the libtgvoip call debug data
+
+        video (``bool``, *optional*):
+            Whether the call was a video call
+
+        reason (:obj:`PhoneCallDiscardReason `, *optional*):
+            Why was the phone call discarded
+
+        duration (``int`` ``32-bit``, *optional*):
+            Duration of the phone call in seconds
+
+    """
+
+    __slots__: List[str] = ["id", "need_rating", "need_debug", "video", "reason", "duration"]
+
+    ID = 0x50ca4de1
+    QUALNAME = "types.PhoneCallDiscarded"
+
+    def __init__(self, *, id: int, need_rating: Optional[bool] = None, need_debug: Optional[bool] = None, video: Optional[bool] = None, reason: "raw.base.PhoneCallDiscardReason" = None, duration: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.need_rating = need_rating  # flags.2?true
+        self.need_debug = need_debug  # flags.3?true
+        self.video = video  # flags.6?true
+        self.reason = reason  # flags.0?PhoneCallDiscardReason
+        self.duration = duration  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallDiscarded":
+
+        flags = Int.read(b)
+
+        need_rating = True if flags & (1 << 2) else False
+        need_debug = True if flags & (1 << 3) else False
+        video = True if flags & (1 << 6) else False
+        id = Long.read(b)
+
+        reason = TLObject.read(b) if flags & (1 << 0) else None
+
+        duration = Int.read(b) if flags & (1 << 1) else None
+        return PhoneCallDiscarded(id=id, need_rating=need_rating, need_debug=need_debug, video=video, reason=reason, duration=duration)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.need_rating else 0
+        flags |= (1 << 3) if self.need_debug else 0
+        flags |= (1 << 6) if self.video else 0
+        flags |= (1 << 0) if self.reason is not None else 0
+        flags |= (1 << 1) if self.duration is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        if self.reason is not None:
+            b.write(self.reason.write())
+
+        if self.duration is not None:
+            b.write(Int(self.duration))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_empty.py b/pyrogram/raw/types/phone_call_empty.py
new file mode 100644
index 00000000..34ca6a75
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_empty.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallEmpty(TLObject):  # type: ignore
+    """Empty constructor
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5366C915``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Call ID
+
+    """
+
+    __slots__: List[str] = ["id"]
+
+    ID = 0x5366c915
+    QUALNAME = "types.PhoneCallEmpty"
+
+    def __init__(self, *, id: int) -> None:
+        self.id = id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallEmpty":
+        # No flags
+
+        id = Long.read(b)
+
+        return PhoneCallEmpty(id=id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_protocol.py b/pyrogram/raw/types/phone_call_protocol.py
new file mode 100644
index 00000000..8d081472
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_protocol.py
@@ -0,0 +1,84 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallProtocol(TLObject):  # type: ignore
+    """Protocol info for libtgvoip
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCallProtocol`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FC878FC8``
+
+    Parameters:
+        min_layer (``int`` ``32-bit``):
+            Minimum layer for remote libtgvoip
+
+        max_layer (``int`` ``32-bit``):
+            Maximum layer for remote libtgvoip
+
+        library_versions (List of ``str``):
+            When using phone.requestCall and phone.acceptCall, specify all library versions supported by the client. The server will merge and choose the best library version supported by both peers, returning only the best value in the result of the callee's phone.acceptCall and in the phoneCallAccepted update received by the caller.
+
+        udp_p2p (``bool``, *optional*):
+            Whether to allow P2P connection to the other participant
+
+        udp_reflector (``bool``, *optional*):
+            Whether to allow connection to the other participants through the reflector servers
+
+    """
+
+    __slots__: List[str] = ["min_layer", "max_layer", "library_versions", "udp_p2p", "udp_reflector"]
+
+    ID = 0xfc878fc8
+    QUALNAME = "types.PhoneCallProtocol"
+
+    def __init__(self, *, min_layer: int, max_layer: int, library_versions: List[str], udp_p2p: Optional[bool] = None, udp_reflector: Optional[bool] = None) -> None:
+        self.min_layer = min_layer  # int
+        self.max_layer = max_layer  # int
+        self.library_versions = library_versions  # Vector
+        self.udp_p2p = udp_p2p  # flags.0?true
+        self.udp_reflector = udp_reflector  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallProtocol":
+
+        flags = Int.read(b)
+
+        udp_p2p = True if flags & (1 << 0) else False
+        udp_reflector = True if flags & (1 << 1) else False
+        min_layer = Int.read(b)
+
+        max_layer = Int.read(b)
+
+        library_versions = TLObject.read(b, String)
+
+        return PhoneCallProtocol(min_layer=min_layer, max_layer=max_layer, library_versions=library_versions, udp_p2p=udp_p2p, udp_reflector=udp_reflector)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.udp_p2p else 0
+        flags |= (1 << 1) if self.udp_reflector else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.min_layer))
+
+        b.write(Int(self.max_layer))
+
+        b.write(Vector(self.library_versions, String))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_requested.py b/pyrogram/raw/types/phone_call_requested.py
new file mode 100644
index 00000000..ca38a42f
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_requested.py
@@ -0,0 +1,110 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallRequested(TLObject):  # type: ignore
+    """Requested phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``14B0ED0C``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Phone call ID
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        date (``int`` ``32-bit``):
+            When was the phone call created
+
+        admin_id (``int`` ``64-bit``):
+            ID of the creator of the phone call
+
+        participant_id (``int`` ``64-bit``):
+            ID of the other participant of the phone call
+
+        g_a_hash (``bytes``):
+            Parameter for key exchange
+
+        protocol (:obj:`PhoneCallProtocol `):
+            Call protocol info to be passed to libtgvoip
+
+        video (``bool``, *optional*):
+            Whether this is a video call
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id", "g_a_hash", "protocol", "video"]
+
+    ID = 0x14b0ed0c
+    QUALNAME = "types.PhoneCallRequested"
+
+    def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int, g_a_hash: bytes, protocol: "raw.base.PhoneCallProtocol", video: Optional[bool] = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.date = date  # int
+        self.admin_id = admin_id  # long
+        self.participant_id = participant_id  # long
+        self.g_a_hash = g_a_hash  # bytes
+        self.protocol = protocol  # PhoneCallProtocol
+        self.video = video  # flags.6?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallRequested":
+
+        flags = Int.read(b)
+
+        video = True if flags & (1 << 6) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        date = Int.read(b)
+
+        admin_id = Long.read(b)
+
+        participant_id = Long.read(b)
+
+        g_a_hash = Bytes.read(b)
+
+        protocol = TLObject.read(b)
+
+        return PhoneCallRequested(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id, g_a_hash=g_a_hash, protocol=protocol, video=video)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 6) if self.video else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.admin_id))
+
+        b.write(Long(self.participant_id))
+
+        b.write(Bytes(self.g_a_hash))
+
+        b.write(self.protocol.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_call_waiting.py b/pyrogram/raw/types/phone_call_waiting.py
new file mode 100644
index 00000000..584ed9bf
--- /dev/null
+++ b/pyrogram/raw/types/phone_call_waiting.py
@@ -0,0 +1,111 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneCallWaiting(TLObject):  # type: ignore
+    """Incoming phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneCall`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C5226F17``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Call ID
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        date (``int`` ``32-bit``):
+            Date
+
+        admin_id (``int`` ``64-bit``):
+            Admin ID
+
+        participant_id (``int`` ``64-bit``):
+            Participant ID
+
+        protocol (:obj:`PhoneCallProtocol `):
+            Phone call protocol info
+
+        video (``bool``, *optional*):
+            Is this a video call
+
+        receive_date (``int`` ``32-bit``, *optional*):
+            When was the phone call received
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "date", "admin_id", "participant_id", "protocol", "video", "receive_date"]
+
+    ID = 0xc5226f17
+    QUALNAME = "types.PhoneCallWaiting"
+
+    def __init__(self, *, id: int, access_hash: int, date: int, admin_id: int, participant_id: int, protocol: "raw.base.PhoneCallProtocol", video: Optional[bool] = None, receive_date: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.date = date  # int
+        self.admin_id = admin_id  # long
+        self.participant_id = participant_id  # long
+        self.protocol = protocol  # PhoneCallProtocol
+        self.video = video  # flags.6?true
+        self.receive_date = receive_date  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneCallWaiting":
+
+        flags = Int.read(b)
+
+        video = True if flags & (1 << 6) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        date = Int.read(b)
+
+        admin_id = Long.read(b)
+
+        participant_id = Long.read(b)
+
+        protocol = TLObject.read(b)
+
+        receive_date = Int.read(b) if flags & (1 << 0) else None
+        return PhoneCallWaiting(id=id, access_hash=access_hash, date=date, admin_id=admin_id, participant_id=participant_id, protocol=protocol, video=video, receive_date=receive_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 6) if self.video else 0
+        flags |= (1 << 0) if self.receive_date is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.admin_id))
+
+        b.write(Long(self.participant_id))
+
+        b.write(self.protocol.write())
+
+        if self.receive_date is not None:
+            b.write(Int(self.receive_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_connection.py b/pyrogram/raw/types/phone_connection.py
new file mode 100644
index 00000000..3831a369
--- /dev/null
+++ b/pyrogram/raw/types/phone_connection.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneConnection(TLObject):  # type: ignore
+    """Identifies an endpoint that can be used to connect to the other user in a phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneConnection`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9CC123C7``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Endpoint ID
+
+        ip (``str``):
+            IP address of endpoint
+
+        ipv6 (``str``):
+            IPv6 address of endpoint
+
+        port (``int`` ``32-bit``):
+            Port ID
+
+        peer_tag (``bytes``):
+            Our peer tag
+
+        tcp (``bool``, *optional*):
+            Whether TCP should be used
+
+    """
+
+    __slots__: List[str] = ["id", "ip", "ipv6", "port", "peer_tag", "tcp"]
+
+    ID = 0x9cc123c7
+    QUALNAME = "types.PhoneConnection"
+
+    def __init__(self, *, id: int, ip: str, ipv6: str, port: int, peer_tag: bytes, tcp: Optional[bool] = None) -> None:
+        self.id = id  # long
+        self.ip = ip  # string
+        self.ipv6 = ipv6  # string
+        self.port = port  # int
+        self.peer_tag = peer_tag  # bytes
+        self.tcp = tcp  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneConnection":
+
+        flags = Int.read(b)
+
+        tcp = True if flags & (1 << 0) else False
+        id = Long.read(b)
+
+        ip = String.read(b)
+
+        ipv6 = String.read(b)
+
+        port = Int.read(b)
+
+        peer_tag = Bytes.read(b)
+
+        return PhoneConnection(id=id, ip=ip, ipv6=ipv6, port=port, peer_tag=peer_tag, tcp=tcp)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.tcp else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(String(self.ip))
+
+        b.write(String(self.ipv6))
+
+        b.write(Int(self.port))
+
+        b.write(Bytes(self.peer_tag))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/phone_connection_webrtc.py b/pyrogram/raw/types/phone_connection_webrtc.py
new file mode 100644
index 00000000..55e17a53
--- /dev/null
+++ b/pyrogram/raw/types/phone_connection_webrtc.py
@@ -0,0 +1,108 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhoneConnectionWebrtc(TLObject):  # type: ignore
+    """WebRTC connection parameters
+
+    Constructor of :obj:`~pyrogram.raw.base.PhoneConnection`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``635FE375``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Endpoint ID
+
+        ip (``str``):
+            IP address
+
+        ipv6 (``str``):
+            IPv6 address
+
+        port (``int`` ``32-bit``):
+            Port
+
+        username (``str``):
+            Username
+
+        password (``str``):
+            Password
+
+        turn (``bool``, *optional*):
+            Whether this is a TURN endpoint
+
+        stun (``bool``, *optional*):
+            Whether this is a STUN endpoint
+
+    """
+
+    __slots__: List[str] = ["id", "ip", "ipv6", "port", "username", "password", "turn", "stun"]
+
+    ID = 0x635fe375
+    QUALNAME = "types.PhoneConnectionWebrtc"
+
+    def __init__(self, *, id: int, ip: str, ipv6: str, port: int, username: str, password: str, turn: Optional[bool] = None, stun: Optional[bool] = None) -> None:
+        self.id = id  # long
+        self.ip = ip  # string
+        self.ipv6 = ipv6  # string
+        self.port = port  # int
+        self.username = username  # string
+        self.password = password  # string
+        self.turn = turn  # flags.0?true
+        self.stun = stun  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhoneConnectionWebrtc":
+
+        flags = Int.read(b)
+
+        turn = True if flags & (1 << 0) else False
+        stun = True if flags & (1 << 1) else False
+        id = Long.read(b)
+
+        ip = String.read(b)
+
+        ipv6 = String.read(b)
+
+        port = Int.read(b)
+
+        username = String.read(b)
+
+        password = String.read(b)
+
+        return PhoneConnectionWebrtc(id=id, ip=ip, ipv6=ipv6, port=port, username=username, password=password, turn=turn, stun=stun)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.turn else 0
+        flags |= (1 << 1) if self.stun else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(String(self.ip))
+
+        b.write(String(self.ipv6))
+
+        b.write(Int(self.port))
+
+        b.write(String(self.username))
+
+        b.write(String(self.password))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo.py b/pyrogram/raw/types/photo.py
new file mode 100644
index 00000000..834e0f0e
--- /dev/null
+++ b/pyrogram/raw/types/photo.py
@@ -0,0 +1,112 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Photo(TLObject):  # type: ignore
+    """Photo
+
+    Constructor of :obj:`~pyrogram.raw.base.Photo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FB197A65``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        file_reference (``bytes``):
+            file reference
+
+        date (``int`` ``32-bit``):
+            Date of upload
+
+        sizes (List of :obj:`PhotoSize `):
+            Available sizes for download
+
+        dc_id (``int`` ``32-bit``):
+            DC ID to use for download
+
+        has_stickers (``bool``, *optional*):
+            Whether the photo has mask stickers attached to it
+
+        video_sizes (List of :obj:`VideoSize `, *optional*):
+            For animated profiles, the MPEG4 videos
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "file_reference", "date", "sizes", "dc_id", "has_stickers", "video_sizes"]
+
+    ID = 0xfb197a65
+    QUALNAME = "types.Photo"
+
+    def __init__(self, *, id: int, access_hash: int, file_reference: bytes, date: int, sizes: List["raw.base.PhotoSize"], dc_id: int, has_stickers: Optional[bool] = None, video_sizes: Optional[List["raw.base.VideoSize"]] = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.file_reference = file_reference  # bytes
+        self.date = date  # int
+        self.sizes = sizes  # Vector
+        self.dc_id = dc_id  # int
+        self.has_stickers = has_stickers  # flags.0?true
+        self.video_sizes = video_sizes  # flags.1?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Photo":
+
+        flags = Int.read(b)
+
+        has_stickers = True if flags & (1 << 0) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        file_reference = Bytes.read(b)
+
+        date = Int.read(b)
+
+        sizes = TLObject.read(b)
+
+        video_sizes = TLObject.read(b) if flags & (1 << 1) else []
+
+        dc_id = Int.read(b)
+
+        return Photo(id=id, access_hash=access_hash, file_reference=file_reference, date=date, sizes=sizes, dc_id=dc_id, has_stickers=has_stickers, video_sizes=video_sizes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.has_stickers else 0
+        flags |= (1 << 1) if self.video_sizes else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Bytes(self.file_reference))
+
+        b.write(Int(self.date))
+
+        b.write(Vector(self.sizes))
+
+        if self.video_sizes is not None:
+            b.write(Vector(self.video_sizes))
+
+        b.write(Int(self.dc_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_cached_size.py b/pyrogram/raw/types/photo_cached_size.py
new file mode 100644
index 00000000..1b16a6e7
--- /dev/null
+++ b/pyrogram/raw/types/photo_cached_size.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoCachedSize(TLObject):  # type: ignore
+    """Description of an image and its content.
+
+    Constructor of :obj:`~pyrogram.raw.base.PhotoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``21E1AD6``
+
+    Parameters:
+        type (``str``):
+            Thumbnail type
+
+        w (``int`` ``32-bit``):
+            Image width
+
+        h (``int`` ``32-bit``):
+            Image height
+
+        bytes (``bytes``):
+            Binary data, file content
+
+    """
+
+    __slots__: List[str] = ["type", "w", "h", "bytes"]
+
+    ID = 0x21e1ad6
+    QUALNAME = "types.PhotoCachedSize"
+
+    def __init__(self, *, type: str, w: int, h: int, bytes: bytes) -> None:
+        self.type = type  # string
+        self.w = w  # int
+        self.h = h  # int
+        self.bytes = bytes  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoCachedSize":
+        # No flags
+
+        type = String.read(b)
+
+        w = Int.read(b)
+
+        h = Int.read(b)
+
+        bytes = Bytes.read(b)
+
+        return PhotoCachedSize(type=type, w=w, h=h, bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.type))
+
+        b.write(Int(self.w))
+
+        b.write(Int(self.h))
+
+        b.write(Bytes(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_empty.py b/pyrogram/raw/types/photo_empty.py
new file mode 100644
index 00000000..1b70fc26
--- /dev/null
+++ b/pyrogram/raw/types/photo_empty.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoEmpty(TLObject):  # type: ignore
+    """Empty constructor, non-existent photo
+
+    Constructor of :obj:`~pyrogram.raw.base.Photo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2331B22D``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Photo identifier
+
+    """
+
+    __slots__: List[str] = ["id"]
+
+    ID = 0x2331b22d
+    QUALNAME = "types.PhotoEmpty"
+
+    def __init__(self, *, id: int) -> None:
+        self.id = id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoEmpty":
+        # No flags
+
+        id = Long.read(b)
+
+        return PhotoEmpty(id=id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_path_size.py b/pyrogram/raw/types/photo_path_size.py
new file mode 100644
index 00000000..50eb4100
--- /dev/null
+++ b/pyrogram/raw/types/photo_path_size.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoPathSize(TLObject):  # type: ignore
+    """Messages with animated stickers can have a compressed svg (< 300 bytes) to show the outline of the sticker before fetching the actual lottie animation.
+
+    Constructor of :obj:`~pyrogram.raw.base.PhotoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D8214D41``
+
+    Parameters:
+        type (``str``):
+            Always j
+
+        bytes (``bytes``):
+            Compressed SVG path payload, see here for decompression instructions
+
+    """
+
+    __slots__: List[str] = ["type", "bytes"]
+
+    ID = 0xd8214d41
+    QUALNAME = "types.PhotoPathSize"
+
+    def __init__(self, *, type: str, bytes: bytes) -> None:
+        self.type = type  # string
+        self.bytes = bytes  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoPathSize":
+        # No flags
+
+        type = String.read(b)
+
+        bytes = Bytes.read(b)
+
+        return PhotoPathSize(type=type, bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.type))
+
+        b.write(Bytes(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_size.py b/pyrogram/raw/types/photo_size.py
new file mode 100644
index 00000000..59d6e56b
--- /dev/null
+++ b/pyrogram/raw/types/photo_size.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoSize(TLObject):  # type: ignore
+    """Image description.
+
+    Constructor of :obj:`~pyrogram.raw.base.PhotoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``75C78E60``
+
+    Parameters:
+        type (``str``):
+            Thumbnail type »
+
+        w (``int`` ``32-bit``):
+            Image width
+
+        h (``int`` ``32-bit``):
+            Image height
+
+        size (``int`` ``32-bit``):
+            File size
+
+    """
+
+    __slots__: List[str] = ["type", "w", "h", "size"]
+
+    ID = 0x75c78e60
+    QUALNAME = "types.PhotoSize"
+
+    def __init__(self, *, type: str, w: int, h: int, size: int) -> None:
+        self.type = type  # string
+        self.w = w  # int
+        self.h = h  # int
+        self.size = size  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoSize":
+        # No flags
+
+        type = String.read(b)
+
+        w = Int.read(b)
+
+        h = Int.read(b)
+
+        size = Int.read(b)
+
+        return PhotoSize(type=type, w=w, h=h, size=size)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.type))
+
+        b.write(Int(self.w))
+
+        b.write(Int(self.h))
+
+        b.write(Int(self.size))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_size_empty.py b/pyrogram/raw/types/photo_size_empty.py
new file mode 100644
index 00000000..edf509e6
--- /dev/null
+++ b/pyrogram/raw/types/photo_size_empty.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoSizeEmpty(TLObject):  # type: ignore
+    """Empty constructor. Image with this thumbnail is unavailable.
+
+    Constructor of :obj:`~pyrogram.raw.base.PhotoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E17E23C``
+
+    Parameters:
+        type (``str``):
+            Thumbnail type »
+
+    """
+
+    __slots__: List[str] = ["type"]
+
+    ID = 0xe17e23c
+    QUALNAME = "types.PhotoSizeEmpty"
+
+    def __init__(self, *, type: str) -> None:
+        self.type = type  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoSizeEmpty":
+        # No flags
+
+        type = String.read(b)
+
+        return PhotoSizeEmpty(type=type)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.type))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_size_progressive.py b/pyrogram/raw/types/photo_size_progressive.py
new file mode 100644
index 00000000..a3f612ca
--- /dev/null
+++ b/pyrogram/raw/types/photo_size_progressive.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoSizeProgressive(TLObject):  # type: ignore
+    """Progressively encoded photosize
+
+    Constructor of :obj:`~pyrogram.raw.base.PhotoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FA3EFB95``
+
+    Parameters:
+        type (``str``):
+            Photosize type »
+
+        w (``int`` ``32-bit``):
+            Photo width
+
+        h (``int`` ``32-bit``):
+            Photo height
+
+        sizes (List of ``int`` ``32-bit``):
+            Sizes of progressive JPEG file prefixes, which can be used to preliminarily show the image.
+
+    """
+
+    __slots__: List[str] = ["type", "w", "h", "sizes"]
+
+    ID = 0xfa3efb95
+    QUALNAME = "types.PhotoSizeProgressive"
+
+    def __init__(self, *, type: str, w: int, h: int, sizes: List[int]) -> None:
+        self.type = type  # string
+        self.w = w  # int
+        self.h = h  # int
+        self.sizes = sizes  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoSizeProgressive":
+        # No flags
+
+        type = String.read(b)
+
+        w = Int.read(b)
+
+        h = Int.read(b)
+
+        sizes = TLObject.read(b, Int)
+
+        return PhotoSizeProgressive(type=type, w=w, h=h, sizes=sizes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.type))
+
+        b.write(Int(self.w))
+
+        b.write(Int(self.h))
+
+        b.write(Vector(self.sizes, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photo_stripped_size.py b/pyrogram/raw/types/photo_stripped_size.py
new file mode 100644
index 00000000..77ee43e8
--- /dev/null
+++ b/pyrogram/raw/types/photo_stripped_size.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotoStrippedSize(TLObject):  # type: ignore
+    """A low-resolution compressed JPG payload
+
+    Constructor of :obj:`~pyrogram.raw.base.PhotoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E0B0BC2E``
+
+    Parameters:
+        type (``str``):
+            Thumbnail type
+
+        bytes (``bytes``):
+            Thumbnail data, see here for more info on decompression »
+
+    """
+
+    __slots__: List[str] = ["type", "bytes"]
+
+    ID = 0xe0b0bc2e
+    QUALNAME = "types.PhotoStrippedSize"
+
+    def __init__(self, *, type: str, bytes: bytes) -> None:
+        self.type = type  # string
+        self.bytes = bytes  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotoStrippedSize":
+        # No flags
+
+        type = String.read(b)
+
+        bytes = Bytes.read(b)
+
+        return PhotoStrippedSize(type=type, bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.type))
+
+        b.write(Bytes(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photos/__init__.py b/pyrogram/raw/types/photos/__init__.py
new file mode 100644
index 00000000..0e91cd71
--- /dev/null
+++ b/pyrogram/raw/types/photos/__init__.py
@@ -0,0 +1,37 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .photos import Photos
+from .photos_slice import PhotosSlice
+from .photo import Photo
+
+
+__all__ = [
+    "Photos",
+    "PhotosSlice",
+    "Photo",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/photos/photo.py b/pyrogram/raw/types/photos/photo.py
new file mode 100644
index 00000000..1bc60222
--- /dev/null
+++ b/pyrogram/raw/types/photos/photo.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Photo(TLObject):  # type: ignore
+    """Photo with auxiliary data.
+
+    Constructor of :obj:`~pyrogram.raw.base.photos.Photo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``20212CA8``
+
+    Parameters:
+        photo (:obj:`Photo `):
+            Photo
+
+        users (List of :obj:`User `):
+            Users
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            photos.UpdateProfilePhoto
+            photos.UploadProfilePhoto
+            photos.UploadContactProfilePhoto
+    """
+
+    __slots__: List[str] = ["photo", "users"]
+
+    ID = 0x20212ca8
+    QUALNAME = "types.photos.Photo"
+
+    def __init__(self, *, photo: "raw.base.Photo", users: List["raw.base.User"]) -> None:
+        self.photo = photo  # Photo
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Photo":
+        # No flags
+
+        photo = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return Photo(photo=photo, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.photo.write())
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photos/photos.py b/pyrogram/raw/types/photos/photos.py
new file mode 100644
index 00000000..e808ca86
--- /dev/null
+++ b/pyrogram/raw/types/photos/photos.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Photos(TLObject):  # type: ignore
+    """Full list of photos with auxiliary data.
+
+    Constructor of :obj:`~pyrogram.raw.base.photos.Photos`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8DCA6AA5``
+
+    Parameters:
+        photos (List of :obj:`Photo `):
+            List of photos
+
+        users (List of :obj:`User `):
+            List of mentioned users
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            photos.GetUserPhotos
+    """
+
+    __slots__: List[str] = ["photos", "users"]
+
+    ID = 0x8dca6aa5
+    QUALNAME = "types.photos.Photos"
+
+    def __init__(self, *, photos: List["raw.base.Photo"], users: List["raw.base.User"]) -> None:
+        self.photos = photos  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Photos":
+        # No flags
+
+        photos = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return Photos(photos=photos, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.photos))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/photos/photos_slice.py b/pyrogram/raw/types/photos/photos_slice.py
new file mode 100644
index 00000000..f0e9df33
--- /dev/null
+++ b/pyrogram/raw/types/photos/photos_slice.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PhotosSlice(TLObject):  # type: ignore
+    """Incomplete list of photos with auxiliary data.
+
+    Constructor of :obj:`~pyrogram.raw.base.photos.Photos`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``15051F54``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of photos
+
+        photos (List of :obj:`Photo `):
+            List of photos
+
+        users (List of :obj:`User `):
+            List of mentioned users
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            photos.GetUserPhotos
+    """
+
+    __slots__: List[str] = ["count", "photos", "users"]
+
+    ID = 0x15051f54
+    QUALNAME = "types.photos.PhotosSlice"
+
+    def __init__(self, *, count: int, photos: List["raw.base.Photo"], users: List["raw.base.User"]) -> None:
+        self.count = count  # int
+        self.photos = photos  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PhotosSlice":
+        # No flags
+
+        count = Int.read(b)
+
+        photos = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return PhotosSlice(count=count, photos=photos, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.photos))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/poll.py b/pyrogram/raw/types/poll.py
new file mode 100644
index 00000000..496c4a57
--- /dev/null
+++ b/pyrogram/raw/types/poll.py
@@ -0,0 +1,114 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Poll(TLObject):  # type: ignore
+    """Poll
+
+    Constructor of :obj:`~pyrogram.raw.base.Poll`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``58747131``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID of the poll
+
+        question (:obj:`TextWithEntities `):
+            The question of the poll
+
+        answers (List of :obj:`PollAnswer `):
+            The possible answers, vote using messages.sendVote.
+
+        closed (``bool``, *optional*):
+            Whether the poll is closed and doesn't accept any more answers
+
+        public_voters (``bool``, *optional*):
+            Whether cast votes are publicly visible to all users (non-anonymous poll)
+
+        multiple_choice (``bool``, *optional*):
+            Whether multiple options can be chosen as answer
+
+        quiz (``bool``, *optional*):
+            Whether this is a quiz (with wrong and correct answers, results shown in the return type)
+
+        close_period (``int`` ``32-bit``, *optional*):
+            Amount of time in seconds the poll will be active after creation, 5-600. Can't be used together with close_date.
+
+        close_date (``int`` ``32-bit``, *optional*):
+            Point in time (Unix timestamp) when the poll will be automatically closed. Must be at least 5 and no more than 600 seconds in the future; can't be used together with close_period.
+
+    """
+
+    __slots__: List[str] = ["id", "question", "answers", "closed", "public_voters", "multiple_choice", "quiz", "close_period", "close_date"]
+
+    ID = 0x58747131
+    QUALNAME = "types.Poll"
+
+    def __init__(self, *, id: int, question: "raw.base.TextWithEntities", answers: List["raw.base.PollAnswer"], closed: Optional[bool] = None, public_voters: Optional[bool] = None, multiple_choice: Optional[bool] = None, quiz: Optional[bool] = None, close_period: Optional[int] = None, close_date: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.question = question  # TextWithEntities
+        self.answers = answers  # Vector
+        self.closed = closed  # flags.0?true
+        self.public_voters = public_voters  # flags.1?true
+        self.multiple_choice = multiple_choice  # flags.2?true
+        self.quiz = quiz  # flags.3?true
+        self.close_period = close_period  # flags.4?int
+        self.close_date = close_date  # flags.5?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Poll":
+
+        id = Long.read(b)
+
+        flags = Int.read(b)
+
+        closed = True if flags & (1 << 0) else False
+        public_voters = True if flags & (1 << 1) else False
+        multiple_choice = True if flags & (1 << 2) else False
+        quiz = True if flags & (1 << 3) else False
+        question = TLObject.read(b)
+
+        answers = TLObject.read(b)
+
+        close_period = Int.read(b) if flags & (1 << 4) else None
+        close_date = Int.read(b) if flags & (1 << 5) else None
+        return Poll(id=id, question=question, answers=answers, closed=closed, public_voters=public_voters, multiple_choice=multiple_choice, quiz=quiz, close_period=close_period, close_date=close_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+
+        b.write(Long(self.id))
+        flags = 0
+        flags |= (1 << 0) if self.closed else 0
+        flags |= (1 << 1) if self.public_voters else 0
+        flags |= (1 << 2) if self.multiple_choice else 0
+        flags |= (1 << 3) if self.quiz else 0
+        flags |= (1 << 4) if self.close_period is not None else 0
+        flags |= (1 << 5) if self.close_date is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.question.write())
+
+        b.write(Vector(self.answers))
+
+        if self.close_period is not None:
+            b.write(Int(self.close_period))
+
+        if self.close_date is not None:
+            b.write(Int(self.close_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/poll_answer.py b/pyrogram/raw/types/poll_answer.py
new file mode 100644
index 00000000..127aa866
--- /dev/null
+++ b/pyrogram/raw/types/poll_answer.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PollAnswer(TLObject):  # type: ignore
+    """A possible answer of a poll
+
+    Constructor of :obj:`~pyrogram.raw.base.PollAnswer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FF16E2CA``
+
+    Parameters:
+        text (:obj:`TextWithEntities `):
+            Textual representation of the answer
+
+        option (``bytes``):
+            The param that has to be passed to messages.sendVote.
+
+    """
+
+    __slots__: List[str] = ["text", "option"]
+
+    ID = 0xff16e2ca
+    QUALNAME = "types.PollAnswer"
+
+    def __init__(self, *, text: "raw.base.TextWithEntities", option: bytes) -> None:
+        self.text = text  # TextWithEntities
+        self.option = option  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PollAnswer":
+        # No flags
+
+        text = TLObject.read(b)
+
+        option = Bytes.read(b)
+
+        return PollAnswer(text=text, option=option)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(Bytes(self.option))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/poll_answer_voters.py b/pyrogram/raw/types/poll_answer_voters.py
new file mode 100644
index 00000000..e1a7df0e
--- /dev/null
+++ b/pyrogram/raw/types/poll_answer_voters.py
@@ -0,0 +1,76 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PollAnswerVoters(TLObject):  # type: ignore
+    """A poll answer, and how users voted on it
+
+    Constructor of :obj:`~pyrogram.raw.base.PollAnswerVoters`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3B6DDAD2``
+
+    Parameters:
+        option (``bytes``):
+            The param that has to be passed to messages.sendVote.
+
+        voters (``int`` ``32-bit``):
+            How many users voted for this option
+
+        chosen (``bool``, *optional*):
+            Whether we have chosen this answer
+
+        correct (``bool``, *optional*):
+            For quizzes, whether the option we have chosen is correct
+
+    """
+
+    __slots__: List[str] = ["option", "voters", "chosen", "correct"]
+
+    ID = 0x3b6ddad2
+    QUALNAME = "types.PollAnswerVoters"
+
+    def __init__(self, *, option: bytes, voters: int, chosen: Optional[bool] = None, correct: Optional[bool] = None) -> None:
+        self.option = option  # bytes
+        self.voters = voters  # int
+        self.chosen = chosen  # flags.0?true
+        self.correct = correct  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PollAnswerVoters":
+
+        flags = Int.read(b)
+
+        chosen = True if flags & (1 << 0) else False
+        correct = True if flags & (1 << 1) else False
+        option = Bytes.read(b)
+
+        voters = Int.read(b)
+
+        return PollAnswerVoters(option=option, voters=voters, chosen=chosen, correct=correct)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.chosen else 0
+        flags |= (1 << 1) if self.correct else 0
+        b.write(Int(flags))
+
+        b.write(Bytes(self.option))
+
+        b.write(Int(self.voters))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/poll_results.py b/pyrogram/raw/types/poll_results.py
new file mode 100644
index 00000000..9360c9eb
--- /dev/null
+++ b/pyrogram/raw/types/poll_results.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PollResults(TLObject):  # type: ignore
+    """Results of poll
+
+    Constructor of :obj:`~pyrogram.raw.base.PollResults`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7ADF2420``
+
+    Parameters:
+        min (``bool``, *optional*):
+            Similar to min objects, used for poll constructors that are the same for all users so they don't have the option chosen by the current user (you can use messages.getPollResults to get the full poll results).
+
+        results (List of :obj:`PollAnswerVoters `, *optional*):
+            Poll results
+
+        total_voters (``int`` ``32-bit``, *optional*):
+            Total number of people that voted in the poll
+
+        recent_voters (List of :obj:`Peer `, *optional*):
+            IDs of the last users that recently voted in the poll
+
+        solution (``str``, *optional*):
+            Explanation of quiz solution
+
+        solution_entities (List of :obj:`MessageEntity `, *optional*):
+            Message entities for styled text in quiz solution
+
+    """
+
+    __slots__: List[str] = ["min", "results", "total_voters", "recent_voters", "solution", "solution_entities"]
+
+    ID = 0x7adf2420
+    QUALNAME = "types.PollResults"
+
+    def __init__(self, *, min: Optional[bool] = None, results: Optional[List["raw.base.PollAnswerVoters"]] = None, total_voters: Optional[int] = None, recent_voters: Optional[List["raw.base.Peer"]] = None, solution: Optional[str] = None, solution_entities: Optional[List["raw.base.MessageEntity"]] = None) -> None:
+        self.min = min  # flags.0?true
+        self.results = results  # flags.1?Vector
+        self.total_voters = total_voters  # flags.2?int
+        self.recent_voters = recent_voters  # flags.3?Vector
+        self.solution = solution  # flags.4?string
+        self.solution_entities = solution_entities  # flags.4?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PollResults":
+
+        flags = Int.read(b)
+
+        min = True if flags & (1 << 0) else False
+        results = TLObject.read(b) if flags & (1 << 1) else []
+
+        total_voters = Int.read(b) if flags & (1 << 2) else None
+        recent_voters = TLObject.read(b) if flags & (1 << 3) else []
+
+        solution = String.read(b) if flags & (1 << 4) else None
+        solution_entities = TLObject.read(b) if flags & (1 << 4) else []
+
+        return PollResults(min=min, results=results, total_voters=total_voters, recent_voters=recent_voters, solution=solution, solution_entities=solution_entities)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.min else 0
+        flags |= (1 << 1) if self.results else 0
+        flags |= (1 << 2) if self.total_voters is not None else 0
+        flags |= (1 << 3) if self.recent_voters else 0
+        flags |= (1 << 4) if self.solution is not None else 0
+        flags |= (1 << 4) if self.solution_entities else 0
+        b.write(Int(flags))
+
+        if self.results is not None:
+            b.write(Vector(self.results))
+
+        if self.total_voters is not None:
+            b.write(Int(self.total_voters))
+
+        if self.recent_voters is not None:
+            b.write(Vector(self.recent_voters))
+
+        if self.solution is not None:
+            b.write(String(self.solution))
+
+        if self.solution_entities is not None:
+            b.write(Vector(self.solution_entities))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/pong.py b/pyrogram/raw/types/pong.py
new file mode 100644
index 00000000..04cfa8b4
--- /dev/null
+++ b/pyrogram/raw/types/pong.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Pong(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Pong`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``347773C5``
+
+    Parameters:
+        msg_id (``int`` ``64-bit``):
+            N/A
+
+        ping_id (``int`` ``64-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            Ping
+            PingDelayDisconnect
+    """
+
+    __slots__: List[str] = ["msg_id", "ping_id"]
+
+    ID = 0x347773c5
+    QUALNAME = "types.Pong"
+
+    def __init__(self, *, msg_id: int, ping_id: int) -> None:
+        self.msg_id = msg_id  # long
+        self.ping_id = ping_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Pong":
+        # No flags
+
+        msg_id = Long.read(b)
+
+        ping_id = Long.read(b)
+
+        return Pong(msg_id=msg_id, ping_id=ping_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.msg_id))
+
+        b.write(Long(self.ping_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/popular_contact.py b/pyrogram/raw/types/popular_contact.py
new file mode 100644
index 00000000..ee3b9437
--- /dev/null
+++ b/pyrogram/raw/types/popular_contact.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PopularContact(TLObject):  # type: ignore
+    """Popular contact
+
+    Constructor of :obj:`~pyrogram.raw.base.PopularContact`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5CE14175``
+
+    Parameters:
+        client_id (``int`` ``64-bit``):
+            Contact identifier
+
+        importers (``int`` ``32-bit``):
+            How many people imported this contact
+
+    """
+
+    __slots__: List[str] = ["client_id", "importers"]
+
+    ID = 0x5ce14175
+    QUALNAME = "types.PopularContact"
+
+    def __init__(self, *, client_id: int, importers: int) -> None:
+        self.client_id = client_id  # long
+        self.importers = importers  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PopularContact":
+        # No flags
+
+        client_id = Long.read(b)
+
+        importers = Int.read(b)
+
+        return PopularContact(client_id=client_id, importers=importers)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.client_id))
+
+        b.write(Int(self.importers))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/post_address.py b/pyrogram/raw/types/post_address.py
new file mode 100644
index 00000000..3fe7545d
--- /dev/null
+++ b/pyrogram/raw/types/post_address.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PostAddress(TLObject):  # type: ignore
+    """Shipping address
+
+    Constructor of :obj:`~pyrogram.raw.base.PostAddress`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1E8CAAEB``
+
+    Parameters:
+        street_line1 (``str``):
+            First line for the address
+
+        street_line2 (``str``):
+            Second line for the address
+
+        city (``str``):
+            City
+
+        state (``str``):
+            State, if applicable (empty otherwise)
+
+        country_iso2 (``str``):
+            ISO 3166-1 alpha-2 country code
+
+        post_code (``str``):
+            Address post code
+
+    """
+
+    __slots__: List[str] = ["street_line1", "street_line2", "city", "state", "country_iso2", "post_code"]
+
+    ID = 0x1e8caaeb
+    QUALNAME = "types.PostAddress"
+
+    def __init__(self, *, street_line1: str, street_line2: str, city: str, state: str, country_iso2: str, post_code: str) -> None:
+        self.street_line1 = street_line1  # string
+        self.street_line2 = street_line2  # string
+        self.city = city  # string
+        self.state = state  # string
+        self.country_iso2 = country_iso2  # string
+        self.post_code = post_code  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PostAddress":
+        # No flags
+
+        street_line1 = String.read(b)
+
+        street_line2 = String.read(b)
+
+        city = String.read(b)
+
+        state = String.read(b)
+
+        country_iso2 = String.read(b)
+
+        post_code = String.read(b)
+
+        return PostAddress(street_line1=street_line1, street_line2=street_line2, city=city, state=state, country_iso2=country_iso2, post_code=post_code)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.street_line1))
+
+        b.write(String(self.street_line2))
+
+        b.write(String(self.city))
+
+        b.write(String(self.state))
+
+        b.write(String(self.country_iso2))
+
+        b.write(String(self.post_code))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/post_interaction_counters_message.py b/pyrogram/raw/types/post_interaction_counters_message.py
new file mode 100644
index 00000000..14a917e2
--- /dev/null
+++ b/pyrogram/raw/types/post_interaction_counters_message.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PostInteractionCountersMessage(TLObject):  # type: ignore
+    """Interaction counters for a message.
+
+    Constructor of :obj:`~pyrogram.raw.base.PostInteractionCounters`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E7058E7F``
+
+    Parameters:
+        msg_id (``int`` ``32-bit``):
+            Message ID
+
+        views (``int`` ``32-bit``):
+            Number of views
+
+        forwards (``int`` ``32-bit``):
+            Number of forwards to public channels
+
+        reactions (``int`` ``32-bit``):
+            Number of reactions
+
+    """
+
+    __slots__: List[str] = ["msg_id", "views", "forwards", "reactions"]
+
+    ID = 0xe7058e7f
+    QUALNAME = "types.PostInteractionCountersMessage"
+
+    def __init__(self, *, msg_id: int, views: int, forwards: int, reactions: int) -> None:
+        self.msg_id = msg_id  # int
+        self.views = views  # int
+        self.forwards = forwards  # int
+        self.reactions = reactions  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PostInteractionCountersMessage":
+        # No flags
+
+        msg_id = Int.read(b)
+
+        views = Int.read(b)
+
+        forwards = Int.read(b)
+
+        reactions = Int.read(b)
+
+        return PostInteractionCountersMessage(msg_id=msg_id, views=views, forwards=forwards, reactions=reactions)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.msg_id))
+
+        b.write(Int(self.views))
+
+        b.write(Int(self.forwards))
+
+        b.write(Int(self.reactions))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/post_interaction_counters_story.py b/pyrogram/raw/types/post_interaction_counters_story.py
new file mode 100644
index 00000000..449053d7
--- /dev/null
+++ b/pyrogram/raw/types/post_interaction_counters_story.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PostInteractionCountersStory(TLObject):  # type: ignore
+    """Interaction counters for a story.
+
+    Constructor of :obj:`~pyrogram.raw.base.PostInteractionCounters`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8A480E27``
+
+    Parameters:
+        story_id (``int`` ``32-bit``):
+            Story ID
+
+        views (``int`` ``32-bit``):
+            Number of views
+
+        forwards (``int`` ``32-bit``):
+            Number of forwards and reposts to public chats and channels
+
+        reactions (``int`` ``32-bit``):
+            Number of reactions
+
+    """
+
+    __slots__: List[str] = ["story_id", "views", "forwards", "reactions"]
+
+    ID = 0x8a480e27
+    QUALNAME = "types.PostInteractionCountersStory"
+
+    def __init__(self, *, story_id: int, views: int, forwards: int, reactions: int) -> None:
+        self.story_id = story_id  # int
+        self.views = views  # int
+        self.forwards = forwards  # int
+        self.reactions = reactions  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PostInteractionCountersStory":
+        # No flags
+
+        story_id = Int.read(b)
+
+        views = Int.read(b)
+
+        forwards = Int.read(b)
+
+        reactions = Int.read(b)
+
+        return PostInteractionCountersStory(story_id=story_id, views=views, forwards=forwards, reactions=reactions)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.story_id))
+
+        b.write(Int(self.views))
+
+        b.write(Int(self.forwards))
+
+        b.write(Int(self.reactions))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/pq_inner_data.py b/pyrogram/raw/types/pq_inner_data.py
new file mode 100644
index 00000000..1db4365f
--- /dev/null
+++ b/pyrogram/raw/types/pq_inner_data.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PQInnerData(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PQInnerData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``83C95AEC``
+
+    Parameters:
+        pq (``bytes``):
+            N/A
+
+        p (``bytes``):
+            N/A
+
+        q (``bytes``):
+            N/A
+
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        new_nonce (``int`` ``256-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["pq", "p", "q", "nonce", "server_nonce", "new_nonce"]
+
+    ID = 0x83c95aec
+    QUALNAME = "types.PQInnerData"
+
+    def __init__(self, *, pq: bytes, p: bytes, q: bytes, nonce: int, server_nonce: int, new_nonce: int) -> None:
+        self.pq = pq  # bytes
+        self.p = p  # bytes
+        self.q = q  # bytes
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.new_nonce = new_nonce  # int256
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PQInnerData":
+        # No flags
+
+        pq = Bytes.read(b)
+
+        p = Bytes.read(b)
+
+        q = Bytes.read(b)
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        new_nonce = Int256.read(b)
+
+        return PQInnerData(pq=pq, p=p, q=q, nonce=nonce, server_nonce=server_nonce, new_nonce=new_nonce)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.pq))
+
+        b.write(Bytes(self.p))
+
+        b.write(Bytes(self.q))
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Int256(self.new_nonce))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/pq_inner_data_dc.py b/pyrogram/raw/types/pq_inner_data_dc.py
new file mode 100644
index 00000000..b1a08f5d
--- /dev/null
+++ b/pyrogram/raw/types/pq_inner_data_dc.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PQInnerDataDc(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PQInnerData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A9F55F95``
+
+    Parameters:
+        pq (``bytes``):
+            N/A
+
+        p (``bytes``):
+            N/A
+
+        q (``bytes``):
+            N/A
+
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        new_nonce (``int`` ``256-bit``):
+            N/A
+
+        dc (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["pq", "p", "q", "nonce", "server_nonce", "new_nonce", "dc"]
+
+    ID = 0xa9f55f95
+    QUALNAME = "types.PQInnerDataDc"
+
+    def __init__(self, *, pq: bytes, p: bytes, q: bytes, nonce: int, server_nonce: int, new_nonce: int, dc: int) -> None:
+        self.pq = pq  # bytes
+        self.p = p  # bytes
+        self.q = q  # bytes
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.new_nonce = new_nonce  # int256
+        self.dc = dc  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PQInnerDataDc":
+        # No flags
+
+        pq = Bytes.read(b)
+
+        p = Bytes.read(b)
+
+        q = Bytes.read(b)
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        new_nonce = Int256.read(b)
+
+        dc = Int.read(b)
+
+        return PQInnerDataDc(pq=pq, p=p, q=q, nonce=nonce, server_nonce=server_nonce, new_nonce=new_nonce, dc=dc)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.pq))
+
+        b.write(Bytes(self.p))
+
+        b.write(Bytes(self.q))
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Int256(self.new_nonce))
+
+        b.write(Int(self.dc))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/pq_inner_data_temp.py b/pyrogram/raw/types/pq_inner_data_temp.py
new file mode 100644
index 00000000..d5490b75
--- /dev/null
+++ b/pyrogram/raw/types/pq_inner_data_temp.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PQInnerDataTemp(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PQInnerData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3C6A84D4``
+
+    Parameters:
+        pq (``bytes``):
+            N/A
+
+        p (``bytes``):
+            N/A
+
+        q (``bytes``):
+            N/A
+
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        new_nonce (``int`` ``256-bit``):
+            N/A
+
+        expires_in (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["pq", "p", "q", "nonce", "server_nonce", "new_nonce", "expires_in"]
+
+    ID = 0x3c6a84d4
+    QUALNAME = "types.PQInnerDataTemp"
+
+    def __init__(self, *, pq: bytes, p: bytes, q: bytes, nonce: int, server_nonce: int, new_nonce: int, expires_in: int) -> None:
+        self.pq = pq  # bytes
+        self.p = p  # bytes
+        self.q = q  # bytes
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.new_nonce = new_nonce  # int256
+        self.expires_in = expires_in  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PQInnerDataTemp":
+        # No flags
+
+        pq = Bytes.read(b)
+
+        p = Bytes.read(b)
+
+        q = Bytes.read(b)
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        new_nonce = Int256.read(b)
+
+        expires_in = Int.read(b)
+
+        return PQInnerDataTemp(pq=pq, p=p, q=q, nonce=nonce, server_nonce=server_nonce, new_nonce=new_nonce, expires_in=expires_in)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.pq))
+
+        b.write(Bytes(self.p))
+
+        b.write(Bytes(self.q))
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Int256(self.new_nonce))
+
+        b.write(Int(self.expires_in))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/pq_inner_data_temp_dc.py b/pyrogram/raw/types/pq_inner_data_temp_dc.py
new file mode 100644
index 00000000..b4af5d1c
--- /dev/null
+++ b/pyrogram/raw/types/pq_inner_data_temp_dc.py
@@ -0,0 +1,110 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PQInnerDataTempDc(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PQInnerData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``56FDDF88``
+
+    Parameters:
+        pq (``bytes``):
+            N/A
+
+        p (``bytes``):
+            N/A
+
+        q (``bytes``):
+            N/A
+
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        new_nonce (``int`` ``256-bit``):
+            N/A
+
+        dc (``int`` ``32-bit``):
+            N/A
+
+        expires_in (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["pq", "p", "q", "nonce", "server_nonce", "new_nonce", "dc", "expires_in"]
+
+    ID = 0x56fddf88
+    QUALNAME = "types.PQInnerDataTempDc"
+
+    def __init__(self, *, pq: bytes, p: bytes, q: bytes, nonce: int, server_nonce: int, new_nonce: int, dc: int, expires_in: int) -> None:
+        self.pq = pq  # bytes
+        self.p = p  # bytes
+        self.q = q  # bytes
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.new_nonce = new_nonce  # int256
+        self.dc = dc  # int
+        self.expires_in = expires_in  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PQInnerDataTempDc":
+        # No flags
+
+        pq = Bytes.read(b)
+
+        p = Bytes.read(b)
+
+        q = Bytes.read(b)
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        new_nonce = Int256.read(b)
+
+        dc = Int.read(b)
+
+        expires_in = Int.read(b)
+
+        return PQInnerDataTempDc(pq=pq, p=p, q=q, nonce=nonce, server_nonce=server_nonce, new_nonce=new_nonce, dc=dc, expires_in=expires_in)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.pq))
+
+        b.write(Bytes(self.p))
+
+        b.write(Bytes(self.q))
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Int256(self.new_nonce))
+
+        b.write(Int(self.dc))
+
+        b.write(Int(self.expires_in))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/premium/__init__.py b/pyrogram/raw/types/premium/__init__.py
new file mode 100644
index 00000000..c720664f
--- /dev/null
+++ b/pyrogram/raw/types/premium/__init__.py
@@ -0,0 +1,37 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .boosts_list import BoostsList
+from .my_boosts import MyBoosts
+from .boosts_status import BoostsStatus
+
+
+__all__ = [
+    "BoostsList",
+    "MyBoosts",
+    "BoostsStatus",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/premium/boosts_list.py b/pyrogram/raw/types/premium/boosts_list.py
new file mode 100644
index 00000000..d97d1a05
--- /dev/null
+++ b/pyrogram/raw/types/premium/boosts_list.py
@@ -0,0 +1,91 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class BoostsList(TLObject):  # type: ignore
+    """List of boosts that were applied to a peer by multiple users.
+
+    Constructor of :obj:`~pyrogram.raw.base.premium.BoostsList`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``86F8613C``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of results
+
+        boosts (List of :obj:`Boost `):
+            Boosts
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        next_offset (``str``, *optional*):
+            Offset that can be used for pagination.
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            premium.GetBoostsList
+            premium.GetUserBoosts
+    """
+
+    __slots__: List[str] = ["count", "boosts", "users", "next_offset"]
+
+    ID = 0x86f8613c
+    QUALNAME = "types.premium.BoostsList"
+
+    def __init__(self, *, count: int, boosts: List["raw.base.Boost"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.boosts = boosts  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "BoostsList":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        boosts = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        users = TLObject.read(b)
+
+        return BoostsList(count=count, boosts=boosts, users=users, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.boosts))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/premium/boosts_status.py b/pyrogram/raw/types/premium/boosts_status.py
new file mode 100644
index 00000000..e8ee02bb
--- /dev/null
+++ b/pyrogram/raw/types/premium/boosts_status.py
@@ -0,0 +1,143 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class BoostsStatus(TLObject):  # type: ignore
+    """Contains info about the current boost status of a peer.
+
+    Constructor of :obj:`~pyrogram.raw.base.premium.BoostsStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4959427A``
+
+    Parameters:
+        level (``int`` ``32-bit``):
+            The current boost level of the channel.
+
+        current_level_boosts (``int`` ``32-bit``):
+            The number of boosts acquired so far in the current level.
+
+        boosts (``int`` ``32-bit``):
+            Total number of boosts acquired so far.
+
+        boost_url (``str``):
+            Boost deep link » that can be used to boost the chat.
+
+        my_boost (``bool``, *optional*):
+            Whether we're currently boosting this channel, my_boost_slots will also be set.
+
+        gift_boosts (``int`` ``32-bit``, *optional*):
+            The number of boosts acquired from created Telegram Premium gift codes and giveaways; only returned to channel admins.
+
+        next_level_boosts (``int`` ``32-bit``, *optional*):
+            Total number of boosts needed to reach the next level; if absent, the next level isn't available.
+
+        premium_audience (:obj:`StatsPercentValue `, *optional*):
+            Only returned to channel admins: contains the approximated number of Premium users subscribed to the channel, related to the total number of subscribers.
+
+        prepaid_giveaways (List of :obj:`PrepaidGiveaway `, *optional*):
+            A list of prepaid giveaways available for the chat; only returned to channel admins.
+
+        my_boost_slots (List of ``int`` ``32-bit``, *optional*):
+            Indicates which of our boost slots we've assigned to this peer (populated if my_boost is set).
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            premium.GetBoostsStatus
+    """
+
+    __slots__: List[str] = ["level", "current_level_boosts", "boosts", "boost_url", "my_boost", "gift_boosts", "next_level_boosts", "premium_audience", "prepaid_giveaways", "my_boost_slots"]
+
+    ID = 0x4959427a
+    QUALNAME = "types.premium.BoostsStatus"
+
+    def __init__(self, *, level: int, current_level_boosts: int, boosts: int, boost_url: str, my_boost: Optional[bool] = None, gift_boosts: Optional[int] = None, next_level_boosts: Optional[int] = None, premium_audience: "raw.base.StatsPercentValue" = None, prepaid_giveaways: Optional[List["raw.base.PrepaidGiveaway"]] = None, my_boost_slots: Optional[List[int]] = None) -> None:
+        self.level = level  # int
+        self.current_level_boosts = current_level_boosts  # int
+        self.boosts = boosts  # int
+        self.boost_url = boost_url  # string
+        self.my_boost = my_boost  # flags.2?true
+        self.gift_boosts = gift_boosts  # flags.4?int
+        self.next_level_boosts = next_level_boosts  # flags.0?int
+        self.premium_audience = premium_audience  # flags.1?StatsPercentValue
+        self.prepaid_giveaways = prepaid_giveaways  # flags.3?Vector
+        self.my_boost_slots = my_boost_slots  # flags.2?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "BoostsStatus":
+
+        flags = Int.read(b)
+
+        my_boost = True if flags & (1 << 2) else False
+        level = Int.read(b)
+
+        current_level_boosts = Int.read(b)
+
+        boosts = Int.read(b)
+
+        gift_boosts = Int.read(b) if flags & (1 << 4) else None
+        next_level_boosts = Int.read(b) if flags & (1 << 0) else None
+        premium_audience = TLObject.read(b) if flags & (1 << 1) else None
+
+        boost_url = String.read(b)
+
+        prepaid_giveaways = TLObject.read(b) if flags & (1 << 3) else []
+
+        my_boost_slots = TLObject.read(b, Int) if flags & (1 << 2) else []
+
+        return BoostsStatus(level=level, current_level_boosts=current_level_boosts, boosts=boosts, boost_url=boost_url, my_boost=my_boost, gift_boosts=gift_boosts, next_level_boosts=next_level_boosts, premium_audience=premium_audience, prepaid_giveaways=prepaid_giveaways, my_boost_slots=my_boost_slots)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.my_boost else 0
+        flags |= (1 << 4) if self.gift_boosts is not None else 0
+        flags |= (1 << 0) if self.next_level_boosts is not None else 0
+        flags |= (1 << 1) if self.premium_audience is not None else 0
+        flags |= (1 << 3) if self.prepaid_giveaways else 0
+        flags |= (1 << 2) if self.my_boost_slots else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.level))
+
+        b.write(Int(self.current_level_boosts))
+
+        b.write(Int(self.boosts))
+
+        if self.gift_boosts is not None:
+            b.write(Int(self.gift_boosts))
+
+        if self.next_level_boosts is not None:
+            b.write(Int(self.next_level_boosts))
+
+        if self.premium_audience is not None:
+            b.write(self.premium_audience.write())
+
+        b.write(String(self.boost_url))
+
+        if self.prepaid_giveaways is not None:
+            b.write(Vector(self.prepaid_giveaways))
+
+        if self.my_boost_slots is not None:
+            b.write(Vector(self.my_boost_slots, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/premium/my_boosts.py b/pyrogram/raw/types/premium/my_boosts.py
new file mode 100644
index 00000000..0e61c731
--- /dev/null
+++ b/pyrogram/raw/types/premium/my_boosts.py
@@ -0,0 +1,80 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class MyBoosts(TLObject):  # type: ignore
+    """A list of peers we are currently boosting, and how many boost slots we have left.
+
+    Constructor of :obj:`~pyrogram.raw.base.premium.MyBoosts`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9AE228E2``
+
+    Parameters:
+        my_boosts (List of :obj:`MyBoost `):
+            Info about boosted peers and remaining boost slots.
+
+        chats (List of :obj:`Chat `):
+            Referenced chats
+
+        users (List of :obj:`User `):
+            Referenced users
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            premium.GetMyBoosts
+            premium.ApplyBoost
+    """
+
+    __slots__: List[str] = ["my_boosts", "chats", "users"]
+
+    ID = 0x9ae228e2
+    QUALNAME = "types.premium.MyBoosts"
+
+    def __init__(self, *, my_boosts: List["raw.base.MyBoost"], chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.my_boosts = my_boosts  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "MyBoosts":
+        # No flags
+
+        my_boosts = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return MyBoosts(my_boosts=my_boosts, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.my_boosts))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/premium_gift_code_option.py b/pyrogram/raw/types/premium_gift_code_option.py
new file mode 100644
index 00000000..f1b24538
--- /dev/null
+++ b/pyrogram/raw/types/premium_gift_code_option.py
@@ -0,0 +1,107 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PremiumGiftCodeOption(TLObject):  # type: ignore
+    """Contains info about a giveaway/gift option.
+
+    Constructor of :obj:`~pyrogram.raw.base.PremiumGiftCodeOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``257E962B``
+
+    Parameters:
+        users (``int`` ``32-bit``):
+            Number of users which will be able to activate the gift codes.
+
+        months (``int`` ``32-bit``):
+            Duration in months of each gifted Telegram Premium subscription.
+
+        currency (``str``):
+            Three-letter ISO 4217 currency code
+
+        amount (``int`` ``64-bit``):
+            Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
+
+        store_product (``str``, *optional*):
+            Identifier of the store product associated with the option, official apps only.
+
+        store_quantity (``int`` ``32-bit``, *optional*):
+            Number of times the store product must be paid
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetPremiumGiftCodeOptions
+    """
+
+    __slots__: List[str] = ["users", "months", "currency", "amount", "store_product", "store_quantity"]
+
+    ID = 0x257e962b
+    QUALNAME = "types.PremiumGiftCodeOption"
+
+    def __init__(self, *, users: int, months: int, currency: str, amount: int, store_product: Optional[str] = None, store_quantity: Optional[int] = None) -> None:
+        self.users = users  # int
+        self.months = months  # int
+        self.currency = currency  # string
+        self.amount = amount  # long
+        self.store_product = store_product  # flags.0?string
+        self.store_quantity = store_quantity  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PremiumGiftCodeOption":
+
+        flags = Int.read(b)
+
+        users = Int.read(b)
+
+        months = Int.read(b)
+
+        store_product = String.read(b) if flags & (1 << 0) else None
+        store_quantity = Int.read(b) if flags & (1 << 1) else None
+        currency = String.read(b)
+
+        amount = Long.read(b)
+
+        return PremiumGiftCodeOption(users=users, months=months, currency=currency, amount=amount, store_product=store_product, store_quantity=store_quantity)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.store_product is not None else 0
+        flags |= (1 << 1) if self.store_quantity is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.users))
+
+        b.write(Int(self.months))
+
+        if self.store_product is not None:
+            b.write(String(self.store_product))
+
+        if self.store_quantity is not None:
+            b.write(Int(self.store_quantity))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/premium_gift_option.py b/pyrogram/raw/types/premium_gift_option.py
new file mode 100644
index 00000000..44c6af6e
--- /dev/null
+++ b/pyrogram/raw/types/premium_gift_option.py
@@ -0,0 +1,90 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PremiumGiftOption(TLObject):  # type: ignore
+    """Telegram Premium gift option
+
+    Constructor of :obj:`~pyrogram.raw.base.PremiumGiftOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``79C059F7``
+
+    Parameters:
+        months (``int`` ``32-bit``):
+            Duration of gifted Telegram Premium subscription
+
+        currency (``str``):
+            Three-letter ISO 4217 currency code
+
+        amount (``int`` ``64-bit``):
+            Price of the product in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
+
+        bot_url (``str``, *optional*):
+            An invoice deep link » to an invoice for in-app payment, using the official Premium bot; may be empty if direct payment isn't available.
+
+        store_product (``str``, *optional*):
+            An identifier for the App Store/Play Store product associated with the Premium gift.
+
+    """
+
+    __slots__: List[str] = ["months", "currency", "amount", "bot_url", "store_product"]
+
+    ID = 0x79c059f7
+    QUALNAME = "types.PremiumGiftOption"
+
+    def __init__(self, *, months: int, currency: str, amount: int, bot_url: Optional[str] = None, store_product: Optional[str] = None) -> None:
+        self.months = months  # int
+        self.currency = currency  # string
+        self.amount = amount  # long
+        self.bot_url = bot_url  # flags.1?string
+        self.store_product = store_product  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PremiumGiftOption":
+
+        flags = Int.read(b)
+
+        months = Int.read(b)
+
+        currency = String.read(b)
+
+        amount = Long.read(b)
+
+        bot_url = String.read(b) if flags & (1 << 1) else None
+        store_product = String.read(b) if flags & (1 << 0) else None
+        return PremiumGiftOption(months=months, currency=currency, amount=amount, bot_url=bot_url, store_product=store_product)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.bot_url is not None else 0
+        flags |= (1 << 0) if self.store_product is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.months))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.amount))
+
+        if self.bot_url is not None:
+            b.write(String(self.bot_url))
+
+        if self.store_product is not None:
+            b.write(String(self.store_product))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/premium_subscription_option.py b/pyrogram/raw/types/premium_subscription_option.py
new file mode 100644
index 00000000..d344595d
--- /dev/null
+++ b/pyrogram/raw/types/premium_subscription_option.py
@@ -0,0 +1,110 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PremiumSubscriptionOption(TLObject):  # type: ignore
+    """Describes a Telegram Premium subscription option
+
+    Constructor of :obj:`~pyrogram.raw.base.PremiumSubscriptionOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5F2D1DF2``
+
+    Parameters:
+        months (``int`` ``32-bit``):
+            Duration of subscription in months
+
+        currency (``str``):
+            Three-letter ISO 4217 currency code
+
+        amount (``int`` ``64-bit``):
+            Total price in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
+
+        bot_url (``str``):
+            Deep link used to initiate payment
+
+        current (``bool``, *optional*):
+            Whether this subscription option is currently in use.
+
+        can_purchase_upgrade (``bool``, *optional*):
+            Whether this subscription option can be used to upgrade the existing Telegram Premium subscription. When upgrading Telegram Premium subscriptions bought through stores, make sure that the store transaction ID is equal to transaction, to avoid upgrading someone else's account, if the client is currently logged into multiple accounts.
+
+        transaction (``str``, *optional*):
+            Identifier of the last in-store transaction for the currently used subscription on the current account.
+
+        store_product (``str``, *optional*):
+            Store product ID, only for official apps
+
+    """
+
+    __slots__: List[str] = ["months", "currency", "amount", "bot_url", "current", "can_purchase_upgrade", "transaction", "store_product"]
+
+    ID = 0x5f2d1df2
+    QUALNAME = "types.PremiumSubscriptionOption"
+
+    def __init__(self, *, months: int, currency: str, amount: int, bot_url: str, current: Optional[bool] = None, can_purchase_upgrade: Optional[bool] = None, transaction: Optional[str] = None, store_product: Optional[str] = None) -> None:
+        self.months = months  # int
+        self.currency = currency  # string
+        self.amount = amount  # long
+        self.bot_url = bot_url  # string
+        self.current = current  # flags.1?true
+        self.can_purchase_upgrade = can_purchase_upgrade  # flags.2?true
+        self.transaction = transaction  # flags.3?string
+        self.store_product = store_product  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PremiumSubscriptionOption":
+
+        flags = Int.read(b)
+
+        current = True if flags & (1 << 1) else False
+        can_purchase_upgrade = True if flags & (1 << 2) else False
+        transaction = String.read(b) if flags & (1 << 3) else None
+        months = Int.read(b)
+
+        currency = String.read(b)
+
+        amount = Long.read(b)
+
+        bot_url = String.read(b)
+
+        store_product = String.read(b) if flags & (1 << 0) else None
+        return PremiumSubscriptionOption(months=months, currency=currency, amount=amount, bot_url=bot_url, current=current, can_purchase_upgrade=can_purchase_upgrade, transaction=transaction, store_product=store_product)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.current else 0
+        flags |= (1 << 2) if self.can_purchase_upgrade else 0
+        flags |= (1 << 3) if self.transaction is not None else 0
+        flags |= (1 << 0) if self.store_product is not None else 0
+        b.write(Int(flags))
+
+        if self.transaction is not None:
+            b.write(String(self.transaction))
+
+        b.write(Int(self.months))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.amount))
+
+        b.write(String(self.bot_url))
+
+        if self.store_product is not None:
+            b.write(String(self.store_product))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/prepaid_giveaway.py b/pyrogram/raw/types/prepaid_giveaway.py
new file mode 100644
index 00000000..e1922b25
--- /dev/null
+++ b/pyrogram/raw/types/prepaid_giveaway.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrepaidGiveaway(TLObject):  # type: ignore
+    """Contains info about a prepaid giveaway ».
+
+    Constructor of :obj:`~pyrogram.raw.base.PrepaidGiveaway`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B2539D54``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Prepaid giveaway ID.
+
+        months (``int`` ``32-bit``):
+            Duration in months of each gifted Telegram Premium subscription.
+
+        quantity (``int`` ``32-bit``):
+            Number of given away Telegram Premium subscriptions.
+
+        date (``int`` ``32-bit``):
+            Payment date.
+
+    """
+
+    __slots__: List[str] = ["id", "months", "quantity", "date"]
+
+    ID = 0xb2539d54
+    QUALNAME = "types.PrepaidGiveaway"
+
+    def __init__(self, *, id: int, months: int, quantity: int, date: int) -> None:
+        self.id = id  # long
+        self.months = months  # int
+        self.quantity = quantity  # int
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrepaidGiveaway":
+        # No flags
+
+        id = Long.read(b)
+
+        months = Int.read(b)
+
+        quantity = Int.read(b)
+
+        date = Int.read(b)
+
+        return PrepaidGiveaway(id=id, months=months, quantity=quantity, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.id))
+
+        b.write(Int(self.months))
+
+        b.write(Int(self.quantity))
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/prepaid_stars_giveaway.py b/pyrogram/raw/types/prepaid_stars_giveaway.py
new file mode 100644
index 00000000..dcc4f834
--- /dev/null
+++ b/pyrogram/raw/types/prepaid_stars_giveaway.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrepaidStarsGiveaway(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PrepaidGiveaway`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9A9D77E0``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            N/A
+
+        stars (``int`` ``64-bit``):
+            N/A
+
+        quantity (``int`` ``32-bit``):
+            N/A
+
+        boosts (``int`` ``32-bit``):
+            N/A
+
+        date (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "stars", "quantity", "boosts", "date"]
+
+    ID = 0x9a9d77e0
+    QUALNAME = "types.PrepaidStarsGiveaway"
+
+    def __init__(self, *, id: int, stars: int, quantity: int, boosts: int, date: int) -> None:
+        self.id = id  # long
+        self.stars = stars  # long
+        self.quantity = quantity  # int
+        self.boosts = boosts  # int
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrepaidStarsGiveaway":
+        # No flags
+
+        id = Long.read(b)
+
+        stars = Long.read(b)
+
+        quantity = Int.read(b)
+
+        boosts = Int.read(b)
+
+        date = Int.read(b)
+
+        return PrepaidStarsGiveaway(id=id, stars=stars, quantity=quantity, boosts=boosts, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.stars))
+
+        b.write(Int(self.quantity))
+
+        b.write(Int(self.boosts))
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_about.py b/pyrogram/raw/types/privacy_key_about.py
new file mode 100644
index 00000000..b2043853
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_about.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyAbout(TLObject):  # type: ignore
+    """Whether people can see your bio
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A486B761``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa486b761
+    QUALNAME = "types.PrivacyKeyAbout"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyAbout":
+        # No flags
+
+        return PrivacyKeyAbout()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_added_by_phone.py b/pyrogram/raw/types/privacy_key_added_by_phone.py
new file mode 100644
index 00000000..74e49fa4
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_added_by_phone.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyAddedByPhone(TLObject):  # type: ignore
+    """Whether this user can be added to our contact list by their phone number
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``42FFD42B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x42ffd42b
+    QUALNAME = "types.PrivacyKeyAddedByPhone"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyAddedByPhone":
+        # No flags
+
+        return PrivacyKeyAddedByPhone()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_birthday.py b/pyrogram/raw/types/privacy_key_birthday.py
new file mode 100644
index 00000000..bb0c8936
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_birthday.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyBirthday(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2000A518``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x2000a518
+    QUALNAME = "types.PrivacyKeyBirthday"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyBirthday":
+        # No flags
+
+        return PrivacyKeyBirthday()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_chat_invite.py b/pyrogram/raw/types/privacy_key_chat_invite.py
new file mode 100644
index 00000000..473e4d69
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_chat_invite.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyChatInvite(TLObject):  # type: ignore
+    """Whether the user can be invited to chats
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``500E6DFA``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x500e6dfa
+    QUALNAME = "types.PrivacyKeyChatInvite"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyChatInvite":
+        # No flags
+
+        return PrivacyKeyChatInvite()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_forwards.py b/pyrogram/raw/types/privacy_key_forwards.py
new file mode 100644
index 00000000..be323809
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_forwards.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyForwards(TLObject):  # type: ignore
+    """Whether messages forwarded from the user will be anonymously forwarded
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``69EC56A3``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x69ec56a3
+    QUALNAME = "types.PrivacyKeyForwards"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyForwards":
+        # No flags
+
+        return PrivacyKeyForwards()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_no_paid_messages.py b/pyrogram/raw/types/privacy_key_no_paid_messages.py
new file mode 100644
index 00000000..5568fbb1
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_no_paid_messages.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyNoPaidMessages(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``17D348D2``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x17d348d2
+    QUALNAME = "types.PrivacyKeyNoPaidMessages"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyNoPaidMessages":
+        # No flags
+
+        return PrivacyKeyNoPaidMessages()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_phone_call.py b/pyrogram/raw/types/privacy_key_phone_call.py
new file mode 100644
index 00000000..cda8b7a6
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_phone_call.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyPhoneCall(TLObject):  # type: ignore
+    """Whether the user accepts phone calls
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3D662B7B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x3d662b7b
+    QUALNAME = "types.PrivacyKeyPhoneCall"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyPhoneCall":
+        # No flags
+
+        return PrivacyKeyPhoneCall()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_phone_number.py b/pyrogram/raw/types/privacy_key_phone_number.py
new file mode 100644
index 00000000..d14d7038
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_phone_number.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyPhoneNumber(TLObject):  # type: ignore
+    """Whether the user allows us to see his phone number
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D19AE46D``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xd19ae46d
+    QUALNAME = "types.PrivacyKeyPhoneNumber"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyPhoneNumber":
+        # No flags
+
+        return PrivacyKeyPhoneNumber()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_phone_p2_p.py b/pyrogram/raw/types/privacy_key_phone_p2_p.py
new file mode 100644
index 00000000..d9371c4c
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_phone_p2_p.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyPhoneP2P(TLObject):  # type: ignore
+    """Whether P2P connections in phone calls with this user are allowed
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``39491CC8``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x39491cc8
+    QUALNAME = "types.PrivacyKeyPhoneP2P"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyPhoneP2P":
+        # No flags
+
+        return PrivacyKeyPhoneP2P()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_profile_photo.py b/pyrogram/raw/types/privacy_key_profile_photo.py
new file mode 100644
index 00000000..c70d2adb
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_profile_photo.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyProfilePhoto(TLObject):  # type: ignore
+    """Whether the profile picture of the user is visible
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``96151FED``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x96151fed
+    QUALNAME = "types.PrivacyKeyProfilePhoto"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyProfilePhoto":
+        # No flags
+
+        return PrivacyKeyProfilePhoto()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_saved_music.py b/pyrogram/raw/types/privacy_key_saved_music.py
new file mode 100644
index 00000000..f617e705
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_saved_music.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeySavedMusic(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FF7A571B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xff7a571b
+    QUALNAME = "types.PrivacyKeySavedMusic"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeySavedMusic":
+        # No flags
+
+        return PrivacyKeySavedMusic()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_star_gifts_auto_save.py b/pyrogram/raw/types/privacy_key_star_gifts_auto_save.py
new file mode 100644
index 00000000..c0ed88c6
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_star_gifts_auto_save.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyStarGiftsAutoSave(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2CA4FDF8``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x2ca4fdf8
+    QUALNAME = "types.PrivacyKeyStarGiftsAutoSave"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyStarGiftsAutoSave":
+        # No flags
+
+        return PrivacyKeyStarGiftsAutoSave()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_status_timestamp.py b/pyrogram/raw/types/privacy_key_status_timestamp.py
new file mode 100644
index 00000000..da6d1b86
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_status_timestamp.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyStatusTimestamp(TLObject):  # type: ignore
+    """Whether we can see the last online timestamp of this user
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BC2EAB30``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xbc2eab30
+    QUALNAME = "types.PrivacyKeyStatusTimestamp"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyStatusTimestamp":
+        # No flags
+
+        return PrivacyKeyStatusTimestamp()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_key_voice_messages.py b/pyrogram/raw/types/privacy_key_voice_messages.py
new file mode 100644
index 00000000..633011d5
--- /dev/null
+++ b/pyrogram/raw/types/privacy_key_voice_messages.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyKeyVoiceMessages(TLObject):  # type: ignore
+    """Whether the user accepts voice messages
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyKey`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``697F414``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x697f414
+    QUALNAME = "types.PrivacyKeyVoiceMessages"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyKeyVoiceMessages":
+        # No flags
+
+        return PrivacyKeyVoiceMessages()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_all.py b/pyrogram/raw/types/privacy_value_allow_all.py
new file mode 100644
index 00000000..a0091472
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_all.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowAll(TLObject):  # type: ignore
+    """Allow all users
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``65427B82``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x65427b82
+    QUALNAME = "types.PrivacyValueAllowAll"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowAll":
+        # No flags
+
+        return PrivacyValueAllowAll()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_bots.py b/pyrogram/raw/types/privacy_value_allow_bots.py
new file mode 100644
index 00000000..b601d810
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_bots.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowBots(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``21461B5D``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x21461b5d
+    QUALNAME = "types.PrivacyValueAllowBots"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowBots":
+        # No flags
+
+        return PrivacyValueAllowBots()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_chat_participants.py b/pyrogram/raw/types/privacy_value_allow_chat_participants.py
new file mode 100644
index 00000000..0463d918
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_chat_participants.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowChatParticipants(TLObject):  # type: ignore
+    """Allow all participants of certain chats
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6B134E8E``
+
+    Parameters:
+        chats (List of ``int`` ``64-bit``):
+            Allowed chats
+
+    """
+
+    __slots__: List[str] = ["chats"]
+
+    ID = 0x6b134e8e
+    QUALNAME = "types.PrivacyValueAllowChatParticipants"
+
+    def __init__(self, *, chats: List[int]) -> None:
+        self.chats = chats  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowChatParticipants":
+        # No flags
+
+        chats = TLObject.read(b, Long)
+
+        return PrivacyValueAllowChatParticipants(chats=chats)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.chats, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_close_friends.py b/pyrogram/raw/types/privacy_value_allow_close_friends.py
new file mode 100644
index 00000000..0ce9f50b
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_close_friends.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowCloseFriends(TLObject):  # type: ignore
+    """Allow only close friends »
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F7E8D89B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xf7e8d89b
+    QUALNAME = "types.PrivacyValueAllowCloseFriends"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowCloseFriends":
+        # No flags
+
+        return PrivacyValueAllowCloseFriends()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_contacts.py b/pyrogram/raw/types/privacy_value_allow_contacts.py
new file mode 100644
index 00000000..b88d402f
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_contacts.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowContacts(TLObject):  # type: ignore
+    """Allow all contacts
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FFFE1BAC``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfffe1bac
+    QUALNAME = "types.PrivacyValueAllowContacts"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowContacts":
+        # No flags
+
+        return PrivacyValueAllowContacts()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_premium.py b/pyrogram/raw/types/privacy_value_allow_premium.py
new file mode 100644
index 00000000..0c8393b9
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_premium.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowPremium(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``ECE9814B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xece9814b
+    QUALNAME = "types.PrivacyValueAllowPremium"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowPremium":
+        # No flags
+
+        return PrivacyValueAllowPremium()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_allow_users.py b/pyrogram/raw/types/privacy_value_allow_users.py
new file mode 100644
index 00000000..f2381abf
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_allow_users.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueAllowUsers(TLObject):  # type: ignore
+    """Allow only certain users
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B8905FB2``
+
+    Parameters:
+        users (List of ``int`` ``64-bit``):
+            Allowed users
+
+    """
+
+    __slots__: List[str] = ["users"]
+
+    ID = 0xb8905fb2
+    QUALNAME = "types.PrivacyValueAllowUsers"
+
+    def __init__(self, *, users: List[int]) -> None:
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueAllowUsers":
+        # No flags
+
+        users = TLObject.read(b, Long)
+
+        return PrivacyValueAllowUsers(users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.users, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_disallow_all.py b/pyrogram/raw/types/privacy_value_disallow_all.py
new file mode 100644
index 00000000..54d57a35
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_disallow_all.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueDisallowAll(TLObject):  # type: ignore
+    """Disallow all users
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8B73E763``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x8b73e763
+    QUALNAME = "types.PrivacyValueDisallowAll"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueDisallowAll":
+        # No flags
+
+        return PrivacyValueDisallowAll()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_disallow_bots.py b/pyrogram/raw/types/privacy_value_disallow_bots.py
new file mode 100644
index 00000000..8fc4aa7f
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_disallow_bots.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueDisallowBots(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F6A5F82F``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xf6a5f82f
+    QUALNAME = "types.PrivacyValueDisallowBots"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueDisallowBots":
+        # No flags
+
+        return PrivacyValueDisallowBots()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_disallow_chat_participants.py b/pyrogram/raw/types/privacy_value_disallow_chat_participants.py
new file mode 100644
index 00000000..6c163978
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_disallow_chat_participants.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueDisallowChatParticipants(TLObject):  # type: ignore
+    """Disallow only participants of certain chats
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``41C87565``
+
+    Parameters:
+        chats (List of ``int`` ``64-bit``):
+            Disallowed chats
+
+    """
+
+    __slots__: List[str] = ["chats"]
+
+    ID = 0x41c87565
+    QUALNAME = "types.PrivacyValueDisallowChatParticipants"
+
+    def __init__(self, *, chats: List[int]) -> None:
+        self.chats = chats  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueDisallowChatParticipants":
+        # No flags
+
+        chats = TLObject.read(b, Long)
+
+        return PrivacyValueDisallowChatParticipants(chats=chats)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.chats, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_disallow_contacts.py b/pyrogram/raw/types/privacy_value_disallow_contacts.py
new file mode 100644
index 00000000..b2983488
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_disallow_contacts.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueDisallowContacts(TLObject):  # type: ignore
+    """Disallow only contacts
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F888FA1A``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xf888fa1a
+    QUALNAME = "types.PrivacyValueDisallowContacts"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueDisallowContacts":
+        # No flags
+
+        return PrivacyValueDisallowContacts()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/privacy_value_disallow_users.py b/pyrogram/raw/types/privacy_value_disallow_users.py
new file mode 100644
index 00000000..fcfbf865
--- /dev/null
+++ b/pyrogram/raw/types/privacy_value_disallow_users.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PrivacyValueDisallowUsers(TLObject):  # type: ignore
+    """Disallow only certain users
+
+    Constructor of :obj:`~pyrogram.raw.base.PrivacyRule`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E4621141``
+
+    Parameters:
+        users (List of ``int`` ``64-bit``):
+            Disallowed users
+
+    """
+
+    __slots__: List[str] = ["users"]
+
+    ID = 0xe4621141
+    QUALNAME = "types.PrivacyValueDisallowUsers"
+
+    def __init__(self, *, users: List[int]) -> None:
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PrivacyValueDisallowUsers":
+        # No flags
+
+        users = TLObject.read(b, Long)
+
+        return PrivacyValueDisallowUsers(users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.users, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_files.py b/pyrogram/raw/types/profile_tab_files.py
new file mode 100644
index 00000000..30532cf2
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_files.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabFiles(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AB339C00``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xab339c00
+    QUALNAME = "types.ProfileTabFiles"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabFiles":
+        # No flags
+
+        return ProfileTabFiles()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_gifs.py b/pyrogram/raw/types/profile_tab_gifs.py
new file mode 100644
index 00000000..5a88e9b5
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_gifs.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabGifs(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A2C0F695``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa2c0f695
+    QUALNAME = "types.ProfileTabGifs"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabGifs":
+        # No flags
+
+        return ProfileTabGifs()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_gifts.py b/pyrogram/raw/types/profile_tab_gifts.py
new file mode 100644
index 00000000..df7e824a
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_gifts.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabGifts(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4D4BD46A``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x4d4bd46a
+    QUALNAME = "types.ProfileTabGifts"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabGifts":
+        # No flags
+
+        return ProfileTabGifts()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_links.py b/pyrogram/raw/types/profile_tab_links.py
new file mode 100644
index 00000000..50ec04f6
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_links.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabLinks(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D3656499``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xd3656499
+    QUALNAME = "types.ProfileTabLinks"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabLinks":
+        # No flags
+
+        return ProfileTabLinks()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_media.py b/pyrogram/raw/types/profile_tab_media.py
new file mode 100644
index 00000000..a552d159
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_media.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabMedia(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``72C64955``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x72c64955
+    QUALNAME = "types.ProfileTabMedia"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabMedia":
+        # No flags
+
+        return ProfileTabMedia()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_music.py b/pyrogram/raw/types/profile_tab_music.py
new file mode 100644
index 00000000..bb83c830
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_music.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabMusic(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9F27D26E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x9f27d26e
+    QUALNAME = "types.ProfileTabMusic"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabMusic":
+        # No flags
+
+        return ProfileTabMusic()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_posts.py b/pyrogram/raw/types/profile_tab_posts.py
new file mode 100644
index 00000000..12327b24
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_posts.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabPosts(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B98CD696``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xb98cd696
+    QUALNAME = "types.ProfileTabPosts"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabPosts":
+        # No flags
+
+        return ProfileTabPosts()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/profile_tab_voice.py b/pyrogram/raw/types/profile_tab_voice.py
new file mode 100644
index 00000000..b89814c8
--- /dev/null
+++ b/pyrogram/raw/types/profile_tab_voice.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ProfileTabVoice(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ProfileTab`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E477092E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xe477092e
+    QUALNAME = "types.ProfileTabVoice"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ProfileTabVoice":
+        # No flags
+
+        return ProfileTabVoice()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/public_forward_message.py b/pyrogram/raw/types/public_forward_message.py
new file mode 100644
index 00000000..48e1c3fa
--- /dev/null
+++ b/pyrogram/raw/types/public_forward_message.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PublicForwardMessage(TLObject):  # type: ignore
+    """Contains info about a forward of a story as a message.
+
+    Constructor of :obj:`~pyrogram.raw.base.PublicForward`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1F2BF4A``
+
+    Parameters:
+        message (:obj:`Message `):
+            Info about the message with the reposted story.
+
+    """
+
+    __slots__: List[str] = ["message"]
+
+    ID = 0x1f2bf4a
+    QUALNAME = "types.PublicForwardMessage"
+
+    def __init__(self, *, message: "raw.base.Message") -> None:
+        self.message = message  # Message
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PublicForwardMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        return PublicForwardMessage(message=message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/public_forward_story.py b/pyrogram/raw/types/public_forward_story.py
new file mode 100644
index 00000000..a9a03d85
--- /dev/null
+++ b/pyrogram/raw/types/public_forward_story.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PublicForwardStory(TLObject):  # type: ignore
+    """Contains info about a forward of a story as a repost by a public channel.
+
+    Constructor of :obj:`~pyrogram.raw.base.PublicForward`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EDF3ADD0``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The channel that reposted the story.
+
+        story (:obj:`StoryItem `):
+            The reposted story (may be different from the original story).
+
+    """
+
+    __slots__: List[str] = ["peer", "story"]
+
+    ID = 0xedf3add0
+    QUALNAME = "types.PublicForwardStory"
+
+    def __init__(self, *, peer: "raw.base.Peer", story: "raw.base.StoryItem") -> None:
+        self.peer = peer  # Peer
+        self.story = story  # StoryItem
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PublicForwardStory":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        story = TLObject.read(b)
+
+        return PublicForwardStory(peer=peer, story=story)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.story.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/quick_reply.py b/pyrogram/raw/types/quick_reply.py
new file mode 100644
index 00000000..3c7468d7
--- /dev/null
+++ b/pyrogram/raw/types/quick_reply.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class QuickReply(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.QuickReply`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``697102B``
+
+    Parameters:
+        shortcut_id (``int`` ``32-bit``):
+
+
+        shortcut (``str``):
+
+
+        top_message (``int`` ``32-bit``):
+
+
+        count (``int`` ``32-bit``):
+
+
+    """
+
+    __slots__: List[str] = ["shortcut_id", "shortcut", "top_message", "count"]
+
+    ID = 0x697102b
+    QUALNAME = "types.QuickReply"
+
+    def __init__(self, *, shortcut_id: int, shortcut: str, top_message: int, count: int) -> None:
+        self.shortcut_id = shortcut_id  # int
+        self.shortcut = shortcut  # string
+        self.top_message = top_message  # int
+        self.count = count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "QuickReply":
+        # No flags
+
+        shortcut_id = Int.read(b)
+
+        shortcut = String.read(b)
+
+        top_message = Int.read(b)
+
+        count = Int.read(b)
+
+        return QuickReply(shortcut_id=shortcut_id, shortcut=shortcut, top_message=top_message, count=count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.shortcut_id))
+
+        b.write(String(self.shortcut))
+
+        b.write(Int(self.top_message))
+
+        b.write(Int(self.count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_count.py b/pyrogram/raw/types/reaction_count.py
new file mode 100644
index 00000000..84457186
--- /dev/null
+++ b/pyrogram/raw/types/reaction_count.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionCount(TLObject):  # type: ignore
+    """Reactions
+
+    Constructor of :obj:`~pyrogram.raw.base.ReactionCount`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A3D1CB80``
+
+    Parameters:
+        reaction (:obj:`Reaction `):
+            The reaction.
+
+        count (``int`` ``32-bit``):
+            Number of users that reacted with this emoji.
+
+        chosen_order (``int`` ``32-bit``, *optional*):
+            If set, indicates that the current user also sent this reaction. The integer value indicates when was the reaction added: the bigger the value, the newer the reaction.
+
+    """
+
+    __slots__: List[str] = ["reaction", "count", "chosen_order"]
+
+    ID = 0xa3d1cb80
+    QUALNAME = "types.ReactionCount"
+
+    def __init__(self, *, reaction: "raw.base.Reaction", count: int, chosen_order: Optional[int] = None) -> None:
+        self.reaction = reaction  # Reaction
+        self.count = count  # int
+        self.chosen_order = chosen_order  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionCount":
+
+        flags = Int.read(b)
+
+        chosen_order = Int.read(b) if flags & (1 << 0) else None
+        reaction = TLObject.read(b)
+
+        count = Int.read(b)
+
+        return ReactionCount(reaction=reaction, count=count, chosen_order=chosen_order)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.chosen_order is not None else 0
+        b.write(Int(flags))
+
+        if self.chosen_order is not None:
+            b.write(Int(self.chosen_order))
+
+        b.write(self.reaction.write())
+
+        b.write(Int(self.count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_custom_emoji.py b/pyrogram/raw/types/reaction_custom_emoji.py
new file mode 100644
index 00000000..ac2a92fd
--- /dev/null
+++ b/pyrogram/raw/types/reaction_custom_emoji.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionCustomEmoji(TLObject):  # type: ignore
+    """Custom emoji message reaction
+
+    Constructor of :obj:`~pyrogram.raw.base.Reaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8935FC73``
+
+    Parameters:
+        document_id (``int`` ``64-bit``):
+            Custom emoji document ID
+
+    """
+
+    __slots__: List[str] = ["document_id"]
+
+    ID = 0x8935fc73
+    QUALNAME = "types.ReactionCustomEmoji"
+
+    def __init__(self, *, document_id: int) -> None:
+        self.document_id = document_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionCustomEmoji":
+        # No flags
+
+        document_id = Long.read(b)
+
+        return ReactionCustomEmoji(document_id=document_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.document_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_emoji.py b/pyrogram/raw/types/reaction_emoji.py
new file mode 100644
index 00000000..03c0b3f2
--- /dev/null
+++ b/pyrogram/raw/types/reaction_emoji.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionEmoji(TLObject):  # type: ignore
+    """Normal emoji message reaction
+
+    Constructor of :obj:`~pyrogram.raw.base.Reaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1B2286B8``
+
+    Parameters:
+        emoticon (``str``):
+            Emoji
+
+    """
+
+    __slots__: List[str] = ["emoticon"]
+
+    ID = 0x1b2286b8
+    QUALNAME = "types.ReactionEmoji"
+
+    def __init__(self, *, emoticon: str) -> None:
+        self.emoticon = emoticon  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionEmoji":
+        # No flags
+
+        emoticon = String.read(b)
+
+        return ReactionEmoji(emoticon=emoticon)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.emoticon))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_empty.py b/pyrogram/raw/types/reaction_empty.py
new file mode 100644
index 00000000..dee7a052
--- /dev/null
+++ b/pyrogram/raw/types/reaction_empty.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionEmpty(TLObject):  # type: ignore
+    """No reaction
+
+    Constructor of :obj:`~pyrogram.raw.base.Reaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``79F5D419``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x79f5d419
+    QUALNAME = "types.ReactionEmpty"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionEmpty":
+        # No flags
+
+        return ReactionEmpty()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_notifications_from_all.py b/pyrogram/raw/types/reaction_notifications_from_all.py
new file mode 100644
index 00000000..b9e00928
--- /dev/null
+++ b/pyrogram/raw/types/reaction_notifications_from_all.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionNotificationsFromAll(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.ReactionNotificationsFrom`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4B9E22A0``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x4b9e22a0
+    QUALNAME = "types.ReactionNotificationsFromAll"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionNotificationsFromAll":
+        # No flags
+
+        return ReactionNotificationsFromAll()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_notifications_from_contacts.py b/pyrogram/raw/types/reaction_notifications_from_contacts.py
new file mode 100644
index 00000000..d718affe
--- /dev/null
+++ b/pyrogram/raw/types/reaction_notifications_from_contacts.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionNotificationsFromContacts(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.ReactionNotificationsFrom`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BAC3A61A``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xbac3a61a
+    QUALNAME = "types.ReactionNotificationsFromContacts"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionNotificationsFromContacts":
+        # No flags
+
+        return ReactionNotificationsFromContacts()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reaction_paid.py b/pyrogram/raw/types/reaction_paid.py
new file mode 100644
index 00000000..b2321057
--- /dev/null
+++ b/pyrogram/raw/types/reaction_paid.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionPaid(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Reaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``523DA4EB``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x523da4eb
+    QUALNAME = "types.ReactionPaid"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionPaid":
+        # No flags
+
+        return ReactionPaid()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reactions_notify_settings.py b/pyrogram/raw/types/reactions_notify_settings.py
new file mode 100644
index 00000000..59066548
--- /dev/null
+++ b/pyrogram/raw/types/reactions_notify_settings.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReactionsNotifySettings(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.ReactionsNotifySettings`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``56E34970``
+
+    Parameters:
+        sound (:obj:`NotificationSound `):
+
+
+        show_previews (``bool``):
+
+
+        messages_notify_from (:obj:`ReactionNotificationsFrom `, *optional*):
+
+
+        stories_notify_from (:obj:`ReactionNotificationsFrom `, *optional*):
+
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetReactionsNotifySettings
+            account.SetReactionsNotifySettings
+    """
+
+    __slots__: List[str] = ["sound", "show_previews", "messages_notify_from", "stories_notify_from"]
+
+    ID = 0x56e34970
+    QUALNAME = "types.ReactionsNotifySettings"
+
+    def __init__(self, *, sound: "raw.base.NotificationSound", show_previews: bool, messages_notify_from: "raw.base.ReactionNotificationsFrom" = None, stories_notify_from: "raw.base.ReactionNotificationsFrom" = None) -> None:
+        self.sound = sound  # NotificationSound
+        self.show_previews = show_previews  # Bool
+        self.messages_notify_from = messages_notify_from  # flags.0?ReactionNotificationsFrom
+        self.stories_notify_from = stories_notify_from  # flags.1?ReactionNotificationsFrom
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReactionsNotifySettings":
+
+        flags = Int.read(b)
+
+        messages_notify_from = TLObject.read(b) if flags & (1 << 0) else None
+
+        stories_notify_from = TLObject.read(b) if flags & (1 << 1) else None
+
+        sound = TLObject.read(b)
+
+        show_previews = Bool.read(b)
+
+        return ReactionsNotifySettings(sound=sound, show_previews=show_previews, messages_notify_from=messages_notify_from, stories_notify_from=stories_notify_from)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.messages_notify_from is not None else 0
+        flags |= (1 << 1) if self.stories_notify_from is not None else 0
+        b.write(Int(flags))
+
+        if self.messages_notify_from is not None:
+            b.write(self.messages_notify_from.write())
+
+        if self.stories_notify_from is not None:
+            b.write(self.stories_notify_from.write())
+
+        b.write(self.sound.write())
+
+        b.write(Bool(self.show_previews))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/read_participant_date.py b/pyrogram/raw/types/read_participant_date.py
new file mode 100644
index 00000000..4d3e2261
--- /dev/null
+++ b/pyrogram/raw/types/read_participant_date.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReadParticipantDate(TLObject):  # type: ignore
+    """Contains info about when a certain participant has read a message
+
+    Constructor of :obj:`~pyrogram.raw.base.ReadParticipantDate`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4A4FF172``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+        date (``int`` ``32-bit``):
+            When the user read the message
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetMessageReadParticipants
+    """
+
+    __slots__: List[str] = ["user_id", "date"]
+
+    ID = 0x4a4ff172
+    QUALNAME = "types.ReadParticipantDate"
+
+    def __init__(self, *, user_id: int, date: int) -> None:
+        self.user_id = user_id  # long
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReadParticipantDate":
+        # No flags
+
+        user_id = Long.read(b)
+
+        date = Int.read(b)
+
+        return ReadParticipantDate(user_id=user_id, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/received_notify_message.py b/pyrogram/raw/types/received_notify_message.py
new file mode 100644
index 00000000..30e37388
--- /dev/null
+++ b/pyrogram/raw/types/received_notify_message.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReceivedNotifyMessage(TLObject):  # type: ignore
+    """Message ID, for which PUSH-notifications were cancelled.
+
+    Constructor of :obj:`~pyrogram.raw.base.ReceivedNotifyMessage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A384B779``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            Message ID, for which PUSH-notifications were canceled
+
+        flags (``int`` ``32-bit``):
+            Reserved for future use
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.ReceivedMessages
+    """
+
+    __slots__: List[str] = ["id", "flags"]
+
+    ID = 0xa384b779
+    QUALNAME = "types.ReceivedNotifyMessage"
+
+    def __init__(self, *, id: int, flags: int) -> None:
+        self.id = id  # int
+        self.flags = flags  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReceivedNotifyMessage":
+        # No flags
+
+        id = Int.read(b)
+
+        flags = Int.read(b)
+
+        return ReceivedNotifyMessage(id=id, flags=flags)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.id))
+
+        b.write(Int(self.flags))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/recent_me_url_chat.py b/pyrogram/raw/types/recent_me_url_chat.py
new file mode 100644
index 00000000..117fb104
--- /dev/null
+++ b/pyrogram/raw/types/recent_me_url_chat.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RecentMeUrlChat(TLObject):  # type: ignore
+    """Recent t.me link to a chat
+
+    Constructor of :obj:`~pyrogram.raw.base.RecentMeUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B2DA71D2``
+
+    Parameters:
+        url (``str``):
+            t.me URL
+
+        chat_id (``int`` ``64-bit``):
+            Chat ID
+
+    """
+
+    __slots__: List[str] = ["url", "chat_id"]
+
+    ID = 0xb2da71d2
+    QUALNAME = "types.RecentMeUrlChat"
+
+    def __init__(self, *, url: str, chat_id: int) -> None:
+        self.url = url  # string
+        self.chat_id = chat_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RecentMeUrlChat":
+        # No flags
+
+        url = String.read(b)
+
+        chat_id = Long.read(b)
+
+        return RecentMeUrlChat(url=url, chat_id=chat_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(Long(self.chat_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/recent_me_url_chat_invite.py b/pyrogram/raw/types/recent_me_url_chat_invite.py
new file mode 100644
index 00000000..f6232fb1
--- /dev/null
+++ b/pyrogram/raw/types/recent_me_url_chat_invite.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RecentMeUrlChatInvite(TLObject):  # type: ignore
+    """Recent t.me invite link to a chat
+
+    Constructor of :obj:`~pyrogram.raw.base.RecentMeUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EB49081D``
+
+    Parameters:
+        url (``str``):
+            t.me URL
+
+        chat_invite (:obj:`ChatInvite `):
+            Chat invitation
+
+    """
+
+    __slots__: List[str] = ["url", "chat_invite"]
+
+    ID = 0xeb49081d
+    QUALNAME = "types.RecentMeUrlChatInvite"
+
+    def __init__(self, *, url: str, chat_invite: "raw.base.ChatInvite") -> None:
+        self.url = url  # string
+        self.chat_invite = chat_invite  # ChatInvite
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RecentMeUrlChatInvite":
+        # No flags
+
+        url = String.read(b)
+
+        chat_invite = TLObject.read(b)
+
+        return RecentMeUrlChatInvite(url=url, chat_invite=chat_invite)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(self.chat_invite.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/recent_me_url_sticker_set.py b/pyrogram/raw/types/recent_me_url_sticker_set.py
new file mode 100644
index 00000000..c51be390
--- /dev/null
+++ b/pyrogram/raw/types/recent_me_url_sticker_set.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RecentMeUrlStickerSet(TLObject):  # type: ignore
+    """Recent t.me stickerset installation URL
+
+    Constructor of :obj:`~pyrogram.raw.base.RecentMeUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BC0A57DC``
+
+    Parameters:
+        url (``str``):
+            t.me URL
+
+        set (:obj:`StickerSetCovered `):
+            Stickerset
+
+    """
+
+    __slots__: List[str] = ["url", "set"]
+
+    ID = 0xbc0a57dc
+    QUALNAME = "types.RecentMeUrlStickerSet"
+
+    def __init__(self, *, url: str, set: "raw.base.StickerSetCovered") -> None:
+        self.url = url  # string
+        self.set = set  # StickerSetCovered
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RecentMeUrlStickerSet":
+        # No flags
+
+        url = String.read(b)
+
+        set = TLObject.read(b)
+
+        return RecentMeUrlStickerSet(url=url, set=set)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(self.set.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/recent_me_url_unknown.py b/pyrogram/raw/types/recent_me_url_unknown.py
new file mode 100644
index 00000000..868cad38
--- /dev/null
+++ b/pyrogram/raw/types/recent_me_url_unknown.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RecentMeUrlUnknown(TLObject):  # type: ignore
+    """Unknown t.me url
+
+    Constructor of :obj:`~pyrogram.raw.base.RecentMeUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``46E1D13D``
+
+    Parameters:
+        url (``str``):
+            URL
+
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0x46e1d13d
+    QUALNAME = "types.RecentMeUrlUnknown"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RecentMeUrlUnknown":
+        # No flags
+
+        url = String.read(b)
+
+        return RecentMeUrlUnknown(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/recent_me_url_user.py b/pyrogram/raw/types/recent_me_url_user.py
new file mode 100644
index 00000000..3cafa520
--- /dev/null
+++ b/pyrogram/raw/types/recent_me_url_user.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RecentMeUrlUser(TLObject):  # type: ignore
+    """Recent t.me link to a user
+
+    Constructor of :obj:`~pyrogram.raw.base.RecentMeUrl`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B92C09E2``
+
+    Parameters:
+        url (``str``):
+            URL
+
+        user_id (``int`` ``64-bit``):
+            User ID
+
+    """
+
+    __slots__: List[str] = ["url", "user_id"]
+
+    ID = 0xb92c09e2
+    QUALNAME = "types.RecentMeUrlUser"
+
+    def __init__(self, *, url: str, user_id: int) -> None:
+        self.url = url  # string
+        self.user_id = user_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RecentMeUrlUser":
+        # No flags
+
+        url = String.read(b)
+
+        user_id = Long.read(b)
+
+        return RecentMeUrlUser(url=url, user_id=user_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(Long(self.user_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/recent_story.py b/pyrogram/raw/types/recent_story.py
new file mode 100644
index 00000000..9aa8fede
--- /dev/null
+++ b/pyrogram/raw/types/recent_story.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RecentStory(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RecentStory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``711D692D``
+
+    Parameters:
+        live (``bool``, *optional*):
+            N/A
+
+        max_id (``int`` ``32-bit``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetPeerMaxIDs
+    """
+
+    __slots__: List[str] = ["live", "max_id"]
+
+    ID = 0x711d692d
+    QUALNAME = "types.RecentStory"
+
+    def __init__(self, *, live: Optional[bool] = None, max_id: Optional[int] = None) -> None:
+        self.live = live  # flags.0?true
+        self.max_id = max_id  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RecentStory":
+
+        flags = Int.read(b)
+
+        live = True if flags & (1 << 0) else False
+        max_id = Int.read(b) if flags & (1 << 1) else None
+        return RecentStory(live=live, max_id=max_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.live else 0
+        flags |= (1 << 1) if self.max_id is not None else 0
+        b.write(Int(flags))
+
+        if self.max_id is not None:
+            b.write(Int(self.max_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reply_inline_markup.py b/pyrogram/raw/types/reply_inline_markup.py
new file mode 100644
index 00000000..6d3959fb
--- /dev/null
+++ b/pyrogram/raw/types/reply_inline_markup.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReplyInlineMarkup(TLObject):  # type: ignore
+    """Bot or inline keyboard
+
+    Constructor of :obj:`~pyrogram.raw.base.ReplyMarkup`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``48A30254``
+
+    Parameters:
+        rows (List of :obj:`KeyboardButtonRow `):
+            Bot or inline keyboard rows
+
+    """
+
+    __slots__: List[str] = ["rows"]
+
+    ID = 0x48a30254
+    QUALNAME = "types.ReplyInlineMarkup"
+
+    def __init__(self, *, rows: List["raw.base.KeyboardButtonRow"]) -> None:
+        self.rows = rows  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReplyInlineMarkup":
+        # No flags
+
+        rows = TLObject.read(b)
+
+        return ReplyInlineMarkup(rows=rows)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.rows))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reply_keyboard_force_reply.py b/pyrogram/raw/types/reply_keyboard_force_reply.py
new file mode 100644
index 00000000..8a1615df
--- /dev/null
+++ b/pyrogram/raw/types/reply_keyboard_force_reply.py
@@ -0,0 +1,69 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReplyKeyboardForceReply(TLObject):  # type: ignore
+    """Force the user to send a reply
+
+    Constructor of :obj:`~pyrogram.raw.base.ReplyMarkup`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``86B40B08``
+
+    Parameters:
+        single_use (``bool``, *optional*):
+            Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.
+
+        selective (``bool``, *optional*):
+            Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message. Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
+
+        placeholder (``str``, *optional*):
+            The placeholder to be shown in the input field when the keyboard is active; 1-64 characters.
+
+    """
+
+    __slots__: List[str] = ["single_use", "selective", "placeholder"]
+
+    ID = 0x86b40b08
+    QUALNAME = "types.ReplyKeyboardForceReply"
+
+    def __init__(self, *, single_use: Optional[bool] = None, selective: Optional[bool] = None, placeholder: Optional[str] = None) -> None:
+        self.single_use = single_use  # flags.1?true
+        self.selective = selective  # flags.2?true
+        self.placeholder = placeholder  # flags.3?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReplyKeyboardForceReply":
+
+        flags = Int.read(b)
+
+        single_use = True if flags & (1 << 1) else False
+        selective = True if flags & (1 << 2) else False
+        placeholder = String.read(b) if flags & (1 << 3) else None
+        return ReplyKeyboardForceReply(single_use=single_use, selective=selective, placeholder=placeholder)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.single_use else 0
+        flags |= (1 << 2) if self.selective else 0
+        flags |= (1 << 3) if self.placeholder is not None else 0
+        b.write(Int(flags))
+
+        if self.placeholder is not None:
+            b.write(String(self.placeholder))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reply_keyboard_hide.py b/pyrogram/raw/types/reply_keyboard_hide.py
new file mode 100644
index 00000000..a0734a18
--- /dev/null
+++ b/pyrogram/raw/types/reply_keyboard_hide.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReplyKeyboardHide(TLObject):  # type: ignore
+    """Hide sent bot keyboard
+
+    Constructor of :obj:`~pyrogram.raw.base.ReplyMarkup`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A03E5B85``
+
+    Parameters:
+        selective (``bool``, *optional*):
+            Use this flag if you want to remove the keyboard for specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user votes in a poll, bot returns confirmation message in reply to the vote and removes the keyboard for that user, while still showing the keyboard with poll options to users who haven't voted yet
+
+    """
+
+    __slots__: List[str] = ["selective"]
+
+    ID = 0xa03e5b85
+    QUALNAME = "types.ReplyKeyboardHide"
+
+    def __init__(self, *, selective: Optional[bool] = None) -> None:
+        self.selective = selective  # flags.2?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReplyKeyboardHide":
+
+        flags = Int.read(b)
+
+        selective = True if flags & (1 << 2) else False
+        return ReplyKeyboardHide(selective=selective)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.selective else 0
+        b.write(Int(flags))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/reply_keyboard_markup.py b/pyrogram/raw/types/reply_keyboard_markup.py
new file mode 100644
index 00000000..466da35a
--- /dev/null
+++ b/pyrogram/raw/types/reply_keyboard_markup.py
@@ -0,0 +1,89 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReplyKeyboardMarkup(TLObject):  # type: ignore
+    """Bot keyboard
+
+    Constructor of :obj:`~pyrogram.raw.base.ReplyMarkup`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``85DD99D1``
+
+    Parameters:
+        rows (List of :obj:`KeyboardButtonRow `):
+            Button row
+
+        resize (``bool``, *optional*):
+            Requests clients to resize the keyboard vertically for optimal fit (e.g., make the keyboard smaller if there are just two rows of buttons). If not set, the custom keyboard is always of the same height as the app's standard keyboard.
+
+        single_use (``bool``, *optional*):
+            Requests clients to hide the keyboard as soon as it's been used. The keyboard will still be available, but clients will automatically display the usual letter-keyboard in the chat – the user can press a special button in the input field to see the custom keyboard again.
+
+        selective (``bool``, *optional*):
+            Use this parameter if you want to show the keyboard to specific users only. Targets: 1) users that are @mentioned in the text of the Message object; 2) if the bot's message is a reply (has reply_to_message_id), sender of the original message.Example: A user requests to change the bot's language, bot replies to the request with a keyboard to select the new language. Other users in the group don't see the keyboard.
+
+        persistent (``bool``, *optional*):
+            Requests clients to always show the keyboard when the regular keyboard is hidden.
+
+        placeholder (``str``, *optional*):
+            The placeholder to be shown in the input field when the keyboard is active; 1-64 characters.
+
+    """
+
+    __slots__: List[str] = ["rows", "resize", "single_use", "selective", "persistent", "placeholder"]
+
+    ID = 0x85dd99d1
+    QUALNAME = "types.ReplyKeyboardMarkup"
+
+    def __init__(self, *, rows: List["raw.base.KeyboardButtonRow"], resize: Optional[bool] = None, single_use: Optional[bool] = None, selective: Optional[bool] = None, persistent: Optional[bool] = None, placeholder: Optional[str] = None) -> None:
+        self.rows = rows  # Vector
+        self.resize = resize  # flags.0?true
+        self.single_use = single_use  # flags.1?true
+        self.selective = selective  # flags.2?true
+        self.persistent = persistent  # flags.4?true
+        self.placeholder = placeholder  # flags.3?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReplyKeyboardMarkup":
+
+        flags = Int.read(b)
+
+        resize = True if flags & (1 << 0) else False
+        single_use = True if flags & (1 << 1) else False
+        selective = True if flags & (1 << 2) else False
+        persistent = True if flags & (1 << 4) else False
+        rows = TLObject.read(b)
+
+        placeholder = String.read(b) if flags & (1 << 3) else None
+        return ReplyKeyboardMarkup(rows=rows, resize=resize, single_use=single_use, selective=selective, persistent=persistent, placeholder=placeholder)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.resize else 0
+        flags |= (1 << 1) if self.single_use else 0
+        flags |= (1 << 2) if self.selective else 0
+        flags |= (1 << 4) if self.persistent else 0
+        flags |= (1 << 3) if self.placeholder is not None else 0
+        b.write(Int(flags))
+
+        b.write(Vector(self.rows))
+
+        if self.placeholder is not None:
+            b.write(String(self.placeholder))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/report_result_add_comment.py b/pyrogram/raw/types/report_result_add_comment.py
new file mode 100644
index 00000000..97f768d4
--- /dev/null
+++ b/pyrogram/raw/types/report_result_add_comment.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReportResultAddComment(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ReportResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6F09AC31``
+
+    Parameters:
+        option (``bytes``):
+            N/A
+
+        optional (``bool``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.Report
+            stories.Report
+    """
+
+    __slots__: List[str] = ["option", "optional"]
+
+    ID = 0x6f09ac31
+    QUALNAME = "types.ReportResultAddComment"
+
+    def __init__(self, *, option: bytes, optional: Optional[bool] = None) -> None:
+        self.option = option  # bytes
+        self.optional = optional  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReportResultAddComment":
+
+        flags = Int.read(b)
+
+        optional = True if flags & (1 << 0) else False
+        option = Bytes.read(b)
+
+        return ReportResultAddComment(option=option, optional=optional)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.optional else 0
+        b.write(Int(flags))
+
+        b.write(Bytes(self.option))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/report_result_choose_option.py b/pyrogram/raw/types/report_result_choose_option.py
new file mode 100644
index 00000000..5d889712
--- /dev/null
+++ b/pyrogram/raw/types/report_result_choose_option.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReportResultChooseOption(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ReportResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F0E4E0B6``
+
+    Parameters:
+        title (``str``):
+            N/A
+
+        options (List of :obj:`MessageReportOption `):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.Report
+            stories.Report
+    """
+
+    __slots__: List[str] = ["title", "options"]
+
+    ID = 0xf0e4e0b6
+    QUALNAME = "types.ReportResultChooseOption"
+
+    def __init__(self, *, title: str, options: List["raw.base.MessageReportOption"]) -> None:
+        self.title = title  # string
+        self.options = options  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReportResultChooseOption":
+        # No flags
+
+        title = String.read(b)
+
+        options = TLObject.read(b)
+
+        return ReportResultChooseOption(title=title, options=options)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.title))
+
+        b.write(Vector(self.options))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/report_result_reported.py b/pyrogram/raw/types/report_result_reported.py
new file mode 100644
index 00000000..20e57b6e
--- /dev/null
+++ b/pyrogram/raw/types/report_result_reported.py
@@ -0,0 +1,59 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ReportResultReported(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ReportResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8DB33C4B``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.Report
+            stories.Report
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x8db33c4b
+    QUALNAME = "types.ReportResultReported"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ReportResultReported":
+        # No flags
+
+        return ReportResultReported()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/request_peer_type_broadcast.py b/pyrogram/raw/types/request_peer_type_broadcast.py
new file mode 100644
index 00000000..548f04d5
--- /dev/null
+++ b/pyrogram/raw/types/request_peer_type_broadcast.py
@@ -0,0 +1,83 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequestPeerTypeBroadcast(TLObject):  # type: ignore
+    """Choose a channel
+
+    Constructor of :obj:`~pyrogram.raw.base.RequestPeerType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``339BEF6C``
+
+    Parameters:
+        creator (``bool``, *optional*):
+            Whether to allow only choosing channels that were created by the current user.
+
+        user_admin_rights (:obj:`ChatAdminRights `, *optional*):
+            If specified, allows only choosing channels where the current user is an admin with at least the specified admin rights.
+
+        has_username (``bool``, *optional*):
+            If specified, allows only choosing channels with or without a username, according to the value of Bool.
+
+        bot_admin_rights (:obj:`ChatAdminRights `, *optional*):
+            If specified, allows only choosing channels where the bot is an admin with at least the specified admin rights.
+
+    """
+
+    __slots__: List[str] = ["creator", "user_admin_rights", "has_username", "bot_admin_rights"]
+
+    ID = 0x339bef6c
+    QUALNAME = "types.RequestPeerTypeBroadcast"
+
+    def __init__(self, *, creator: Optional[bool] = None, user_admin_rights: "raw.base.ChatAdminRights" = None, has_username: Optional[bool] = None, bot_admin_rights: "raw.base.ChatAdminRights" = None) -> None:
+        self.creator = creator  # flags.0?true
+        self.user_admin_rights = user_admin_rights  # flags.1?ChatAdminRights
+        self.has_username = has_username  # flags.3?Bool
+        self.bot_admin_rights = bot_admin_rights  # flags.2?ChatAdminRights
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequestPeerTypeBroadcast":
+
+        flags = Int.read(b)
+
+        creator = True if flags & (1 << 0) else False
+        user_admin_rights = TLObject.read(b) if flags & (1 << 1) else None
+
+        has_username = Bool.read(b) if flags & (1 << 3) else None
+        bot_admin_rights = TLObject.read(b) if flags & (1 << 2) else None
+
+        return RequestPeerTypeBroadcast(creator=creator, user_admin_rights=user_admin_rights, has_username=has_username, bot_admin_rights=bot_admin_rights)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.creator else 0
+        flags |= (1 << 1) if self.user_admin_rights is not None else 0
+        flags |= (1 << 3) if self.has_username is not None else 0
+        flags |= (1 << 2) if self.bot_admin_rights is not None else 0
+        b.write(Int(flags))
+
+        if self.user_admin_rights is not None:
+            b.write(self.user_admin_rights.write())
+
+        if self.has_username is not None:
+            b.write(Bool(self.has_username))
+
+        if self.bot_admin_rights is not None:
+            b.write(self.bot_admin_rights.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/request_peer_type_chat.py b/pyrogram/raw/types/request_peer_type_chat.py
new file mode 100644
index 00000000..6bdb2fd4
--- /dev/null
+++ b/pyrogram/raw/types/request_peer_type_chat.py
@@ -0,0 +1,98 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequestPeerTypeChat(TLObject):  # type: ignore
+    """Choose a chat or supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.RequestPeerType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C9F06E1B``
+
+    Parameters:
+        creator (``bool``, *optional*):
+            Whether to allow only choosing chats or supergroups that were created by the current user.
+
+        user_admin_rights (:obj:`ChatAdminRights `, *optional*):
+            If specified, allows only choosing chats or supergroups where the current user is an admin with at least the specified admin rights.
+
+        bot_participant (``bool``, *optional*):
+            Whether to allow only choosing chats or supergroups where the bot is a participant.
+
+        bot_admin_rights (:obj:`ChatAdminRights `, *optional*):
+            If specified, allows only choosing chats or supergroups where the bot is an admin with at least the specified admin rights.
+
+        has_username (``bool``, *optional*):
+            If specified, allows only choosing channels with or without a username, according to the value of Bool.
+
+        forum (``bool``, *optional*):
+            If specified, allows only choosing chats or supergroups that are or aren't forums, according to the value of Bool.
+
+    """
+
+    __slots__: List[str] = ["creator", "user_admin_rights", "bot_participant", "bot_admin_rights", "has_username", "forum"]
+
+    ID = 0xc9f06e1b
+    QUALNAME = "types.RequestPeerTypeChat"
+
+    def __init__(self, *, creator: Optional[bool] = None, user_admin_rights: "raw.base.ChatAdminRights" = None, bot_participant: Optional[bool] = None, bot_admin_rights: "raw.base.ChatAdminRights" = None, has_username: Optional[bool] = None, forum: Optional[bool] = None) -> None:
+        self.creator = creator  # flags.0?true
+        self.user_admin_rights = user_admin_rights  # flags.1?ChatAdminRights
+        self.bot_participant = bot_participant  # flags.5?true
+        self.bot_admin_rights = bot_admin_rights  # flags.2?ChatAdminRights
+        self.has_username = has_username  # flags.3?Bool
+        self.forum = forum  # flags.4?Bool
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequestPeerTypeChat":
+
+        flags = Int.read(b)
+
+        creator = True if flags & (1 << 0) else False
+        user_admin_rights = TLObject.read(b) if flags & (1 << 1) else None
+
+        bot_participant = True if flags & (1 << 5) else False
+        bot_admin_rights = TLObject.read(b) if flags & (1 << 2) else None
+
+        has_username = Bool.read(b) if flags & (1 << 3) else None
+        forum = Bool.read(b) if flags & (1 << 4) else None
+        return RequestPeerTypeChat(creator=creator, user_admin_rights=user_admin_rights, bot_participant=bot_participant, bot_admin_rights=bot_admin_rights, has_username=has_username, forum=forum)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.creator else 0
+        flags |= (1 << 1) if self.user_admin_rights is not None else 0
+        flags |= (1 << 5) if self.bot_participant else 0
+        flags |= (1 << 2) if self.bot_admin_rights is not None else 0
+        flags |= (1 << 3) if self.has_username is not None else 0
+        flags |= (1 << 4) if self.forum is not None else 0
+        b.write(Int(flags))
+
+        if self.user_admin_rights is not None:
+            b.write(self.user_admin_rights.write())
+
+        if self.bot_admin_rights is not None:
+            b.write(self.bot_admin_rights.write())
+
+        if self.has_username is not None:
+            b.write(Bool(self.has_username))
+
+        if self.forum is not None:
+            b.write(Bool(self.forum))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/request_peer_type_user.py b/pyrogram/raw/types/request_peer_type_user.py
new file mode 100644
index 00000000..dbadbb0c
--- /dev/null
+++ b/pyrogram/raw/types/request_peer_type_user.py
@@ -0,0 +1,66 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequestPeerTypeUser(TLObject):  # type: ignore
+    """Choose a user.
+
+    Constructor of :obj:`~pyrogram.raw.base.RequestPeerType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5F3B8A00``
+
+    Parameters:
+        bot (``bool``, *optional*):
+            Whether to allow choosing only bots.
+
+        premium (``bool``, *optional*):
+            Whether to allow choosing only Premium users.
+
+    """
+
+    __slots__: List[str] = ["bot", "premium"]
+
+    ID = 0x5f3b8a00
+    QUALNAME = "types.RequestPeerTypeUser"
+
+    def __init__(self, *, bot: Optional[bool] = None, premium: Optional[bool] = None) -> None:
+        self.bot = bot  # flags.0?Bool
+        self.premium = premium  # flags.1?Bool
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequestPeerTypeUser":
+
+        flags = Int.read(b)
+
+        bot = Bool.read(b) if flags & (1 << 0) else None
+        premium = Bool.read(b) if flags & (1 << 1) else None
+        return RequestPeerTypeUser(bot=bot, premium=premium)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.bot is not None else 0
+        flags |= (1 << 1) if self.premium is not None else 0
+        b.write(Int(flags))
+
+        if self.bot is not None:
+            b.write(Bool(self.bot))
+
+        if self.premium is not None:
+            b.write(Bool(self.premium))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/requested_peer_channel.py b/pyrogram/raw/types/requested_peer_channel.py
new file mode 100644
index 00000000..f77e97d9
--- /dev/null
+++ b/pyrogram/raw/types/requested_peer_channel.py
@@ -0,0 +1,84 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequestedPeerChannel(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.RequestedPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8BA403E4``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+
+
+        title (``str``, *optional*):
+
+
+        username (``str``, *optional*):
+
+
+        photo (:obj:`Photo `, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["channel_id", "title", "username", "photo"]
+
+    ID = 0x8ba403e4
+    QUALNAME = "types.RequestedPeerChannel"
+
+    def __init__(self, *, channel_id: int, title: Optional[str] = None, username: Optional[str] = None, photo: "raw.base.Photo" = None) -> None:
+        self.channel_id = channel_id  # long
+        self.title = title  # flags.0?string
+        self.username = username  # flags.1?string
+        self.photo = photo  # flags.2?Photo
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequestedPeerChannel":
+
+        flags = Int.read(b)
+
+        channel_id = Long.read(b)
+
+        title = String.read(b) if flags & (1 << 0) else None
+        username = String.read(b) if flags & (1 << 1) else None
+        photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        return RequestedPeerChannel(channel_id=channel_id, title=title, username=username, photo=photo)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.title is not None else 0
+        flags |= (1 << 1) if self.username is not None else 0
+        flags |= (1 << 2) if self.photo is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.username is not None:
+            b.write(String(self.username))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/requested_peer_chat.py b/pyrogram/raw/types/requested_peer_chat.py
new file mode 100644
index 00000000..227cd3a0
--- /dev/null
+++ b/pyrogram/raw/types/requested_peer_chat.py
@@ -0,0 +1,75 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequestedPeerChat(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.RequestedPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7307544F``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+
+
+        title (``str``, *optional*):
+
+
+        photo (:obj:`Photo `, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["chat_id", "title", "photo"]
+
+    ID = 0x7307544f
+    QUALNAME = "types.RequestedPeerChat"
+
+    def __init__(self, *, chat_id: int, title: Optional[str] = None, photo: "raw.base.Photo" = None) -> None:
+        self.chat_id = chat_id  # long
+        self.title = title  # flags.0?string
+        self.photo = photo  # flags.2?Photo
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequestedPeerChat":
+
+        flags = Int.read(b)
+
+        chat_id = Long.read(b)
+
+        title = String.read(b) if flags & (1 << 0) else None
+        photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        return RequestedPeerChat(chat_id=chat_id, title=title, photo=photo)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.title is not None else 0
+        flags |= (1 << 2) if self.photo is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.chat_id))
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/requested_peer_user.py b/pyrogram/raw/types/requested_peer_user.py
new file mode 100644
index 00000000..11760610
--- /dev/null
+++ b/pyrogram/raw/types/requested_peer_user.py
@@ -0,0 +1,93 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequestedPeerUser(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.RequestedPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D62FF46A``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+
+
+        first_name (``str``, *optional*):
+
+
+        last_name (``str``, *optional*):
+
+
+        username (``str``, *optional*):
+
+
+        photo (:obj:`Photo `, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["user_id", "first_name", "last_name", "username", "photo"]
+
+    ID = 0xd62ff46a
+    QUALNAME = "types.RequestedPeerUser"
+
+    def __init__(self, *, user_id: int, first_name: Optional[str] = None, last_name: Optional[str] = None, username: Optional[str] = None, photo: "raw.base.Photo" = None) -> None:
+        self.user_id = user_id  # long
+        self.first_name = first_name  # flags.0?string
+        self.last_name = last_name  # flags.0?string
+        self.username = username  # flags.1?string
+        self.photo = photo  # flags.2?Photo
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequestedPeerUser":
+
+        flags = Int.read(b)
+
+        user_id = Long.read(b)
+
+        first_name = String.read(b) if flags & (1 << 0) else None
+        last_name = String.read(b) if flags & (1 << 0) else None
+        username = String.read(b) if flags & (1 << 1) else None
+        photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        return RequestedPeerUser(user_id=user_id, first_name=first_name, last_name=last_name, username=username, photo=photo)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.first_name is not None else 0
+        flags |= (1 << 0) if self.last_name is not None else 0
+        flags |= (1 << 1) if self.username is not None else 0
+        flags |= (1 << 2) if self.photo is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.user_id))
+
+        if self.first_name is not None:
+            b.write(String(self.first_name))
+
+        if self.last_name is not None:
+            b.write(String(self.last_name))
+
+        if self.username is not None:
+            b.write(String(self.username))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/requirement_to_contact_empty.py b/pyrogram/raw/types/requirement_to_contact_empty.py
new file mode 100644
index 00000000..719c8a75
--- /dev/null
+++ b/pyrogram/raw/types/requirement_to_contact_empty.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequirementToContactEmpty(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RequirementToContact`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``50A9839``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            users.GetRequirementsToContact
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x50a9839
+    QUALNAME = "types.RequirementToContactEmpty"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequirementToContactEmpty":
+        # No flags
+
+        return RequirementToContactEmpty()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/requirement_to_contact_paid_messages.py b/pyrogram/raw/types/requirement_to_contact_paid_messages.py
new file mode 100644
index 00000000..717bce9e
--- /dev/null
+++ b/pyrogram/raw/types/requirement_to_contact_paid_messages.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequirementToContactPaidMessages(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RequirementToContact`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B4F67E93``
+
+    Parameters:
+        stars_amount (``int`` ``64-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            users.GetRequirementsToContact
+    """
+
+    __slots__: List[str] = ["stars_amount"]
+
+    ID = 0xb4f67e93
+    QUALNAME = "types.RequirementToContactPaidMessages"
+
+    def __init__(self, *, stars_amount: int) -> None:
+        self.stars_amount = stars_amount  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequirementToContactPaidMessages":
+        # No flags
+
+        stars_amount = Long.read(b)
+
+        return RequirementToContactPaidMessages(stars_amount=stars_amount)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.stars_amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/requirement_to_contact_premium.py b/pyrogram/raw/types/requirement_to_contact_premium.py
new file mode 100644
index 00000000..2428b4d0
--- /dev/null
+++ b/pyrogram/raw/types/requirement_to_contact_premium.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RequirementToContactPremium(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RequirementToContact`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E581E4E9``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            users.GetRequirementsToContact
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xe581e4e9
+    QUALNAME = "types.RequirementToContactPremium"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RequirementToContactPremium":
+        # No flags
+
+        return RequirementToContactPremium()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/res_pq.py b/pyrogram/raw/types/res_pq.py
new file mode 100644
index 00000000..d1755b72
--- /dev/null
+++ b/pyrogram/raw/types/res_pq.py
@@ -0,0 +1,88 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ResPQ(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ResPQ`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``05162463``
+
+    Parameters:
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        pq (``bytes``):
+            N/A
+
+        server_public_key_fingerprints (List of ``int`` ``64-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            ReqPq
+            ReqPqMulti
+    """
+
+    __slots__: List[str] = ["nonce", "server_nonce", "pq", "server_public_key_fingerprints"]
+
+    ID = 0x05162463
+    QUALNAME = "types.ResPQ"
+
+    def __init__(self, *, nonce: int, server_nonce: int, pq: bytes, server_public_key_fingerprints: List[int]) -> None:
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.pq = pq  # bytes
+        self.server_public_key_fingerprints = server_public_key_fingerprints  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ResPQ":
+        # No flags
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        pq = Bytes.read(b)
+
+        server_public_key_fingerprints = TLObject.read(b, Long)
+
+        return ResPQ(nonce=nonce, server_nonce=server_nonce, pq=pq, server_public_key_fingerprints=server_public_key_fingerprints)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Bytes(self.pq))
+
+        b.write(Vector(self.server_public_key_fingerprints, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/restriction_reason.py b/pyrogram/raw/types/restriction_reason.py
new file mode 100644
index 00000000..5bc69da1
--- /dev/null
+++ b/pyrogram/raw/types/restriction_reason.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RestrictionReason(TLObject):  # type: ignore
+    """Restriction reason.
+
+    Constructor of :obj:`~pyrogram.raw.base.RestrictionReason`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D072ACB4``
+
+    Parameters:
+        platform (``str``):
+            Platform identifier (ios, android, wp, all, etc.), can be concatenated with a dash as separator (android-ios, ios-wp, etc)
+
+        reason (``str``):
+            Restriction reason (porno, terms, etc.)
+
+        text (``str``):
+            Error message to be shown to the user
+
+    """
+
+    __slots__: List[str] = ["platform", "reason", "text"]
+
+    ID = 0xd072acb4
+    QUALNAME = "types.RestrictionReason"
+
+    def __init__(self, *, platform: str, reason: str, text: str) -> None:
+        self.platform = platform  # string
+        self.reason = reason  # string
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RestrictionReason":
+        # No flags
+
+        platform = String.read(b)
+
+        reason = String.read(b)
+
+        text = String.read(b)
+
+        return RestrictionReason(platform=platform, reason=reason, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.platform))
+
+        b.write(String(self.reason))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/rpc_answer_dropped.py b/pyrogram/raw/types/rpc_answer_dropped.py
new file mode 100644
index 00000000..dab7cd56
--- /dev/null
+++ b/pyrogram/raw/types/rpc_answer_dropped.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RpcAnswerDropped(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RpcDropAnswer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A43AD8B7``
+
+    Parameters:
+        msg_id (``int`` ``64-bit``):
+            N/A
+
+        seq_no (``int`` ``32-bit``):
+            N/A
+
+        bytes (``int`` ``32-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            RpcDropAnswer
+    """
+
+    __slots__: List[str] = ["msg_id", "seq_no", "bytes"]
+
+    ID = 0xa43ad8b7
+    QUALNAME = "types.RpcAnswerDropped"
+
+    def __init__(self, *, msg_id: int, seq_no: int, bytes: int) -> None:
+        self.msg_id = msg_id  # long
+        self.seq_no = seq_no  # int
+        self.bytes = bytes  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RpcAnswerDropped":
+        # No flags
+
+        msg_id = Long.read(b)
+
+        seq_no = Int.read(b)
+
+        bytes = Int.read(b)
+
+        return RpcAnswerDropped(msg_id=msg_id, seq_no=seq_no, bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.msg_id))
+
+        b.write(Int(self.seq_no))
+
+        b.write(Int(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/rpc_answer_dropped_running.py b/pyrogram/raw/types/rpc_answer_dropped_running.py
new file mode 100644
index 00000000..c2e580a3
--- /dev/null
+++ b/pyrogram/raw/types/rpc_answer_dropped_running.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RpcAnswerDroppedRunning(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RpcDropAnswer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CD78E586``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            RpcDropAnswer
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xcd78e586
+    QUALNAME = "types.RpcAnswerDroppedRunning"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RpcAnswerDroppedRunning":
+        # No flags
+
+        return RpcAnswerDroppedRunning()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/rpc_answer_unknown.py b/pyrogram/raw/types/rpc_answer_unknown.py
new file mode 100644
index 00000000..7890c6fd
--- /dev/null
+++ b/pyrogram/raw/types/rpc_answer_unknown.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RpcAnswerUnknown(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RpcDropAnswer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5E2AD36E``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            RpcDropAnswer
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x5e2ad36e
+    QUALNAME = "types.RpcAnswerUnknown"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RpcAnswerUnknown":
+        # No flags
+
+        return RpcAnswerUnknown()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/rpc_error.py b/pyrogram/raw/types/rpc_error.py
new file mode 100644
index 00000000..f18d97ea
--- /dev/null
+++ b/pyrogram/raw/types/rpc_error.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RpcError(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RpcError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2144CA19``
+
+    Parameters:
+        error_code (``int`` ``32-bit``):
+            N/A
+
+        error_message (``str``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["error_code", "error_message"]
+
+    ID = 0x2144ca19
+    QUALNAME = "types.RpcError"
+
+    def __init__(self, *, error_code: int, error_message: str) -> None:
+        self.error_code = error_code  # int
+        self.error_message = error_message  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RpcError":
+        # No flags
+
+        error_code = Int.read(b)
+
+        error_message = String.read(b)
+
+        return RpcError(error_code=error_code, error_message=error_message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.error_code))
+
+        b.write(String(self.error_message))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/rpc_result.py b/pyrogram/raw/types/rpc_result.py
new file mode 100644
index 00000000..ae2fc8aa
--- /dev/null
+++ b/pyrogram/raw/types/rpc_result.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class RpcResult(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.RpcResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F35C6D01``
+
+    Parameters:
+        req_msg_id (``int`` ``64-bit``):
+            N/A
+
+        result (:obj:`Object `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["req_msg_id", "result"]
+
+    ID = 0xf35c6d01
+    QUALNAME = "types.RpcResult"
+
+    def __init__(self, *, req_msg_id: int, result: TLObject) -> None:
+        self.req_msg_id = req_msg_id  # long
+        self.result = result  # Object
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "RpcResult":
+        # No flags
+
+        req_msg_id = Long.read(b)
+
+        result = TLObject.read(b)
+
+        return RpcResult(req_msg_id=req_msg_id, result=result)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.req_msg_id))
+
+        b.write(self.result.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/saved_dialog.py b/pyrogram/raw/types/saved_dialog.py
new file mode 100644
index 00000000..d703dfa2
--- /dev/null
+++ b/pyrogram/raw/types/saved_dialog.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedDialog(TLObject):  # type: ignore
+    """Represents a saved dialog ».
+
+    Constructor of :obj:`~pyrogram.raw.base.SavedDialog`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BD87CB6C``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The dialog
+
+        top_message (``int`` ``32-bit``):
+            The latest message ID
+
+        pinned (``bool``, *optional*):
+            Is the dialog pinned
+
+    """
+
+    __slots__: List[str] = ["peer", "top_message", "pinned"]
+
+    ID = 0xbd87cb6c
+    QUALNAME = "types.SavedDialog"
+
+    def __init__(self, *, peer: "raw.base.Peer", top_message: int, pinned: Optional[bool] = None) -> None:
+        self.peer = peer  # Peer
+        self.top_message = top_message  # int
+        self.pinned = pinned  # flags.2?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedDialog":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 2) else False
+        peer = TLObject.read(b)
+
+        top_message = Int.read(b)
+
+        return SavedDialog(peer=peer, top_message=top_message, pinned=pinned)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.pinned else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.top_message))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/saved_phone_contact.py b/pyrogram/raw/types/saved_phone_contact.py
new file mode 100644
index 00000000..2e95da35
--- /dev/null
+++ b/pyrogram/raw/types/saved_phone_contact.py
@@ -0,0 +1,87 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedPhoneContact(TLObject):  # type: ignore
+    """Saved contact
+
+    Constructor of :obj:`~pyrogram.raw.base.SavedContact`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1142BD56``
+
+    Parameters:
+        phone (``str``):
+            Phone number
+
+        first_name (``str``):
+            First name
+
+        last_name (``str``):
+            Last name
+
+        date (``int`` ``32-bit``):
+            Date added
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            contacts.GetSaved
+    """
+
+    __slots__: List[str] = ["phone", "first_name", "last_name", "date"]
+
+    ID = 0x1142bd56
+    QUALNAME = "types.SavedPhoneContact"
+
+    def __init__(self, *, phone: str, first_name: str, last_name: str, date: int) -> None:
+        self.phone = phone  # string
+        self.first_name = first_name  # string
+        self.last_name = last_name  # string
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedPhoneContact":
+        # No flags
+
+        phone = String.read(b)
+
+        first_name = String.read(b)
+
+        last_name = String.read(b)
+
+        date = Int.read(b)
+
+        return SavedPhoneContact(phone=phone, first_name=first_name, last_name=last_name, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.phone))
+
+        b.write(String(self.first_name))
+
+        b.write(String(self.last_name))
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/saved_reaction_tag.py b/pyrogram/raw/types/saved_reaction_tag.py
new file mode 100644
index 00000000..2384f824
--- /dev/null
+++ b/pyrogram/raw/types/saved_reaction_tag.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedReactionTag(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.SavedReactionTag`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CB6FF828``
+
+    Parameters:
+        reaction (:obj:`Reaction `):
+
+
+        count (``int`` ``32-bit``):
+
+
+        title (``str``, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["reaction", "count", "title"]
+
+    ID = 0xcb6ff828
+    QUALNAME = "types.SavedReactionTag"
+
+    def __init__(self, *, reaction: "raw.base.Reaction", count: int, title: Optional[str] = None) -> None:
+        self.reaction = reaction  # Reaction
+        self.count = count  # int
+        self.title = title  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedReactionTag":
+
+        flags = Int.read(b)
+
+        reaction = TLObject.read(b)
+
+        title = String.read(b) if flags & (1 << 0) else None
+        count = Int.read(b)
+
+        return SavedReactionTag(reaction=reaction, count=count, title=title)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.title is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.reaction.write())
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        b.write(Int(self.count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/saved_star_gift.py b/pyrogram/raw/types/saved_star_gift.py
new file mode 100644
index 00000000..43d2f4c7
--- /dev/null
+++ b/pyrogram/raw/types/saved_star_gift.py
@@ -0,0 +1,238 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedStarGift(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.SavedStarGift`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``41DF43FC``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+            N/A
+
+        gift (:obj:`StarGift `):
+            N/A
+
+        name_hidden (``bool``, *optional*):
+            N/A
+
+        unsaved (``bool``, *optional*):
+            N/A
+
+        refunded (``bool``, *optional*):
+            N/A
+
+        can_upgrade (``bool``, *optional*):
+            N/A
+
+        pinned_to_top (``bool``, *optional*):
+            N/A
+
+        upgrade_separate (``bool``, *optional*):
+            N/A
+
+        from_id (:obj:`Peer `, *optional*):
+            N/A
+
+        message (:obj:`TextWithEntities `, *optional*):
+            N/A
+
+        msg_id (``int`` ``32-bit``, *optional*):
+            N/A
+
+        saved_id (``int`` ``64-bit``, *optional*):
+            N/A
+
+        convert_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        upgrade_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        can_export_at (``int`` ``32-bit``, *optional*):
+            N/A
+
+        transfer_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        can_transfer_at (``int`` ``32-bit``, *optional*):
+            N/A
+
+        can_resell_at (``int`` ``32-bit``, *optional*):
+            N/A
+
+        collection_id (List of ``int`` ``32-bit``, *optional*):
+            N/A
+
+        prepaid_upgrade_hash (``str``, *optional*):
+            N/A
+
+        drop_original_details_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        gift_num (``int`` ``32-bit``, *optional*):
+            N/A
+
+        can_craft_at (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["date", "gift", "name_hidden", "unsaved", "refunded", "can_upgrade", "pinned_to_top", "upgrade_separate", "from_id", "message", "msg_id", "saved_id", "convert_stars", "upgrade_stars", "can_export_at", "transfer_stars", "can_transfer_at", "can_resell_at", "collection_id", "prepaid_upgrade_hash", "drop_original_details_stars", "gift_num", "can_craft_at"]
+
+    ID = 0x41df43fc
+    QUALNAME = "types.SavedStarGift"
+
+    def __init__(self, *, date: int, gift: "raw.base.StarGift", name_hidden: Optional[bool] = None, unsaved: Optional[bool] = None, refunded: Optional[bool] = None, can_upgrade: Optional[bool] = None, pinned_to_top: Optional[bool] = None, upgrade_separate: Optional[bool] = None, from_id: "raw.base.Peer" = None, message: "raw.base.TextWithEntities" = None, msg_id: Optional[int] = None, saved_id: Optional[int] = None, convert_stars: Optional[int] = None, upgrade_stars: Optional[int] = None, can_export_at: Optional[int] = None, transfer_stars: Optional[int] = None, can_transfer_at: Optional[int] = None, can_resell_at: Optional[int] = None, collection_id: Optional[List[int]] = None, prepaid_upgrade_hash: Optional[str] = None, drop_original_details_stars: Optional[int] = None, gift_num: Optional[int] = None, can_craft_at: Optional[int] = None) -> None:
+        self.date = date  # int
+        self.gift = gift  # StarGift
+        self.name_hidden = name_hidden  # flags.0?true
+        self.unsaved = unsaved  # flags.5?true
+        self.refunded = refunded  # flags.9?true
+        self.can_upgrade = can_upgrade  # flags.10?true
+        self.pinned_to_top = pinned_to_top  # flags.12?true
+        self.upgrade_separate = upgrade_separate  # flags.17?true
+        self.from_id = from_id  # flags.1?Peer
+        self.message = message  # flags.2?TextWithEntities
+        self.msg_id = msg_id  # flags.3?int
+        self.saved_id = saved_id  # flags.11?long
+        self.convert_stars = convert_stars  # flags.4?long
+        self.upgrade_stars = upgrade_stars  # flags.6?long
+        self.can_export_at = can_export_at  # flags.7?int
+        self.transfer_stars = transfer_stars  # flags.8?long
+        self.can_transfer_at = can_transfer_at  # flags.13?int
+        self.can_resell_at = can_resell_at  # flags.14?int
+        self.collection_id = collection_id  # flags.15?Vector
+        self.prepaid_upgrade_hash = prepaid_upgrade_hash  # flags.16?string
+        self.drop_original_details_stars = drop_original_details_stars  # flags.18?long
+        self.gift_num = gift_num  # flags.19?int
+        self.can_craft_at = can_craft_at  # flags.20?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedStarGift":
+
+        flags = Int.read(b)
+
+        name_hidden = True if flags & (1 << 0) else False
+        unsaved = True if flags & (1 << 5) else False
+        refunded = True if flags & (1 << 9) else False
+        can_upgrade = True if flags & (1 << 10) else False
+        pinned_to_top = True if flags & (1 << 12) else False
+        upgrade_separate = True if flags & (1 << 17) else False
+        from_id = TLObject.read(b) if flags & (1 << 1) else None
+
+        date = Int.read(b)
+
+        gift = TLObject.read(b)
+
+        message = TLObject.read(b) if flags & (1 << 2) else None
+
+        msg_id = Int.read(b) if flags & (1 << 3) else None
+        saved_id = Long.read(b) if flags & (1 << 11) else None
+        convert_stars = Long.read(b) if flags & (1 << 4) else None
+        upgrade_stars = Long.read(b) if flags & (1 << 6) else None
+        can_export_at = Int.read(b) if flags & (1 << 7) else None
+        transfer_stars = Long.read(b) if flags & (1 << 8) else None
+        can_transfer_at = Int.read(b) if flags & (1 << 13) else None
+        can_resell_at = Int.read(b) if flags & (1 << 14) else None
+        collection_id = TLObject.read(b, Int) if flags & (1 << 15) else []
+
+        prepaid_upgrade_hash = String.read(b) if flags & (1 << 16) else None
+        drop_original_details_stars = Long.read(b) if flags & (1 << 18) else None
+        gift_num = Int.read(b) if flags & (1 << 19) else None
+        can_craft_at = Int.read(b) if flags & (1 << 20) else None
+        return SavedStarGift(date=date, gift=gift, name_hidden=name_hidden, unsaved=unsaved, refunded=refunded, can_upgrade=can_upgrade, pinned_to_top=pinned_to_top, upgrade_separate=upgrade_separate, from_id=from_id, message=message, msg_id=msg_id, saved_id=saved_id, convert_stars=convert_stars, upgrade_stars=upgrade_stars, can_export_at=can_export_at, transfer_stars=transfer_stars, can_transfer_at=can_transfer_at, can_resell_at=can_resell_at, collection_id=collection_id, prepaid_upgrade_hash=prepaid_upgrade_hash, drop_original_details_stars=drop_original_details_stars, gift_num=gift_num, can_craft_at=can_craft_at)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.name_hidden else 0
+        flags |= (1 << 5) if self.unsaved else 0
+        flags |= (1 << 9) if self.refunded else 0
+        flags |= (1 << 10) if self.can_upgrade else 0
+        flags |= (1 << 12) if self.pinned_to_top else 0
+        flags |= (1 << 17) if self.upgrade_separate else 0
+        flags |= (1 << 1) if self.from_id is not None else 0
+        flags |= (1 << 2) if self.message is not None else 0
+        flags |= (1 << 3) if self.msg_id is not None else 0
+        flags |= (1 << 11) if self.saved_id is not None else 0
+        flags |= (1 << 4) if self.convert_stars is not None else 0
+        flags |= (1 << 6) if self.upgrade_stars is not None else 0
+        flags |= (1 << 7) if self.can_export_at is not None else 0
+        flags |= (1 << 8) if self.transfer_stars is not None else 0
+        flags |= (1 << 13) if self.can_transfer_at is not None else 0
+        flags |= (1 << 14) if self.can_resell_at is not None else 0
+        flags |= (1 << 15) if self.collection_id else 0
+        flags |= (1 << 16) if self.prepaid_upgrade_hash is not None else 0
+        flags |= (1 << 18) if self.drop_original_details_stars is not None else 0
+        flags |= (1 << 19) if self.gift_num is not None else 0
+        flags |= (1 << 20) if self.can_craft_at is not None else 0
+        b.write(Int(flags))
+
+        if self.from_id is not None:
+            b.write(self.from_id.write())
+
+        b.write(Int(self.date))
+
+        b.write(self.gift.write())
+
+        if self.message is not None:
+            b.write(self.message.write())
+
+        if self.msg_id is not None:
+            b.write(Int(self.msg_id))
+
+        if self.saved_id is not None:
+            b.write(Long(self.saved_id))
+
+        if self.convert_stars is not None:
+            b.write(Long(self.convert_stars))
+
+        if self.upgrade_stars is not None:
+            b.write(Long(self.upgrade_stars))
+
+        if self.can_export_at is not None:
+            b.write(Int(self.can_export_at))
+
+        if self.transfer_stars is not None:
+            b.write(Long(self.transfer_stars))
+
+        if self.can_transfer_at is not None:
+            b.write(Int(self.can_transfer_at))
+
+        if self.can_resell_at is not None:
+            b.write(Int(self.can_resell_at))
+
+        if self.collection_id is not None:
+            b.write(Vector(self.collection_id, Int))
+
+        if self.prepaid_upgrade_hash is not None:
+            b.write(String(self.prepaid_upgrade_hash))
+
+        if self.drop_original_details_stars is not None:
+            b.write(Long(self.drop_original_details_stars))
+
+        if self.gift_num is not None:
+            b.write(Int(self.gift_num))
+
+        if self.can_craft_at is not None:
+            b.write(Int(self.can_craft_at))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/search_posts_flood.py b/pyrogram/raw/types/search_posts_flood.py
new file mode 100644
index 00000000..1578b633
--- /dev/null
+++ b/pyrogram/raw/types/search_posts_flood.py
@@ -0,0 +1,96 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SearchPostsFlood(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.SearchPostsFlood`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3E0B5B6A``
+
+    Parameters:
+        total_daily (``int`` ``32-bit``):
+            N/A
+
+        remains (``int`` ``32-bit``):
+            N/A
+
+        stars_amount (``int`` ``64-bit``):
+            N/A
+
+        query_is_free (``bool``, *optional*):
+            N/A
+
+        wait_till (``int`` ``32-bit``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            channels.CheckSearchPostsFlood
+    """
+
+    __slots__: List[str] = ["total_daily", "remains", "stars_amount", "query_is_free", "wait_till"]
+
+    ID = 0x3e0b5b6a
+    QUALNAME = "types.SearchPostsFlood"
+
+    def __init__(self, *, total_daily: int, remains: int, stars_amount: int, query_is_free: Optional[bool] = None, wait_till: Optional[int] = None) -> None:
+        self.total_daily = total_daily  # int
+        self.remains = remains  # int
+        self.stars_amount = stars_amount  # long
+        self.query_is_free = query_is_free  # flags.0?true
+        self.wait_till = wait_till  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SearchPostsFlood":
+
+        flags = Int.read(b)
+
+        query_is_free = True if flags & (1 << 0) else False
+        total_daily = Int.read(b)
+
+        remains = Int.read(b)
+
+        wait_till = Int.read(b) if flags & (1 << 1) else None
+        stars_amount = Long.read(b)
+
+        return SearchPostsFlood(total_daily=total_daily, remains=remains, stars_amount=stars_amount, query_is_free=query_is_free, wait_till=wait_till)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.query_is_free else 0
+        flags |= (1 << 1) if self.wait_till is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.total_daily))
+
+        b.write(Int(self.remains))
+
+        if self.wait_till is not None:
+            b.write(Int(self.wait_till))
+
+        b.write(Long(self.stars_amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/search_result_position.py b/pyrogram/raw/types/search_result_position.py
new file mode 100644
index 00000000..ed1845eb
--- /dev/null
+++ b/pyrogram/raw/types/search_result_position.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SearchResultPosition(TLObject):  # type: ignore
+    """Information about a message in a specific position
+
+    Constructor of :obj:`~pyrogram.raw.base.SearchResultsPosition`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7F648B67``
+
+    Parameters:
+        msg_id (``int`` ``32-bit``):
+            Message ID
+
+        date (``int`` ``32-bit``):
+            When was the message sent
+
+        offset (``int`` ``32-bit``):
+            0-based message position in the full list of suitable messages
+
+    """
+
+    __slots__: List[str] = ["msg_id", "date", "offset"]
+
+    ID = 0x7f648b67
+    QUALNAME = "types.SearchResultPosition"
+
+    def __init__(self, *, msg_id: int, date: int, offset: int) -> None:
+        self.msg_id = msg_id  # int
+        self.date = date  # int
+        self.offset = offset  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SearchResultPosition":
+        # No flags
+
+        msg_id = Int.read(b)
+
+        date = Int.read(b)
+
+        offset = Int.read(b)
+
+        return SearchResultPosition(msg_id=msg_id, date=date, offset=offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.msg_id))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/search_results_calendar_period.py b/pyrogram/raw/types/search_results_calendar_period.py
new file mode 100644
index 00000000..0c27834b
--- /dev/null
+++ b/pyrogram/raw/types/search_results_calendar_period.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SearchResultsCalendarPeriod(TLObject):  # type: ignore
+    """Information about found messages sent on a specific day, used to split the messages in messages.searchResultsCalendar constructors by days.
+
+    Constructor of :obj:`~pyrogram.raw.base.SearchResultsCalendarPeriod`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C9B0539F``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+            The day this object is referring to.
+
+        min_msg_id (``int`` ``32-bit``):
+            First message ID that was sent on this day.
+
+        max_msg_id (``int`` ``32-bit``):
+            Last message ID that was sent on this day.
+
+        count (``int`` ``32-bit``):
+            All messages that were sent on this day.
+
+    """
+
+    __slots__: List[str] = ["date", "min_msg_id", "max_msg_id", "count"]
+
+    ID = 0xc9b0539f
+    QUALNAME = "types.SearchResultsCalendarPeriod"
+
+    def __init__(self, *, date: int, min_msg_id: int, max_msg_id: int, count: int) -> None:
+        self.date = date  # int
+        self.min_msg_id = min_msg_id  # int
+        self.max_msg_id = max_msg_id  # int
+        self.count = count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SearchResultsCalendarPeriod":
+        # No flags
+
+        date = Int.read(b)
+
+        min_msg_id = Int.read(b)
+
+        max_msg_id = Int.read(b)
+
+        count = Int.read(b)
+
+        return SearchResultsCalendarPeriod(date=date, min_msg_id=min_msg_id, max_msg_id=max_msg_id, count=count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.min_msg_id))
+
+        b.write(Int(self.max_msg_id))
+
+        b.write(Int(self.count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_credentials_encrypted.py b/pyrogram/raw/types/secure_credentials_encrypted.py
new file mode 100644
index 00000000..d1afd16b
--- /dev/null
+++ b/pyrogram/raw/types/secure_credentials_encrypted.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureCredentialsEncrypted(TLObject):  # type: ignore
+    """Encrypted credentials required to decrypt telegram passport data.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureCredentialsEncrypted`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``33F0EA47``
+
+    Parameters:
+        data (``bytes``):
+            Encrypted JSON-serialized data with unique user's payload, data hashes and secrets required for EncryptedPassportElement decryption and authentication, as described in decrypting data »
+
+        hash (``bytes``):
+            Data hash for data authentication as described in decrypting data »
+
+        secret (``bytes``):
+            Secret, encrypted with the bot's public RSA key, required for data decryption as described in decrypting data »
+
+    """
+
+    __slots__: List[str] = ["data", "hash", "secret"]
+
+    ID = 0x33f0ea47
+    QUALNAME = "types.SecureCredentialsEncrypted"
+
+    def __init__(self, *, data: bytes, hash: bytes, secret: bytes) -> None:
+        self.data = data  # bytes
+        self.hash = hash  # bytes
+        self.secret = secret  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureCredentialsEncrypted":
+        # No flags
+
+        data = Bytes.read(b)
+
+        hash = Bytes.read(b)
+
+        secret = Bytes.read(b)
+
+        return SecureCredentialsEncrypted(data=data, hash=hash, secret=secret)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.data))
+
+        b.write(Bytes(self.hash))
+
+        b.write(Bytes(self.secret))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_data.py b/pyrogram/raw/types/secure_data.py
new file mode 100644
index 00000000..5861c126
--- /dev/null
+++ b/pyrogram/raw/types/secure_data.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureData(TLObject):  # type: ignore
+    """Secure passport data, for more info see the passport docs »
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8AEABEC3``
+
+    Parameters:
+        data (``bytes``):
+            Data
+
+        data_hash (``bytes``):
+            Data hash
+
+        secret (``bytes``):
+            Secret
+
+    """
+
+    __slots__: List[str] = ["data", "data_hash", "secret"]
+
+    ID = 0x8aeabec3
+    QUALNAME = "types.SecureData"
+
+    def __init__(self, *, data: bytes, data_hash: bytes, secret: bytes) -> None:
+        self.data = data  # bytes
+        self.data_hash = data_hash  # bytes
+        self.secret = secret  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureData":
+        # No flags
+
+        data = Bytes.read(b)
+
+        data_hash = Bytes.read(b)
+
+        secret = Bytes.read(b)
+
+        return SecureData(data=data, data_hash=data_hash, secret=secret)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.data))
+
+        b.write(Bytes(self.data_hash))
+
+        b.write(Bytes(self.secret))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_file.py b/pyrogram/raw/types/secure_file.py
new file mode 100644
index 00000000..790fe919
--- /dev/null
+++ b/pyrogram/raw/types/secure_file.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureFile(TLObject):  # type: ignore
+    """Secure passport file, for more info see the passport docs »
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureFile`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7D09C27E``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        size (``int`` ``64-bit``):
+            File size
+
+        dc_id (``int`` ``32-bit``):
+            DC ID
+
+        date (``int`` ``32-bit``):
+            Date of upload
+
+        file_hash (``bytes``):
+            File hash
+
+        secret (``bytes``):
+            Secret
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "size", "dc_id", "date", "file_hash", "secret"]
+
+    ID = 0x7d09c27e
+    QUALNAME = "types.SecureFile"
+
+    def __init__(self, *, id: int, access_hash: int, size: int, dc_id: int, date: int, file_hash: bytes, secret: bytes) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.size = size  # long
+        self.dc_id = dc_id  # int
+        self.date = date  # int
+        self.file_hash = file_hash  # bytes
+        self.secret = secret  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureFile":
+        # No flags
+
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        size = Long.read(b)
+
+        dc_id = Int.read(b)
+
+        date = Int.read(b)
+
+        file_hash = Bytes.read(b)
+
+        secret = Bytes.read(b)
+
+        return SecureFile(id=id, access_hash=access_hash, size=size, dc_id=dc_id, date=date, file_hash=file_hash, secret=secret)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Long(self.size))
+
+        b.write(Int(self.dc_id))
+
+        b.write(Int(self.date))
+
+        b.write(Bytes(self.file_hash))
+
+        b.write(Bytes(self.secret))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_file_empty.py b/pyrogram/raw/types/secure_file_empty.py
new file mode 100644
index 00000000..1db829b4
--- /dev/null
+++ b/pyrogram/raw/types/secure_file_empty.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureFileEmpty(TLObject):  # type: ignore
+    """Empty constructor
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureFile`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``64199744``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x64199744
+    QUALNAME = "types.SecureFileEmpty"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureFileEmpty":
+        # No flags
+
+        return SecureFileEmpty()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_password_kdf_algo_pbkdf2_hmacsha512iter100000.py b/pyrogram/raw/types/secure_password_kdf_algo_pbkdf2_hmacsha512iter100000.py
new file mode 100644
index 00000000..d16189eb
--- /dev/null
+++ b/pyrogram/raw/types/secure_password_kdf_algo_pbkdf2_hmacsha512iter100000.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000(TLObject):  # type: ignore
+    """PBKDF2 with SHA512 and 100000 iterations KDF algo
+
+    Constructor of :obj:`~pyrogram.raw.base.SecurePasswordKdfAlgo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BBF2DDA0``
+
+    Parameters:
+        salt (``bytes``):
+            Salt
+
+    """
+
+    __slots__: List[str] = ["salt"]
+
+    ID = 0xbbf2dda0
+    QUALNAME = "types.SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000"
+
+    def __init__(self, *, salt: bytes) -> None:
+        self.salt = salt  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000":
+        # No flags
+
+        salt = Bytes.read(b)
+
+        return SecurePasswordKdfAlgoPBKDF2HMACSHA512iter100000(salt=salt)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.salt))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_password_kdf_algo_sha512.py b/pyrogram/raw/types/secure_password_kdf_algo_sha512.py
new file mode 100644
index 00000000..e782d3d8
--- /dev/null
+++ b/pyrogram/raw/types/secure_password_kdf_algo_sha512.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecurePasswordKdfAlgoSHA512(TLObject):  # type: ignore
+    """SHA512 KDF algo
+
+    Constructor of :obj:`~pyrogram.raw.base.SecurePasswordKdfAlgo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``86471D92``
+
+    Parameters:
+        salt (``bytes``):
+            Salt
+
+    """
+
+    __slots__: List[str] = ["salt"]
+
+    ID = 0x86471d92
+    QUALNAME = "types.SecurePasswordKdfAlgoSHA512"
+
+    def __init__(self, *, salt: bytes) -> None:
+        self.salt = salt  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecurePasswordKdfAlgoSHA512":
+        # No flags
+
+        salt = Bytes.read(b)
+
+        return SecurePasswordKdfAlgoSHA512(salt=salt)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.salt))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_password_kdf_algo_unknown.py b/pyrogram/raw/types/secure_password_kdf_algo_unknown.py
new file mode 100644
index 00000000..29fb0f8e
--- /dev/null
+++ b/pyrogram/raw/types/secure_password_kdf_algo_unknown.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecurePasswordKdfAlgoUnknown(TLObject):  # type: ignore
+    """Unknown KDF algo (most likely the client has to be updated)
+
+    Constructor of :obj:`~pyrogram.raw.base.SecurePasswordKdfAlgo`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4A8537``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x4a8537
+    QUALNAME = "types.SecurePasswordKdfAlgoUnknown"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecurePasswordKdfAlgoUnknown":
+        # No flags
+
+        return SecurePasswordKdfAlgoUnknown()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_plain_email.py b/pyrogram/raw/types/secure_plain_email.py
new file mode 100644
index 00000000..7cc2159d
--- /dev/null
+++ b/pyrogram/raw/types/secure_plain_email.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecurePlainEmail(TLObject):  # type: ignore
+    """Email address to use in telegram passport: it must be verified, first ».
+
+    Constructor of :obj:`~pyrogram.raw.base.SecurePlainData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``21EC5A5F``
+
+    Parameters:
+        email (``str``):
+            Email address
+
+    """
+
+    __slots__: List[str] = ["email"]
+
+    ID = 0x21ec5a5f
+    QUALNAME = "types.SecurePlainEmail"
+
+    def __init__(self, *, email: str) -> None:
+        self.email = email  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecurePlainEmail":
+        # No flags
+
+        email = String.read(b)
+
+        return SecurePlainEmail(email=email)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.email))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_plain_phone.py b/pyrogram/raw/types/secure_plain_phone.py
new file mode 100644
index 00000000..fb85bcd5
--- /dev/null
+++ b/pyrogram/raw/types/secure_plain_phone.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecurePlainPhone(TLObject):  # type: ignore
+    """Phone number to use in telegram passport: it must be verified, first ».
+
+    Constructor of :obj:`~pyrogram.raw.base.SecurePlainData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7D6099DD``
+
+    Parameters:
+        phone (``str``):
+            Phone number
+
+    """
+
+    __slots__: List[str] = ["phone"]
+
+    ID = 0x7d6099dd
+    QUALNAME = "types.SecurePlainPhone"
+
+    def __init__(self, *, phone: str) -> None:
+        self.phone = phone  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecurePlainPhone":
+        # No flags
+
+        phone = String.read(b)
+
+        return SecurePlainPhone(phone=phone)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.phone))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_required_type.py b/pyrogram/raw/types/secure_required_type.py
new file mode 100644
index 00000000..4c0499ea
--- /dev/null
+++ b/pyrogram/raw/types/secure_required_type.py
@@ -0,0 +1,74 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureRequiredType(TLObject):  # type: ignore
+    """Required type
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureRequiredType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``829D99DA``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            Secure value type
+
+        native_names (``bool``, *optional*):
+            Native names
+
+        selfie_required (``bool``, *optional*):
+            Is a selfie required
+
+        translation_required (``bool``, *optional*):
+            Is a translation required
+
+    """
+
+    __slots__: List[str] = ["type", "native_names", "selfie_required", "translation_required"]
+
+    ID = 0x829d99da
+    QUALNAME = "types.SecureRequiredType"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", native_names: Optional[bool] = None, selfie_required: Optional[bool] = None, translation_required: Optional[bool] = None) -> None:
+        self.type = type  # SecureValueType
+        self.native_names = native_names  # flags.0?true
+        self.selfie_required = selfie_required  # flags.1?true
+        self.translation_required = translation_required  # flags.2?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureRequiredType":
+
+        flags = Int.read(b)
+
+        native_names = True if flags & (1 << 0) else False
+        selfie_required = True if flags & (1 << 1) else False
+        translation_required = True if flags & (1 << 2) else False
+        type = TLObject.read(b)
+
+        return SecureRequiredType(type=type, native_names=native_names, selfie_required=selfie_required, translation_required=translation_required)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.native_names else 0
+        flags |= (1 << 1) if self.selfie_required else 0
+        flags |= (1 << 2) if self.translation_required else 0
+        b.write(Int(flags))
+
+        b.write(self.type.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_required_type_one_of.py b/pyrogram/raw/types/secure_required_type_one_of.py
new file mode 100644
index 00000000..b9e8a441
--- /dev/null
+++ b/pyrogram/raw/types/secure_required_type_one_of.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureRequiredTypeOneOf(TLObject):  # type: ignore
+    """One of
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureRequiredType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``27477B4``
+
+    Parameters:
+        types (List of :obj:`SecureRequiredType `):
+            Secure required value types
+
+    """
+
+    __slots__: List[str] = ["types"]
+
+    ID = 0x27477b4
+    QUALNAME = "types.SecureRequiredTypeOneOf"
+
+    def __init__(self, *, types: List["raw.base.SecureRequiredType"]) -> None:
+        self.types = types  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureRequiredTypeOneOf":
+        # No flags
+
+        types = TLObject.read(b)
+
+        return SecureRequiredTypeOneOf(types=types)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.types))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_secret_settings.py b/pyrogram/raw/types/secure_secret_settings.py
new file mode 100644
index 00000000..bceb0cb2
--- /dev/null
+++ b/pyrogram/raw/types/secure_secret_settings.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureSecretSettings(TLObject):  # type: ignore
+    """Secure settings
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureSecretSettings`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1527BCAC``
+
+    Parameters:
+        secure_algo (:obj:`SecurePasswordKdfAlgo `):
+            Secure KDF algo
+
+        secure_secret (``bytes``):
+            Secure secret
+
+        secure_secret_id (``int`` ``64-bit``):
+            Secret ID
+
+    """
+
+    __slots__: List[str] = ["secure_algo", "secure_secret", "secure_secret_id"]
+
+    ID = 0x1527bcac
+    QUALNAME = "types.SecureSecretSettings"
+
+    def __init__(self, *, secure_algo: "raw.base.SecurePasswordKdfAlgo", secure_secret: bytes, secure_secret_id: int) -> None:
+        self.secure_algo = secure_algo  # SecurePasswordKdfAlgo
+        self.secure_secret = secure_secret  # bytes
+        self.secure_secret_id = secure_secret_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureSecretSettings":
+        # No flags
+
+        secure_algo = TLObject.read(b)
+
+        secure_secret = Bytes.read(b)
+
+        secure_secret_id = Long.read(b)
+
+        return SecureSecretSettings(secure_algo=secure_algo, secure_secret=secure_secret, secure_secret_id=secure_secret_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.secure_algo.write())
+
+        b.write(Bytes(self.secure_secret))
+
+        b.write(Long(self.secure_secret_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value.py b/pyrogram/raw/types/secure_value.py
new file mode 100644
index 00000000..bf5b5075
--- /dev/null
+++ b/pyrogram/raw/types/secure_value.py
@@ -0,0 +1,145 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValue(TLObject):  # type: ignore
+    """Secure value
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValue`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``187FA0CA``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            Secure passport value type
+
+        hash (``bytes``):
+            Data hash
+
+        data (:obj:`SecureData `, *optional*):
+            Encrypted Telegram Passport element data
+
+        front_side (:obj:`SecureFile `, *optional*):
+            Encrypted passport file with the front side of the document
+
+        reverse_side (:obj:`SecureFile `, *optional*):
+            Encrypted passport file with the reverse side of the document
+
+        selfie (:obj:`SecureFile `, *optional*):
+            Encrypted passport file with a selfie of the user holding the document
+
+        translation (List of :obj:`SecureFile `, *optional*):
+            Array of encrypted passport files with translated versions of the provided documents
+
+        files (List of :obj:`SecureFile `, *optional*):
+            Array of encrypted passport files with photos the of the documents
+
+        plain_data (:obj:`SecurePlainData `, *optional*):
+            Plaintext verified passport data
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetAllSecureValues
+            account.GetSecureValue
+            account.SaveSecureValue
+    """
+
+    __slots__: List[str] = ["type", "hash", "data", "front_side", "reverse_side", "selfie", "translation", "files", "plain_data"]
+
+    ID = 0x187fa0ca
+    QUALNAME = "types.SecureValue"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", hash: bytes, data: "raw.base.SecureData" = None, front_side: "raw.base.SecureFile" = None, reverse_side: "raw.base.SecureFile" = None, selfie: "raw.base.SecureFile" = None, translation: Optional[List["raw.base.SecureFile"]] = None, files: Optional[List["raw.base.SecureFile"]] = None, plain_data: "raw.base.SecurePlainData" = None) -> None:
+        self.type = type  # SecureValueType
+        self.hash = hash  # bytes
+        self.data = data  # flags.0?SecureData
+        self.front_side = front_side  # flags.1?SecureFile
+        self.reverse_side = reverse_side  # flags.2?SecureFile
+        self.selfie = selfie  # flags.3?SecureFile
+        self.translation = translation  # flags.6?Vector
+        self.files = files  # flags.4?Vector
+        self.plain_data = plain_data  # flags.5?SecurePlainData
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValue":
+
+        flags = Int.read(b)
+
+        type = TLObject.read(b)
+
+        data = TLObject.read(b) if flags & (1 << 0) else None
+
+        front_side = TLObject.read(b) if flags & (1 << 1) else None
+
+        reverse_side = TLObject.read(b) if flags & (1 << 2) else None
+
+        selfie = TLObject.read(b) if flags & (1 << 3) else None
+
+        translation = TLObject.read(b) if flags & (1 << 6) else []
+
+        files = TLObject.read(b) if flags & (1 << 4) else []
+
+        plain_data = TLObject.read(b) if flags & (1 << 5) else None
+
+        hash = Bytes.read(b)
+
+        return SecureValue(type=type, hash=hash, data=data, front_side=front_side, reverse_side=reverse_side, selfie=selfie, translation=translation, files=files, plain_data=plain_data)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.data is not None else 0
+        flags |= (1 << 1) if self.front_side is not None else 0
+        flags |= (1 << 2) if self.reverse_side is not None else 0
+        flags |= (1 << 3) if self.selfie is not None else 0
+        flags |= (1 << 6) if self.translation else 0
+        flags |= (1 << 4) if self.files else 0
+        flags |= (1 << 5) if self.plain_data is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.type.write())
+
+        if self.data is not None:
+            b.write(self.data.write())
+
+        if self.front_side is not None:
+            b.write(self.front_side.write())
+
+        if self.reverse_side is not None:
+            b.write(self.reverse_side.write())
+
+        if self.selfie is not None:
+            b.write(self.selfie.write())
+
+        if self.translation is not None:
+            b.write(Vector(self.translation))
+
+        if self.files is not None:
+            b.write(Vector(self.files))
+
+        if self.plain_data is not None:
+            b.write(self.plain_data.write())
+
+        b.write(Bytes(self.hash))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error.py b/pyrogram/raw/types/secure_value_error.py
new file mode 100644
index 00000000..a56de7b8
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueError(TLObject):  # type: ignore
+    """Secure value error
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``869D758F``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            Type of element which has the issue
+
+        hash (``bytes``):
+            Hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "hash", "text"]
+
+    ID = 0x869d758f
+    QUALNAME = "types.SecureValueError"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", hash: bytes, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.hash = hash  # bytes
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueError":
+        # No flags
+
+        type = TLObject.read(b)
+
+        hash = Bytes.read(b)
+
+        text = String.read(b)
+
+        return SecureValueError(type=type, hash=hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.hash))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_data.py b/pyrogram/raw/types/secure_value_error_data.py
new file mode 100644
index 00000000..74e430ce
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_data.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorData(TLObject):  # type: ignore
+    """Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E8A40BD9``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            The section of the user's Telegram Passport which has the error, one of secureValueTypePersonalDetails, secureValueTypePassport, secureValueTypeDriverLicense, secureValueTypeIdentityCard, secureValueTypeInternalPassport, secureValueTypeAddress
+
+        data_hash (``bytes``):
+            Data hash
+
+        field (``str``):
+            Name of the data field which has the error
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "data_hash", "field", "text"]
+
+    ID = 0xe8a40bd9
+    QUALNAME = "types.SecureValueErrorData"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", data_hash: bytes, field: str, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.data_hash = data_hash  # bytes
+        self.field = field  # string
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorData":
+        # No flags
+
+        type = TLObject.read(b)
+
+        data_hash = Bytes.read(b)
+
+        field = String.read(b)
+
+        text = String.read(b)
+
+        return SecureValueErrorData(type=type, data_hash=data_hash, field=field, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.data_hash))
+
+        b.write(String(self.field))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_file.py b/pyrogram/raw/types/secure_value_error_file.py
new file mode 100644
index 00000000..2c7bf364
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_file.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorFile(TLObject):  # type: ignore
+    """Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7A700873``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypeUtilityBill, secureValueTypeBankStatement, secureValueTypeRentalAgreement, secureValueTypePassportRegistration, secureValueTypeTemporaryRegistration
+
+        file_hash (``bytes``):
+            File hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0x7a700873
+    QUALNAME = "types.SecureValueErrorFile"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: bytes, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # bytes
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorFile":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = Bytes.read(b)
+
+        text = String.read(b)
+
+        return SecureValueErrorFile(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.file_hash))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_files.py b/pyrogram/raw/types/secure_value_error_files.py
new file mode 100644
index 00000000..43d7bc05
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_files.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorFiles(TLObject):  # type: ignore
+    """Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``666220E9``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypeUtilityBill, secureValueTypeBankStatement, secureValueTypeRentalAgreement, secureValueTypePassportRegistration, secureValueTypeTemporaryRegistration
+
+        file_hash (List of ``bytes``):
+            File hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0x666220e9
+    QUALNAME = "types.SecureValueErrorFiles"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: List[bytes], text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # Vector
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorFiles":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = TLObject.read(b, Bytes)
+
+        text = String.read(b)
+
+        return SecureValueErrorFiles(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Vector(self.file_hash, Bytes))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_front_side.py b/pyrogram/raw/types/secure_value_error_front_side.py
new file mode 100644
index 00000000..65847906
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_front_side.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorFrontSide(TLObject):  # type: ignore
+    """Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BE3DFA``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypePassport, secureValueTypeDriverLicense, secureValueTypeIdentityCard, secureValueTypeInternalPassport
+
+        file_hash (``bytes``):
+            File hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0xbe3dfa
+    QUALNAME = "types.SecureValueErrorFrontSide"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: bytes, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # bytes
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorFrontSide":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = Bytes.read(b)
+
+        text = String.read(b)
+
+        return SecureValueErrorFrontSide(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.file_hash))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_reverse_side.py b/pyrogram/raw/types/secure_value_error_reverse_side.py
new file mode 100644
index 00000000..09755649
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_reverse_side.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorReverseSide(TLObject):  # type: ignore
+    """Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``868A2AA5``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypeDriverLicense, secureValueTypeIdentityCard
+
+        file_hash (``bytes``):
+            File hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0x868a2aa5
+    QUALNAME = "types.SecureValueErrorReverseSide"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: bytes, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # bytes
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorReverseSide":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = Bytes.read(b)
+
+        text = String.read(b)
+
+        return SecureValueErrorReverseSide(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.file_hash))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_selfie.py b/pyrogram/raw/types/secure_value_error_selfie.py
new file mode 100644
index 00000000..e7adc74d
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_selfie.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorSelfie(TLObject):  # type: ignore
+    """Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E537CED6``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypePassport, secureValueTypeDriverLicense, secureValueTypeIdentityCard, secureValueTypeInternalPassport
+
+        file_hash (``bytes``):
+            File hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0xe537ced6
+    QUALNAME = "types.SecureValueErrorSelfie"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: bytes, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # bytes
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorSelfie":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = Bytes.read(b)
+
+        text = String.read(b)
+
+        return SecureValueErrorSelfie(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.file_hash))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_translation_file.py b/pyrogram/raw/types/secure_value_error_translation_file.py
new file mode 100644
index 00000000..6d80990a
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_translation_file.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorTranslationFile(TLObject):  # type: ignore
+    """Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A1144770``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypePersonalDetails, secureValueTypePassport, secureValueTypeDriverLicense, secureValueTypeIdentityCard, secureValueTypeInternalPassport, secureValueTypeUtilityBill, secureValueTypeBankStatement, secureValueTypeRentalAgreement, secureValueTypePassportRegistration, secureValueTypeTemporaryRegistration
+
+        file_hash (``bytes``):
+            File hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0xa1144770
+    QUALNAME = "types.SecureValueErrorTranslationFile"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: bytes, text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # bytes
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorTranslationFile":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = Bytes.read(b)
+
+        text = String.read(b)
+
+        return SecureValueErrorTranslationFile(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.file_hash))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_error_translation_files.py b/pyrogram/raw/types/secure_value_error_translation_files.py
new file mode 100644
index 00000000..e99be2e9
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_error_translation_files.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueErrorTranslationFiles(TLObject):  # type: ignore
+    """Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation changes.
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueError`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``34636DD8``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            One of secureValueTypePersonalDetails, secureValueTypePassport, secureValueTypeDriverLicense, secureValueTypeIdentityCard, secureValueTypeInternalPassport, secureValueTypeUtilityBill, secureValueTypeBankStatement, secureValueTypeRentalAgreement, secureValueTypePassportRegistration, secureValueTypeTemporaryRegistration
+
+        file_hash (List of ``bytes``):
+            Hash
+
+        text (``str``):
+            Error message
+
+    """
+
+    __slots__: List[str] = ["type", "file_hash", "text"]
+
+    ID = 0x34636dd8
+    QUALNAME = "types.SecureValueErrorTranslationFiles"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", file_hash: List[bytes], text: str) -> None:
+        self.type = type  # SecureValueType
+        self.file_hash = file_hash  # Vector
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueErrorTranslationFiles":
+        # No flags
+
+        type = TLObject.read(b)
+
+        file_hash = TLObject.read(b, Bytes)
+
+        text = String.read(b)
+
+        return SecureValueErrorTranslationFiles(type=type, file_hash=file_hash, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Vector(self.file_hash, Bytes))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_hash.py b/pyrogram/raw/types/secure_value_hash.py
new file mode 100644
index 00000000..fecec6e6
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_hash.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueHash(TLObject):  # type: ignore
+    """Secure value hash
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueHash`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``ED1ECDB0``
+
+    Parameters:
+        type (:obj:`SecureValueType `):
+            Secure value type
+
+        hash (``bytes``):
+            Hash
+
+    """
+
+    __slots__: List[str] = ["type", "hash"]
+
+    ID = 0xed1ecdb0
+    QUALNAME = "types.SecureValueHash"
+
+    def __init__(self, *, type: "raw.base.SecureValueType", hash: bytes) -> None:
+        self.type = type  # SecureValueType
+        self.hash = hash  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueHash":
+        # No flags
+
+        type = TLObject.read(b)
+
+        hash = Bytes.read(b)
+
+        return SecureValueHash(type=type, hash=hash)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Bytes(self.hash))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_address.py b/pyrogram/raw/types/secure_value_type_address.py
new file mode 100644
index 00000000..4d260324
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_address.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeAddress(TLObject):  # type: ignore
+    """Address
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CBE31E26``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xcbe31e26
+    QUALNAME = "types.SecureValueTypeAddress"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeAddress":
+        # No flags
+
+        return SecureValueTypeAddress()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_bank_statement.py b/pyrogram/raw/types/secure_value_type_bank_statement.py
new file mode 100644
index 00000000..fb707858
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_bank_statement.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeBankStatement(TLObject):  # type: ignore
+    """Bank statement
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``89137C0D``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x89137c0d
+    QUALNAME = "types.SecureValueTypeBankStatement"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeBankStatement":
+        # No flags
+
+        return SecureValueTypeBankStatement()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_driver_license.py b/pyrogram/raw/types/secure_value_type_driver_license.py
new file mode 100644
index 00000000..5aefd821
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_driver_license.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeDriverLicense(TLObject):  # type: ignore
+    """Driver's license
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6E425C4``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x6e425c4
+    QUALNAME = "types.SecureValueTypeDriverLicense"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeDriverLicense":
+        # No flags
+
+        return SecureValueTypeDriverLicense()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_email.py b/pyrogram/raw/types/secure_value_type_email.py
new file mode 100644
index 00000000..6987160c
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_email.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeEmail(TLObject):  # type: ignore
+    """Email
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8E3CA7EE``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x8e3ca7ee
+    QUALNAME = "types.SecureValueTypeEmail"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeEmail":
+        # No flags
+
+        return SecureValueTypeEmail()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_identity_card.py b/pyrogram/raw/types/secure_value_type_identity_card.py
new file mode 100644
index 00000000..255a6c17
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_identity_card.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeIdentityCard(TLObject):  # type: ignore
+    """Identity card
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A0D0744B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa0d0744b
+    QUALNAME = "types.SecureValueTypeIdentityCard"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeIdentityCard":
+        # No flags
+
+        return SecureValueTypeIdentityCard()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_internal_passport.py b/pyrogram/raw/types/secure_value_type_internal_passport.py
new file mode 100644
index 00000000..b927dbae
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_internal_passport.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeInternalPassport(TLObject):  # type: ignore
+    """Internal passport
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``99A48F23``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x99a48f23
+    QUALNAME = "types.SecureValueTypeInternalPassport"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeInternalPassport":
+        # No flags
+
+        return SecureValueTypeInternalPassport()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_passport.py b/pyrogram/raw/types/secure_value_type_passport.py
new file mode 100644
index 00000000..aaea33fd
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_passport.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypePassport(TLObject):  # type: ignore
+    """Passport
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3DAC6A00``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x3dac6a00
+    QUALNAME = "types.SecureValueTypePassport"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypePassport":
+        # No flags
+
+        return SecureValueTypePassport()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_passport_registration.py b/pyrogram/raw/types/secure_value_type_passport_registration.py
new file mode 100644
index 00000000..2ee49b64
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_passport_registration.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypePassportRegistration(TLObject):  # type: ignore
+    """Internal registration passport
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``99E3806A``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x99e3806a
+    QUALNAME = "types.SecureValueTypePassportRegistration"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypePassportRegistration":
+        # No flags
+
+        return SecureValueTypePassportRegistration()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_personal_details.py b/pyrogram/raw/types/secure_value_type_personal_details.py
new file mode 100644
index 00000000..0b915e27
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_personal_details.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypePersonalDetails(TLObject):  # type: ignore
+    """Personal details
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9D2A81E3``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x9d2a81e3
+    QUALNAME = "types.SecureValueTypePersonalDetails"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypePersonalDetails":
+        # No flags
+
+        return SecureValueTypePersonalDetails()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_phone.py b/pyrogram/raw/types/secure_value_type_phone.py
new file mode 100644
index 00000000..8f158915
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_phone.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypePhone(TLObject):  # type: ignore
+    """Phone
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B320AADB``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xb320aadb
+    QUALNAME = "types.SecureValueTypePhone"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypePhone":
+        # No flags
+
+        return SecureValueTypePhone()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_rental_agreement.py b/pyrogram/raw/types/secure_value_type_rental_agreement.py
new file mode 100644
index 00000000..09845096
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_rental_agreement.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeRentalAgreement(TLObject):  # type: ignore
+    """Rental agreement
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8B883488``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x8b883488
+    QUALNAME = "types.SecureValueTypeRentalAgreement"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeRentalAgreement":
+        # No flags
+
+        return SecureValueTypeRentalAgreement()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_temporary_registration.py b/pyrogram/raw/types/secure_value_type_temporary_registration.py
new file mode 100644
index 00000000..d98d7f54
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_temporary_registration.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeTemporaryRegistration(TLObject):  # type: ignore
+    """Temporary registration
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EA02EC33``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xea02ec33
+    QUALNAME = "types.SecureValueTypeTemporaryRegistration"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeTemporaryRegistration":
+        # No flags
+
+        return SecureValueTypeTemporaryRegistration()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/secure_value_type_utility_bill.py b/pyrogram/raw/types/secure_value_type_utility_bill.py
new file mode 100644
index 00000000..1eae7f8b
--- /dev/null
+++ b/pyrogram/raw/types/secure_value_type_utility_bill.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SecureValueTypeUtilityBill(TLObject):  # type: ignore
+    """Utility bill
+
+    Constructor of :obj:`~pyrogram.raw.base.SecureValueType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FC36954E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfc36954e
+    QUALNAME = "types.SecureValueTypeUtilityBill"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SecureValueTypeUtilityBill":
+        # No flags
+
+        return SecureValueTypeUtilityBill()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_as_peer.py b/pyrogram/raw/types/send_as_peer.py
new file mode 100644
index 00000000..ad5faa29
--- /dev/null
+++ b/pyrogram/raw/types/send_as_peer.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendAsPeer(TLObject):  # type: ignore
+    """Indicates a peer that can be used to send messages
+
+    Constructor of :obj:`~pyrogram.raw.base.SendAsPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B81C7034``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        premium_required (``bool``, *optional*):
+            Whether a Telegram Premium account is required to send messages as this peer
+
+    """
+
+    __slots__: List[str] = ["peer", "premium_required"]
+
+    ID = 0xb81c7034
+    QUALNAME = "types.SendAsPeer"
+
+    def __init__(self, *, peer: "raw.base.Peer", premium_required: Optional[bool] = None) -> None:
+        self.peer = peer  # Peer
+        self.premium_required = premium_required  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendAsPeer":
+
+        flags = Int.read(b)
+
+        premium_required = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        return SendAsPeer(peer=peer, premium_required=premium_required)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.premium_required else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_cancel_action.py b/pyrogram/raw/types/send_message_cancel_action.py
new file mode 100644
index 00000000..688b0b10
--- /dev/null
+++ b/pyrogram/raw/types/send_message_cancel_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageCancelAction(TLObject):  # type: ignore
+    """Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FD5EC8F5``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfd5ec8f5
+    QUALNAME = "types.SendMessageCancelAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageCancelAction":
+        # No flags
+
+        return SendMessageCancelAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_choose_contact_action.py b/pyrogram/raw/types/send_message_choose_contact_action.py
new file mode 100644
index 00000000..b5a58dd8
--- /dev/null
+++ b/pyrogram/raw/types/send_message_choose_contact_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageChooseContactAction(TLObject):  # type: ignore
+    """User is selecting a contact to share.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``628CBC6F``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x628cbc6f
+    QUALNAME = "types.SendMessageChooseContactAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageChooseContactAction":
+        # No flags
+
+        return SendMessageChooseContactAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_choose_sticker_action.py b/pyrogram/raw/types/send_message_choose_sticker_action.py
new file mode 100644
index 00000000..99752ff1
--- /dev/null
+++ b/pyrogram/raw/types/send_message_choose_sticker_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageChooseStickerAction(TLObject):  # type: ignore
+    """User is choosing a sticker
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B05AC6B1``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xb05ac6b1
+    QUALNAME = "types.SendMessageChooseStickerAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageChooseStickerAction":
+        # No flags
+
+        return SendMessageChooseStickerAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_emoji_interaction.py b/pyrogram/raw/types/send_message_emoji_interaction.py
new file mode 100644
index 00000000..9b566fc0
--- /dev/null
+++ b/pyrogram/raw/types/send_message_emoji_interaction.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageEmojiInteraction(TLObject):  # type: ignore
+    """User has clicked on an animated emoji triggering a reaction, click here for more info ».
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``25972BCB``
+
+    Parameters:
+        emoticon (``str``):
+            Emoji
+
+        msg_id (``int`` ``32-bit``):
+            Message ID of the animated emoji that was clicked
+
+        interaction (:obj:`DataJSON `):
+            A JSON object with interaction info, click here for more info »
+
+    """
+
+    __slots__: List[str] = ["emoticon", "msg_id", "interaction"]
+
+    ID = 0x25972bcb
+    QUALNAME = "types.SendMessageEmojiInteraction"
+
+    def __init__(self, *, emoticon: str, msg_id: int, interaction: "raw.base.DataJSON") -> None:
+        self.emoticon = emoticon  # string
+        self.msg_id = msg_id  # int
+        self.interaction = interaction  # DataJSON
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageEmojiInteraction":
+        # No flags
+
+        emoticon = String.read(b)
+
+        msg_id = Int.read(b)
+
+        interaction = TLObject.read(b)
+
+        return SendMessageEmojiInteraction(emoticon=emoticon, msg_id=msg_id, interaction=interaction)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.emoticon))
+
+        b.write(Int(self.msg_id))
+
+        b.write(self.interaction.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_emoji_interaction_seen.py b/pyrogram/raw/types/send_message_emoji_interaction_seen.py
new file mode 100644
index 00000000..c8c120a3
--- /dev/null
+++ b/pyrogram/raw/types/send_message_emoji_interaction_seen.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageEmojiInteractionSeen(TLObject):  # type: ignore
+    """User is watching an animated emoji reaction triggered by another user, click here for more info ».
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B665902E``
+
+    Parameters:
+        emoticon (``str``):
+            Emoji
+
+    """
+
+    __slots__: List[str] = ["emoticon"]
+
+    ID = 0xb665902e
+    QUALNAME = "types.SendMessageEmojiInteractionSeen"
+
+    def __init__(self, *, emoticon: str) -> None:
+        self.emoticon = emoticon  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageEmojiInteractionSeen":
+        # No flags
+
+        emoticon = String.read(b)
+
+        return SendMessageEmojiInteractionSeen(emoticon=emoticon)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.emoticon))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_game_play_action.py b/pyrogram/raw/types/send_message_game_play_action.py
new file mode 100644
index 00000000..b075560f
--- /dev/null
+++ b/pyrogram/raw/types/send_message_game_play_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageGamePlayAction(TLObject):  # type: ignore
+    """User is playing a game
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DD6A8F48``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xdd6a8f48
+    QUALNAME = "types.SendMessageGamePlayAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageGamePlayAction":
+        # No flags
+
+        return SendMessageGamePlayAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_geo_location_action.py b/pyrogram/raw/types/send_message_geo_location_action.py
new file mode 100644
index 00000000..052b1ddc
--- /dev/null
+++ b/pyrogram/raw/types/send_message_geo_location_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageGeoLocationAction(TLObject):  # type: ignore
+    """User is selecting a location to share.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``176F8BA1``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x176f8ba1
+    QUALNAME = "types.SendMessageGeoLocationAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageGeoLocationAction":
+        # No flags
+
+        return SendMessageGeoLocationAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_history_import_action.py b/pyrogram/raw/types/send_message_history_import_action.py
new file mode 100644
index 00000000..9d104371
--- /dev/null
+++ b/pyrogram/raw/types/send_message_history_import_action.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageHistoryImportAction(TLObject):  # type: ignore
+    """Chat history is being imported
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DBDA9246``
+
+    Parameters:
+        progress (``int`` ``32-bit``):
+            Progress percentage
+
+    """
+
+    __slots__: List[str] = ["progress"]
+
+    ID = 0xdbda9246
+    QUALNAME = "types.SendMessageHistoryImportAction"
+
+    def __init__(self, *, progress: int) -> None:
+        self.progress = progress  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageHistoryImportAction":
+        # No flags
+
+        progress = Int.read(b)
+
+        return SendMessageHistoryImportAction(progress=progress)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.progress))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_record_audio_action.py b/pyrogram/raw/types/send_message_record_audio_action.py
new file mode 100644
index 00000000..53728eb4
--- /dev/null
+++ b/pyrogram/raw/types/send_message_record_audio_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageRecordAudioAction(TLObject):  # type: ignore
+    """User is recording a voice message.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D52F73F7``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xd52f73f7
+    QUALNAME = "types.SendMessageRecordAudioAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageRecordAudioAction":
+        # No flags
+
+        return SendMessageRecordAudioAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_record_round_action.py b/pyrogram/raw/types/send_message_record_round_action.py
new file mode 100644
index 00000000..8de6def4
--- /dev/null
+++ b/pyrogram/raw/types/send_message_record_round_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageRecordRoundAction(TLObject):  # type: ignore
+    """User is recording a round video to share
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``88F27FBC``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x88f27fbc
+    QUALNAME = "types.SendMessageRecordRoundAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageRecordRoundAction":
+        # No flags
+
+        return SendMessageRecordRoundAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_record_video_action.py b/pyrogram/raw/types/send_message_record_video_action.py
new file mode 100644
index 00000000..bb5475d0
--- /dev/null
+++ b/pyrogram/raw/types/send_message_record_video_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageRecordVideoAction(TLObject):  # type: ignore
+    """User is recording a video.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A187D66F``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa187d66f
+    QUALNAME = "types.SendMessageRecordVideoAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageRecordVideoAction":
+        # No flags
+
+        return SendMessageRecordVideoAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_text_draft_action.py b/pyrogram/raw/types/send_message_text_draft_action.py
new file mode 100644
index 00000000..3978f8a1
--- /dev/null
+++ b/pyrogram/raw/types/send_message_text_draft_action.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageTextDraftAction(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``376D975C``
+
+    Parameters:
+        random_id (``int`` ``64-bit``):
+            N/A
+
+        text (:obj:`TextWithEntities `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["random_id", "text"]
+
+    ID = 0x376d975c
+    QUALNAME = "types.SendMessageTextDraftAction"
+
+    def __init__(self, *, random_id: int, text: "raw.base.TextWithEntities") -> None:
+        self.random_id = random_id  # long
+        self.text = text  # TextWithEntities
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageTextDraftAction":
+        # No flags
+
+        random_id = Long.read(b)
+
+        text = TLObject.read(b)
+
+        return SendMessageTextDraftAction(random_id=random_id, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.random_id))
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_typing_action.py b/pyrogram/raw/types/send_message_typing_action.py
new file mode 100644
index 00000000..811f5140
--- /dev/null
+++ b/pyrogram/raw/types/send_message_typing_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageTypingAction(TLObject):  # type: ignore
+    """User is typing.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``16BF744E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x16bf744e
+    QUALNAME = "types.SendMessageTypingAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageTypingAction":
+        # No flags
+
+        return SendMessageTypingAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_upload_audio_action.py b/pyrogram/raw/types/send_message_upload_audio_action.py
new file mode 100644
index 00000000..33f83603
--- /dev/null
+++ b/pyrogram/raw/types/send_message_upload_audio_action.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageUploadAudioAction(TLObject):  # type: ignore
+    """User is uploading a voice message.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F351D7AB``
+
+    Parameters:
+        progress (``int`` ``32-bit``):
+            Progress percentage
+
+    """
+
+    __slots__: List[str] = ["progress"]
+
+    ID = 0xf351d7ab
+    QUALNAME = "types.SendMessageUploadAudioAction"
+
+    def __init__(self, *, progress: int) -> None:
+        self.progress = progress  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageUploadAudioAction":
+        # No flags
+
+        progress = Int.read(b)
+
+        return SendMessageUploadAudioAction(progress=progress)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.progress))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_upload_document_action.py b/pyrogram/raw/types/send_message_upload_document_action.py
new file mode 100644
index 00000000..2d4df4f5
--- /dev/null
+++ b/pyrogram/raw/types/send_message_upload_document_action.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageUploadDocumentAction(TLObject):  # type: ignore
+    """User is uploading a file.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AA0CD9E4``
+
+    Parameters:
+        progress (``int`` ``32-bit``):
+            Progress percentage
+
+    """
+
+    __slots__: List[str] = ["progress"]
+
+    ID = 0xaa0cd9e4
+    QUALNAME = "types.SendMessageUploadDocumentAction"
+
+    def __init__(self, *, progress: int) -> None:
+        self.progress = progress  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageUploadDocumentAction":
+        # No flags
+
+        progress = Int.read(b)
+
+        return SendMessageUploadDocumentAction(progress=progress)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.progress))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_upload_photo_action.py b/pyrogram/raw/types/send_message_upload_photo_action.py
new file mode 100644
index 00000000..3a0fb68c
--- /dev/null
+++ b/pyrogram/raw/types/send_message_upload_photo_action.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageUploadPhotoAction(TLObject):  # type: ignore
+    """User is uploading a photo.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D1D34A26``
+
+    Parameters:
+        progress (``int`` ``32-bit``):
+            Progress percentage
+
+    """
+
+    __slots__: List[str] = ["progress"]
+
+    ID = 0xd1d34a26
+    QUALNAME = "types.SendMessageUploadPhotoAction"
+
+    def __init__(self, *, progress: int) -> None:
+        self.progress = progress  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageUploadPhotoAction":
+        # No flags
+
+        progress = Int.read(b)
+
+        return SendMessageUploadPhotoAction(progress=progress)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.progress))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_upload_round_action.py b/pyrogram/raw/types/send_message_upload_round_action.py
new file mode 100644
index 00000000..2595cd92
--- /dev/null
+++ b/pyrogram/raw/types/send_message_upload_round_action.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageUploadRoundAction(TLObject):  # type: ignore
+    """User is uploading a round video
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``243E1C66``
+
+    Parameters:
+        progress (``int`` ``32-bit``):
+            Progress percentage
+
+    """
+
+    __slots__: List[str] = ["progress"]
+
+    ID = 0x243e1c66
+    QUALNAME = "types.SendMessageUploadRoundAction"
+
+    def __init__(self, *, progress: int) -> None:
+        self.progress = progress  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageUploadRoundAction":
+        # No flags
+
+        progress = Int.read(b)
+
+        return SendMessageUploadRoundAction(progress=progress)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.progress))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/send_message_upload_video_action.py b/pyrogram/raw/types/send_message_upload_video_action.py
new file mode 100644
index 00000000..8e2134e5
--- /dev/null
+++ b/pyrogram/raw/types/send_message_upload_video_action.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SendMessageUploadVideoAction(TLObject):  # type: ignore
+    """User is uploading a video.
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E9763AEC``
+
+    Parameters:
+        progress (``int`` ``32-bit``):
+            Progress percentage
+
+    """
+
+    __slots__: List[str] = ["progress"]
+
+    ID = 0xe9763aec
+    QUALNAME = "types.SendMessageUploadVideoAction"
+
+    def __init__(self, *, progress: int) -> None:
+        self.progress = progress  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SendMessageUploadVideoAction":
+        # No flags
+
+        progress = Int.read(b)
+
+        return SendMessageUploadVideoAction(progress=progress)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.progress))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/server_dh_inner_data.py b/pyrogram/raw/types/server_dh_inner_data.py
new file mode 100644
index 00000000..2d64ca5a
--- /dev/null
+++ b/pyrogram/raw/types/server_dh_inner_data.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ServerDHInnerData(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ServerDHInnerData`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B5890DBA``
+
+    Parameters:
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        g (``int`` ``32-bit``):
+            N/A
+
+        dh_prime (``bytes``):
+            N/A
+
+        g_a (``bytes``):
+            N/A
+
+        server_time (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["nonce", "server_nonce", "g", "dh_prime", "g_a", "server_time"]
+
+    ID = 0xb5890dba
+    QUALNAME = "types.ServerDHInnerData"
+
+    def __init__(self, *, nonce: int, server_nonce: int, g: int, dh_prime: bytes, g_a: bytes, server_time: int) -> None:
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.g = g  # int
+        self.dh_prime = dh_prime  # bytes
+        self.g_a = g_a  # bytes
+        self.server_time = server_time  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ServerDHInnerData":
+        # No flags
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        g = Int.read(b)
+
+        dh_prime = Bytes.read(b)
+
+        g_a = Bytes.read(b)
+
+        server_time = Int.read(b)
+
+        return ServerDHInnerData(nonce=nonce, server_nonce=server_nonce, g=g, dh_prime=dh_prime, g_a=g_a, server_time=server_time)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Int(self.g))
+
+        b.write(Bytes(self.dh_prime))
+
+        b.write(Bytes(self.g_a))
+
+        b.write(Int(self.server_time))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/server_dh_params_fail.py b/pyrogram/raw/types/server_dh_params_fail.py
new file mode 100644
index 00000000..372ce49d
--- /dev/null
+++ b/pyrogram/raw/types/server_dh_params_fail.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ServerDHParamsFail(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ServerDHParams`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``79CB045D``
+
+    Parameters:
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        new_nonce_hash (``int`` ``128-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            ReqDHParams
+    """
+
+    __slots__: List[str] = ["nonce", "server_nonce", "new_nonce_hash"]
+
+    ID = 0x79cb045d
+    QUALNAME = "types.ServerDHParamsFail"
+
+    def __init__(self, *, nonce: int, server_nonce: int, new_nonce_hash: int) -> None:
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.new_nonce_hash = new_nonce_hash  # int128
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ServerDHParamsFail":
+        # No flags
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        new_nonce_hash = Int128.read(b)
+
+        return ServerDHParamsFail(nonce=nonce, server_nonce=server_nonce, new_nonce_hash=new_nonce_hash)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Int128(self.new_nonce_hash))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/server_dh_params_ok.py b/pyrogram/raw/types/server_dh_params_ok.py
new file mode 100644
index 00000000..ff0eac95
--- /dev/null
+++ b/pyrogram/raw/types/server_dh_params_ok.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ServerDHParamsOk(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.ServerDHParams`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D0E8075C``
+
+    Parameters:
+        nonce (``int`` ``128-bit``):
+            N/A
+
+        server_nonce (``int`` ``128-bit``):
+            N/A
+
+        encrypted_answer (``bytes``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            ReqDHParams
+    """
+
+    __slots__: List[str] = ["nonce", "server_nonce", "encrypted_answer"]
+
+    ID = 0xd0e8075c
+    QUALNAME = "types.ServerDHParamsOk"
+
+    def __init__(self, *, nonce: int, server_nonce: int, encrypted_answer: bytes) -> None:
+        self.nonce = nonce  # int128
+        self.server_nonce = server_nonce  # int128
+        self.encrypted_answer = encrypted_answer  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ServerDHParamsOk":
+        # No flags
+
+        nonce = Int128.read(b)
+
+        server_nonce = Int128.read(b)
+
+        encrypted_answer = Bytes.read(b)
+
+        return ServerDHParamsOk(nonce=nonce, server_nonce=server_nonce, encrypted_answer=encrypted_answer)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int128(self.nonce))
+
+        b.write(Int128(self.server_nonce))
+
+        b.write(Bytes(self.encrypted_answer))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/shipping_option.py b/pyrogram/raw/types/shipping_option.py
new file mode 100644
index 00000000..c5889db5
--- /dev/null
+++ b/pyrogram/raw/types/shipping_option.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ShippingOption(TLObject):  # type: ignore
+    """Shipping option
+
+    Constructor of :obj:`~pyrogram.raw.base.ShippingOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B6213CDF``
+
+    Parameters:
+        id (``str``):
+            Option ID
+
+        title (``str``):
+            Title
+
+        prices (List of :obj:`LabeledPrice `):
+            List of price portions
+
+    """
+
+    __slots__: List[str] = ["id", "title", "prices"]
+
+    ID = 0xb6213cdf
+    QUALNAME = "types.ShippingOption"
+
+    def __init__(self, *, id: str, title: str, prices: List["raw.base.LabeledPrice"]) -> None:
+        self.id = id  # string
+        self.title = title  # string
+        self.prices = prices  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ShippingOption":
+        # No flags
+
+        id = String.read(b)
+
+        title = String.read(b)
+
+        prices = TLObject.read(b)
+
+        return ShippingOption(id=id, title=title, prices=prices)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.id))
+
+        b.write(String(self.title))
+
+        b.write(Vector(self.prices))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sms_job.py b/pyrogram/raw/types/sms_job.py
new file mode 100644
index 00000000..bed01a58
--- /dev/null
+++ b/pyrogram/raw/types/sms_job.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SmsJob(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.SmsJob`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E6A1EEB8``
+
+    Parameters:
+        job_id (``str``):
+
+
+        phone_number (``str``):
+
+
+        text (``str``):
+
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            smsjobs.GetSmsJob
+    """
+
+    __slots__: List[str] = ["job_id", "phone_number", "text"]
+
+    ID = 0xe6a1eeb8
+    QUALNAME = "types.SmsJob"
+
+    def __init__(self, *, job_id: str, phone_number: str, text: str) -> None:
+        self.job_id = job_id  # string
+        self.phone_number = phone_number  # string
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SmsJob":
+        # No flags
+
+        job_id = String.read(b)
+
+        phone_number = String.read(b)
+
+        text = String.read(b)
+
+        return SmsJob(job_id=job_id, phone_number=phone_number, text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.job_id))
+
+        b.write(String(self.phone_number))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/smsjobs/__init__.py b/pyrogram/raw/types/smsjobs/__init__.py
new file mode 100644
index 00000000..42ba71d7
--- /dev/null
+++ b/pyrogram/raw/types/smsjobs/__init__.py
@@ -0,0 +1,35 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .eligible_to_join import EligibleToJoin
+from .status import Status
+
+
+__all__ = [
+    "EligibleToJoin",
+    "Status",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/smsjobs/eligible_to_join.py b/pyrogram/raw/types/smsjobs/eligible_to_join.py
new file mode 100644
index 00000000..fa05d96c
--- /dev/null
+++ b/pyrogram/raw/types/smsjobs/eligible_to_join.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class EligibleToJoin(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.smsjobs.EligibilityToJoin`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DC8B44CF``
+
+    Parameters:
+        terms_url (``str``):
+
+
+        monthly_sent_sms (``int`` ``32-bit``):
+
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            smsjobs.IsEligibleToJoin
+    """
+
+    __slots__: List[str] = ["terms_url", "monthly_sent_sms"]
+
+    ID = 0xdc8b44cf
+    QUALNAME = "types.smsjobs.EligibleToJoin"
+
+    def __init__(self, *, terms_url: str, monthly_sent_sms: int) -> None:
+        self.terms_url = terms_url  # string
+        self.monthly_sent_sms = monthly_sent_sms  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "EligibleToJoin":
+        # No flags
+
+        terms_url = String.read(b)
+
+        monthly_sent_sms = Int.read(b)
+
+        return EligibleToJoin(terms_url=terms_url, monthly_sent_sms=monthly_sent_sms)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.terms_url))
+
+        b.write(Int(self.monthly_sent_sms))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/smsjobs/status.py b/pyrogram/raw/types/smsjobs/status.py
new file mode 100644
index 00000000..77832364
--- /dev/null
+++ b/pyrogram/raw/types/smsjobs/status.py
@@ -0,0 +1,120 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Status(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.smsjobs.Status`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2AEE9191``
+
+    Parameters:
+        recent_sent (``int`` ``32-bit``):
+
+
+        recent_since (``int`` ``32-bit``):
+
+
+        recent_remains (``int`` ``32-bit``):
+
+
+        total_sent (``int`` ``32-bit``):
+
+
+        total_since (``int`` ``32-bit``):
+
+
+        terms_url (``str``):
+
+
+        allow_international (``bool``, *optional*):
+
+
+        last_gift_slug (``str``, *optional*):
+
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            smsjobs.GetStatus
+    """
+
+    __slots__: List[str] = ["recent_sent", "recent_since", "recent_remains", "total_sent", "total_since", "terms_url", "allow_international", "last_gift_slug"]
+
+    ID = 0x2aee9191
+    QUALNAME = "types.smsjobs.Status"
+
+    def __init__(self, *, recent_sent: int, recent_since: int, recent_remains: int, total_sent: int, total_since: int, terms_url: str, allow_international: Optional[bool] = None, last_gift_slug: Optional[str] = None) -> None:
+        self.recent_sent = recent_sent  # int
+        self.recent_since = recent_since  # int
+        self.recent_remains = recent_remains  # int
+        self.total_sent = total_sent  # int
+        self.total_since = total_since  # int
+        self.terms_url = terms_url  # string
+        self.allow_international = allow_international  # flags.0?true
+        self.last_gift_slug = last_gift_slug  # flags.1?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Status":
+
+        flags = Int.read(b)
+
+        allow_international = True if flags & (1 << 0) else False
+        recent_sent = Int.read(b)
+
+        recent_since = Int.read(b)
+
+        recent_remains = Int.read(b)
+
+        total_sent = Int.read(b)
+
+        total_since = Int.read(b)
+
+        last_gift_slug = String.read(b) if flags & (1 << 1) else None
+        terms_url = String.read(b)
+
+        return Status(recent_sent=recent_sent, recent_since=recent_since, recent_remains=recent_remains, total_sent=total_sent, total_since=total_since, terms_url=terms_url, allow_international=allow_international, last_gift_slug=last_gift_slug)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.allow_international else 0
+        flags |= (1 << 1) if self.last_gift_slug is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.recent_sent))
+
+        b.write(Int(self.recent_since))
+
+        b.write(Int(self.recent_remains))
+
+        b.write(Int(self.total_sent))
+
+        b.write(Int(self.total_since))
+
+        if self.last_gift_slug is not None:
+            b.write(String(self.last_gift_slug))
+
+        b.write(String(self.terms_url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/speaking_in_group_call_action.py b/pyrogram/raw/types/speaking_in_group_call_action.py
new file mode 100644
index 00000000..078399d3
--- /dev/null
+++ b/pyrogram/raw/types/speaking_in_group_call_action.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SpeakingInGroupCallAction(TLObject):  # type: ignore
+    """User is currently speaking in the group call
+
+    Constructor of :obj:`~pyrogram.raw.base.SendMessageAction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D92C2285``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xd92c2285
+    QUALNAME = "types.SpeakingInGroupCallAction"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SpeakingInGroupCallAction":
+        # No flags
+
+        return SpeakingInGroupCallAction()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sponsored_message.py b/pyrogram/raw/types/sponsored_message.py
new file mode 100644
index 00000000..eaa3e187
--- /dev/null
+++ b/pyrogram/raw/types/sponsored_message.py
@@ -0,0 +1,176 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SponsoredMessage(TLObject):  # type: ignore
+    """A sponsored message.
+
+    Constructor of :obj:`~pyrogram.raw.base.SponsoredMessage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7DBF8673``
+
+    Parameters:
+        random_id (``bytes``):
+            Message ID
+
+        url (``str``):
+
+
+        title (``str``):
+
+
+        message (``str``):
+            Sponsored message
+
+        button_text (``str``):
+            Text of the sponsored message button.
+
+        recommended (``bool``, *optional*):
+            Whether the message needs to be labeled as "recommended" instead of "sponsored"
+
+        can_report (``bool``, *optional*):
+
+
+        entities (List of :obj:`MessageEntity `, *optional*):
+            Message entities for styled text
+
+        photo (:obj:`Photo `, *optional*):
+
+
+        media (:obj:`MessageMedia `, *optional*):
+            N/A
+
+        color (:obj:`PeerColor `, *optional*):
+
+
+        sponsor_info (``str``, *optional*):
+            If set, contains additional information about the sponsor to be shown along with the message.
+
+        additional_info (``str``, *optional*):
+            If set, contains additional information about the sponsored message to be shown along with the message.
+
+        min_display_duration (``int`` ``32-bit``, *optional*):
+            N/A
+
+        max_display_duration (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["random_id", "url", "title", "message", "button_text", "recommended", "can_report", "entities", "photo", "media", "color", "sponsor_info", "additional_info", "min_display_duration", "max_display_duration"]
+
+    ID = 0x7dbf8673
+    QUALNAME = "types.SponsoredMessage"
+
+    def __init__(self, *, random_id: bytes, url: str, title: str, message: str, button_text: str, recommended: Optional[bool] = None, can_report: Optional[bool] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, photo: "raw.base.Photo" = None, media: "raw.base.MessageMedia" = None, color: "raw.base.PeerColor" = None, sponsor_info: Optional[str] = None, additional_info: Optional[str] = None, min_display_duration: Optional[int] = None, max_display_duration: Optional[int] = None) -> None:
+        self.random_id = random_id  # bytes
+        self.url = url  # string
+        self.title = title  # string
+        self.message = message  # string
+        self.button_text = button_text  # string
+        self.recommended = recommended  # flags.5?true
+        self.can_report = can_report  # flags.12?true
+        self.entities = entities  # flags.1?Vector
+        self.photo = photo  # flags.6?Photo
+        self.media = media  # flags.14?MessageMedia
+        self.color = color  # flags.13?PeerColor
+        self.sponsor_info = sponsor_info  # flags.7?string
+        self.additional_info = additional_info  # flags.8?string
+        self.min_display_duration = min_display_duration  # flags.15?int
+        self.max_display_duration = max_display_duration  # flags.15?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SponsoredMessage":
+
+        flags = Int.read(b)
+
+        recommended = True if flags & (1 << 5) else False
+        can_report = True if flags & (1 << 12) else False
+        random_id = Bytes.read(b)
+
+        url = String.read(b)
+
+        title = String.read(b)
+
+        message = String.read(b)
+
+        entities = TLObject.read(b) if flags & (1 << 1) else []
+
+        photo = TLObject.read(b) if flags & (1 << 6) else None
+
+        media = TLObject.read(b) if flags & (1 << 14) else None
+
+        color = TLObject.read(b) if flags & (1 << 13) else None
+
+        button_text = String.read(b)
+
+        sponsor_info = String.read(b) if flags & (1 << 7) else None
+        additional_info = String.read(b) if flags & (1 << 8) else None
+        min_display_duration = Int.read(b) if flags & (1 << 15) else None
+        max_display_duration = Int.read(b) if flags & (1 << 15) else None
+        return SponsoredMessage(random_id=random_id, url=url, title=title, message=message, button_text=button_text, recommended=recommended, can_report=can_report, entities=entities, photo=photo, media=media, color=color, sponsor_info=sponsor_info, additional_info=additional_info, min_display_duration=min_display_duration, max_display_duration=max_display_duration)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 5) if self.recommended else 0
+        flags |= (1 << 12) if self.can_report else 0
+        flags |= (1 << 1) if self.entities else 0
+        flags |= (1 << 6) if self.photo is not None else 0
+        flags |= (1 << 14) if self.media is not None else 0
+        flags |= (1 << 13) if self.color is not None else 0
+        flags |= (1 << 7) if self.sponsor_info is not None else 0
+        flags |= (1 << 8) if self.additional_info is not None else 0
+        flags |= (1 << 15) if self.min_display_duration is not None else 0
+        flags |= (1 << 15) if self.max_display_duration is not None else 0
+        b.write(Int(flags))
+
+        b.write(Bytes(self.random_id))
+
+        b.write(String(self.url))
+
+        b.write(String(self.title))
+
+        b.write(String(self.message))
+
+        if self.entities is not None:
+            b.write(Vector(self.entities))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        if self.media is not None:
+            b.write(self.media.write())
+
+        if self.color is not None:
+            b.write(self.color.write())
+
+        b.write(String(self.button_text))
+
+        if self.sponsor_info is not None:
+            b.write(String(self.sponsor_info))
+
+        if self.additional_info is not None:
+            b.write(String(self.additional_info))
+
+        if self.min_display_duration is not None:
+            b.write(Int(self.min_display_duration))
+
+        if self.max_display_duration is not None:
+            b.write(Int(self.max_display_duration))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sponsored_message_report_option.py b/pyrogram/raw/types/sponsored_message_report_option.py
new file mode 100644
index 00000000..b7e60853
--- /dev/null
+++ b/pyrogram/raw/types/sponsored_message_report_option.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SponsoredMessageReportOption(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.SponsoredMessageReportOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``430D3150``
+
+    Parameters:
+        text (``str``):
+
+
+        option (``bytes``):
+
+
+    """
+
+    __slots__: List[str] = ["text", "option"]
+
+    ID = 0x430d3150
+    QUALNAME = "types.SponsoredMessageReportOption"
+
+    def __init__(self, *, text: str, option: bytes) -> None:
+        self.text = text  # string
+        self.option = option  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SponsoredMessageReportOption":
+        # No flags
+
+        text = String.read(b)
+
+        option = Bytes.read(b)
+
+        return SponsoredMessageReportOption(text=text, option=option)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.text))
+
+        b.write(Bytes(self.option))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sponsored_peer.py b/pyrogram/raw/types/sponsored_peer.py
new file mode 100644
index 00000000..050ec578
--- /dev/null
+++ b/pyrogram/raw/types/sponsored_peer.py
@@ -0,0 +1,82 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SponsoredPeer(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.SponsoredPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C69708D3``
+
+    Parameters:
+        random_id (``bytes``):
+            N/A
+
+        peer (:obj:`Peer `):
+            N/A
+
+        sponsor_info (``str``, *optional*):
+            N/A
+
+        additional_info (``str``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["random_id", "peer", "sponsor_info", "additional_info"]
+
+    ID = 0xc69708d3
+    QUALNAME = "types.SponsoredPeer"
+
+    def __init__(self, *, random_id: bytes, peer: "raw.base.Peer", sponsor_info: Optional[str] = None, additional_info: Optional[str] = None) -> None:
+        self.random_id = random_id  # bytes
+        self.peer = peer  # Peer
+        self.sponsor_info = sponsor_info  # flags.0?string
+        self.additional_info = additional_info  # flags.1?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SponsoredPeer":
+
+        flags = Int.read(b)
+
+        random_id = Bytes.read(b)
+
+        peer = TLObject.read(b)
+
+        sponsor_info = String.read(b) if flags & (1 << 0) else None
+        additional_info = String.read(b) if flags & (1 << 1) else None
+        return SponsoredPeer(random_id=random_id, peer=peer, sponsor_info=sponsor_info, additional_info=additional_info)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.sponsor_info is not None else 0
+        flags |= (1 << 1) if self.additional_info is not None else 0
+        b.write(Int(flags))
+
+        b.write(Bytes(self.random_id))
+
+        b.write(self.peer.write())
+
+        if self.sponsor_info is not None:
+            b.write(String(self.sponsor_info))
+
+        if self.additional_info is not None:
+            b.write(String(self.additional_info))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift.py b/pyrogram/raw/types/star_gift.py
new file mode 100644
index 00000000..6f91d153
--- /dev/null
+++ b/pyrogram/raw/types/star_gift.py
@@ -0,0 +1,283 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGift(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGift`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``313A9547``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            N/A
+
+        sticker (:obj:`Document `):
+            N/A
+
+        stars (``int`` ``64-bit``):
+            N/A
+
+        convert_stars (``int`` ``64-bit``):
+            N/A
+
+        limited (``bool``, *optional*):
+            N/A
+
+        sold_out (``bool``, *optional*):
+            N/A
+
+        birthday (``bool``, *optional*):
+            N/A
+
+        can_upgrade (``bool``, *optional*):
+            N/A
+
+        require_premium (``bool``, *optional*):
+            N/A
+
+        limited_per_user (``bool``, *optional*):
+            N/A
+
+        peer_color_available (``bool``, *optional*):
+            N/A
+
+        auction (``bool``, *optional*):
+            N/A
+
+        availability_remains (``int`` ``32-bit``, *optional*):
+            N/A
+
+        availability_total (``int`` ``32-bit``, *optional*):
+            N/A
+
+        availability_resale (``int`` ``64-bit``, *optional*):
+            N/A
+
+        first_sale_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        last_sale_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        upgrade_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        resell_min_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        title (``str``, *optional*):
+            N/A
+
+        released_by (:obj:`Peer `, *optional*):
+            N/A
+
+        per_user_total (``int`` ``32-bit``, *optional*):
+            N/A
+
+        per_user_remains (``int`` ``32-bit``, *optional*):
+            N/A
+
+        locked_until_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        auction_slug (``str``, *optional*):
+            N/A
+
+        gifts_per_round (``int`` ``32-bit``, *optional*):
+            N/A
+
+        auction_start_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        upgrade_variants (``int`` ``32-bit``, *optional*):
+            N/A
+
+        background (:obj:`StarGiftBackground `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "sticker", "stars", "convert_stars", "limited", "sold_out", "birthday", "can_upgrade", "require_premium", "limited_per_user", "peer_color_available", "auction", "availability_remains", "availability_total", "availability_resale", "first_sale_date", "last_sale_date", "upgrade_stars", "resell_min_stars", "title", "released_by", "per_user_total", "per_user_remains", "locked_until_date", "auction_slug", "gifts_per_round", "auction_start_date", "upgrade_variants", "background"]
+
+    ID = 0x313a9547
+    QUALNAME = "types.StarGift"
+
+    def __init__(self, *, id: int, sticker: "raw.base.Document", stars: int, convert_stars: int, limited: Optional[bool] = None, sold_out: Optional[bool] = None, birthday: Optional[bool] = None, can_upgrade: Optional[bool] = None, require_premium: Optional[bool] = None, limited_per_user: Optional[bool] = None, peer_color_available: Optional[bool] = None, auction: Optional[bool] = None, availability_remains: Optional[int] = None, availability_total: Optional[int] = None, availability_resale: Optional[int] = None, first_sale_date: Optional[int] = None, last_sale_date: Optional[int] = None, upgrade_stars: Optional[int] = None, resell_min_stars: Optional[int] = None, title: Optional[str] = None, released_by: "raw.base.Peer" = None, per_user_total: Optional[int] = None, per_user_remains: Optional[int] = None, locked_until_date: Optional[int] = None, auction_slug: Optional[str] = None, gifts_per_round: Optional[int] = None, auction_start_date: Optional[int] = None, upgrade_variants: Optional[int] = None, background: "raw.base.StarGiftBackground" = None) -> None:
+        self.id = id  # long
+        self.sticker = sticker  # Document
+        self.stars = stars  # long
+        self.convert_stars = convert_stars  # long
+        self.limited = limited  # flags.0?true
+        self.sold_out = sold_out  # flags.1?true
+        self.birthday = birthday  # flags.2?true
+        self.can_upgrade = can_upgrade  # flags.3?true
+        self.require_premium = require_premium  # flags.7?true
+        self.limited_per_user = limited_per_user  # flags.8?true
+        self.peer_color_available = peer_color_available  # flags.10?true
+        self.auction = auction  # flags.11?true
+        self.availability_remains = availability_remains  # flags.0?int
+        self.availability_total = availability_total  # flags.0?int
+        self.availability_resale = availability_resale  # flags.4?long
+        self.first_sale_date = first_sale_date  # flags.1?int
+        self.last_sale_date = last_sale_date  # flags.1?int
+        self.upgrade_stars = upgrade_stars  # flags.3?long
+        self.resell_min_stars = resell_min_stars  # flags.4?long
+        self.title = title  # flags.5?string
+        self.released_by = released_by  # flags.6?Peer
+        self.per_user_total = per_user_total  # flags.8?int
+        self.per_user_remains = per_user_remains  # flags.8?int
+        self.locked_until_date = locked_until_date  # flags.9?int
+        self.auction_slug = auction_slug  # flags.11?string
+        self.gifts_per_round = gifts_per_round  # flags.11?int
+        self.auction_start_date = auction_start_date  # flags.11?int
+        self.upgrade_variants = upgrade_variants  # flags.12?int
+        self.background = background  # flags.13?StarGiftBackground
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGift":
+
+        flags = Int.read(b)
+
+        limited = True if flags & (1 << 0) else False
+        sold_out = True if flags & (1 << 1) else False
+        birthday = True if flags & (1 << 2) else False
+        can_upgrade = True if flags & (1 << 3) else False
+        require_premium = True if flags & (1 << 7) else False
+        limited_per_user = True if flags & (1 << 8) else False
+        peer_color_available = True if flags & (1 << 10) else False
+        auction = True if flags & (1 << 11) else False
+        id = Long.read(b)
+
+        sticker = TLObject.read(b)
+
+        stars = Long.read(b)
+
+        availability_remains = Int.read(b) if flags & (1 << 0) else None
+        availability_total = Int.read(b) if flags & (1 << 0) else None
+        availability_resale = Long.read(b) if flags & (1 << 4) else None
+        convert_stars = Long.read(b)
+
+        first_sale_date = Int.read(b) if flags & (1 << 1) else None
+        last_sale_date = Int.read(b) if flags & (1 << 1) else None
+        upgrade_stars = Long.read(b) if flags & (1 << 3) else None
+        resell_min_stars = Long.read(b) if flags & (1 << 4) else None
+        title = String.read(b) if flags & (1 << 5) else None
+        released_by = TLObject.read(b) if flags & (1 << 6) else None
+
+        per_user_total = Int.read(b) if flags & (1 << 8) else None
+        per_user_remains = Int.read(b) if flags & (1 << 8) else None
+        locked_until_date = Int.read(b) if flags & (1 << 9) else None
+        auction_slug = String.read(b) if flags & (1 << 11) else None
+        gifts_per_round = Int.read(b) if flags & (1 << 11) else None
+        auction_start_date = Int.read(b) if flags & (1 << 11) else None
+        upgrade_variants = Int.read(b) if flags & (1 << 12) else None
+        background = TLObject.read(b) if flags & (1 << 13) else None
+
+        return StarGift(id=id, sticker=sticker, stars=stars, convert_stars=convert_stars, limited=limited, sold_out=sold_out, birthday=birthday, can_upgrade=can_upgrade, require_premium=require_premium, limited_per_user=limited_per_user, peer_color_available=peer_color_available, auction=auction, availability_remains=availability_remains, availability_total=availability_total, availability_resale=availability_resale, first_sale_date=first_sale_date, last_sale_date=last_sale_date, upgrade_stars=upgrade_stars, resell_min_stars=resell_min_stars, title=title, released_by=released_by, per_user_total=per_user_total, per_user_remains=per_user_remains, locked_until_date=locked_until_date, auction_slug=auction_slug, gifts_per_round=gifts_per_round, auction_start_date=auction_start_date, upgrade_variants=upgrade_variants, background=background)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.limited else 0
+        flags |= (1 << 1) if self.sold_out else 0
+        flags |= (1 << 2) if self.birthday else 0
+        flags |= (1 << 3) if self.can_upgrade else 0
+        flags |= (1 << 7) if self.require_premium else 0
+        flags |= (1 << 8) if self.limited_per_user else 0
+        flags |= (1 << 10) if self.peer_color_available else 0
+        flags |= (1 << 11) if self.auction else 0
+        flags |= (1 << 0) if self.availability_remains is not None else 0
+        flags |= (1 << 0) if self.availability_total is not None else 0
+        flags |= (1 << 4) if self.availability_resale is not None else 0
+        flags |= (1 << 1) if self.first_sale_date is not None else 0
+        flags |= (1 << 1) if self.last_sale_date is not None else 0
+        flags |= (1 << 3) if self.upgrade_stars is not None else 0
+        flags |= (1 << 4) if self.resell_min_stars is not None else 0
+        flags |= (1 << 5) if self.title is not None else 0
+        flags |= (1 << 6) if self.released_by is not None else 0
+        flags |= (1 << 8) if self.per_user_total is not None else 0
+        flags |= (1 << 8) if self.per_user_remains is not None else 0
+        flags |= (1 << 9) if self.locked_until_date is not None else 0
+        flags |= (1 << 11) if self.auction_slug is not None else 0
+        flags |= (1 << 11) if self.gifts_per_round is not None else 0
+        flags |= (1 << 11) if self.auction_start_date is not None else 0
+        flags |= (1 << 12) if self.upgrade_variants is not None else 0
+        flags |= (1 << 13) if self.background is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(self.sticker.write())
+
+        b.write(Long(self.stars))
+
+        if self.availability_remains is not None:
+            b.write(Int(self.availability_remains))
+
+        if self.availability_total is not None:
+            b.write(Int(self.availability_total))
+
+        if self.availability_resale is not None:
+            b.write(Long(self.availability_resale))
+
+        b.write(Long(self.convert_stars))
+
+        if self.first_sale_date is not None:
+            b.write(Int(self.first_sale_date))
+
+        if self.last_sale_date is not None:
+            b.write(Int(self.last_sale_date))
+
+        if self.upgrade_stars is not None:
+            b.write(Long(self.upgrade_stars))
+
+        if self.resell_min_stars is not None:
+            b.write(Long(self.resell_min_stars))
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.released_by is not None:
+            b.write(self.released_by.write())
+
+        if self.per_user_total is not None:
+            b.write(Int(self.per_user_total))
+
+        if self.per_user_remains is not None:
+            b.write(Int(self.per_user_remains))
+
+        if self.locked_until_date is not None:
+            b.write(Int(self.locked_until_date))
+
+        if self.auction_slug is not None:
+            b.write(String(self.auction_slug))
+
+        if self.gifts_per_round is not None:
+            b.write(Int(self.gifts_per_round))
+
+        if self.auction_start_date is not None:
+            b.write(Int(self.auction_start_date))
+
+        if self.upgrade_variants is not None:
+            b.write(Int(self.upgrade_variants))
+
+        if self.background is not None:
+            b.write(self.background.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_active_auction_state.py b/pyrogram/raw/types/star_gift_active_auction_state.py
new file mode 100644
index 00000000..0a2c2071
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_active_auction_state.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftActiveAuctionState(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftActiveAuctionState`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D31BC45D``
+
+    Parameters:
+        gift (:obj:`StarGift `):
+            N/A
+
+        state (:obj:`StarGiftAuctionState `):
+            N/A
+
+        user_state (:obj:`StarGiftAuctionUserState `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["gift", "state", "user_state"]
+
+    ID = 0xd31bc45d
+    QUALNAME = "types.StarGiftActiveAuctionState"
+
+    def __init__(self, *, gift: "raw.base.StarGift", state: "raw.base.StarGiftAuctionState", user_state: "raw.base.StarGiftAuctionUserState") -> None:
+        self.gift = gift  # StarGift
+        self.state = state  # StarGiftAuctionState
+        self.user_state = user_state  # StarGiftAuctionUserState
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftActiveAuctionState":
+        # No flags
+
+        gift = TLObject.read(b)
+
+        state = TLObject.read(b)
+
+        user_state = TLObject.read(b)
+
+        return StarGiftActiveAuctionState(gift=gift, state=state, user_state=user_state)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.gift.write())
+
+        b.write(self.state.write())
+
+        b.write(self.user_state.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_backdrop.py b/pyrogram/raw/types/star_gift_attribute_backdrop.py
new file mode 100644
index 00000000..d0dd879d
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_backdrop.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeBackdrop(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9F2504E4``
+
+    Parameters:
+        name (``str``):
+            N/A
+
+        backdrop_id (``int`` ``32-bit``):
+            N/A
+
+        center_color (``int`` ``32-bit``):
+            N/A
+
+        edge_color (``int`` ``32-bit``):
+            N/A
+
+        pattern_color (``int`` ``32-bit``):
+            N/A
+
+        text_color (``int`` ``32-bit``):
+            N/A
+
+        rarity (:obj:`StarGiftAttributeRarity `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["name", "backdrop_id", "center_color", "edge_color", "pattern_color", "text_color", "rarity"]
+
+    ID = 0x9f2504e4
+    QUALNAME = "types.StarGiftAttributeBackdrop"
+
+    def __init__(self, *, name: str, backdrop_id: int, center_color: int, edge_color: int, pattern_color: int, text_color: int, rarity: "raw.base.StarGiftAttributeRarity") -> None:
+        self.name = name  # string
+        self.backdrop_id = backdrop_id  # int
+        self.center_color = center_color  # int
+        self.edge_color = edge_color  # int
+        self.pattern_color = pattern_color  # int
+        self.text_color = text_color  # int
+        self.rarity = rarity  # StarGiftAttributeRarity
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeBackdrop":
+        # No flags
+
+        name = String.read(b)
+
+        backdrop_id = Int.read(b)
+
+        center_color = Int.read(b)
+
+        edge_color = Int.read(b)
+
+        pattern_color = Int.read(b)
+
+        text_color = Int.read(b)
+
+        rarity = TLObject.read(b)
+
+        return StarGiftAttributeBackdrop(name=name, backdrop_id=backdrop_id, center_color=center_color, edge_color=edge_color, pattern_color=pattern_color, text_color=text_color, rarity=rarity)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.name))
+
+        b.write(Int(self.backdrop_id))
+
+        b.write(Int(self.center_color))
+
+        b.write(Int(self.edge_color))
+
+        b.write(Int(self.pattern_color))
+
+        b.write(Int(self.text_color))
+
+        b.write(self.rarity.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_counter.py b/pyrogram/raw/types/star_gift_attribute_counter.py
new file mode 100644
index 00000000..bb8c3720
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_counter.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeCounter(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeCounter`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2EB1B658``
+
+    Parameters:
+        attribute (:obj:`StarGiftAttributeId `):
+            N/A
+
+        count (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["attribute", "count"]
+
+    ID = 0x2eb1b658
+    QUALNAME = "types.StarGiftAttributeCounter"
+
+    def __init__(self, *, attribute: "raw.base.StarGiftAttributeId", count: int) -> None:
+        self.attribute = attribute  # StarGiftAttributeId
+        self.count = count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeCounter":
+        # No flags
+
+        attribute = TLObject.read(b)
+
+        count = Int.read(b)
+
+        return StarGiftAttributeCounter(attribute=attribute, count=count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.attribute.write())
+
+        b.write(Int(self.count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_id_backdrop.py b/pyrogram/raw/types/star_gift_attribute_id_backdrop.py
new file mode 100644
index 00000000..2c98362e
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_id_backdrop.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeIdBackdrop(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeId`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1F01C757``
+
+    Parameters:
+        backdrop_id (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["backdrop_id"]
+
+    ID = 0x1f01c757
+    QUALNAME = "types.StarGiftAttributeIdBackdrop"
+
+    def __init__(self, *, backdrop_id: int) -> None:
+        self.backdrop_id = backdrop_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeIdBackdrop":
+        # No flags
+
+        backdrop_id = Int.read(b)
+
+        return StarGiftAttributeIdBackdrop(backdrop_id=backdrop_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.backdrop_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_id_model.py b/pyrogram/raw/types/star_gift_attribute_id_model.py
new file mode 100644
index 00000000..28e8f001
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_id_model.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeIdModel(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeId`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``48AAAE3C``
+
+    Parameters:
+        document_id (``int`` ``64-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["document_id"]
+
+    ID = 0x48aaae3c
+    QUALNAME = "types.StarGiftAttributeIdModel"
+
+    def __init__(self, *, document_id: int) -> None:
+        self.document_id = document_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeIdModel":
+        # No flags
+
+        document_id = Long.read(b)
+
+        return StarGiftAttributeIdModel(document_id=document_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.document_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_id_pattern.py b/pyrogram/raw/types/star_gift_attribute_id_pattern.py
new file mode 100644
index 00000000..94d23ce2
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_id_pattern.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeIdPattern(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeId`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4A162433``
+
+    Parameters:
+        document_id (``int`` ``64-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["document_id"]
+
+    ID = 0x4a162433
+    QUALNAME = "types.StarGiftAttributeIdPattern"
+
+    def __init__(self, *, document_id: int) -> None:
+        self.document_id = document_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeIdPattern":
+        # No flags
+
+        document_id = Long.read(b)
+
+        return StarGiftAttributeIdPattern(document_id=document_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.document_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_model.py b/pyrogram/raw/types/star_gift_attribute_model.py
new file mode 100644
index 00000000..11ea406a
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_model.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeModel(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``565251E2``
+
+    Parameters:
+        name (``str``):
+            N/A
+
+        document (:obj:`Document `):
+            N/A
+
+        rarity (:obj:`StarGiftAttributeRarity `):
+            N/A
+
+        crafted (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["name", "document", "rarity", "crafted"]
+
+    ID = 0x565251e2
+    QUALNAME = "types.StarGiftAttributeModel"
+
+    def __init__(self, *, name: str, document: "raw.base.Document", rarity: "raw.base.StarGiftAttributeRarity", crafted: Optional[bool] = None) -> None:
+        self.name = name  # string
+        self.document = document  # Document
+        self.rarity = rarity  # StarGiftAttributeRarity
+        self.crafted = crafted  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeModel":
+
+        flags = Int.read(b)
+
+        crafted = True if flags & (1 << 0) else False
+        name = String.read(b)
+
+        document = TLObject.read(b)
+
+        rarity = TLObject.read(b)
+
+        return StarGiftAttributeModel(name=name, document=document, rarity=rarity, crafted=crafted)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.crafted else 0
+        b.write(Int(flags))
+
+        b.write(String(self.name))
+
+        b.write(self.document.write())
+
+        b.write(self.rarity.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_original_details.py b/pyrogram/raw/types/star_gift_attribute_original_details.py
new file mode 100644
index 00000000..91752c34
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_original_details.py
@@ -0,0 +1,84 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeOriginalDetails(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E0BFF26C``
+
+    Parameters:
+        recipient_id (:obj:`Peer `):
+            N/A
+
+        date (``int`` ``32-bit``):
+            N/A
+
+        sender_id (:obj:`Peer `, *optional*):
+            N/A
+
+        message (:obj:`TextWithEntities `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["recipient_id", "date", "sender_id", "message"]
+
+    ID = 0xe0bff26c
+    QUALNAME = "types.StarGiftAttributeOriginalDetails"
+
+    def __init__(self, *, recipient_id: "raw.base.Peer", date: int, sender_id: "raw.base.Peer" = None, message: "raw.base.TextWithEntities" = None) -> None:
+        self.recipient_id = recipient_id  # Peer
+        self.date = date  # int
+        self.sender_id = sender_id  # flags.0?Peer
+        self.message = message  # flags.1?TextWithEntities
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeOriginalDetails":
+
+        flags = Int.read(b)
+
+        sender_id = TLObject.read(b) if flags & (1 << 0) else None
+
+        recipient_id = TLObject.read(b)
+
+        date = Int.read(b)
+
+        message = TLObject.read(b) if flags & (1 << 1) else None
+
+        return StarGiftAttributeOriginalDetails(recipient_id=recipient_id, date=date, sender_id=sender_id, message=message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.sender_id is not None else 0
+        flags |= (1 << 1) if self.message is not None else 0
+        b.write(Int(flags))
+
+        if self.sender_id is not None:
+            b.write(self.sender_id.write())
+
+        b.write(self.recipient_id.write())
+
+        b.write(Int(self.date))
+
+        if self.message is not None:
+            b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_pattern.py b/pyrogram/raw/types/star_gift_attribute_pattern.py
new file mode 100644
index 00000000..a353e137
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_pattern.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributePattern(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4E7085EA``
+
+    Parameters:
+        name (``str``):
+            N/A
+
+        document (:obj:`Document `):
+            N/A
+
+        rarity (:obj:`StarGiftAttributeRarity `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["name", "document", "rarity"]
+
+    ID = 0x4e7085ea
+    QUALNAME = "types.StarGiftAttributePattern"
+
+    def __init__(self, *, name: str, document: "raw.base.Document", rarity: "raw.base.StarGiftAttributeRarity") -> None:
+        self.name = name  # string
+        self.document = document  # Document
+        self.rarity = rarity  # StarGiftAttributeRarity
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributePattern":
+        # No flags
+
+        name = String.read(b)
+
+        document = TLObject.read(b)
+
+        rarity = TLObject.read(b)
+
+        return StarGiftAttributePattern(name=name, document=document, rarity=rarity)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.name))
+
+        b.write(self.document.write())
+
+        b.write(self.rarity.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_rarity.py b/pyrogram/raw/types/star_gift_attribute_rarity.py
new file mode 100644
index 00000000..8846d426
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_rarity.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeRarity(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeRarity`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``36437737``
+
+    Parameters:
+        permille (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["permille"]
+
+    ID = 0x36437737
+    QUALNAME = "types.StarGiftAttributeRarity"
+
+    def __init__(self, *, permille: int) -> None:
+        self.permille = permille  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeRarity":
+        # No flags
+
+        permille = Int.read(b)
+
+        return StarGiftAttributeRarity(permille=permille)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.permille))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_rarity_epic.py b/pyrogram/raw/types/star_gift_attribute_rarity_epic.py
new file mode 100644
index 00000000..a8b83436
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_rarity_epic.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeRarityEpic(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeRarity`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``78FBF3A8``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x78fbf3a8
+    QUALNAME = "types.StarGiftAttributeRarityEpic"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeRarityEpic":
+        # No flags
+
+        return StarGiftAttributeRarityEpic()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_rarity_legendary.py b/pyrogram/raw/types/star_gift_attribute_rarity_legendary.py
new file mode 100644
index 00000000..44aee02e
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_rarity_legendary.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeRarityLegendary(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeRarity`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CEF7E7A8``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xcef7e7a8
+    QUALNAME = "types.StarGiftAttributeRarityLegendary"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeRarityLegendary":
+        # No flags
+
+        return StarGiftAttributeRarityLegendary()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_rarity_rare.py b/pyrogram/raw/types/star_gift_attribute_rarity_rare.py
new file mode 100644
index 00000000..c758487e
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_rarity_rare.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeRarityRare(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeRarity`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F08D516B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xf08d516b
+    QUALNAME = "types.StarGiftAttributeRarityRare"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeRarityRare":
+        # No flags
+
+        return StarGiftAttributeRarityRare()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_attribute_rarity_uncommon.py b/pyrogram/raw/types/star_gift_attribute_rarity_uncommon.py
new file mode 100644
index 00000000..7f263029
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_attribute_rarity_uncommon.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAttributeRarityUncommon(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAttributeRarity`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DBCE6389``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xdbce6389
+    QUALNAME = "types.StarGiftAttributeRarityUncommon"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAttributeRarityUncommon":
+        # No flags
+
+        return StarGiftAttributeRarityUncommon()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_acquired_gift.py b/pyrogram/raw/types/star_gift_auction_acquired_gift.py
new file mode 100644
index 00000000..39df68b2
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_acquired_gift.py
@@ -0,0 +1,113 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionAcquiredGift(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionAcquiredGift`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``42B00348``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            N/A
+
+        date (``int`` ``32-bit``):
+            N/A
+
+        bid_amount (``int`` ``64-bit``):
+            N/A
+
+        round (``int`` ``32-bit``):
+            N/A
+
+        pos (``int`` ``32-bit``):
+            N/A
+
+        name_hidden (``bool``, *optional*):
+            N/A
+
+        message (:obj:`TextWithEntities `, *optional*):
+            N/A
+
+        gift_num (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "date", "bid_amount", "round", "pos", "name_hidden", "message", "gift_num"]
+
+    ID = 0x42b00348
+    QUALNAME = "types.StarGiftAuctionAcquiredGift"
+
+    def __init__(self, *, peer: "raw.base.Peer", date: int, bid_amount: int, round: int, pos: int, name_hidden: Optional[bool] = None, message: "raw.base.TextWithEntities" = None, gift_num: Optional[int] = None) -> None:
+        self.peer = peer  # Peer
+        self.date = date  # int
+        self.bid_amount = bid_amount  # long
+        self.round = round  # int
+        self.pos = pos  # int
+        self.name_hidden = name_hidden  # flags.0?true
+        self.message = message  # flags.1?TextWithEntities
+        self.gift_num = gift_num  # flags.2?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionAcquiredGift":
+
+        flags = Int.read(b)
+
+        name_hidden = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        date = Int.read(b)
+
+        bid_amount = Long.read(b)
+
+        round = Int.read(b)
+
+        pos = Int.read(b)
+
+        message = TLObject.read(b) if flags & (1 << 1) else None
+
+        gift_num = Int.read(b) if flags & (1 << 2) else None
+        return StarGiftAuctionAcquiredGift(peer=peer, date=date, bid_amount=bid_amount, round=round, pos=pos, name_hidden=name_hidden, message=message, gift_num=gift_num)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.name_hidden else 0
+        flags |= (1 << 1) if self.message is not None else 0
+        flags |= (1 << 2) if self.gift_num is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.bid_amount))
+
+        b.write(Int(self.round))
+
+        b.write(Int(self.pos))
+
+        if self.message is not None:
+            b.write(self.message.write())
+
+        if self.gift_num is not None:
+            b.write(Int(self.gift_num))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_round.py b/pyrogram/raw/types/star_gift_auction_round.py
new file mode 100644
index 00000000..e963f4d8
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_round.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionRound(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionRound`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3AAE0528``
+
+    Parameters:
+        num (``int`` ``32-bit``):
+            N/A
+
+        duration (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["num", "duration"]
+
+    ID = 0x3aae0528
+    QUALNAME = "types.StarGiftAuctionRound"
+
+    def __init__(self, *, num: int, duration: int) -> None:
+        self.num = num  # int
+        self.duration = duration  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionRound":
+        # No flags
+
+        num = Int.read(b)
+
+        duration = Int.read(b)
+
+        return StarGiftAuctionRound(num=num, duration=duration)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.num))
+
+        b.write(Int(self.duration))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_round_extendable.py b/pyrogram/raw/types/star_gift_auction_round_extendable.py
new file mode 100644
index 00000000..b3a5d286
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_round_extendable.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionRoundExtendable(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionRound`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AA021E5``
+
+    Parameters:
+        num (``int`` ``32-bit``):
+            N/A
+
+        duration (``int`` ``32-bit``):
+            N/A
+
+        extend_top (``int`` ``32-bit``):
+            N/A
+
+        extend_window (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["num", "duration", "extend_top", "extend_window"]
+
+    ID = 0xaa021e5
+    QUALNAME = "types.StarGiftAuctionRoundExtendable"
+
+    def __init__(self, *, num: int, duration: int, extend_top: int, extend_window: int) -> None:
+        self.num = num  # int
+        self.duration = duration  # int
+        self.extend_top = extend_top  # int
+        self.extend_window = extend_window  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionRoundExtendable":
+        # No flags
+
+        num = Int.read(b)
+
+        duration = Int.read(b)
+
+        extend_top = Int.read(b)
+
+        extend_window = Int.read(b)
+
+        return StarGiftAuctionRoundExtendable(num=num, duration=duration, extend_top=extend_top, extend_window=extend_window)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.num))
+
+        b.write(Int(self.duration))
+
+        b.write(Int(self.extend_top))
+
+        b.write(Int(self.extend_window))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_state.py b/pyrogram/raw/types/star_gift_auction_state.py
new file mode 100644
index 00000000..8f55962a
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_state.py
@@ -0,0 +1,142 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionState(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionState`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``771A4E66``
+
+    Parameters:
+        version (``int`` ``32-bit``):
+            N/A
+
+        start_date (``int`` ``32-bit``):
+            N/A
+
+        end_date (``int`` ``32-bit``):
+            N/A
+
+        min_bid_amount (``int`` ``64-bit``):
+            N/A
+
+        bid_levels (List of :obj:`AuctionBidLevel `):
+            N/A
+
+        top_bidders (List of ``int`` ``64-bit``):
+            N/A
+
+        next_round_at (``int`` ``32-bit``):
+            N/A
+
+        last_gift_num (``int`` ``32-bit``):
+            N/A
+
+        gifts_left (``int`` ``32-bit``):
+            N/A
+
+        current_round (``int`` ``32-bit``):
+            N/A
+
+        total_rounds (``int`` ``32-bit``):
+            N/A
+
+        rounds (List of :obj:`StarGiftAuctionRound `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["version", "start_date", "end_date", "min_bid_amount", "bid_levels", "top_bidders", "next_round_at", "last_gift_num", "gifts_left", "current_round", "total_rounds", "rounds"]
+
+    ID = 0x771a4e66
+    QUALNAME = "types.StarGiftAuctionState"
+
+    def __init__(self, *, version: int, start_date: int, end_date: int, min_bid_amount: int, bid_levels: List["raw.base.AuctionBidLevel"], top_bidders: List[int], next_round_at: int, last_gift_num: int, gifts_left: int, current_round: int, total_rounds: int, rounds: List["raw.base.StarGiftAuctionRound"]) -> None:
+        self.version = version  # int
+        self.start_date = start_date  # int
+        self.end_date = end_date  # int
+        self.min_bid_amount = min_bid_amount  # long
+        self.bid_levels = bid_levels  # Vector
+        self.top_bidders = top_bidders  # Vector
+        self.next_round_at = next_round_at  # int
+        self.last_gift_num = last_gift_num  # int
+        self.gifts_left = gifts_left  # int
+        self.current_round = current_round  # int
+        self.total_rounds = total_rounds  # int
+        self.rounds = rounds  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionState":
+        # No flags
+
+        version = Int.read(b)
+
+        start_date = Int.read(b)
+
+        end_date = Int.read(b)
+
+        min_bid_amount = Long.read(b)
+
+        bid_levels = TLObject.read(b)
+
+        top_bidders = TLObject.read(b, Long)
+
+        next_round_at = Int.read(b)
+
+        last_gift_num = Int.read(b)
+
+        gifts_left = Int.read(b)
+
+        current_round = Int.read(b)
+
+        total_rounds = Int.read(b)
+
+        rounds = TLObject.read(b)
+
+        return StarGiftAuctionState(version=version, start_date=start_date, end_date=end_date, min_bid_amount=min_bid_amount, bid_levels=bid_levels, top_bidders=top_bidders, next_round_at=next_round_at, last_gift_num=last_gift_num, gifts_left=gifts_left, current_round=current_round, total_rounds=total_rounds, rounds=rounds)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.version))
+
+        b.write(Int(self.start_date))
+
+        b.write(Int(self.end_date))
+
+        b.write(Long(self.min_bid_amount))
+
+        b.write(Vector(self.bid_levels))
+
+        b.write(Vector(self.top_bidders, Long))
+
+        b.write(Int(self.next_round_at))
+
+        b.write(Int(self.last_gift_num))
+
+        b.write(Int(self.gifts_left))
+
+        b.write(Int(self.current_round))
+
+        b.write(Int(self.total_rounds))
+
+        b.write(Vector(self.rounds))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_state_finished.py b/pyrogram/raw/types/star_gift_auction_state_finished.py
new file mode 100644
index 00000000..49255366
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_state_finished.py
@@ -0,0 +1,99 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionStateFinished(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionState`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``972DABBF``
+
+    Parameters:
+        start_date (``int`` ``32-bit``):
+            N/A
+
+        end_date (``int`` ``32-bit``):
+            N/A
+
+        average_price (``int`` ``64-bit``):
+            N/A
+
+        listed_count (``int`` ``32-bit``, *optional*):
+            N/A
+
+        fragment_listed_count (``int`` ``32-bit``, *optional*):
+            N/A
+
+        fragment_listed_url (``str``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["start_date", "end_date", "average_price", "listed_count", "fragment_listed_count", "fragment_listed_url"]
+
+    ID = 0x972dabbf
+    QUALNAME = "types.StarGiftAuctionStateFinished"
+
+    def __init__(self, *, start_date: int, end_date: int, average_price: int, listed_count: Optional[int] = None, fragment_listed_count: Optional[int] = None, fragment_listed_url: Optional[str] = None) -> None:
+        self.start_date = start_date  # int
+        self.end_date = end_date  # int
+        self.average_price = average_price  # long
+        self.listed_count = listed_count  # flags.0?int
+        self.fragment_listed_count = fragment_listed_count  # flags.1?int
+        self.fragment_listed_url = fragment_listed_url  # flags.1?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionStateFinished":
+
+        flags = Int.read(b)
+
+        start_date = Int.read(b)
+
+        end_date = Int.read(b)
+
+        average_price = Long.read(b)
+
+        listed_count = Int.read(b) if flags & (1 << 0) else None
+        fragment_listed_count = Int.read(b) if flags & (1 << 1) else None
+        fragment_listed_url = String.read(b) if flags & (1 << 1) else None
+        return StarGiftAuctionStateFinished(start_date=start_date, end_date=end_date, average_price=average_price, listed_count=listed_count, fragment_listed_count=fragment_listed_count, fragment_listed_url=fragment_listed_url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.listed_count is not None else 0
+        flags |= (1 << 1) if self.fragment_listed_count is not None else 0
+        flags |= (1 << 1) if self.fragment_listed_url is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.start_date))
+
+        b.write(Int(self.end_date))
+
+        b.write(Long(self.average_price))
+
+        if self.listed_count is not None:
+            b.write(Int(self.listed_count))
+
+        if self.fragment_listed_count is not None:
+            b.write(Int(self.fragment_listed_count))
+
+        if self.fragment_listed_url is not None:
+            b.write(String(self.fragment_listed_url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_state_not_modified.py b/pyrogram/raw/types/star_gift_auction_state_not_modified.py
new file mode 100644
index 00000000..b267d00a
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_state_not_modified.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionStateNotModified(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionState`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FE333952``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfe333952
+    QUALNAME = "types.StarGiftAuctionStateNotModified"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionStateNotModified":
+        # No flags
+
+        return StarGiftAuctionStateNotModified()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_auction_user_state.py b/pyrogram/raw/types/star_gift_auction_user_state.py
new file mode 100644
index 00000000..e19235ed
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_auction_user_state.py
@@ -0,0 +1,99 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftAuctionUserState(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftAuctionUserState`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2EEED1C4``
+
+    Parameters:
+        acquired_count (``int`` ``32-bit``):
+            N/A
+
+        returned (``bool``, *optional*):
+            N/A
+
+        bid_amount (``int`` ``64-bit``, *optional*):
+            N/A
+
+        bid_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        min_bid_amount (``int`` ``64-bit``, *optional*):
+            N/A
+
+        bid_peer (:obj:`Peer `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["acquired_count", "returned", "bid_amount", "bid_date", "min_bid_amount", "bid_peer"]
+
+    ID = 0x2eeed1c4
+    QUALNAME = "types.StarGiftAuctionUserState"
+
+    def __init__(self, *, acquired_count: int, returned: Optional[bool] = None, bid_amount: Optional[int] = None, bid_date: Optional[int] = None, min_bid_amount: Optional[int] = None, bid_peer: "raw.base.Peer" = None) -> None:
+        self.acquired_count = acquired_count  # int
+        self.returned = returned  # flags.1?true
+        self.bid_amount = bid_amount  # flags.0?long
+        self.bid_date = bid_date  # flags.0?int
+        self.min_bid_amount = min_bid_amount  # flags.0?long
+        self.bid_peer = bid_peer  # flags.0?Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftAuctionUserState":
+
+        flags = Int.read(b)
+
+        returned = True if flags & (1 << 1) else False
+        bid_amount = Long.read(b) if flags & (1 << 0) else None
+        bid_date = Int.read(b) if flags & (1 << 0) else None
+        min_bid_amount = Long.read(b) if flags & (1 << 0) else None
+        bid_peer = TLObject.read(b) if flags & (1 << 0) else None
+
+        acquired_count = Int.read(b)
+
+        return StarGiftAuctionUserState(acquired_count=acquired_count, returned=returned, bid_amount=bid_amount, bid_date=bid_date, min_bid_amount=min_bid_amount, bid_peer=bid_peer)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.returned else 0
+        flags |= (1 << 0) if self.bid_amount is not None else 0
+        flags |= (1 << 0) if self.bid_date is not None else 0
+        flags |= (1 << 0) if self.min_bid_amount is not None else 0
+        flags |= (1 << 0) if self.bid_peer is not None else 0
+        b.write(Int(flags))
+
+        if self.bid_amount is not None:
+            b.write(Long(self.bid_amount))
+
+        if self.bid_date is not None:
+            b.write(Int(self.bid_date))
+
+        if self.min_bid_amount is not None:
+            b.write(Long(self.min_bid_amount))
+
+        if self.bid_peer is not None:
+            b.write(self.bid_peer.write())
+
+        b.write(Int(self.acquired_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_background.py b/pyrogram/raw/types/star_gift_background.py
new file mode 100644
index 00000000..196f0403
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_background.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftBackground(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftBackground`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AFF56398``
+
+    Parameters:
+        center_color (``int`` ``32-bit``):
+            N/A
+
+        edge_color (``int`` ``32-bit``):
+            N/A
+
+        text_color (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["center_color", "edge_color", "text_color"]
+
+    ID = 0xaff56398
+    QUALNAME = "types.StarGiftBackground"
+
+    def __init__(self, *, center_color: int, edge_color: int, text_color: int) -> None:
+        self.center_color = center_color  # int
+        self.edge_color = edge_color  # int
+        self.text_color = text_color  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftBackground":
+        # No flags
+
+        center_color = Int.read(b)
+
+        edge_color = Int.read(b)
+
+        text_color = Int.read(b)
+
+        return StarGiftBackground(center_color=center_color, edge_color=edge_color, text_color=text_color)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.center_color))
+
+        b.write(Int(self.edge_color))
+
+        b.write(Int(self.text_color))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_collection.py b/pyrogram/raw/types/star_gift_collection.py
new file mode 100644
index 00000000..6b61393a
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_collection.py
@@ -0,0 +1,100 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftCollection(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftCollection`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9D6B13B0``
+
+    Parameters:
+        collection_id (``int`` ``32-bit``):
+            N/A
+
+        title (``str``):
+            N/A
+
+        gifts_count (``int`` ``32-bit``):
+            N/A
+
+        hash (``int`` ``64-bit``):
+            N/A
+
+        icon (:obj:`Document `, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.CreateStarGiftCollection
+            payments.UpdateStarGiftCollection
+    """
+
+    __slots__: List[str] = ["collection_id", "title", "gifts_count", "hash", "icon"]
+
+    ID = 0x9d6b13b0
+    QUALNAME = "types.StarGiftCollection"
+
+    def __init__(self, *, collection_id: int, title: str, gifts_count: int, hash: int, icon: "raw.base.Document" = None) -> None:
+        self.collection_id = collection_id  # int
+        self.title = title  # string
+        self.gifts_count = gifts_count  # int
+        self.hash = hash  # long
+        self.icon = icon  # flags.0?Document
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftCollection":
+
+        flags = Int.read(b)
+
+        collection_id = Int.read(b)
+
+        title = String.read(b)
+
+        icon = TLObject.read(b) if flags & (1 << 0) else None
+
+        gifts_count = Int.read(b)
+
+        hash = Long.read(b)
+
+        return StarGiftCollection(collection_id=collection_id, title=title, gifts_count=gifts_count, hash=hash, icon=icon)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.icon is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.collection_id))
+
+        b.write(String(self.title))
+
+        if self.icon is not None:
+            b.write(self.icon.write())
+
+        b.write(Int(self.gifts_count))
+
+        b.write(Long(self.hash))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_unique.py b/pyrogram/raw/types/star_gift_unique.py
new file mode 100644
index 00000000..79655147
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_unique.py
@@ -0,0 +1,274 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftUnique(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGift`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``85F0A9CD``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            N/A
+
+        gift_id (``int`` ``64-bit``):
+            N/A
+
+        title (``str``):
+            N/A
+
+        slug (``str``):
+            N/A
+
+        num (``int`` ``32-bit``):
+            N/A
+
+        attributes (List of :obj:`StarGiftAttribute `):
+            N/A
+
+        availability_issued (``int`` ``32-bit``):
+            N/A
+
+        availability_total (``int`` ``32-bit``):
+            N/A
+
+        require_premium (``bool``, *optional*):
+            N/A
+
+        resale_ton_only (``bool``, *optional*):
+            N/A
+
+        theme_available (``bool``, *optional*):
+            N/A
+
+        burned (``bool``, *optional*):
+            N/A
+
+        crafted (``bool``, *optional*):
+            N/A
+
+        owner_id (:obj:`Peer `, *optional*):
+            N/A
+
+        owner_name (``str``, *optional*):
+            N/A
+
+        owner_address (``str``, *optional*):
+            N/A
+
+        gift_address (``str``, *optional*):
+            N/A
+
+        resell_amount (List of :obj:`StarsAmount `, *optional*):
+            N/A
+
+        released_by (:obj:`Peer `, *optional*):
+            N/A
+
+        value_amount (``int`` ``64-bit``, *optional*):
+            N/A
+
+        value_currency (``str``, *optional*):
+            N/A
+
+        value_usd_amount (``int`` ``64-bit``, *optional*):
+            N/A
+
+        theme_peer (:obj:`Peer `, *optional*):
+            N/A
+
+        peer_color (:obj:`PeerColor `, *optional*):
+            N/A
+
+        host_id (:obj:`Peer `, *optional*):
+            N/A
+
+        offer_min_stars (``int`` ``32-bit``, *optional*):
+            N/A
+
+        craft_chance_permille (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "gift_id", "title", "slug", "num", "attributes", "availability_issued", "availability_total", "require_premium", "resale_ton_only", "theme_available", "burned", "crafted", "owner_id", "owner_name", "owner_address", "gift_address", "resell_amount", "released_by", "value_amount", "value_currency", "value_usd_amount", "theme_peer", "peer_color", "host_id", "offer_min_stars", "craft_chance_permille"]
+
+    ID = 0x85f0a9cd
+    QUALNAME = "types.StarGiftUnique"
+
+    def __init__(self, *, id: int, gift_id: int, title: str, slug: str, num: int, attributes: List["raw.base.StarGiftAttribute"], availability_issued: int, availability_total: int, require_premium: Optional[bool] = None, resale_ton_only: Optional[bool] = None, theme_available: Optional[bool] = None, burned: Optional[bool] = None, crafted: Optional[bool] = None, owner_id: "raw.base.Peer" = None, owner_name: Optional[str] = None, owner_address: Optional[str] = None, gift_address: Optional[str] = None, resell_amount: Optional[List["raw.base.StarsAmount"]] = None, released_by: "raw.base.Peer" = None, value_amount: Optional[int] = None, value_currency: Optional[str] = None, value_usd_amount: Optional[int] = None, theme_peer: "raw.base.Peer" = None, peer_color: "raw.base.PeerColor" = None, host_id: "raw.base.Peer" = None, offer_min_stars: Optional[int] = None, craft_chance_permille: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.gift_id = gift_id  # long
+        self.title = title  # string
+        self.slug = slug  # string
+        self.num = num  # int
+        self.attributes = attributes  # Vector
+        self.availability_issued = availability_issued  # int
+        self.availability_total = availability_total  # int
+        self.require_premium = require_premium  # flags.6?true
+        self.resale_ton_only = resale_ton_only  # flags.7?true
+        self.theme_available = theme_available  # flags.9?true
+        self.burned = burned  # flags.14?true
+        self.crafted = crafted  # flags.15?true
+        self.owner_id = owner_id  # flags.0?Peer
+        self.owner_name = owner_name  # flags.1?string
+        self.owner_address = owner_address  # flags.2?string
+        self.gift_address = gift_address  # flags.3?string
+        self.resell_amount = resell_amount  # flags.4?Vector
+        self.released_by = released_by  # flags.5?Peer
+        self.value_amount = value_amount  # flags.8?long
+        self.value_currency = value_currency  # flags.8?string
+        self.value_usd_amount = value_usd_amount  # flags.8?long
+        self.theme_peer = theme_peer  # flags.10?Peer
+        self.peer_color = peer_color  # flags.11?PeerColor
+        self.host_id = host_id  # flags.12?Peer
+        self.offer_min_stars = offer_min_stars  # flags.13?int
+        self.craft_chance_permille = craft_chance_permille  # flags.16?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftUnique":
+
+        flags = Int.read(b)
+
+        require_premium = True if flags & (1 << 6) else False
+        resale_ton_only = True if flags & (1 << 7) else False
+        theme_available = True if flags & (1 << 9) else False
+        burned = True if flags & (1 << 14) else False
+        crafted = True if flags & (1 << 15) else False
+        id = Long.read(b)
+
+        gift_id = Long.read(b)
+
+        title = String.read(b)
+
+        slug = String.read(b)
+
+        num = Int.read(b)
+
+        owner_id = TLObject.read(b) if flags & (1 << 0) else None
+
+        owner_name = String.read(b) if flags & (1 << 1) else None
+        owner_address = String.read(b) if flags & (1 << 2) else None
+        attributes = TLObject.read(b)
+
+        availability_issued = Int.read(b)
+
+        availability_total = Int.read(b)
+
+        gift_address = String.read(b) if flags & (1 << 3) else None
+        resell_amount = TLObject.read(b) if flags & (1 << 4) else []
+
+        released_by = TLObject.read(b) if flags & (1 << 5) else None
+
+        value_amount = Long.read(b) if flags & (1 << 8) else None
+        value_currency = String.read(b) if flags & (1 << 8) else None
+        value_usd_amount = Long.read(b) if flags & (1 << 8) else None
+        theme_peer = TLObject.read(b) if flags & (1 << 10) else None
+
+        peer_color = TLObject.read(b) if flags & (1 << 11) else None
+
+        host_id = TLObject.read(b) if flags & (1 << 12) else None
+
+        offer_min_stars = Int.read(b) if flags & (1 << 13) else None
+        craft_chance_permille = Int.read(b) if flags & (1 << 16) else None
+        return StarGiftUnique(id=id, gift_id=gift_id, title=title, slug=slug, num=num, attributes=attributes, availability_issued=availability_issued, availability_total=availability_total, require_premium=require_premium, resale_ton_only=resale_ton_only, theme_available=theme_available, burned=burned, crafted=crafted, owner_id=owner_id, owner_name=owner_name, owner_address=owner_address, gift_address=gift_address, resell_amount=resell_amount, released_by=released_by, value_amount=value_amount, value_currency=value_currency, value_usd_amount=value_usd_amount, theme_peer=theme_peer, peer_color=peer_color, host_id=host_id, offer_min_stars=offer_min_stars, craft_chance_permille=craft_chance_permille)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 6) if self.require_premium else 0
+        flags |= (1 << 7) if self.resale_ton_only else 0
+        flags |= (1 << 9) if self.theme_available else 0
+        flags |= (1 << 14) if self.burned else 0
+        flags |= (1 << 15) if self.crafted else 0
+        flags |= (1 << 0) if self.owner_id is not None else 0
+        flags |= (1 << 1) if self.owner_name is not None else 0
+        flags |= (1 << 2) if self.owner_address is not None else 0
+        flags |= (1 << 3) if self.gift_address is not None else 0
+        flags |= (1 << 4) if self.resell_amount else 0
+        flags |= (1 << 5) if self.released_by is not None else 0
+        flags |= (1 << 8) if self.value_amount is not None else 0
+        flags |= (1 << 8) if self.value_currency is not None else 0
+        flags |= (1 << 8) if self.value_usd_amount is not None else 0
+        flags |= (1 << 10) if self.theme_peer is not None else 0
+        flags |= (1 << 11) if self.peer_color is not None else 0
+        flags |= (1 << 12) if self.host_id is not None else 0
+        flags |= (1 << 13) if self.offer_min_stars is not None else 0
+        flags |= (1 << 16) if self.craft_chance_permille is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.gift_id))
+
+        b.write(String(self.title))
+
+        b.write(String(self.slug))
+
+        b.write(Int(self.num))
+
+        if self.owner_id is not None:
+            b.write(self.owner_id.write())
+
+        if self.owner_name is not None:
+            b.write(String(self.owner_name))
+
+        if self.owner_address is not None:
+            b.write(String(self.owner_address))
+
+        b.write(Vector(self.attributes))
+
+        b.write(Int(self.availability_issued))
+
+        b.write(Int(self.availability_total))
+
+        if self.gift_address is not None:
+            b.write(String(self.gift_address))
+
+        if self.resell_amount is not None:
+            b.write(Vector(self.resell_amount))
+
+        if self.released_by is not None:
+            b.write(self.released_by.write())
+
+        if self.value_amount is not None:
+            b.write(Long(self.value_amount))
+
+        if self.value_currency is not None:
+            b.write(String(self.value_currency))
+
+        if self.value_usd_amount is not None:
+            b.write(Long(self.value_usd_amount))
+
+        if self.theme_peer is not None:
+            b.write(self.theme_peer.write())
+
+        if self.peer_color is not None:
+            b.write(self.peer_color.write())
+
+        if self.host_id is not None:
+            b.write(self.host_id.write())
+
+        if self.offer_min_stars is not None:
+            b.write(Int(self.offer_min_stars))
+
+        if self.craft_chance_permille is not None:
+            b.write(Int(self.craft_chance_permille))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_gift_upgrade_price.py b/pyrogram/raw/types/star_gift_upgrade_price.py
new file mode 100644
index 00000000..137f04c9
--- /dev/null
+++ b/pyrogram/raw/types/star_gift_upgrade_price.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarGiftUpgradePrice(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarGiftUpgradePrice`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``99EA331D``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+            N/A
+
+        upgrade_stars (``int`` ``64-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["date", "upgrade_stars"]
+
+    ID = 0x99ea331d
+    QUALNAME = "types.StarGiftUpgradePrice"
+
+    def __init__(self, *, date: int, upgrade_stars: int) -> None:
+        self.date = date  # int
+        self.upgrade_stars = upgrade_stars  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarGiftUpgradePrice":
+        # No flags
+
+        date = Int.read(b)
+
+        upgrade_stars = Long.read(b)
+
+        return StarGiftUpgradePrice(date=date, upgrade_stars=upgrade_stars)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.upgrade_stars))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/star_ref_program.py b/pyrogram/raw/types/star_ref_program.py
new file mode 100644
index 00000000..37881617
--- /dev/null
+++ b/pyrogram/raw/types/star_ref_program.py
@@ -0,0 +1,101 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarRefProgram(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarRefProgram`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DD0C66F2``
+
+    Parameters:
+        bot_id (``int`` ``64-bit``):
+            N/A
+
+        commission_permille (``int`` ``32-bit``):
+            N/A
+
+        duration_months (``int`` ``32-bit``, *optional*):
+            N/A
+
+        end_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        daily_revenue_per_user (:obj:`StarsAmount `, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            bots.UpdateStarRefProgram
+    """
+
+    __slots__: List[str] = ["bot_id", "commission_permille", "duration_months", "end_date", "daily_revenue_per_user"]
+
+    ID = 0xdd0c66f2
+    QUALNAME = "types.StarRefProgram"
+
+    def __init__(self, *, bot_id: int, commission_permille: int, duration_months: Optional[int] = None, end_date: Optional[int] = None, daily_revenue_per_user: "raw.base.StarsAmount" = None) -> None:
+        self.bot_id = bot_id  # long
+        self.commission_permille = commission_permille  # int
+        self.duration_months = duration_months  # flags.0?int
+        self.end_date = end_date  # flags.1?int
+        self.daily_revenue_per_user = daily_revenue_per_user  # flags.2?StarsAmount
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarRefProgram":
+
+        flags = Int.read(b)
+
+        bot_id = Long.read(b)
+
+        commission_permille = Int.read(b)
+
+        duration_months = Int.read(b) if flags & (1 << 0) else None
+        end_date = Int.read(b) if flags & (1 << 1) else None
+        daily_revenue_per_user = TLObject.read(b) if flags & (1 << 2) else None
+
+        return StarRefProgram(bot_id=bot_id, commission_permille=commission_permille, duration_months=duration_months, end_date=end_date, daily_revenue_per_user=daily_revenue_per_user)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.duration_months is not None else 0
+        flags |= (1 << 1) if self.end_date is not None else 0
+        flags |= (1 << 2) if self.daily_revenue_per_user is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.bot_id))
+
+        b.write(Int(self.commission_permille))
+
+        if self.duration_months is not None:
+            b.write(Int(self.duration_months))
+
+        if self.end_date is not None:
+            b.write(Int(self.end_date))
+
+        if self.daily_revenue_per_user is not None:
+            b.write(self.daily_revenue_per_user.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_amount.py b/pyrogram/raw/types/stars_amount.py
new file mode 100644
index 00000000..45cd33c5
--- /dev/null
+++ b/pyrogram/raw/types/stars_amount.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsAmount(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsAmount`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BBB6B4A3``
+
+    Parameters:
+        amount (``int`` ``64-bit``):
+            N/A
+
+        nanos (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["amount", "nanos"]
+
+    ID = 0xbbb6b4a3
+    QUALNAME = "types.StarsAmount"
+
+    def __init__(self, *, amount: int, nanos: int) -> None:
+        self.amount = amount  # long
+        self.nanos = nanos  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsAmount":
+        # No flags
+
+        amount = Long.read(b)
+
+        nanos = Int.read(b)
+
+        return StarsAmount(amount=amount, nanos=nanos)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.amount))
+
+        b.write(Int(self.nanos))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_gift_option.py b/pyrogram/raw/types/stars_gift_option.py
new file mode 100644
index 00000000..60353034
--- /dev/null
+++ b/pyrogram/raw/types/stars_gift_option.py
@@ -0,0 +1,96 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsGiftOption(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsGiftOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5E0589F1``
+
+    Parameters:
+        stars (``int`` ``64-bit``):
+            N/A
+
+        currency (``str``):
+            N/A
+
+        amount (``int`` ``64-bit``):
+            N/A
+
+        extended (``bool``, *optional*):
+            N/A
+
+        store_product (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsGiftOptions
+    """
+
+    __slots__: List[str] = ["stars", "currency", "amount", "extended", "store_product"]
+
+    ID = 0x5e0589f1
+    QUALNAME = "types.StarsGiftOption"
+
+    def __init__(self, *, stars: int, currency: str, amount: int, extended: Optional[bool] = None, store_product: Optional[str] = None) -> None:
+        self.stars = stars  # long
+        self.currency = currency  # string
+        self.amount = amount  # long
+        self.extended = extended  # flags.1?true
+        self.store_product = store_product  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsGiftOption":
+
+        flags = Int.read(b)
+
+        extended = True if flags & (1 << 1) else False
+        stars = Long.read(b)
+
+        store_product = String.read(b) if flags & (1 << 0) else None
+        currency = String.read(b)
+
+        amount = Long.read(b)
+
+        return StarsGiftOption(stars=stars, currency=currency, amount=amount, extended=extended, store_product=store_product)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.extended else 0
+        flags |= (1 << 0) if self.store_product is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.stars))
+
+        if self.store_product is not None:
+            b.write(String(self.store_product))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_giveaway_option.py b/pyrogram/raw/types/stars_giveaway_option.py
new file mode 100644
index 00000000..192b7fad
--- /dev/null
+++ b/pyrogram/raw/types/stars_giveaway_option.py
@@ -0,0 +1,118 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsGiveawayOption(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsGiveawayOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``94CE852A``
+
+    Parameters:
+        stars (``int`` ``64-bit``):
+            N/A
+
+        yearly_boosts (``int`` ``32-bit``):
+            N/A
+
+        currency (``str``):
+            N/A
+
+        amount (``int`` ``64-bit``):
+            N/A
+
+        winners (List of :obj:`StarsGiveawayWinnersOption `):
+            N/A
+
+        extended (``bool``, *optional*):
+            N/A
+
+        default (``bool``, *optional*):
+            N/A
+
+        store_product (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsGiveawayOptions
+    """
+
+    __slots__: List[str] = ["stars", "yearly_boosts", "currency", "amount", "winners", "extended", "default", "store_product"]
+
+    ID = 0x94ce852a
+    QUALNAME = "types.StarsGiveawayOption"
+
+    def __init__(self, *, stars: int, yearly_boosts: int, currency: str, amount: int, winners: List["raw.base.StarsGiveawayWinnersOption"], extended: Optional[bool] = None, default: Optional[bool] = None, store_product: Optional[str] = None) -> None:
+        self.stars = stars  # long
+        self.yearly_boosts = yearly_boosts  # int
+        self.currency = currency  # string
+        self.amount = amount  # long
+        self.winners = winners  # Vector
+        self.extended = extended  # flags.0?true
+        self.default = default  # flags.1?true
+        self.store_product = store_product  # flags.2?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsGiveawayOption":
+
+        flags = Int.read(b)
+
+        extended = True if flags & (1 << 0) else False
+        default = True if flags & (1 << 1) else False
+        stars = Long.read(b)
+
+        yearly_boosts = Int.read(b)
+
+        store_product = String.read(b) if flags & (1 << 2) else None
+        currency = String.read(b)
+
+        amount = Long.read(b)
+
+        winners = TLObject.read(b)
+
+        return StarsGiveawayOption(stars=stars, yearly_boosts=yearly_boosts, currency=currency, amount=amount, winners=winners, extended=extended, default=default, store_product=store_product)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.extended else 0
+        flags |= (1 << 1) if self.default else 0
+        flags |= (1 << 2) if self.store_product is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.stars))
+
+        b.write(Int(self.yearly_boosts))
+
+        if self.store_product is not None:
+            b.write(String(self.store_product))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.amount))
+
+        b.write(Vector(self.winners))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_giveaway_winners_option.py b/pyrogram/raw/types/stars_giveaway_winners_option.py
new file mode 100644
index 00000000..cf50462c
--- /dev/null
+++ b/pyrogram/raw/types/stars_giveaway_winners_option.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsGiveawayWinnersOption(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsGiveawayWinnersOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``54236209``
+
+    Parameters:
+        users (``int`` ``32-bit``):
+            N/A
+
+        per_user_stars (``int`` ``64-bit``):
+            N/A
+
+        default (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["users", "per_user_stars", "default"]
+
+    ID = 0x54236209
+    QUALNAME = "types.StarsGiveawayWinnersOption"
+
+    def __init__(self, *, users: int, per_user_stars: int, default: Optional[bool] = None) -> None:
+        self.users = users  # int
+        self.per_user_stars = per_user_stars  # long
+        self.default = default  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsGiveawayWinnersOption":
+
+        flags = Int.read(b)
+
+        default = True if flags & (1 << 0) else False
+        users = Int.read(b)
+
+        per_user_stars = Long.read(b)
+
+        return StarsGiveawayWinnersOption(users=users, per_user_stars=per_user_stars, default=default)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.default else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.users))
+
+        b.write(Long(self.per_user_stars))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_rating.py b/pyrogram/raw/types/stars_rating.py
new file mode 100644
index 00000000..b2130193
--- /dev/null
+++ b/pyrogram/raw/types/stars_rating.py
@@ -0,0 +1,81 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsRating(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsRating`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1B0E4F07``
+
+    Parameters:
+        level (``int`` ``32-bit``):
+            N/A
+
+        current_level_stars (``int`` ``64-bit``):
+            N/A
+
+        stars (``int`` ``64-bit``):
+            N/A
+
+        next_level_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["level", "current_level_stars", "stars", "next_level_stars"]
+
+    ID = 0x1b0e4f07
+    QUALNAME = "types.StarsRating"
+
+    def __init__(self, *, level: int, current_level_stars: int, stars: int, next_level_stars: Optional[int] = None) -> None:
+        self.level = level  # int
+        self.current_level_stars = current_level_stars  # long
+        self.stars = stars  # long
+        self.next_level_stars = next_level_stars  # flags.0?long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsRating":
+
+        flags = Int.read(b)
+
+        level = Int.read(b)
+
+        current_level_stars = Long.read(b)
+
+        stars = Long.read(b)
+
+        next_level_stars = Long.read(b) if flags & (1 << 0) else None
+        return StarsRating(level=level, current_level_stars=current_level_stars, stars=stars, next_level_stars=next_level_stars)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_level_stars is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.level))
+
+        b.write(Long(self.current_level_stars))
+
+        b.write(Long(self.stars))
+
+        if self.next_level_stars is not None:
+            b.write(Long(self.next_level_stars))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_revenue_status.py b/pyrogram/raw/types/stars_revenue_status.py
new file mode 100644
index 00000000..10c3dcc3
--- /dev/null
+++ b/pyrogram/raw/types/stars_revenue_status.py
@@ -0,0 +1,87 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsRevenueStatus(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsRevenueStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FEBE5491``
+
+    Parameters:
+        current_balance (:obj:`StarsAmount `):
+            N/A
+
+        available_balance (:obj:`StarsAmount `):
+            N/A
+
+        overall_revenue (:obj:`StarsAmount `):
+            N/A
+
+        withdrawal_enabled (``bool``, *optional*):
+            N/A
+
+        next_withdrawal_at (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["current_balance", "available_balance", "overall_revenue", "withdrawal_enabled", "next_withdrawal_at"]
+
+    ID = 0xfebe5491
+    QUALNAME = "types.StarsRevenueStatus"
+
+    def __init__(self, *, current_balance: "raw.base.StarsAmount", available_balance: "raw.base.StarsAmount", overall_revenue: "raw.base.StarsAmount", withdrawal_enabled: Optional[bool] = None, next_withdrawal_at: Optional[int] = None) -> None:
+        self.current_balance = current_balance  # StarsAmount
+        self.available_balance = available_balance  # StarsAmount
+        self.overall_revenue = overall_revenue  # StarsAmount
+        self.withdrawal_enabled = withdrawal_enabled  # flags.0?true
+        self.next_withdrawal_at = next_withdrawal_at  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsRevenueStatus":
+
+        flags = Int.read(b)
+
+        withdrawal_enabled = True if flags & (1 << 0) else False
+        current_balance = TLObject.read(b)
+
+        available_balance = TLObject.read(b)
+
+        overall_revenue = TLObject.read(b)
+
+        next_withdrawal_at = Int.read(b) if flags & (1 << 1) else None
+        return StarsRevenueStatus(current_balance=current_balance, available_balance=available_balance, overall_revenue=overall_revenue, withdrawal_enabled=withdrawal_enabled, next_withdrawal_at=next_withdrawal_at)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.withdrawal_enabled else 0
+        flags |= (1 << 1) if self.next_withdrawal_at is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.current_balance.write())
+
+        b.write(self.available_balance.write())
+
+        b.write(self.overall_revenue.write())
+
+        if self.next_withdrawal_at is not None:
+            b.write(Int(self.next_withdrawal_at))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_subscription.py b/pyrogram/raw/types/stars_subscription.py
new file mode 100644
index 00000000..0f4977aa
--- /dev/null
+++ b/pyrogram/raw/types/stars_subscription.py
@@ -0,0 +1,141 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsSubscription(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsSubscription`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2E6EAB1A``
+
+    Parameters:
+        id (``str``):
+            N/A
+
+        peer (:obj:`Peer `):
+            N/A
+
+        until_date (``int`` ``32-bit``):
+            N/A
+
+        pricing (:obj:`StarsSubscriptionPricing `):
+            N/A
+
+        canceled (``bool``, *optional*):
+            N/A
+
+        can_refulfill (``bool``, *optional*):
+            N/A
+
+        missing_balance (``bool``, *optional*):
+            N/A
+
+        bot_canceled (``bool``, *optional*):
+            N/A
+
+        chat_invite_hash (``str``, *optional*):
+            N/A
+
+        title (``str``, *optional*):
+            N/A
+
+        photo (:obj:`WebDocument `, *optional*):
+            N/A
+
+        invoice_slug (``str``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "peer", "until_date", "pricing", "canceled", "can_refulfill", "missing_balance", "bot_canceled", "chat_invite_hash", "title", "photo", "invoice_slug"]
+
+    ID = 0x2e6eab1a
+    QUALNAME = "types.StarsSubscription"
+
+    def __init__(self, *, id: str, peer: "raw.base.Peer", until_date: int, pricing: "raw.base.StarsSubscriptionPricing", canceled: Optional[bool] = None, can_refulfill: Optional[bool] = None, missing_balance: Optional[bool] = None, bot_canceled: Optional[bool] = None, chat_invite_hash: Optional[str] = None, title: Optional[str] = None, photo: "raw.base.WebDocument" = None, invoice_slug: Optional[str] = None) -> None:
+        self.id = id  # string
+        self.peer = peer  # Peer
+        self.until_date = until_date  # int
+        self.pricing = pricing  # StarsSubscriptionPricing
+        self.canceled = canceled  # flags.0?true
+        self.can_refulfill = can_refulfill  # flags.1?true
+        self.missing_balance = missing_balance  # flags.2?true
+        self.bot_canceled = bot_canceled  # flags.7?true
+        self.chat_invite_hash = chat_invite_hash  # flags.3?string
+        self.title = title  # flags.4?string
+        self.photo = photo  # flags.5?WebDocument
+        self.invoice_slug = invoice_slug  # flags.6?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsSubscription":
+
+        flags = Int.read(b)
+
+        canceled = True if flags & (1 << 0) else False
+        can_refulfill = True if flags & (1 << 1) else False
+        missing_balance = True if flags & (1 << 2) else False
+        bot_canceled = True if flags & (1 << 7) else False
+        id = String.read(b)
+
+        peer = TLObject.read(b)
+
+        until_date = Int.read(b)
+
+        pricing = TLObject.read(b)
+
+        chat_invite_hash = String.read(b) if flags & (1 << 3) else None
+        title = String.read(b) if flags & (1 << 4) else None
+        photo = TLObject.read(b) if flags & (1 << 5) else None
+
+        invoice_slug = String.read(b) if flags & (1 << 6) else None
+        return StarsSubscription(id=id, peer=peer, until_date=until_date, pricing=pricing, canceled=canceled, can_refulfill=can_refulfill, missing_balance=missing_balance, bot_canceled=bot_canceled, chat_invite_hash=chat_invite_hash, title=title, photo=photo, invoice_slug=invoice_slug)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.canceled else 0
+        flags |= (1 << 1) if self.can_refulfill else 0
+        flags |= (1 << 2) if self.missing_balance else 0
+        flags |= (1 << 7) if self.bot_canceled else 0
+        flags |= (1 << 3) if self.chat_invite_hash is not None else 0
+        flags |= (1 << 4) if self.title is not None else 0
+        flags |= (1 << 5) if self.photo is not None else 0
+        flags |= (1 << 6) if self.invoice_slug is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.id))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.until_date))
+
+        b.write(self.pricing.write())
+
+        if self.chat_invite_hash is not None:
+            b.write(String(self.chat_invite_hash))
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        if self.invoice_slug is not None:
+            b.write(String(self.invoice_slug))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_subscription_pricing.py b/pyrogram/raw/types/stars_subscription_pricing.py
new file mode 100644
index 00000000..af5748f6
--- /dev/null
+++ b/pyrogram/raw/types/stars_subscription_pricing.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsSubscriptionPricing(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsSubscriptionPricing`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5416D58``
+
+    Parameters:
+        period (``int`` ``32-bit``):
+            N/A
+
+        amount (``int`` ``64-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["period", "amount"]
+
+    ID = 0x5416d58
+    QUALNAME = "types.StarsSubscriptionPricing"
+
+    def __init__(self, *, period: int, amount: int) -> None:
+        self.period = period  # int
+        self.amount = amount  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsSubscriptionPricing":
+        # No flags
+
+        period = Int.read(b)
+
+        amount = Long.read(b)
+
+        return StarsSubscriptionPricing(period=period, amount=amount)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.period))
+
+        b.write(Long(self.amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_ton_amount.py b/pyrogram/raw/types/stars_ton_amount.py
new file mode 100644
index 00000000..d13c8ba7
--- /dev/null
+++ b/pyrogram/raw/types/stars_ton_amount.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTonAmount(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsAmount`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``74AEE3E0``
+
+    Parameters:
+        amount (``int`` ``64-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["amount"]
+
+    ID = 0x74aee3e0
+    QUALNAME = "types.StarsTonAmount"
+
+    def __init__(self, *, amount: int) -> None:
+        self.amount = amount  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTonAmount":
+        # No flags
+
+        amount = Long.read(b)
+
+        return StarsTonAmount(amount=amount)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_topup_option.py b/pyrogram/raw/types/stars_topup_option.py
new file mode 100644
index 00000000..1718bc40
--- /dev/null
+++ b/pyrogram/raw/types/stars_topup_option.py
@@ -0,0 +1,96 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTopupOption(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTopupOption`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BD915C0``
+
+    Parameters:
+        stars (``int`` ``64-bit``):
+
+
+        currency (``str``):
+
+
+        amount (``int`` ``64-bit``):
+
+
+        extended (``bool``, *optional*):
+
+
+        store_product (``str``, *optional*):
+
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            payments.GetStarsTopupOptions
+    """
+
+    __slots__: List[str] = ["stars", "currency", "amount", "extended", "store_product"]
+
+    ID = 0xbd915c0
+    QUALNAME = "types.StarsTopupOption"
+
+    def __init__(self, *, stars: int, currency: str, amount: int, extended: Optional[bool] = None, store_product: Optional[str] = None) -> None:
+        self.stars = stars  # long
+        self.currency = currency  # string
+        self.amount = amount  # long
+        self.extended = extended  # flags.1?true
+        self.store_product = store_product  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTopupOption":
+
+        flags = Int.read(b)
+
+        extended = True if flags & (1 << 1) else False
+        stars = Long.read(b)
+
+        store_product = String.read(b) if flags & (1 << 0) else None
+        currency = String.read(b)
+
+        amount = Long.read(b)
+
+        return StarsTopupOption(stars=stars, currency=currency, amount=amount, extended=extended, store_product=store_product)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.extended else 0
+        flags |= (1 << 0) if self.store_product is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.stars))
+
+        if self.store_product is not None:
+            b.write(String(self.store_product))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction.py b/pyrogram/raw/types/stars_transaction.py
new file mode 100644
index 00000000..a0dcb89d
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction.py
@@ -0,0 +1,364 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransaction(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``13659EB0``
+
+    Parameters:
+        id (``str``):
+
+
+        amount (:obj:`StarsAmount `):
+            N/A
+
+        date (``int`` ``32-bit``):
+
+
+        peer (:obj:`StarsTransactionPeer `):
+
+
+        refund (``bool``, *optional*):
+
+
+        pending (``bool``, *optional*):
+            N/A
+
+        failed (``bool``, *optional*):
+            N/A
+
+        gift (``bool``, *optional*):
+            N/A
+
+        reaction (``bool``, *optional*):
+            N/A
+
+        subscription (``bool``, *optional*):
+            N/A
+
+        floodskip (``bool``, *optional*):
+            N/A
+
+        stargift_upgrade (``bool``, *optional*):
+            N/A
+
+        paid_message (``bool``, *optional*):
+            N/A
+
+        premium_gift (``bool``, *optional*):
+            N/A
+
+        business_transfer (``bool``, *optional*):
+            N/A
+
+        stargift_resale (``bool``, *optional*):
+            N/A
+
+        posts_search (``bool``, *optional*):
+            N/A
+
+        stargift_prepaid_upgrade (``bool``, *optional*):
+            N/A
+
+        stargift_drop_original_details (``bool``, *optional*):
+            N/A
+
+        phonegroup_message (``bool``, *optional*):
+            N/A
+
+        stargift_auction_bid (``bool``, *optional*):
+            N/A
+
+        offer (``bool``, *optional*):
+            N/A
+
+        title (``str``, *optional*):
+
+
+        description (``str``, *optional*):
+
+
+        photo (:obj:`WebDocument `, *optional*):
+
+
+        transaction_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        transaction_url (``str``, *optional*):
+            N/A
+
+        bot_payload (``bytes``, *optional*):
+            N/A
+
+        msg_id (``int`` ``32-bit``, *optional*):
+            N/A
+
+        extended_media (List of :obj:`MessageMedia `, *optional*):
+            N/A
+
+        subscription_period (``int`` ``32-bit``, *optional*):
+            N/A
+
+        giveaway_post_id (``int`` ``32-bit``, *optional*):
+            N/A
+
+        stargift (:obj:`StarGift `, *optional*):
+            N/A
+
+        floodskip_number (``int`` ``32-bit``, *optional*):
+            N/A
+
+        starref_commission_permille (``int`` ``32-bit``, *optional*):
+            N/A
+
+        starref_peer (:obj:`Peer `, *optional*):
+            N/A
+
+        starref_amount (:obj:`StarsAmount `, *optional*):
+            N/A
+
+        paid_messages (``int`` ``32-bit``, *optional*):
+            N/A
+
+        premium_gift_months (``int`` ``32-bit``, *optional*):
+            N/A
+
+        ads_proceeds_from_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        ads_proceeds_to_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "amount", "date", "peer", "refund", "pending", "failed", "gift", "reaction", "subscription", "floodskip", "stargift_upgrade", "paid_message", "premium_gift", "business_transfer", "stargift_resale", "posts_search", "stargift_prepaid_upgrade", "stargift_drop_original_details", "phonegroup_message", "stargift_auction_bid", "offer", "title", "description", "photo", "transaction_date", "transaction_url", "bot_payload", "msg_id", "extended_media", "subscription_period", "giveaway_post_id", "stargift", "floodskip_number", "starref_commission_permille", "starref_peer", "starref_amount", "paid_messages", "premium_gift_months", "ads_proceeds_from_date", "ads_proceeds_to_date"]
+
+    ID = 0x13659eb0
+    QUALNAME = "types.StarsTransaction"
+
+    def __init__(self, *, id: str, amount: "raw.base.StarsAmount", date: int, peer: "raw.base.StarsTransactionPeer", refund: Optional[bool] = None, pending: Optional[bool] = None, failed: Optional[bool] = None, gift: Optional[bool] = None, reaction: Optional[bool] = None, subscription: Optional[bool] = None, floodskip: Optional[bool] = None, stargift_upgrade: Optional[bool] = None, paid_message: Optional[bool] = None, premium_gift: Optional[bool] = None, business_transfer: Optional[bool] = None, stargift_resale: Optional[bool] = None, posts_search: Optional[bool] = None, stargift_prepaid_upgrade: Optional[bool] = None, stargift_drop_original_details: Optional[bool] = None, phonegroup_message: Optional[bool] = None, stargift_auction_bid: Optional[bool] = None, offer: Optional[bool] = None, title: Optional[str] = None, description: Optional[str] = None, photo: "raw.base.WebDocument" = None, transaction_date: Optional[int] = None, transaction_url: Optional[str] = None, bot_payload: Optional[bytes] = None, msg_id: Optional[int] = None, extended_media: Optional[List["raw.base.MessageMedia"]] = None, subscription_period: Optional[int] = None, giveaway_post_id: Optional[int] = None, stargift: "raw.base.StarGift" = None, floodskip_number: Optional[int] = None, starref_commission_permille: Optional[int] = None, starref_peer: "raw.base.Peer" = None, starref_amount: "raw.base.StarsAmount" = None, paid_messages: Optional[int] = None, premium_gift_months: Optional[int] = None, ads_proceeds_from_date: Optional[int] = None, ads_proceeds_to_date: Optional[int] = None) -> None:
+        self.id = id  # string
+        self.amount = amount  # StarsAmount
+        self.date = date  # int
+        self.peer = peer  # StarsTransactionPeer
+        self.refund = refund  # flags.3?true
+        self.pending = pending  # flags.4?true
+        self.failed = failed  # flags.6?true
+        self.gift = gift  # flags.10?true
+        self.reaction = reaction  # flags.11?true
+        self.subscription = subscription  # flags.12?true
+        self.floodskip = floodskip  # flags.15?true
+        self.stargift_upgrade = stargift_upgrade  # flags.18?true
+        self.paid_message = paid_message  # flags.19?true
+        self.premium_gift = premium_gift  # flags.20?true
+        self.business_transfer = business_transfer  # flags.21?true
+        self.stargift_resale = stargift_resale  # flags.22?true
+        self.posts_search = posts_search  # flags.24?true
+        self.stargift_prepaid_upgrade = stargift_prepaid_upgrade  # flags.25?true
+        self.stargift_drop_original_details = stargift_drop_original_details  # flags.26?true
+        self.phonegroup_message = phonegroup_message  # flags.27?true
+        self.stargift_auction_bid = stargift_auction_bid  # flags.28?true
+        self.offer = offer  # flags.29?true
+        self.title = title  # flags.0?string
+        self.description = description  # flags.1?string
+        self.photo = photo  # flags.2?WebDocument
+        self.transaction_date = transaction_date  # flags.5?int
+        self.transaction_url = transaction_url  # flags.5?string
+        self.bot_payload = bot_payload  # flags.7?bytes
+        self.msg_id = msg_id  # flags.8?int
+        self.extended_media = extended_media  # flags.9?Vector
+        self.subscription_period = subscription_period  # flags.12?int
+        self.giveaway_post_id = giveaway_post_id  # flags.13?int
+        self.stargift = stargift  # flags.14?StarGift
+        self.floodskip_number = floodskip_number  # flags.15?int
+        self.starref_commission_permille = starref_commission_permille  # flags.16?int
+        self.starref_peer = starref_peer  # flags.17?Peer
+        self.starref_amount = starref_amount  # flags.17?StarsAmount
+        self.paid_messages = paid_messages  # flags.19?int
+        self.premium_gift_months = premium_gift_months  # flags.20?int
+        self.ads_proceeds_from_date = ads_proceeds_from_date  # flags.23?int
+        self.ads_proceeds_to_date = ads_proceeds_to_date  # flags.23?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransaction":
+
+        flags = Int.read(b)
+
+        refund = True if flags & (1 << 3) else False
+        pending = True if flags & (1 << 4) else False
+        failed = True if flags & (1 << 6) else False
+        gift = True if flags & (1 << 10) else False
+        reaction = True if flags & (1 << 11) else False
+        subscription = True if flags & (1 << 12) else False
+        floodskip = True if flags & (1 << 15) else False
+        stargift_upgrade = True if flags & (1 << 18) else False
+        paid_message = True if flags & (1 << 19) else False
+        premium_gift = True if flags & (1 << 20) else False
+        business_transfer = True if flags & (1 << 21) else False
+        stargift_resale = True if flags & (1 << 22) else False
+        posts_search = True if flags & (1 << 24) else False
+        stargift_prepaid_upgrade = True if flags & (1 << 25) else False
+        stargift_drop_original_details = True if flags & (1 << 26) else False
+        phonegroup_message = True if flags & (1 << 27) else False
+        stargift_auction_bid = True if flags & (1 << 28) else False
+        offer = True if flags & (1 << 29) else False
+        id = String.read(b)
+
+        amount = TLObject.read(b)
+
+        date = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        title = String.read(b) if flags & (1 << 0) else None
+        description = String.read(b) if flags & (1 << 1) else None
+        photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        transaction_date = Int.read(b) if flags & (1 << 5) else None
+        transaction_url = String.read(b) if flags & (1 << 5) else None
+        bot_payload = Bytes.read(b) if flags & (1 << 7) else None
+        msg_id = Int.read(b) if flags & (1 << 8) else None
+        extended_media = TLObject.read(b) if flags & (1 << 9) else []
+
+        subscription_period = Int.read(b) if flags & (1 << 12) else None
+        giveaway_post_id = Int.read(b) if flags & (1 << 13) else None
+        stargift = TLObject.read(b) if flags & (1 << 14) else None
+
+        floodskip_number = Int.read(b) if flags & (1 << 15) else None
+        starref_commission_permille = Int.read(b) if flags & (1 << 16) else None
+        starref_peer = TLObject.read(b) if flags & (1 << 17) else None
+
+        starref_amount = TLObject.read(b) if flags & (1 << 17) else None
+
+        paid_messages = Int.read(b) if flags & (1 << 19) else None
+        premium_gift_months = Int.read(b) if flags & (1 << 20) else None
+        ads_proceeds_from_date = Int.read(b) if flags & (1 << 23) else None
+        ads_proceeds_to_date = Int.read(b) if flags & (1 << 23) else None
+        return StarsTransaction(id=id, amount=amount, date=date, peer=peer, refund=refund, pending=pending, failed=failed, gift=gift, reaction=reaction, subscription=subscription, floodskip=floodskip, stargift_upgrade=stargift_upgrade, paid_message=paid_message, premium_gift=premium_gift, business_transfer=business_transfer, stargift_resale=stargift_resale, posts_search=posts_search, stargift_prepaid_upgrade=stargift_prepaid_upgrade, stargift_drop_original_details=stargift_drop_original_details, phonegroup_message=phonegroup_message, stargift_auction_bid=stargift_auction_bid, offer=offer, title=title, description=description, photo=photo, transaction_date=transaction_date, transaction_url=transaction_url, bot_payload=bot_payload, msg_id=msg_id, extended_media=extended_media, subscription_period=subscription_period, giveaway_post_id=giveaway_post_id, stargift=stargift, floodskip_number=floodskip_number, starref_commission_permille=starref_commission_permille, starref_peer=starref_peer, starref_amount=starref_amount, paid_messages=paid_messages, premium_gift_months=premium_gift_months, ads_proceeds_from_date=ads_proceeds_from_date, ads_proceeds_to_date=ads_proceeds_to_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 3) if self.refund else 0
+        flags |= (1 << 4) if self.pending else 0
+        flags |= (1 << 6) if self.failed else 0
+        flags |= (1 << 10) if self.gift else 0
+        flags |= (1 << 11) if self.reaction else 0
+        flags |= (1 << 12) if self.subscription else 0
+        flags |= (1 << 15) if self.floodskip else 0
+        flags |= (1 << 18) if self.stargift_upgrade else 0
+        flags |= (1 << 19) if self.paid_message else 0
+        flags |= (1 << 20) if self.premium_gift else 0
+        flags |= (1 << 21) if self.business_transfer else 0
+        flags |= (1 << 22) if self.stargift_resale else 0
+        flags |= (1 << 24) if self.posts_search else 0
+        flags |= (1 << 25) if self.stargift_prepaid_upgrade else 0
+        flags |= (1 << 26) if self.stargift_drop_original_details else 0
+        flags |= (1 << 27) if self.phonegroup_message else 0
+        flags |= (1 << 28) if self.stargift_auction_bid else 0
+        flags |= (1 << 29) if self.offer else 0
+        flags |= (1 << 0) if self.title is not None else 0
+        flags |= (1 << 1) if self.description is not None else 0
+        flags |= (1 << 2) if self.photo is not None else 0
+        flags |= (1 << 5) if self.transaction_date is not None else 0
+        flags |= (1 << 5) if self.transaction_url is not None else 0
+        flags |= (1 << 7) if self.bot_payload is not None else 0
+        flags |= (1 << 8) if self.msg_id is not None else 0
+        flags |= (1 << 9) if self.extended_media else 0
+        flags |= (1 << 12) if self.subscription_period is not None else 0
+        flags |= (1 << 13) if self.giveaway_post_id is not None else 0
+        flags |= (1 << 14) if self.stargift is not None else 0
+        flags |= (1 << 15) if self.floodskip_number is not None else 0
+        flags |= (1 << 16) if self.starref_commission_permille is not None else 0
+        flags |= (1 << 17) if self.starref_peer is not None else 0
+        flags |= (1 << 17) if self.starref_amount is not None else 0
+        flags |= (1 << 19) if self.paid_messages is not None else 0
+        flags |= (1 << 20) if self.premium_gift_months is not None else 0
+        flags |= (1 << 23) if self.ads_proceeds_from_date is not None else 0
+        flags |= (1 << 23) if self.ads_proceeds_to_date is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.id))
+
+        b.write(self.amount.write())
+
+        b.write(Int(self.date))
+
+        b.write(self.peer.write())
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.description is not None:
+            b.write(String(self.description))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        if self.transaction_date is not None:
+            b.write(Int(self.transaction_date))
+
+        if self.transaction_url is not None:
+            b.write(String(self.transaction_url))
+
+        if self.bot_payload is not None:
+            b.write(Bytes(self.bot_payload))
+
+        if self.msg_id is not None:
+            b.write(Int(self.msg_id))
+
+        if self.extended_media is not None:
+            b.write(Vector(self.extended_media))
+
+        if self.subscription_period is not None:
+            b.write(Int(self.subscription_period))
+
+        if self.giveaway_post_id is not None:
+            b.write(Int(self.giveaway_post_id))
+
+        if self.stargift is not None:
+            b.write(self.stargift.write())
+
+        if self.floodskip_number is not None:
+            b.write(Int(self.floodskip_number))
+
+        if self.starref_commission_permille is not None:
+            b.write(Int(self.starref_commission_permille))
+
+        if self.starref_peer is not None:
+            b.write(self.starref_peer.write())
+
+        if self.starref_amount is not None:
+            b.write(self.starref_amount.write())
+
+        if self.paid_messages is not None:
+            b.write(Int(self.paid_messages))
+
+        if self.premium_gift_months is not None:
+            b.write(Int(self.premium_gift_months))
+
+        if self.ads_proceeds_from_date is not None:
+            b.write(Int(self.ads_proceeds_from_date))
+
+        if self.ads_proceeds_to_date is not None:
+            b.write(Int(self.ads_proceeds_to_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer.py b/pyrogram/raw/types/stars_transaction_peer.py
new file mode 100644
index 00000000..5760f1e3
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeer(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D80DA15D``
+
+    Parameters:
+        peer (:obj:`Peer `):
+
+
+    """
+
+    __slots__: List[str] = ["peer"]
+
+    ID = 0xd80da15d
+    QUALNAME = "types.StarsTransactionPeer"
+
+    def __init__(self, *, peer: "raw.base.Peer") -> None:
+        self.peer = peer  # Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeer":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        return StarsTransactionPeer(peer=peer)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_ads.py b/pyrogram/raw/types/stars_transaction_peer_ads.py
new file mode 100644
index 00000000..b54ff3e2
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_ads.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerAds(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``60682812``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x60682812
+    QUALNAME = "types.StarsTransactionPeerAds"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerAds":
+        # No flags
+
+        return StarsTransactionPeerAds()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_api.py b/pyrogram/raw/types/stars_transaction_peer_api.py
new file mode 100644
index 00000000..9a08dd1f
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_api.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerAPI(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F9677AAD``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xf9677aad
+    QUALNAME = "types.StarsTransactionPeerAPI"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerAPI":
+        # No flags
+
+        return StarsTransactionPeerAPI()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_app_store.py b/pyrogram/raw/types/stars_transaction_peer_app_store.py
new file mode 100644
index 00000000..f530c64d
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_app_store.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerAppStore(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B457B375``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xb457b375
+    QUALNAME = "types.StarsTransactionPeerAppStore"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerAppStore":
+        # No flags
+
+        return StarsTransactionPeerAppStore()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_fragment.py b/pyrogram/raw/types/stars_transaction_peer_fragment.py
new file mode 100644
index 00000000..702fa1a5
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_fragment.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerFragment(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E92FD902``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xe92fd902
+    QUALNAME = "types.StarsTransactionPeerFragment"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerFragment":
+        # No flags
+
+        return StarsTransactionPeerFragment()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_play_market.py b/pyrogram/raw/types/stars_transaction_peer_play_market.py
new file mode 100644
index 00000000..a3be5c50
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_play_market.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerPlayMarket(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7B560A0B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x7b560a0b
+    QUALNAME = "types.StarsTransactionPeerPlayMarket"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerPlayMarket":
+        # No flags
+
+        return StarsTransactionPeerPlayMarket()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_premium_bot.py b/pyrogram/raw/types/stars_transaction_peer_premium_bot.py
new file mode 100644
index 00000000..4fe2fdbf
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_premium_bot.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerPremiumBot(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``250DBAF8``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x250dbaf8
+    QUALNAME = "types.StarsTransactionPeerPremiumBot"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerPremiumBot":
+        # No flags
+
+        return StarsTransactionPeerPremiumBot()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stars_transaction_peer_unsupported.py b/pyrogram/raw/types/stars_transaction_peer_unsupported.py
new file mode 100644
index 00000000..5e63ff8c
--- /dev/null
+++ b/pyrogram/raw/types/stars_transaction_peer_unsupported.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StarsTransactionPeerUnsupported(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.StarsTransactionPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``95F2BFE4``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x95f2bfe4
+    QUALNAME = "types.StarsTransactionPeerUnsupported"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StarsTransactionPeerUnsupported":
+        # No flags
+
+        return StarsTransactionPeerUnsupported()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats/__init__.py b/pyrogram/raw/types/stats/__init__.py
new file mode 100644
index 00000000..ca6f4dc7
--- /dev/null
+++ b/pyrogram/raw/types/stats/__init__.py
@@ -0,0 +1,41 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .broadcast_stats import BroadcastStats
+from .megagroup_stats import MegagroupStats
+from .message_stats import MessageStats
+from .story_stats import StoryStats
+from .public_forwards import PublicForwards
+
+
+__all__ = [
+    "BroadcastStats",
+    "MegagroupStats",
+    "MessageStats",
+    "StoryStats",
+    "PublicForwards",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/stats/broadcast_stats.py b/pyrogram/raw/types/stats/broadcast_stats.py
new file mode 100644
index 00000000..b32371b0
--- /dev/null
+++ b/pyrogram/raw/types/stats/broadcast_stats.py
@@ -0,0 +1,231 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class BroadcastStats(TLObject):  # type: ignore
+    """Channel statistics.
+
+    Constructor of :obj:`~pyrogram.raw.base.stats.BroadcastStats`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``396CA5FC``
+
+    Parameters:
+        period (:obj:`StatsDateRangeDays `):
+            Period in consideration
+
+        followers (:obj:`StatsAbsValueAndPrev `):
+            Follower count change for period in consideration
+
+        views_per_post (:obj:`StatsAbsValueAndPrev `):
+            total_viewcount/postcount, for posts posted during the period in consideration. Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date).
+
+        shares_per_post (:obj:`StatsAbsValueAndPrev `):
+            total_sharecount/postcount, for posts posted during the period in consideration. Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
+
+        reactions_per_post (:obj:`StatsAbsValueAndPrev `):
+            total_reactions/postcount, for posts posted during the period in consideration. Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
+
+        views_per_story (:obj:`StatsAbsValueAndPrev `):
+            total_views/storycount, for posts posted during the period in consideration. Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
+
+        shares_per_story (:obj:`StatsAbsValueAndPrev `):
+            total_shares/storycount, for posts posted during the period in consideration. Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
+
+        reactions_per_story (:obj:`StatsAbsValueAndPrev `):
+            total_reactions/storycount, for posts posted during the period in consideration. Note that in this case, current refers to the period in consideration (min_date till max_date), and prev refers to the previous period ((min_date - (max_date - min_date)) till min_date)
+
+        enabled_notifications (:obj:`StatsPercentValue `):
+            Percentage of subscribers with enabled notifications
+
+        growth_graph (:obj:`StatsGraph `):
+            Channel growth graph (absolute subscriber count)
+
+        followers_graph (:obj:`StatsGraph `):
+            Followers growth graph (relative subscriber count)
+
+        mute_graph (:obj:`StatsGraph `):
+            Muted users graph (relative)
+
+        top_hours_graph (:obj:`StatsGraph `):
+            Views per hour graph (absolute)
+
+        interactions_graph (:obj:`StatsGraph `):
+            Interactions graph (absolute)
+
+        iv_interactions_graph (:obj:`StatsGraph `):
+            IV interactions graph (absolute)
+
+        views_by_source_graph (:obj:`StatsGraph `):
+            Views by source graph (absolute)
+
+        new_followers_by_source_graph (:obj:`StatsGraph `):
+            New followers by source graph (absolute)
+
+        languages_graph (:obj:`StatsGraph `):
+            Subscriber language graph (pie chart)
+
+        reactions_by_emotion_graph (:obj:`StatsGraph `):
+            A graph containing the number of reactions on posts categorized by emotion
+
+        story_interactions_graph (:obj:`StatsGraph `):
+            A graph containing the number of story views and shares
+
+        story_reactions_by_emotion_graph (:obj:`StatsGraph `):
+            A graph containing the number of reactions on stories categorized by emotion
+
+        recent_posts_interactions (List of :obj:`PostInteractionCounters `):
+            Detailed statistics about number of views and shares of recently sent messages and stories
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.GetBroadcastStats
+    """
+
+    __slots__: List[str] = ["period", "followers", "views_per_post", "shares_per_post", "reactions_per_post", "views_per_story", "shares_per_story", "reactions_per_story", "enabled_notifications", "growth_graph", "followers_graph", "mute_graph", "top_hours_graph", "interactions_graph", "iv_interactions_graph", "views_by_source_graph", "new_followers_by_source_graph", "languages_graph", "reactions_by_emotion_graph", "story_interactions_graph", "story_reactions_by_emotion_graph", "recent_posts_interactions"]
+
+    ID = 0x396ca5fc
+    QUALNAME = "types.stats.BroadcastStats"
+
+    def __init__(self, *, period: "raw.base.StatsDateRangeDays", followers: "raw.base.StatsAbsValueAndPrev", views_per_post: "raw.base.StatsAbsValueAndPrev", shares_per_post: "raw.base.StatsAbsValueAndPrev", reactions_per_post: "raw.base.StatsAbsValueAndPrev", views_per_story: "raw.base.StatsAbsValueAndPrev", shares_per_story: "raw.base.StatsAbsValueAndPrev", reactions_per_story: "raw.base.StatsAbsValueAndPrev", enabled_notifications: "raw.base.StatsPercentValue", growth_graph: "raw.base.StatsGraph", followers_graph: "raw.base.StatsGraph", mute_graph: "raw.base.StatsGraph", top_hours_graph: "raw.base.StatsGraph", interactions_graph: "raw.base.StatsGraph", iv_interactions_graph: "raw.base.StatsGraph", views_by_source_graph: "raw.base.StatsGraph", new_followers_by_source_graph: "raw.base.StatsGraph", languages_graph: "raw.base.StatsGraph", reactions_by_emotion_graph: "raw.base.StatsGraph", story_interactions_graph: "raw.base.StatsGraph", story_reactions_by_emotion_graph: "raw.base.StatsGraph", recent_posts_interactions: List["raw.base.PostInteractionCounters"]) -> None:
+        self.period = period  # StatsDateRangeDays
+        self.followers = followers  # StatsAbsValueAndPrev
+        self.views_per_post = views_per_post  # StatsAbsValueAndPrev
+        self.shares_per_post = shares_per_post  # StatsAbsValueAndPrev
+        self.reactions_per_post = reactions_per_post  # StatsAbsValueAndPrev
+        self.views_per_story = views_per_story  # StatsAbsValueAndPrev
+        self.shares_per_story = shares_per_story  # StatsAbsValueAndPrev
+        self.reactions_per_story = reactions_per_story  # StatsAbsValueAndPrev
+        self.enabled_notifications = enabled_notifications  # StatsPercentValue
+        self.growth_graph = growth_graph  # StatsGraph
+        self.followers_graph = followers_graph  # StatsGraph
+        self.mute_graph = mute_graph  # StatsGraph
+        self.top_hours_graph = top_hours_graph  # StatsGraph
+        self.interactions_graph = interactions_graph  # StatsGraph
+        self.iv_interactions_graph = iv_interactions_graph  # StatsGraph
+        self.views_by_source_graph = views_by_source_graph  # StatsGraph
+        self.new_followers_by_source_graph = new_followers_by_source_graph  # StatsGraph
+        self.languages_graph = languages_graph  # StatsGraph
+        self.reactions_by_emotion_graph = reactions_by_emotion_graph  # StatsGraph
+        self.story_interactions_graph = story_interactions_graph  # StatsGraph
+        self.story_reactions_by_emotion_graph = story_reactions_by_emotion_graph  # StatsGraph
+        self.recent_posts_interactions = recent_posts_interactions  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "BroadcastStats":
+        # No flags
+
+        period = TLObject.read(b)
+
+        followers = TLObject.read(b)
+
+        views_per_post = TLObject.read(b)
+
+        shares_per_post = TLObject.read(b)
+
+        reactions_per_post = TLObject.read(b)
+
+        views_per_story = TLObject.read(b)
+
+        shares_per_story = TLObject.read(b)
+
+        reactions_per_story = TLObject.read(b)
+
+        enabled_notifications = TLObject.read(b)
+
+        growth_graph = TLObject.read(b)
+
+        followers_graph = TLObject.read(b)
+
+        mute_graph = TLObject.read(b)
+
+        top_hours_graph = TLObject.read(b)
+
+        interactions_graph = TLObject.read(b)
+
+        iv_interactions_graph = TLObject.read(b)
+
+        views_by_source_graph = TLObject.read(b)
+
+        new_followers_by_source_graph = TLObject.read(b)
+
+        languages_graph = TLObject.read(b)
+
+        reactions_by_emotion_graph = TLObject.read(b)
+
+        story_interactions_graph = TLObject.read(b)
+
+        story_reactions_by_emotion_graph = TLObject.read(b)
+
+        recent_posts_interactions = TLObject.read(b)
+
+        return BroadcastStats(period=period, followers=followers, views_per_post=views_per_post, shares_per_post=shares_per_post, reactions_per_post=reactions_per_post, views_per_story=views_per_story, shares_per_story=shares_per_story, reactions_per_story=reactions_per_story, enabled_notifications=enabled_notifications, growth_graph=growth_graph, followers_graph=followers_graph, mute_graph=mute_graph, top_hours_graph=top_hours_graph, interactions_graph=interactions_graph, iv_interactions_graph=iv_interactions_graph, views_by_source_graph=views_by_source_graph, new_followers_by_source_graph=new_followers_by_source_graph, languages_graph=languages_graph, reactions_by_emotion_graph=reactions_by_emotion_graph, story_interactions_graph=story_interactions_graph, story_reactions_by_emotion_graph=story_reactions_by_emotion_graph, recent_posts_interactions=recent_posts_interactions)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.period.write())
+
+        b.write(self.followers.write())
+
+        b.write(self.views_per_post.write())
+
+        b.write(self.shares_per_post.write())
+
+        b.write(self.reactions_per_post.write())
+
+        b.write(self.views_per_story.write())
+
+        b.write(self.shares_per_story.write())
+
+        b.write(self.reactions_per_story.write())
+
+        b.write(self.enabled_notifications.write())
+
+        b.write(self.growth_graph.write())
+
+        b.write(self.followers_graph.write())
+
+        b.write(self.mute_graph.write())
+
+        b.write(self.top_hours_graph.write())
+
+        b.write(self.interactions_graph.write())
+
+        b.write(self.iv_interactions_graph.write())
+
+        b.write(self.views_by_source_graph.write())
+
+        b.write(self.new_followers_by_source_graph.write())
+
+        b.write(self.languages_graph.write())
+
+        b.write(self.reactions_by_emotion_graph.write())
+
+        b.write(self.story_interactions_graph.write())
+
+        b.write(self.story_reactions_by_emotion_graph.write())
+
+        b.write(Vector(self.recent_posts_interactions))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats/megagroup_stats.py b/pyrogram/raw/types/stats/megagroup_stats.py
new file mode 100644
index 00000000..9058dfe5
--- /dev/null
+++ b/pyrogram/raw/types/stats/megagroup_stats.py
@@ -0,0 +1,191 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class MegagroupStats(TLObject):  # type: ignore
+    """Supergroup statistics
+
+    Constructor of :obj:`~pyrogram.raw.base.stats.MegagroupStats`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EF7FF916``
+
+    Parameters:
+        period (:obj:`StatsDateRangeDays `):
+            Period in consideration
+
+        members (:obj:`StatsAbsValueAndPrev `):
+            Member count change for period in consideration
+
+        messages (:obj:`StatsAbsValueAndPrev `):
+            Message number change for period in consideration
+
+        viewers (:obj:`StatsAbsValueAndPrev `):
+            Number of users that viewed messages, for range in consideration
+
+        posters (:obj:`StatsAbsValueAndPrev `):
+            Number of users that posted messages, for range in consideration
+
+        growth_graph (:obj:`StatsGraph `):
+            Supergroup growth graph (absolute subscriber count)
+
+        members_graph (:obj:`StatsGraph `):
+            Members growth (relative subscriber count)
+
+        new_members_by_source_graph (:obj:`StatsGraph `):
+            New members by source graph
+
+        languages_graph (:obj:`StatsGraph `):
+            Subscriber language graph (pie chart)
+
+        messages_graph (:obj:`StatsGraph `):
+            Message activity graph (stacked bar graph, message type)
+
+        actions_graph (:obj:`StatsGraph `):
+            Group activity graph (deleted, modified messages, blocked users)
+
+        top_hours_graph (:obj:`StatsGraph `):
+            Activity per hour graph (absolute)
+
+        weekdays_graph (:obj:`StatsGraph `):
+            Activity per day of week graph (absolute)
+
+        top_posters (List of :obj:`StatsGroupTopPoster `):
+            Info about most active group members
+
+        top_admins (List of :obj:`StatsGroupTopAdmin `):
+            Info about most active group admins
+
+        top_inviters (List of :obj:`StatsGroupTopInviter `):
+            Info about most active group inviters
+
+        users (List of :obj:`User `):
+            Info about users mentioned in statistics
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.GetMegagroupStats
+    """
+
+    __slots__: List[str] = ["period", "members", "messages", "viewers", "posters", "growth_graph", "members_graph", "new_members_by_source_graph", "languages_graph", "messages_graph", "actions_graph", "top_hours_graph", "weekdays_graph", "top_posters", "top_admins", "top_inviters", "users"]
+
+    ID = 0xef7ff916
+    QUALNAME = "types.stats.MegagroupStats"
+
+    def __init__(self, *, period: "raw.base.StatsDateRangeDays", members: "raw.base.StatsAbsValueAndPrev", messages: "raw.base.StatsAbsValueAndPrev", viewers: "raw.base.StatsAbsValueAndPrev", posters: "raw.base.StatsAbsValueAndPrev", growth_graph: "raw.base.StatsGraph", members_graph: "raw.base.StatsGraph", new_members_by_source_graph: "raw.base.StatsGraph", languages_graph: "raw.base.StatsGraph", messages_graph: "raw.base.StatsGraph", actions_graph: "raw.base.StatsGraph", top_hours_graph: "raw.base.StatsGraph", weekdays_graph: "raw.base.StatsGraph", top_posters: List["raw.base.StatsGroupTopPoster"], top_admins: List["raw.base.StatsGroupTopAdmin"], top_inviters: List["raw.base.StatsGroupTopInviter"], users: List["raw.base.User"]) -> None:
+        self.period = period  # StatsDateRangeDays
+        self.members = members  # StatsAbsValueAndPrev
+        self.messages = messages  # StatsAbsValueAndPrev
+        self.viewers = viewers  # StatsAbsValueAndPrev
+        self.posters = posters  # StatsAbsValueAndPrev
+        self.growth_graph = growth_graph  # StatsGraph
+        self.members_graph = members_graph  # StatsGraph
+        self.new_members_by_source_graph = new_members_by_source_graph  # StatsGraph
+        self.languages_graph = languages_graph  # StatsGraph
+        self.messages_graph = messages_graph  # StatsGraph
+        self.actions_graph = actions_graph  # StatsGraph
+        self.top_hours_graph = top_hours_graph  # StatsGraph
+        self.weekdays_graph = weekdays_graph  # StatsGraph
+        self.top_posters = top_posters  # Vector
+        self.top_admins = top_admins  # Vector
+        self.top_inviters = top_inviters  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "MegagroupStats":
+        # No flags
+
+        period = TLObject.read(b)
+
+        members = TLObject.read(b)
+
+        messages = TLObject.read(b)
+
+        viewers = TLObject.read(b)
+
+        posters = TLObject.read(b)
+
+        growth_graph = TLObject.read(b)
+
+        members_graph = TLObject.read(b)
+
+        new_members_by_source_graph = TLObject.read(b)
+
+        languages_graph = TLObject.read(b)
+
+        messages_graph = TLObject.read(b)
+
+        actions_graph = TLObject.read(b)
+
+        top_hours_graph = TLObject.read(b)
+
+        weekdays_graph = TLObject.read(b)
+
+        top_posters = TLObject.read(b)
+
+        top_admins = TLObject.read(b)
+
+        top_inviters = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return MegagroupStats(period=period, members=members, messages=messages, viewers=viewers, posters=posters, growth_graph=growth_graph, members_graph=members_graph, new_members_by_source_graph=new_members_by_source_graph, languages_graph=languages_graph, messages_graph=messages_graph, actions_graph=actions_graph, top_hours_graph=top_hours_graph, weekdays_graph=weekdays_graph, top_posters=top_posters, top_admins=top_admins, top_inviters=top_inviters, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.period.write())
+
+        b.write(self.members.write())
+
+        b.write(self.messages.write())
+
+        b.write(self.viewers.write())
+
+        b.write(self.posters.write())
+
+        b.write(self.growth_graph.write())
+
+        b.write(self.members_graph.write())
+
+        b.write(self.new_members_by_source_graph.write())
+
+        b.write(self.languages_graph.write())
+
+        b.write(self.messages_graph.write())
+
+        b.write(self.actions_graph.write())
+
+        b.write(self.top_hours_graph.write())
+
+        b.write(self.weekdays_graph.write())
+
+        b.write(Vector(self.top_posters))
+
+        b.write(Vector(self.top_admins))
+
+        b.write(Vector(self.top_inviters))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats/message_stats.py b/pyrogram/raw/types/stats/message_stats.py
new file mode 100644
index 00000000..55edafd8
--- /dev/null
+++ b/pyrogram/raw/types/stats/message_stats.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class MessageStats(TLObject):  # type: ignore
+    """Message statistics
+
+    Constructor of :obj:`~pyrogram.raw.base.stats.MessageStats`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7FE91C14``
+
+    Parameters:
+        views_graph (:obj:`StatsGraph `):
+            Message view graph
+
+        reactions_by_emotion_graph (:obj:`StatsGraph `):
+            A graph containing the number of reactions on stories categorized by emotion
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.GetMessageStats
+    """
+
+    __slots__: List[str] = ["views_graph", "reactions_by_emotion_graph"]
+
+    ID = 0x7fe91c14
+    QUALNAME = "types.stats.MessageStats"
+
+    def __init__(self, *, views_graph: "raw.base.StatsGraph", reactions_by_emotion_graph: "raw.base.StatsGraph") -> None:
+        self.views_graph = views_graph  # StatsGraph
+        self.reactions_by_emotion_graph = reactions_by_emotion_graph  # StatsGraph
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "MessageStats":
+        # No flags
+
+        views_graph = TLObject.read(b)
+
+        reactions_by_emotion_graph = TLObject.read(b)
+
+        return MessageStats(views_graph=views_graph, reactions_by_emotion_graph=reactions_by_emotion_graph)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.views_graph.write())
+
+        b.write(self.reactions_by_emotion_graph.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats/public_forwards.py b/pyrogram/raw/types/stats/public_forwards.py
new file mode 100644
index 00000000..7e1a8db7
--- /dev/null
+++ b/pyrogram/raw/types/stats/public_forwards.py
@@ -0,0 +1,99 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PublicForwards(TLObject):  # type: ignore
+    """Contains info about the forwards of a story as a message to public chats and reposts by public channels.
+
+    Constructor of :obj:`~pyrogram.raw.base.stats.PublicForwards`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``93037E20``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of results
+
+        forwards (List of :obj:`PublicForward `):
+            Info about the forwards of a story.
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        next_offset (``str``, *optional*):
+            Offset used for pagination.
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.GetMessagePublicForwards
+            stats.GetStoryPublicForwards
+    """
+
+    __slots__: List[str] = ["count", "forwards", "chats", "users", "next_offset"]
+
+    ID = 0x93037e20
+    QUALNAME = "types.stats.PublicForwards"
+
+    def __init__(self, *, count: int, forwards: List["raw.base.PublicForward"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.forwards = forwards  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PublicForwards":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        forwards = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return PublicForwards(count=count, forwards=forwards, chats=chats, users=users, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.forwards))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats/story_stats.py b/pyrogram/raw/types/stats/story_stats.py
new file mode 100644
index 00000000..f880abc7
--- /dev/null
+++ b/pyrogram/raw/types/stats/story_stats.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryStats(TLObject):  # type: ignore
+    """Contains statistics about a story.
+
+    Constructor of :obj:`~pyrogram.raw.base.stats.StoryStats`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``50CD067C``
+
+    Parameters:
+        views_graph (:obj:`StatsGraph `):
+            A graph containing the number of story views and shares
+
+        reactions_by_emotion_graph (:obj:`StatsGraph `):
+            A bar graph containing the number of story reactions categorized by "emotion" (i.e. Positive, Negative, Other, etc...)
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.GetStoryStats
+    """
+
+    __slots__: List[str] = ["views_graph", "reactions_by_emotion_graph"]
+
+    ID = 0x50cd067c
+    QUALNAME = "types.stats.StoryStats"
+
+    def __init__(self, *, views_graph: "raw.base.StatsGraph", reactions_by_emotion_graph: "raw.base.StatsGraph") -> None:
+        self.views_graph = views_graph  # StatsGraph
+        self.reactions_by_emotion_graph = reactions_by_emotion_graph  # StatsGraph
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryStats":
+        # No flags
+
+        views_graph = TLObject.read(b)
+
+        reactions_by_emotion_graph = TLObject.read(b)
+
+        return StoryStats(views_graph=views_graph, reactions_by_emotion_graph=reactions_by_emotion_graph)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.views_graph.write())
+
+        b.write(self.reactions_by_emotion_graph.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_abs_value_and_prev.py b/pyrogram/raw/types/stats_abs_value_and_prev.py
new file mode 100644
index 00000000..b33d1283
--- /dev/null
+++ b/pyrogram/raw/types/stats_abs_value_and_prev.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsAbsValueAndPrev(TLObject):  # type: ignore
+    """Statistics value couple; initial and final value for period of time currently in consideration
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsAbsValueAndPrev`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CB43ACDE``
+
+    Parameters:
+        current (``float`` ``64-bit``):
+            Current value
+
+        previous (``float`` ``64-bit``):
+            Previous value
+
+    """
+
+    __slots__: List[str] = ["current", "previous"]
+
+    ID = 0xcb43acde
+    QUALNAME = "types.StatsAbsValueAndPrev"
+
+    def __init__(self, *, current: float, previous: float) -> None:
+        self.current = current  # double
+        self.previous = previous  # double
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsAbsValueAndPrev":
+        # No flags
+
+        current = Double.read(b)
+
+        previous = Double.read(b)
+
+        return StatsAbsValueAndPrev(current=current, previous=previous)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Double(self.current))
+
+        b.write(Double(self.previous))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_date_range_days.py b/pyrogram/raw/types/stats_date_range_days.py
new file mode 100644
index 00000000..2998f494
--- /dev/null
+++ b/pyrogram/raw/types/stats_date_range_days.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsDateRangeDays(TLObject):  # type: ignore
+    """Channel statistics date range
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsDateRangeDays`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B637EDAF``
+
+    Parameters:
+        min_date (``int`` ``32-bit``):
+            Initial date
+
+        max_date (``int`` ``32-bit``):
+            Final date
+
+    """
+
+    __slots__: List[str] = ["min_date", "max_date"]
+
+    ID = 0xb637edaf
+    QUALNAME = "types.StatsDateRangeDays"
+
+    def __init__(self, *, min_date: int, max_date: int) -> None:
+        self.min_date = min_date  # int
+        self.max_date = max_date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsDateRangeDays":
+        # No flags
+
+        min_date = Int.read(b)
+
+        max_date = Int.read(b)
+
+        return StatsDateRangeDays(min_date=min_date, max_date=max_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.min_date))
+
+        b.write(Int(self.max_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_graph.py b/pyrogram/raw/types/stats_graph.py
new file mode 100644
index 00000000..144758de
--- /dev/null
+++ b/pyrogram/raw/types/stats_graph.py
@@ -0,0 +1,74 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsGraph(TLObject):  # type: ignore
+    """Channel statistics graph
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsGraph`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8EA464B6``
+
+    Parameters:
+        json (:obj:`DataJSON `):
+            Statistics data
+
+        zoom_token (``str``, *optional*):
+            Zoom token
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.LoadAsyncGraph
+    """
+
+    __slots__: List[str] = ["json", "zoom_token"]
+
+    ID = 0x8ea464b6
+    QUALNAME = "types.StatsGraph"
+
+    def __init__(self, *, json: "raw.base.DataJSON", zoom_token: Optional[str] = None) -> None:
+        self.json = json  # DataJSON
+        self.zoom_token = zoom_token  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsGraph":
+
+        flags = Int.read(b)
+
+        json = TLObject.read(b)
+
+        zoom_token = String.read(b) if flags & (1 << 0) else None
+        return StatsGraph(json=json, zoom_token=zoom_token)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.zoom_token is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.json.write())
+
+        if self.zoom_token is not None:
+            b.write(String(self.zoom_token))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_graph_async.py b/pyrogram/raw/types/stats_graph_async.py
new file mode 100644
index 00000000..75961d01
--- /dev/null
+++ b/pyrogram/raw/types/stats_graph_async.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsGraphAsync(TLObject):  # type: ignore
+    """This channel statistics graph must be generated asynchronously using stats.loadAsyncGraph to reduce server load
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsGraph`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4A27EB2D``
+
+    Parameters:
+        token (``str``):
+            Token to use for fetching the async graph
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.LoadAsyncGraph
+    """
+
+    __slots__: List[str] = ["token"]
+
+    ID = 0x4a27eb2d
+    QUALNAME = "types.StatsGraphAsync"
+
+    def __init__(self, *, token: str) -> None:
+        self.token = token  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsGraphAsync":
+        # No flags
+
+        token = String.read(b)
+
+        return StatsGraphAsync(token=token)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.token))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_graph_error.py b/pyrogram/raw/types/stats_graph_error.py
new file mode 100644
index 00000000..b5355ff0
--- /dev/null
+++ b/pyrogram/raw/types/stats_graph_error.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsGraphError(TLObject):  # type: ignore
+    """An error occurred while generating the statistics graph
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsGraph`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BEDC9822``
+
+    Parameters:
+        error (``str``):
+            The error
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stats.LoadAsyncGraph
+    """
+
+    __slots__: List[str] = ["error"]
+
+    ID = 0xbedc9822
+    QUALNAME = "types.StatsGraphError"
+
+    def __init__(self, *, error: str) -> None:
+        self.error = error  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsGraphError":
+        # No flags
+
+        error = String.read(b)
+
+        return StatsGraphError(error=error)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.error))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_group_top_admin.py b/pyrogram/raw/types/stats_group_top_admin.py
new file mode 100644
index 00000000..73198e6f
--- /dev/null
+++ b/pyrogram/raw/types/stats_group_top_admin.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsGroupTopAdmin(TLObject):  # type: ignore
+    """Information about an active admin in a supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsGroupTopAdmin`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D7584C87``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+        deleted (``int`` ``32-bit``):
+            Number of deleted messages for statistics period in consideration
+
+        kicked (``int`` ``32-bit``):
+            Number of kicked users for statistics period in consideration
+
+        banned (``int`` ``32-bit``):
+            Number of banned users for statistics period in consideration
+
+    """
+
+    __slots__: List[str] = ["user_id", "deleted", "kicked", "banned"]
+
+    ID = 0xd7584c87
+    QUALNAME = "types.StatsGroupTopAdmin"
+
+    def __init__(self, *, user_id: int, deleted: int, kicked: int, banned: int) -> None:
+        self.user_id = user_id  # long
+        self.deleted = deleted  # int
+        self.kicked = kicked  # int
+        self.banned = banned  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsGroupTopAdmin":
+        # No flags
+
+        user_id = Long.read(b)
+
+        deleted = Int.read(b)
+
+        kicked = Int.read(b)
+
+        banned = Int.read(b)
+
+        return StatsGroupTopAdmin(user_id=user_id, deleted=deleted, kicked=kicked, banned=banned)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.deleted))
+
+        b.write(Int(self.kicked))
+
+        b.write(Int(self.banned))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_group_top_inviter.py b/pyrogram/raw/types/stats_group_top_inviter.py
new file mode 100644
index 00000000..ea96de7f
--- /dev/null
+++ b/pyrogram/raw/types/stats_group_top_inviter.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsGroupTopInviter(TLObject):  # type: ignore
+    """Information about an active supergroup inviter
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsGroupTopInviter`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``535F779D``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+        invitations (``int`` ``32-bit``):
+            Number of invitations for statistics period in consideration
+
+    """
+
+    __slots__: List[str] = ["user_id", "invitations"]
+
+    ID = 0x535f779d
+    QUALNAME = "types.StatsGroupTopInviter"
+
+    def __init__(self, *, user_id: int, invitations: int) -> None:
+        self.user_id = user_id  # long
+        self.invitations = invitations  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsGroupTopInviter":
+        # No flags
+
+        user_id = Long.read(b)
+
+        invitations = Int.read(b)
+
+        return StatsGroupTopInviter(user_id=user_id, invitations=invitations)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.invitations))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_group_top_poster.py b/pyrogram/raw/types/stats_group_top_poster.py
new file mode 100644
index 00000000..1a4d40c2
--- /dev/null
+++ b/pyrogram/raw/types/stats_group_top_poster.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsGroupTopPoster(TLObject):  # type: ignore
+    """Information about an active user in a supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsGroupTopPoster`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9D04AF9B``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+        messages (``int`` ``32-bit``):
+            Number of messages for statistics period in consideration
+
+        avg_chars (``int`` ``32-bit``):
+            Average number of characters per message
+
+    """
+
+    __slots__: List[str] = ["user_id", "messages", "avg_chars"]
+
+    ID = 0x9d04af9b
+    QUALNAME = "types.StatsGroupTopPoster"
+
+    def __init__(self, *, user_id: int, messages: int, avg_chars: int) -> None:
+        self.user_id = user_id  # long
+        self.messages = messages  # int
+        self.avg_chars = avg_chars  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsGroupTopPoster":
+        # No flags
+
+        user_id = Long.read(b)
+
+        messages = Int.read(b)
+
+        avg_chars = Int.read(b)
+
+        return StatsGroupTopPoster(user_id=user_id, messages=messages, avg_chars=avg_chars)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.messages))
+
+        b.write(Int(self.avg_chars))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_percent_value.py b/pyrogram/raw/types/stats_percent_value.py
new file mode 100644
index 00000000..5d2f5692
--- /dev/null
+++ b/pyrogram/raw/types/stats_percent_value.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsPercentValue(TLObject):  # type: ignore
+    """Channel statistics percentage.
+Compute the percentage simply by doing part * total / 100
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsPercentValue`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CBCE2FE0``
+
+    Parameters:
+        part (``float`` ``64-bit``):
+            Partial value
+
+        total (``float`` ``64-bit``):
+            Total value
+
+    """
+
+    __slots__: List[str] = ["part", "total"]
+
+    ID = 0xcbce2fe0
+    QUALNAME = "types.StatsPercentValue"
+
+    def __init__(self, *, part: float, total: float) -> None:
+        self.part = part  # double
+        self.total = total  # double
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsPercentValue":
+        # No flags
+
+        part = Double.read(b)
+
+        total = Double.read(b)
+
+        return StatsPercentValue(part=part, total=total)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Double(self.part))
+
+        b.write(Double(self.total))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stats_url.py b/pyrogram/raw/types/stats_url.py
new file mode 100644
index 00000000..2fc00a92
--- /dev/null
+++ b/pyrogram/raw/types/stats_url.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StatsURL(TLObject):  # type: ignore
+    """URL with chat statistics
+
+    Constructor of :obj:`~pyrogram.raw.base.StatsURL`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``47A971E0``
+
+    Parameters:
+        url (``str``):
+            Chat statistics
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetStatsURL
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0x47a971e0
+    QUALNAME = "types.StatsURL"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StatsURL":
+        # No flags
+
+        url = String.read(b)
+
+        return StatsURL(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_keyword.py b/pyrogram/raw/types/sticker_keyword.py
new file mode 100644
index 00000000..aaa795e5
--- /dev/null
+++ b/pyrogram/raw/types/sticker_keyword.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerKeyword(TLObject):  # type: ignore
+    """Keywords for a certain sticker
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerKeyword`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FCFEB29C``
+
+    Parameters:
+        document_id (``int`` ``64-bit``):
+            Sticker ID
+
+        keyword (List of ``str``):
+            Keywords
+
+    """
+
+    __slots__: List[str] = ["document_id", "keyword"]
+
+    ID = 0xfcfeb29c
+    QUALNAME = "types.StickerKeyword"
+
+    def __init__(self, *, document_id: int, keyword: List[str]) -> None:
+        self.document_id = document_id  # long
+        self.keyword = keyword  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerKeyword":
+        # No flags
+
+        document_id = Long.read(b)
+
+        keyword = TLObject.read(b, String)
+
+        return StickerKeyword(document_id=document_id, keyword=keyword)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.document_id))
+
+        b.write(Vector(self.keyword, String))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_pack.py b/pyrogram/raw/types/sticker_pack.py
new file mode 100644
index 00000000..3d181a3e
--- /dev/null
+++ b/pyrogram/raw/types/sticker_pack.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerPack(TLObject):  # type: ignore
+    """A stickerpack is a group of stickers associated to the same emoji.
+It is not a sticker pack the way it is usually intended, you may be looking for a StickerSet.
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerPack`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``12B299D4``
+
+    Parameters:
+        emoticon (``str``):
+            Emoji
+
+        documents (List of ``int`` ``64-bit``):
+            Stickers
+
+    """
+
+    __slots__: List[str] = ["emoticon", "documents"]
+
+    ID = 0x12b299d4
+    QUALNAME = "types.StickerPack"
+
+    def __init__(self, *, emoticon: str, documents: List[int]) -> None:
+        self.emoticon = emoticon  # string
+        self.documents = documents  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerPack":
+        # No flags
+
+        emoticon = String.read(b)
+
+        documents = TLObject.read(b, Long)
+
+        return StickerPack(emoticon=emoticon, documents=documents)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.emoticon))
+
+        b.write(Vector(self.documents, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_set.py b/pyrogram/raw/types/sticker_set.py
new file mode 100644
index 00000000..a92d7081
--- /dev/null
+++ b/pyrogram/raw/types/sticker_set.py
@@ -0,0 +1,184 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerSet(TLObject):  # type: ignore
+    """Represents a stickerset (stickerpack)
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerSet`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2DD14EDC``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID of the stickerset
+
+        access_hash (``int`` ``64-bit``):
+            Access hash of stickerset
+
+        title (``str``):
+            Title of stickerset
+
+        short_name (``str``):
+            Short name of stickerset, used when sharing stickerset using stickerset deep links.
+
+        count (``int`` ``32-bit``):
+            Number of stickers in pack
+
+        hash (``int`` ``32-bit``):
+            Hash
+
+        archived (``bool``, *optional*):
+            Whether this stickerset was archived (due to too many saved stickers in the current account)
+
+        official (``bool``, *optional*):
+            Is this stickerset official
+
+        masks (``bool``, *optional*):
+            Is this a mask stickerset
+
+        emojis (``bool``, *optional*):
+            This is a custom emoji stickerset
+
+        text_color (``bool``, *optional*):
+            Whether the color of this TGS custom emoji stickerset should be changed to the text color when used in messages, the accent color if used as emoji status, white on chat photos, or another appropriate color based on context.
+
+        channel_emoji_status (``bool``, *optional*):
+            If set, this custom emoji stickerset can be used in channel emoji statuses.
+
+        creator (``bool``, *optional*):
+
+
+        installed_date (``int`` ``32-bit``, *optional*):
+            When was this stickerset installed
+
+        thumbs (List of :obj:`PhotoSize `, *optional*):
+            Stickerset thumbnail
+
+        thumb_dc_id (``int`` ``32-bit``, *optional*):
+            DC ID of thumbnail
+
+        thumb_version (``int`` ``32-bit``, *optional*):
+            Thumbnail version
+
+        thumb_document_id (``int`` ``64-bit``, *optional*):
+            Document ID of custom emoji thumbnail, fetch the document using messages.getCustomEmojiDocuments
+
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "title", "short_name", "count", "hash", "archived", "official", "masks", "emojis", "text_color", "channel_emoji_status", "creator", "installed_date", "thumbs", "thumb_dc_id", "thumb_version", "thumb_document_id"]
+
+    ID = 0x2dd14edc
+    QUALNAME = "types.StickerSet"
+
+    def __init__(self, *, id: int, access_hash: int, title: str, short_name: str, count: int, hash: int, archived: Optional[bool] = None, official: Optional[bool] = None, masks: Optional[bool] = None, emojis: Optional[bool] = None, text_color: Optional[bool] = None, channel_emoji_status: Optional[bool] = None, creator: Optional[bool] = None, installed_date: Optional[int] = None, thumbs: Optional[List["raw.base.PhotoSize"]] = None, thumb_dc_id: Optional[int] = None, thumb_version: Optional[int] = None, thumb_document_id: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.title = title  # string
+        self.short_name = short_name  # string
+        self.count = count  # int
+        self.hash = hash  # int
+        self.archived = archived  # flags.1?true
+        self.official = official  # flags.2?true
+        self.masks = masks  # flags.3?true
+        self.emojis = emojis  # flags.7?true
+        self.text_color = text_color  # flags.9?true
+        self.channel_emoji_status = channel_emoji_status  # flags.10?true
+        self.creator = creator  # flags.11?true
+        self.installed_date = installed_date  # flags.0?int
+        self.thumbs = thumbs  # flags.4?Vector
+        self.thumb_dc_id = thumb_dc_id  # flags.4?int
+        self.thumb_version = thumb_version  # flags.4?int
+        self.thumb_document_id = thumb_document_id  # flags.8?long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerSet":
+
+        flags = Int.read(b)
+
+        archived = True if flags & (1 << 1) else False
+        official = True if flags & (1 << 2) else False
+        masks = True if flags & (1 << 3) else False
+        emojis = True if flags & (1 << 7) else False
+        text_color = True if flags & (1 << 9) else False
+        channel_emoji_status = True if flags & (1 << 10) else False
+        creator = True if flags & (1 << 11) else False
+        installed_date = Int.read(b) if flags & (1 << 0) else None
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        title = String.read(b)
+
+        short_name = String.read(b)
+
+        thumbs = TLObject.read(b) if flags & (1 << 4) else []
+
+        thumb_dc_id = Int.read(b) if flags & (1 << 4) else None
+        thumb_version = Int.read(b) if flags & (1 << 4) else None
+        thumb_document_id = Long.read(b) if flags & (1 << 8) else None
+        count = Int.read(b)
+
+        hash = Int.read(b)
+
+        return StickerSet(id=id, access_hash=access_hash, title=title, short_name=short_name, count=count, hash=hash, archived=archived, official=official, masks=masks, emojis=emojis, text_color=text_color, channel_emoji_status=channel_emoji_status, creator=creator, installed_date=installed_date, thumbs=thumbs, thumb_dc_id=thumb_dc_id, thumb_version=thumb_version, thumb_document_id=thumb_document_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.archived else 0
+        flags |= (1 << 2) if self.official else 0
+        flags |= (1 << 3) if self.masks else 0
+        flags |= (1 << 7) if self.emojis else 0
+        flags |= (1 << 9) if self.text_color else 0
+        flags |= (1 << 10) if self.channel_emoji_status else 0
+        flags |= (1 << 11) if self.creator else 0
+        flags |= (1 << 0) if self.installed_date is not None else 0
+        flags |= (1 << 4) if self.thumbs else 0
+        flags |= (1 << 4) if self.thumb_dc_id is not None else 0
+        flags |= (1 << 4) if self.thumb_version is not None else 0
+        flags |= (1 << 8) if self.thumb_document_id is not None else 0
+        b.write(Int(flags))
+
+        if self.installed_date is not None:
+            b.write(Int(self.installed_date))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(String(self.title))
+
+        b.write(String(self.short_name))
+
+        if self.thumbs is not None:
+            b.write(Vector(self.thumbs))
+
+        if self.thumb_dc_id is not None:
+            b.write(Int(self.thumb_dc_id))
+
+        if self.thumb_version is not None:
+            b.write(Int(self.thumb_version))
+
+        if self.thumb_document_id is not None:
+            b.write(Long(self.thumb_document_id))
+
+        b.write(Int(self.count))
+
+        b.write(Int(self.hash))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_set_covered.py b/pyrogram/raw/types/sticker_set_covered.py
new file mode 100644
index 00000000..7f6d4334
--- /dev/null
+++ b/pyrogram/raw/types/sticker_set_covered.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerSetCovered(TLObject):  # type: ignore
+    """Stickerset with a single sticker as preview
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerSetCovered`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6410A5D2``
+
+    Parameters:
+        set (:obj:`StickerSet `):
+            Stickerset
+
+        cover (:obj:`Document `):
+            Preview
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetAttachedStickers
+    """
+
+    __slots__: List[str] = ["set", "cover"]
+
+    ID = 0x6410a5d2
+    QUALNAME = "types.StickerSetCovered"
+
+    def __init__(self, *, set: "raw.base.StickerSet", cover: "raw.base.Document") -> None:
+        self.set = set  # StickerSet
+        self.cover = cover  # Document
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerSetCovered":
+        # No flags
+
+        set = TLObject.read(b)
+
+        cover = TLObject.read(b)
+
+        return StickerSetCovered(set=set, cover=cover)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.set.write())
+
+        b.write(self.cover.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_set_full_covered.py b/pyrogram/raw/types/sticker_set_full_covered.py
new file mode 100644
index 00000000..6c645112
--- /dev/null
+++ b/pyrogram/raw/types/sticker_set_full_covered.py
@@ -0,0 +1,88 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerSetFullCovered(TLObject):  # type: ignore
+    """Stickerset preview with all stickers of the stickerset included.
+Currently used only for custom emoji stickersets, to avoid a further call to messages.getStickerSet.
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerSetCovered`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``40D13C0E``
+
+    Parameters:
+        set (:obj:`StickerSet `):
+            Stickerset
+
+        packs (List of :obj:`StickerPack `):
+            Emoji information about every sticker in the stickerset
+
+        keywords (List of :obj:`StickerKeyword `):
+            Keywords for some or every sticker in the stickerset.
+
+        documents (List of :obj:`Document `):
+            Stickers
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetAttachedStickers
+    """
+
+    __slots__: List[str] = ["set", "packs", "keywords", "documents"]
+
+    ID = 0x40d13c0e
+    QUALNAME = "types.StickerSetFullCovered"
+
+    def __init__(self, *, set: "raw.base.StickerSet", packs: List["raw.base.StickerPack"], keywords: List["raw.base.StickerKeyword"], documents: List["raw.base.Document"]) -> None:
+        self.set = set  # StickerSet
+        self.packs = packs  # Vector
+        self.keywords = keywords  # Vector
+        self.documents = documents  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerSetFullCovered":
+        # No flags
+
+        set = TLObject.read(b)
+
+        packs = TLObject.read(b)
+
+        keywords = TLObject.read(b)
+
+        documents = TLObject.read(b)
+
+        return StickerSetFullCovered(set=set, packs=packs, keywords=keywords, documents=documents)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.set.write())
+
+        b.write(Vector(self.packs))
+
+        b.write(Vector(self.keywords))
+
+        b.write(Vector(self.documents))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_set_multi_covered.py b/pyrogram/raw/types/sticker_set_multi_covered.py
new file mode 100644
index 00000000..83a749ce
--- /dev/null
+++ b/pyrogram/raw/types/sticker_set_multi_covered.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerSetMultiCovered(TLObject):  # type: ignore
+    """Stickerset, with multiple stickers as preview
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerSetCovered`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3407E51B``
+
+    Parameters:
+        set (:obj:`StickerSet `):
+            Stickerset
+
+        covers (List of :obj:`Document `):
+            Preview stickers
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetAttachedStickers
+    """
+
+    __slots__: List[str] = ["set", "covers"]
+
+    ID = 0x3407e51b
+    QUALNAME = "types.StickerSetMultiCovered"
+
+    def __init__(self, *, set: "raw.base.StickerSet", covers: List["raw.base.Document"]) -> None:
+        self.set = set  # StickerSet
+        self.covers = covers  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerSetMultiCovered":
+        # No flags
+
+        set = TLObject.read(b)
+
+        covers = TLObject.read(b)
+
+        return StickerSetMultiCovered(set=set, covers=covers)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.set.write())
+
+        b.write(Vector(self.covers))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/sticker_set_no_covered.py b/pyrogram/raw/types/sticker_set_no_covered.py
new file mode 100644
index 00000000..4ec1bab5
--- /dev/null
+++ b/pyrogram/raw/types/sticker_set_no_covered.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StickerSetNoCovered(TLObject):  # type: ignore
+    """Just the stickerset information, with no previews.
+
+    Constructor of :obj:`~pyrogram.raw.base.StickerSetCovered`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``77B15D1C``
+
+    Parameters:
+        set (:obj:`StickerSet `):
+            Stickerset information.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.GetAttachedStickers
+    """
+
+    __slots__: List[str] = ["set"]
+
+    ID = 0x77b15d1c
+    QUALNAME = "types.StickerSetNoCovered"
+
+    def __init__(self, *, set: "raw.base.StickerSet") -> None:
+        self.set = set  # StickerSet
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StickerSetNoCovered":
+        # No flags
+
+        set = TLObject.read(b)
+
+        return StickerSetNoCovered(set=set)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.set.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stickers/__init__.py b/pyrogram/raw/types/stickers/__init__.py
new file mode 100644
index 00000000..089a4725
--- /dev/null
+++ b/pyrogram/raw/types/stickers/__init__.py
@@ -0,0 +1,33 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .suggested_short_name import SuggestedShortName
+
+
+__all__ = [
+    "SuggestedShortName",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/stickers/suggested_short_name.py b/pyrogram/raw/types/stickers/suggested_short_name.py
new file mode 100644
index 00000000..dd4336a4
--- /dev/null
+++ b/pyrogram/raw/types/stickers/suggested_short_name.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SuggestedShortName(TLObject):  # type: ignore
+    """A suggested short name for a stickerpack
+
+    Constructor of :obj:`~pyrogram.raw.base.stickers.SuggestedShortName`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``85FEA03F``
+
+    Parameters:
+        short_name (``str``):
+            Suggested short name
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stickers.SuggestShortName
+    """
+
+    __slots__: List[str] = ["short_name"]
+
+    ID = 0x85fea03f
+    QUALNAME = "types.stickers.SuggestedShortName"
+
+    def __init__(self, *, short_name: str) -> None:
+        self.short_name = short_name  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SuggestedShortName":
+        # No flags
+
+        short_name = String.read(b)
+
+        return SuggestedShortName(short_name=short_name)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.short_name))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/__init__.py b/pyrogram/raw/types/storage/__init__.py
new file mode 100644
index 00000000..a57a3838
--- /dev/null
+++ b/pyrogram/raw/types/storage/__init__.py
@@ -0,0 +1,51 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .file_unknown import FileUnknown
+from .file_partial import FilePartial
+from .file_jpeg import FileJpeg
+from .file_gif import FileGif
+from .file_png import FilePng
+from .file_pdf import FilePdf
+from .file_mp3 import FileMp3
+from .file_mov import FileMov
+from .file_mp4 import FileMp4
+from .file_webp import FileWebp
+
+
+__all__ = [
+    "FileUnknown",
+    "FilePartial",
+    "FileJpeg",
+    "FileGif",
+    "FilePng",
+    "FilePdf",
+    "FileMp3",
+    "FileMov",
+    "FileMp4",
+    "FileWebp",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/storage/file_gif.py b/pyrogram/raw/types/storage/file_gif.py
new file mode 100644
index 00000000..a73ababb
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_gif.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileGif(TLObject):  # type: ignore
+    """GIF image. MIME type: image/gif.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CAE1AADF``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xcae1aadf
+    QUALNAME = "types.storage.FileGif"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileGif":
+        # No flags
+
+        return FileGif()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_jpeg.py b/pyrogram/raw/types/storage/file_jpeg.py
new file mode 100644
index 00000000..fd99ae69
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_jpeg.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileJpeg(TLObject):  # type: ignore
+    """JPEG image. MIME type: image/jpeg.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7EFE0E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x7efe0e
+    QUALNAME = "types.storage.FileJpeg"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileJpeg":
+        # No flags
+
+        return FileJpeg()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_mov.py b/pyrogram/raw/types/storage/file_mov.py
new file mode 100644
index 00000000..0d1cd66c
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_mov.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileMov(TLObject):  # type: ignore
+    """Quicktime video. MIME type: video/quicktime.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4B09EBBC``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x4b09ebbc
+    QUALNAME = "types.storage.FileMov"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileMov":
+        # No flags
+
+        return FileMov()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_mp3.py b/pyrogram/raw/types/storage/file_mp3.py
new file mode 100644
index 00000000..3904a1c5
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_mp3.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileMp3(TLObject):  # type: ignore
+    """Mp3 audio. MIME type: audio/mpeg.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``528A0677``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x528a0677
+    QUALNAME = "types.storage.FileMp3"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileMp3":
+        # No flags
+
+        return FileMp3()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_mp4.py b/pyrogram/raw/types/storage/file_mp4.py
new file mode 100644
index 00000000..6d82acba
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_mp4.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileMp4(TLObject):  # type: ignore
+    """MPEG-4 video. MIME type: video/mp4.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B3CEA0E4``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xb3cea0e4
+    QUALNAME = "types.storage.FileMp4"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileMp4":
+        # No flags
+
+        return FileMp4()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_partial.py b/pyrogram/raw/types/storage/file_partial.py
new file mode 100644
index 00000000..ca93f84b
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_partial.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FilePartial(TLObject):  # type: ignore
+    """Part of a bigger file.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``40BC6F52``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x40bc6f52
+    QUALNAME = "types.storage.FilePartial"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FilePartial":
+        # No flags
+
+        return FilePartial()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_pdf.py b/pyrogram/raw/types/storage/file_pdf.py
new file mode 100644
index 00000000..e3d4c3e5
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_pdf.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FilePdf(TLObject):  # type: ignore
+    """PDF document image. MIME type: application/pdf.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AE1E508D``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xae1e508d
+    QUALNAME = "types.storage.FilePdf"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FilePdf":
+        # No flags
+
+        return FilePdf()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_png.py b/pyrogram/raw/types/storage/file_png.py
new file mode 100644
index 00000000..77b3019e
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_png.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FilePng(TLObject):  # type: ignore
+    """PNG image. MIME type: image/png.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A4F63C0``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa4f63c0
+    QUALNAME = "types.storage.FilePng"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FilePng":
+        # No flags
+
+        return FilePng()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_unknown.py b/pyrogram/raw/types/storage/file_unknown.py
new file mode 100644
index 00000000..7f250a31
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_unknown.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileUnknown(TLObject):  # type: ignore
+    """Unknown type.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AA963B05``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xaa963b05
+    QUALNAME = "types.storage.FileUnknown"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileUnknown":
+        # No flags
+
+        return FileUnknown()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/storage/file_webp.py b/pyrogram/raw/types/storage/file_webp.py
new file mode 100644
index 00000000..5f616a27
--- /dev/null
+++ b/pyrogram/raw/types/storage/file_webp.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileWebp(TLObject):  # type: ignore
+    """WEBP image. MIME type: image/webp.
+
+    Constructor of :obj:`~pyrogram.raw.base.storage.FileType`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1081464C``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x1081464c
+    QUALNAME = "types.storage.FileWebp"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileWebp":
+        # No flags
+
+        return FileWebp()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/__init__.py b/pyrogram/raw/types/stories/__init__.py
new file mode 100644
index 00000000..59d75dcc
--- /dev/null
+++ b/pyrogram/raw/types/stories/__init__.py
@@ -0,0 +1,53 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .all_stories_not_modified import AllStoriesNotModified
+from .all_stories import AllStories
+from .stories import Stories
+from .story_views_list import StoryViewsList
+from .story_views import StoryViews
+from .peer_stories import PeerStories
+from .story_reactions_list import StoryReactionsList
+from .found_stories import FoundStories
+from .can_send_story_count import CanSendStoryCount
+from .albums_not_modified import AlbumsNotModified
+from .albums import Albums
+
+
+__all__ = [
+    "AllStoriesNotModified",
+    "AllStories",
+    "Stories",
+    "StoryViewsList",
+    "StoryViews",
+    "PeerStories",
+    "StoryReactionsList",
+    "FoundStories",
+    "CanSendStoryCount",
+    "AlbumsNotModified",
+    "Albums",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/stories/albums.py b/pyrogram/raw/types/stories/albums.py
new file mode 100644
index 00000000..4606b19f
--- /dev/null
+++ b/pyrogram/raw/types/stories/albums.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Albums(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.Albums`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C3987A3A``
+
+    Parameters:
+        hash (``int`` ``64-bit``):
+            N/A
+
+        albums (List of :obj:`StoryAlbum `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetAlbums
+    """
+
+    __slots__: List[str] = ["hash", "albums"]
+
+    ID = 0xc3987a3a
+    QUALNAME = "types.stories.Albums"
+
+    def __init__(self, *, hash: int, albums: List["raw.base.StoryAlbum"]) -> None:
+        self.hash = hash  # long
+        self.albums = albums  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Albums":
+        # No flags
+
+        hash = Long.read(b)
+
+        albums = TLObject.read(b)
+
+        return Albums(hash=hash, albums=albums)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.hash))
+
+        b.write(Vector(self.albums))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/albums_not_modified.py b/pyrogram/raw/types/stories/albums_not_modified.py
new file mode 100644
index 00000000..3ba6cd20
--- /dev/null
+++ b/pyrogram/raw/types/stories/albums_not_modified.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class AlbumsNotModified(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.Albums`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``564EDAEB``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetAlbums
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x564edaeb
+    QUALNAME = "types.stories.AlbumsNotModified"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "AlbumsNotModified":
+        # No flags
+
+        return AlbumsNotModified()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/all_stories.py b/pyrogram/raw/types/stories/all_stories.py
new file mode 100644
index 00000000..2978eeaf
--- /dev/null
+++ b/pyrogram/raw/types/stories/all_stories.py
@@ -0,0 +1,111 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class AllStories(TLObject):  # type: ignore
+    """Full list of active (or active and hidden) stories.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.AllStories`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6EFC5E81``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of active (or active and hidden) stories
+
+        state (``str``):
+            State to use for pagination
+
+        peer_stories (List of :obj:`PeerStories `):
+            Stories
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        stealth_mode (:obj:`StoriesStealthMode `):
+            Current stealth mode information
+
+        has_more (``bool``, *optional*):
+            Whether more results can be fetched as described here ».
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetAllStories
+    """
+
+    __slots__: List[str] = ["count", "state", "peer_stories", "chats", "users", "stealth_mode", "has_more"]
+
+    ID = 0x6efc5e81
+    QUALNAME = "types.stories.AllStories"
+
+    def __init__(self, *, count: int, state: str, peer_stories: List["raw.base.PeerStories"], chats: List["raw.base.Chat"], users: List["raw.base.User"], stealth_mode: "raw.base.StoriesStealthMode", has_more: Optional[bool] = None) -> None:
+        self.count = count  # int
+        self.state = state  # string
+        self.peer_stories = peer_stories  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.stealth_mode = stealth_mode  # StoriesStealthMode
+        self.has_more = has_more  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "AllStories":
+
+        flags = Int.read(b)
+
+        has_more = True if flags & (1 << 0) else False
+        count = Int.read(b)
+
+        state = String.read(b)
+
+        peer_stories = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        stealth_mode = TLObject.read(b)
+
+        return AllStories(count=count, state=state, peer_stories=peer_stories, chats=chats, users=users, stealth_mode=stealth_mode, has_more=has_more)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.has_more else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(String(self.state))
+
+        b.write(Vector(self.peer_stories))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        b.write(self.stealth_mode.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/all_stories_not_modified.py b/pyrogram/raw/types/stories/all_stories_not_modified.py
new file mode 100644
index 00000000..756cf2db
--- /dev/null
+++ b/pyrogram/raw/types/stories/all_stories_not_modified.py
@@ -0,0 +1,74 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class AllStoriesNotModified(TLObject):  # type: ignore
+    """The list of active (or active and hidden) stories has not changed.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.AllStories`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1158FE3E``
+
+    Parameters:
+        state (``str``):
+            State to use to ask for updates
+
+        stealth_mode (:obj:`StoriesStealthMode `):
+            Current stealth mode information
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetAllStories
+    """
+
+    __slots__: List[str] = ["state", "stealth_mode"]
+
+    ID = 0x1158fe3e
+    QUALNAME = "types.stories.AllStoriesNotModified"
+
+    def __init__(self, *, state: str, stealth_mode: "raw.base.StoriesStealthMode") -> None:
+        self.state = state  # string
+        self.stealth_mode = stealth_mode  # StoriesStealthMode
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "AllStoriesNotModified":
+
+        flags = Int.read(b)
+
+        state = String.read(b)
+
+        stealth_mode = TLObject.read(b)
+
+        return AllStoriesNotModified(state=state, stealth_mode=stealth_mode)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+
+        b.write(Int(flags))
+
+        b.write(String(self.state))
+
+        b.write(self.stealth_mode.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/can_send_story_count.py b/pyrogram/raw/types/stories/can_send_story_count.py
new file mode 100644
index 00000000..a4b7b13f
--- /dev/null
+++ b/pyrogram/raw/types/stories/can_send_story_count.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class CanSendStoryCount(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.CanSendStoryCount`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C387C04E``
+
+    Parameters:
+        count_remains (``int`` ``32-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.CanSendStory
+    """
+
+    __slots__: List[str] = ["count_remains"]
+
+    ID = 0xc387c04e
+    QUALNAME = "types.stories.CanSendStoryCount"
+
+    def __init__(self, *, count_remains: int) -> None:
+        self.count_remains = count_remains  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "CanSendStoryCount":
+        # No flags
+
+        count_remains = Int.read(b)
+
+        return CanSendStoryCount(count_remains=count_remains)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count_remains))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/found_stories.py b/pyrogram/raw/types/stories/found_stories.py
new file mode 100644
index 00000000..473f0ee4
--- /dev/null
+++ b/pyrogram/raw/types/stories/found_stories.py
@@ -0,0 +1,98 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FoundStories(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.FoundStories`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E2DE7737``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        stories (List of :obj:`FoundStory `):
+            N/A
+
+        chats (List of :obj:`Chat `):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+        next_offset (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.SearchPosts
+    """
+
+    __slots__: List[str] = ["count", "stories", "chats", "users", "next_offset"]
+
+    ID = 0xe2de7737
+    QUALNAME = "types.stories.FoundStories"
+
+    def __init__(self, *, count: int, stories: List["raw.base.FoundStory"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.stories = stories  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FoundStories":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        stories = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return FoundStories(count=count, stories=stories, chats=chats, users=users, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.stories))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/peer_stories.py b/pyrogram/raw/types/stories/peer_stories.py
new file mode 100644
index 00000000..1a1736a6
--- /dev/null
+++ b/pyrogram/raw/types/stories/peer_stories.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class PeerStories(TLObject):  # type: ignore
+    """Active story list of a specific peer.
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.PeerStories`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CAE68768``
+
+    Parameters:
+        stories (:obj:`PeerStories `):
+            Stories
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetPeerStories
+    """
+
+    __slots__: List[str] = ["stories", "chats", "users"]
+
+    ID = 0xcae68768
+    QUALNAME = "types.stories.PeerStories"
+
+    def __init__(self, *, stories: "raw.base.PeerStories", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.stories = stories  # PeerStories
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "PeerStories":
+        # No flags
+
+        stories = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return PeerStories(stories=stories, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.stories.write())
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/stories.py b/pyrogram/raw/types/stories/stories.py
new file mode 100644
index 00000000..18fb31e5
--- /dev/null
+++ b/pyrogram/raw/types/stories/stories.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Stories(TLObject):  # type: ignore
+    """List of stories
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.Stories`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``63C3DD0A``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of stories that can be fetched
+
+        stories (List of :obj:`StoryItem `):
+            Stories
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        pinned_to_top (List of ``int`` ``32-bit``, *optional*):
+
+
+    Functions:
+        This object can be returned by 4 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetPinnedStories
+            stories.GetStoriesArchive
+            stories.GetStoriesByID
+            stories.GetAlbumStories
+    """
+
+    __slots__: List[str] = ["count", "stories", "chats", "users", "pinned_to_top"]
+
+    ID = 0x63c3dd0a
+    QUALNAME = "types.stories.Stories"
+
+    def __init__(self, *, count: int, stories: List["raw.base.StoryItem"], chats: List["raw.base.Chat"], users: List["raw.base.User"], pinned_to_top: Optional[List[int]] = None) -> None:
+        self.count = count  # int
+        self.stories = stories  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.pinned_to_top = pinned_to_top  # flags.0?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Stories":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        stories = TLObject.read(b)
+
+        pinned_to_top = TLObject.read(b, Int) if flags & (1 << 0) else []
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return Stories(count=count, stories=stories, chats=chats, users=users, pinned_to_top=pinned_to_top)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pinned_to_top else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.stories))
+
+        if self.pinned_to_top is not None:
+            b.write(Vector(self.pinned_to_top, Int))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/story_reactions_list.py b/pyrogram/raw/types/stories/story_reactions_list.py
new file mode 100644
index 00000000..744215e2
--- /dev/null
+++ b/pyrogram/raw/types/stories/story_reactions_list.py
@@ -0,0 +1,98 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryReactionsList(TLObject):  # type: ignore
+    """List of peers that reacted to or intercated with a specific story
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.StoryReactionsList`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AA5F789C``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of reactions matching query
+
+        reactions (List of :obj:`StoryReaction `):
+            List of peers that reacted to or interacted with a specific story
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        next_offset (``str``, *optional*):
+            If set, indicates the next offset to use to load more results by invoking stories.getStoryReactionsList.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetStoryReactionsList
+    """
+
+    __slots__: List[str] = ["count", "reactions", "chats", "users", "next_offset"]
+
+    ID = 0xaa5f789c
+    QUALNAME = "types.stories.StoryReactionsList"
+
+    def __init__(self, *, count: int, reactions: List["raw.base.StoryReaction"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.reactions = reactions  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryReactionsList":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        reactions = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        return StoryReactionsList(count=count, reactions=reactions, chats=chats, users=users, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.reactions))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/story_views.py b/pyrogram/raw/types/stories/story_views.py
new file mode 100644
index 00000000..46e4f8f2
--- /dev/null
+++ b/pyrogram/raw/types/stories/story_views.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryViews(TLObject):  # type: ignore
+    """Reaction and view counters for a list of stories
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.StoryViews`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DE9EED1D``
+
+    Parameters:
+        views (List of :obj:`StoryViews `):
+            View date and reaction information of multiple stories
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetStoriesViews
+    """
+
+    __slots__: List[str] = ["views", "users"]
+
+    ID = 0xde9eed1d
+    QUALNAME = "types.stories.StoryViews"
+
+    def __init__(self, *, views: List["raw.base.StoryViews"], users: List["raw.base.User"]) -> None:
+        self.views = views  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryViews":
+        # No flags
+
+        views = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return StoryViews(views=views, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.views))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories/story_views_list.py b/pyrogram/raw/types/stories/story_views_list.py
new file mode 100644
index 00000000..d68bc8f6
--- /dev/null
+++ b/pyrogram/raw/types/stories/story_views_list.py
@@ -0,0 +1,122 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryViewsList(TLObject):  # type: ignore
+    """Reaction and view counters for a story
+
+    Constructor of :obj:`~pyrogram.raw.base.stories.StoryViewsList`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``59D78FC5``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            Total number of results that can be fetched
+
+        views_count (``int`` ``32-bit``):
+            Total number of story views
+
+        forwards_count (``int`` ``32-bit``):
+            Total number of story forwards/reposts
+
+        reactions_count (``int`` ``32-bit``):
+            Number of reactions that were added to the story
+
+        views (List of :obj:`StoryView `):
+            Story view date and reaction information
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+        next_offset (``str``, *optional*):
+            Offset for pagination
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.GetStoryViewsList
+    """
+
+    __slots__: List[str] = ["count", "views_count", "forwards_count", "reactions_count", "views", "chats", "users", "next_offset"]
+
+    ID = 0x59d78fc5
+    QUALNAME = "types.stories.StoryViewsList"
+
+    def __init__(self, *, count: int, views_count: int, forwards_count: int, reactions_count: int, views: List["raw.base.StoryView"], chats: List["raw.base.Chat"], users: List["raw.base.User"], next_offset: Optional[str] = None) -> None:
+        self.count = count  # int
+        self.views_count = views_count  # int
+        self.forwards_count = forwards_count  # int
+        self.reactions_count = reactions_count  # int
+        self.views = views  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.next_offset = next_offset  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryViewsList":
+
+        flags = Int.read(b)
+
+        count = Int.read(b)
+
+        views_count = Int.read(b)
+
+        forwards_count = Int.read(b)
+
+        reactions_count = Int.read(b)
+
+        views = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        next_offset = String.read(b) if flags & (1 << 0) else None
+        return StoryViewsList(count=count, views_count=views_count, forwards_count=forwards_count, reactions_count=reactions_count, views=views, chats=chats, users=users, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.next_offset is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.count))
+
+        b.write(Int(self.views_count))
+
+        b.write(Int(self.forwards_count))
+
+        b.write(Int(self.reactions_count))
+
+        b.write(Vector(self.views))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        if self.next_offset is not None:
+            b.write(String(self.next_offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/stories_stealth_mode.py b/pyrogram/raw/types/stories_stealth_mode.py
new file mode 100644
index 00000000..5edcf9b8
--- /dev/null
+++ b/pyrogram/raw/types/stories_stealth_mode.py
@@ -0,0 +1,66 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoriesStealthMode(TLObject):  # type: ignore
+    """Information about the current stealth mode session.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoriesStealthMode`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``712E27FD``
+
+    Parameters:
+        active_until_date (``int`` ``32-bit``, *optional*):
+            The date up to which stealth mode will be active.
+
+        cooldown_until_date (``int`` ``32-bit``, *optional*):
+            The date starting from which the user will be allowed to re-enable stealth mode again.
+
+    """
+
+    __slots__: List[str] = ["active_until_date", "cooldown_until_date"]
+
+    ID = 0x712e27fd
+    QUALNAME = "types.StoriesStealthMode"
+
+    def __init__(self, *, active_until_date: Optional[int] = None, cooldown_until_date: Optional[int] = None) -> None:
+        self.active_until_date = active_until_date  # flags.0?int
+        self.cooldown_until_date = cooldown_until_date  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoriesStealthMode":
+
+        flags = Int.read(b)
+
+        active_until_date = Int.read(b) if flags & (1 << 0) else None
+        cooldown_until_date = Int.read(b) if flags & (1 << 1) else None
+        return StoriesStealthMode(active_until_date=active_until_date, cooldown_until_date=cooldown_until_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.active_until_date is not None else 0
+        flags |= (1 << 1) if self.cooldown_until_date is not None else 0
+        b.write(Int(flags))
+
+        if self.active_until_date is not None:
+            b.write(Int(self.active_until_date))
+
+        if self.cooldown_until_date is not None:
+            b.write(Int(self.cooldown_until_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_album.py b/pyrogram/raw/types/story_album.py
new file mode 100644
index 00000000..7961dfed
--- /dev/null
+++ b/pyrogram/raw/types/story_album.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryAlbum(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryAlbum`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9325705A``
+
+    Parameters:
+        album_id (``int`` ``32-bit``):
+            N/A
+
+        title (``str``):
+            N/A
+
+        icon_photo (:obj:`Photo `, *optional*):
+            N/A
+
+        icon_video (:obj:`Document `, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            stories.CreateAlbum
+            stories.UpdateAlbum
+    """
+
+    __slots__: List[str] = ["album_id", "title", "icon_photo", "icon_video"]
+
+    ID = 0x9325705a
+    QUALNAME = "types.StoryAlbum"
+
+    def __init__(self, *, album_id: int, title: str, icon_photo: "raw.base.Photo" = None, icon_video: "raw.base.Document" = None) -> None:
+        self.album_id = album_id  # int
+        self.title = title  # string
+        self.icon_photo = icon_photo  # flags.0?Photo
+        self.icon_video = icon_video  # flags.1?Document
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryAlbum":
+
+        flags = Int.read(b)
+
+        album_id = Int.read(b)
+
+        title = String.read(b)
+
+        icon_photo = TLObject.read(b) if flags & (1 << 0) else None
+
+        icon_video = TLObject.read(b) if flags & (1 << 1) else None
+
+        return StoryAlbum(album_id=album_id, title=title, icon_photo=icon_photo, icon_video=icon_video)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.icon_photo is not None else 0
+        flags |= (1 << 1) if self.icon_video is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.album_id))
+
+        b.write(String(self.title))
+
+        if self.icon_photo is not None:
+            b.write(self.icon_photo.write())
+
+        if self.icon_video is not None:
+            b.write(self.icon_video.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_fwd_header.py b/pyrogram/raw/types/story_fwd_header.py
new file mode 100644
index 00000000..3148292e
--- /dev/null
+++ b/pyrogram/raw/types/story_fwd_header.py
@@ -0,0 +1,82 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryFwdHeader(TLObject):  # type: ignore
+    """Contains info about the original poster of a reposted story.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryFwdHeader`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B826E150``
+
+    Parameters:
+        modified (``bool``, *optional*):
+            Whether the story media was modified before reposting it (for example by overlaying a round video with a reaction).
+
+        from_peer (:obj:`Peer `, *optional*):
+            N/A
+
+        from_name (``str``, *optional*):
+            Will be set for stories forwarded from a user with forwards privacy enabled, in which case from will also be empty.
+
+        story_id (``int`` ``32-bit``, *optional*):
+            , contains the story ID
+
+    """
+
+    __slots__: List[str] = ["modified", "from_peer", "from_name", "story_id"]
+
+    ID = 0xb826e150
+    QUALNAME = "types.StoryFwdHeader"
+
+    def __init__(self, *, modified: Optional[bool] = None, from_peer: "raw.base.Peer" = None, from_name: Optional[str] = None, story_id: Optional[int] = None) -> None:
+        self.modified = modified  # flags.3?true
+        self.from_peer = from_peer  # flags.0?Peer
+        self.from_name = from_name  # flags.1?string
+        self.story_id = story_id  # flags.2?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryFwdHeader":
+
+        flags = Int.read(b)
+
+        modified = True if flags & (1 << 3) else False
+        from_peer = TLObject.read(b) if flags & (1 << 0) else None
+
+        from_name = String.read(b) if flags & (1 << 1) else None
+        story_id = Int.read(b) if flags & (1 << 2) else None
+        return StoryFwdHeader(modified=modified, from_peer=from_peer, from_name=from_name, story_id=story_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 3) if self.modified else 0
+        flags |= (1 << 0) if self.from_peer is not None else 0
+        flags |= (1 << 1) if self.from_name is not None else 0
+        flags |= (1 << 2) if self.story_id is not None else 0
+        b.write(Int(flags))
+
+        if self.from_peer is not None:
+            b.write(self.from_peer.write())
+
+        if self.from_name is not None:
+            b.write(String(self.from_name))
+
+        if self.story_id is not None:
+            b.write(Int(self.story_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_item.py b/pyrogram/raw/types/story_item.py
new file mode 100644
index 00000000..64baff20
--- /dev/null
+++ b/pyrogram/raw/types/story_item.py
@@ -0,0 +1,223 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryItem(TLObject):  # type: ignore
+    """Represents a story.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EDF164F1``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            ID of the story.
+
+        date (``int`` ``32-bit``):
+            When was the story posted.
+
+        expire_date (``int`` ``32-bit``):
+            When does the story expire.
+
+        media (:obj:`MessageMedia `):
+            Story media.
+
+        pinned (``bool``, *optional*):
+            Whether this story is pinned on the user's profile
+
+        public (``bool``, *optional*):
+            Whether this story is public and can be viewed by everyone
+
+        close_friends (``bool``, *optional*):
+            Whether this story can only be viewed by our close friends, see here » for more info
+
+        min (``bool``, *optional*):
+            Full information about this story was omitted for space and performance reasons; use stories.getStoriesByID to fetch full info about this story when and if needed.
+
+        noforwards (``bool``, *optional*):
+            Whether this story is protected and thus cannot be forwarded; clients should also prevent users from saving attached media (i.e. videos should only be streamed, photos should be kept in RAM, et cetera).
+
+        edited (``bool``, *optional*):
+            Indicates whether the story was edited.
+
+        contacts (``bool``, *optional*):
+            Whether this story can only be viewed by our contacts
+
+        selected_contacts (``bool``, *optional*):
+            Whether this story can only be viewed by a select list of our contacts
+
+        out (``bool``, *optional*):
+            indicates whether we sent this story.
+
+        from_id (:obj:`Peer `, *optional*):
+
+
+        fwd_from (:obj:`StoryFwdHeader `, *optional*):
+            For reposted stories », contains info about the original story.
+
+        caption (``str``, *optional*):
+            Story caption.
+
+        entities (List of :obj:`MessageEntity `, *optional*):
+            Message entities for styled text
+
+        media_areas (List of :obj:`MediaArea `, *optional*):
+            List of media areas, see here » for more info on media areas.
+
+        privacy (List of :obj:`PrivacyRule `, *optional*):
+            Privacy rules indicating who can and can't view this story
+
+        views (:obj:`StoryViews `, *optional*):
+            View date and reaction information
+
+        sent_reaction (:obj:`Reaction `, *optional*):
+            The reaction we sent.
+
+        albums (List of ``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "date", "expire_date", "media", "pinned", "public", "close_friends", "min", "noforwards", "edited", "contacts", "selected_contacts", "out", "from_id", "fwd_from", "caption", "entities", "media_areas", "privacy", "views", "sent_reaction", "albums"]
+
+    ID = 0xedf164f1
+    QUALNAME = "types.StoryItem"
+
+    def __init__(self, *, id: int, date: int, expire_date: int, media: "raw.base.MessageMedia", pinned: Optional[bool] = None, public: Optional[bool] = None, close_friends: Optional[bool] = None, min: Optional[bool] = None, noforwards: Optional[bool] = None, edited: Optional[bool] = None, contacts: Optional[bool] = None, selected_contacts: Optional[bool] = None, out: Optional[bool] = None, from_id: "raw.base.Peer" = None, fwd_from: "raw.base.StoryFwdHeader" = None, caption: Optional[str] = None, entities: Optional[List["raw.base.MessageEntity"]] = None, media_areas: Optional[List["raw.base.MediaArea"]] = None, privacy: Optional[List["raw.base.PrivacyRule"]] = None, views: "raw.base.StoryViews" = None, sent_reaction: "raw.base.Reaction" = None, albums: Optional[List[int]] = None) -> None:
+        self.id = id  # int
+        self.date = date  # int
+        self.expire_date = expire_date  # int
+        self.media = media  # MessageMedia
+        self.pinned = pinned  # flags.5?true
+        self.public = public  # flags.7?true
+        self.close_friends = close_friends  # flags.8?true
+        self.min = min  # flags.9?true
+        self.noforwards = noforwards  # flags.10?true
+        self.edited = edited  # flags.11?true
+        self.contacts = contacts  # flags.12?true
+        self.selected_contacts = selected_contacts  # flags.13?true
+        self.out = out  # flags.16?true
+        self.from_id = from_id  # flags.18?Peer
+        self.fwd_from = fwd_from  # flags.17?StoryFwdHeader
+        self.caption = caption  # flags.0?string
+        self.entities = entities  # flags.1?Vector
+        self.media_areas = media_areas  # flags.14?Vector
+        self.privacy = privacy  # flags.2?Vector
+        self.views = views  # flags.3?StoryViews
+        self.sent_reaction = sent_reaction  # flags.15?Reaction
+        self.albums = albums  # flags.19?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryItem":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 5) else False
+        public = True if flags & (1 << 7) else False
+        close_friends = True if flags & (1 << 8) else False
+        min = True if flags & (1 << 9) else False
+        noforwards = True if flags & (1 << 10) else False
+        edited = True if flags & (1 << 11) else False
+        contacts = True if flags & (1 << 12) else False
+        selected_contacts = True if flags & (1 << 13) else False
+        out = True if flags & (1 << 16) else False
+        id = Int.read(b)
+
+        date = Int.read(b)
+
+        from_id = TLObject.read(b) if flags & (1 << 18) else None
+
+        fwd_from = TLObject.read(b) if flags & (1 << 17) else None
+
+        expire_date = Int.read(b)
+
+        caption = String.read(b) if flags & (1 << 0) else None
+        entities = TLObject.read(b) if flags & (1 << 1) else []
+
+        media = TLObject.read(b)
+
+        media_areas = TLObject.read(b) if flags & (1 << 14) else []
+
+        privacy = TLObject.read(b) if flags & (1 << 2) else []
+
+        views = TLObject.read(b) if flags & (1 << 3) else None
+
+        sent_reaction = TLObject.read(b) if flags & (1 << 15) else None
+
+        albums = TLObject.read(b, Int) if flags & (1 << 19) else []
+
+        return StoryItem(id=id, date=date, expire_date=expire_date, media=media, pinned=pinned, public=public, close_friends=close_friends, min=min, noforwards=noforwards, edited=edited, contacts=contacts, selected_contacts=selected_contacts, out=out, from_id=from_id, fwd_from=fwd_from, caption=caption, entities=entities, media_areas=media_areas, privacy=privacy, views=views, sent_reaction=sent_reaction, albums=albums)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 5) if self.pinned else 0
+        flags |= (1 << 7) if self.public else 0
+        flags |= (1 << 8) if self.close_friends else 0
+        flags |= (1 << 9) if self.min else 0
+        flags |= (1 << 10) if self.noforwards else 0
+        flags |= (1 << 11) if self.edited else 0
+        flags |= (1 << 12) if self.contacts else 0
+        flags |= (1 << 13) if self.selected_contacts else 0
+        flags |= (1 << 16) if self.out else 0
+        flags |= (1 << 18) if self.from_id is not None else 0
+        flags |= (1 << 17) if self.fwd_from is not None else 0
+        flags |= (1 << 0) if self.caption is not None else 0
+        flags |= (1 << 1) if self.entities else 0
+        flags |= (1 << 14) if self.media_areas else 0
+        flags |= (1 << 2) if self.privacy else 0
+        flags |= (1 << 3) if self.views is not None else 0
+        flags |= (1 << 15) if self.sent_reaction is not None else 0
+        flags |= (1 << 19) if self.albums else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.id))
+
+        b.write(Int(self.date))
+
+        if self.from_id is not None:
+            b.write(self.from_id.write())
+
+        if self.fwd_from is not None:
+            b.write(self.fwd_from.write())
+
+        b.write(Int(self.expire_date))
+
+        if self.caption is not None:
+            b.write(String(self.caption))
+
+        if self.entities is not None:
+            b.write(Vector(self.entities))
+
+        b.write(self.media.write())
+
+        if self.media_areas is not None:
+            b.write(Vector(self.media_areas))
+
+        if self.privacy is not None:
+            b.write(Vector(self.privacy))
+
+        if self.views is not None:
+            b.write(self.views.write())
+
+        if self.sent_reaction is not None:
+            b.write(self.sent_reaction.write())
+
+        if self.albums is not None:
+            b.write(Vector(self.albums, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_item_deleted.py b/pyrogram/raw/types/story_item_deleted.py
new file mode 100644
index 00000000..2354935a
--- /dev/null
+++ b/pyrogram/raw/types/story_item_deleted.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryItemDeleted(TLObject):  # type: ignore
+    """Represents a previously active story, that was deleted
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``51E6EE4F``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            Story ID
+
+    """
+
+    __slots__: List[str] = ["id"]
+
+    ID = 0x51e6ee4f
+    QUALNAME = "types.StoryItemDeleted"
+
+    def __init__(self, *, id: int) -> None:
+        self.id = id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryItemDeleted":
+        # No flags
+
+        id = Int.read(b)
+
+        return StoryItemDeleted(id=id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_item_skipped.py b/pyrogram/raw/types/story_item_skipped.py
new file mode 100644
index 00000000..297ae88b
--- /dev/null
+++ b/pyrogram/raw/types/story_item_skipped.py
@@ -0,0 +1,84 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryItemSkipped(TLObject):  # type: ignore
+    """Represents an active story, whose full information was omitted for space and performance reasons; use stories.getStoriesByID to fetch full info about the skipped story when and if needed.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FFADC913``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            Story ID
+
+        date (``int`` ``32-bit``):
+            When was the story posted.
+
+        expire_date (``int`` ``32-bit``):
+            When does the story expire.
+
+        close_friends (``bool``, *optional*):
+            Whether this story can only be viewed by our close friends, see here » for more info
+
+        live (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "date", "expire_date", "close_friends", "live"]
+
+    ID = 0xffadc913
+    QUALNAME = "types.StoryItemSkipped"
+
+    def __init__(self, *, id: int, date: int, expire_date: int, close_friends: Optional[bool] = None, live: Optional[bool] = None) -> None:
+        self.id = id  # int
+        self.date = date  # int
+        self.expire_date = expire_date  # int
+        self.close_friends = close_friends  # flags.8?true
+        self.live = live  # flags.9?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryItemSkipped":
+
+        flags = Int.read(b)
+
+        close_friends = True if flags & (1 << 8) else False
+        live = True if flags & (1 << 9) else False
+        id = Int.read(b)
+
+        date = Int.read(b)
+
+        expire_date = Int.read(b)
+
+        return StoryItemSkipped(id=id, date=date, expire_date=expire_date, close_friends=close_friends, live=live)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 8) if self.close_friends else 0
+        flags |= (1 << 9) if self.live else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.id))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.expire_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_reaction.py b/pyrogram/raw/types/story_reaction.py
new file mode 100644
index 00000000..c09a90ac
--- /dev/null
+++ b/pyrogram/raw/types/story_reaction.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryReaction(TLObject):  # type: ignore
+    """How a certain peer reacted to a story
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryReaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6090D6D5``
+
+    Parameters:
+        peer_id (:obj:`Peer `):
+            The peer
+
+        date (``int`` ``32-bit``):
+            Reaction date
+
+        reaction (:obj:`Reaction `):
+            The reaction
+
+    """
+
+    __slots__: List[str] = ["peer_id", "date", "reaction"]
+
+    ID = 0x6090d6d5
+    QUALNAME = "types.StoryReaction"
+
+    def __init__(self, *, peer_id: "raw.base.Peer", date: int, reaction: "raw.base.Reaction") -> None:
+        self.peer_id = peer_id  # Peer
+        self.date = date  # int
+        self.reaction = reaction  # Reaction
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryReaction":
+        # No flags
+
+        peer_id = TLObject.read(b)
+
+        date = Int.read(b)
+
+        reaction = TLObject.read(b)
+
+        return StoryReaction(peer_id=peer_id, date=date, reaction=reaction)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer_id.write())
+
+        b.write(Int(self.date))
+
+        b.write(self.reaction.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_reaction_public_forward.py b/pyrogram/raw/types/story_reaction_public_forward.py
new file mode 100644
index 00000000..e34642a5
--- /dev/null
+++ b/pyrogram/raw/types/story_reaction_public_forward.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryReactionPublicForward(TLObject):  # type: ignore
+    """A certain peer has forwarded the story as a message to a public chat or channel.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryReaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BBAB2643``
+
+    Parameters:
+        message (:obj:`Message `):
+            The message with the forwarded story.
+
+    """
+
+    __slots__: List[str] = ["message"]
+
+    ID = 0xbbab2643
+    QUALNAME = "types.StoryReactionPublicForward"
+
+    def __init__(self, *, message: "raw.base.Message") -> None:
+        self.message = message  # Message
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryReactionPublicForward":
+        # No flags
+
+        message = TLObject.read(b)
+
+        return StoryReactionPublicForward(message=message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_reaction_public_repost.py b/pyrogram/raw/types/story_reaction_public_repost.py
new file mode 100644
index 00000000..73572076
--- /dev/null
+++ b/pyrogram/raw/types/story_reaction_public_repost.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryReactionPublicRepost(TLObject):  # type: ignore
+    """A certain peer has reposted the story.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryReaction`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CFCD0F13``
+
+    Parameters:
+        peer_id (:obj:`Peer `):
+            The peer that reposted the story.
+
+        story (:obj:`StoryItem `):
+            The reposted story.
+
+    """
+
+    __slots__: List[str] = ["peer_id", "story"]
+
+    ID = 0xcfcd0f13
+    QUALNAME = "types.StoryReactionPublicRepost"
+
+    def __init__(self, *, peer_id: "raw.base.Peer", story: "raw.base.StoryItem") -> None:
+        self.peer_id = peer_id  # Peer
+        self.story = story  # StoryItem
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryReactionPublicRepost":
+        # No flags
+
+        peer_id = TLObject.read(b)
+
+        story = TLObject.read(b)
+
+        return StoryReactionPublicRepost(peer_id=peer_id, story=story)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer_id.write())
+
+        b.write(self.story.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_view.py b/pyrogram/raw/types/story_view.py
new file mode 100644
index 00000000..4ec769a3
--- /dev/null
+++ b/pyrogram/raw/types/story_view.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryView(TLObject):  # type: ignore
+    """Story view date and reaction information
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryView`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B0BDEAC5``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            The user that viewed the story
+
+        date (``int`` ``32-bit``):
+            When did the user view the story
+
+        blocked (``bool``, *optional*):
+            Whether we have completely blocked this user, including from viewing more of our stories.
+
+        blocked_my_stories_from (``bool``, *optional*):
+            Whether we have blocked this user from viewing more of our stories.
+
+        reaction (:obj:`Reaction `, *optional*):
+            If present, contains the reaction that the user left on the story
+
+    """
+
+    __slots__: List[str] = ["user_id", "date", "blocked", "blocked_my_stories_from", "reaction"]
+
+    ID = 0xb0bdeac5
+    QUALNAME = "types.StoryView"
+
+    def __init__(self, *, user_id: int, date: int, blocked: Optional[bool] = None, blocked_my_stories_from: Optional[bool] = None, reaction: "raw.base.Reaction" = None) -> None:
+        self.user_id = user_id  # long
+        self.date = date  # int
+        self.blocked = blocked  # flags.0?true
+        self.blocked_my_stories_from = blocked_my_stories_from  # flags.1?true
+        self.reaction = reaction  # flags.2?Reaction
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryView":
+
+        flags = Int.read(b)
+
+        blocked = True if flags & (1 << 0) else False
+        blocked_my_stories_from = True if flags & (1 << 1) else False
+        user_id = Long.read(b)
+
+        date = Int.read(b)
+
+        reaction = TLObject.read(b) if flags & (1 << 2) else None
+
+        return StoryView(user_id=user_id, date=date, blocked=blocked, blocked_my_stories_from=blocked_my_stories_from, reaction=reaction)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.blocked else 0
+        flags |= (1 << 1) if self.blocked_my_stories_from else 0
+        flags |= (1 << 2) if self.reaction is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.date))
+
+        if self.reaction is not None:
+            b.write(self.reaction.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_view_public_forward.py b/pyrogram/raw/types/story_view_public_forward.py
new file mode 100644
index 00000000..5a5f688c
--- /dev/null
+++ b/pyrogram/raw/types/story_view_public_forward.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryViewPublicForward(TLObject):  # type: ignore
+    """A certain peer has forwarded the story as a message to a public chat or channel.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryView`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9083670B``
+
+    Parameters:
+        message (:obj:`Message `):
+            The message with the forwarded story.
+
+        blocked (``bool``, *optional*):
+            Whether we have completely blocked this user, including from viewing more of our stories.
+
+        blocked_my_stories_from (``bool``, *optional*):
+            Whether we have blocked this user from viewing more of our stories.
+
+    """
+
+    __slots__: List[str] = ["message", "blocked", "blocked_my_stories_from"]
+
+    ID = 0x9083670b
+    QUALNAME = "types.StoryViewPublicForward"
+
+    def __init__(self, *, message: "raw.base.Message", blocked: Optional[bool] = None, blocked_my_stories_from: Optional[bool] = None) -> None:
+        self.message = message  # Message
+        self.blocked = blocked  # flags.0?true
+        self.blocked_my_stories_from = blocked_my_stories_from  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryViewPublicForward":
+
+        flags = Int.read(b)
+
+        blocked = True if flags & (1 << 0) else False
+        blocked_my_stories_from = True if flags & (1 << 1) else False
+        message = TLObject.read(b)
+
+        return StoryViewPublicForward(message=message, blocked=blocked, blocked_my_stories_from=blocked_my_stories_from)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.blocked else 0
+        flags |= (1 << 1) if self.blocked_my_stories_from else 0
+        b.write(Int(flags))
+
+        b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_view_public_repost.py b/pyrogram/raw/types/story_view_public_repost.py
new file mode 100644
index 00000000..ec785dcc
--- /dev/null
+++ b/pyrogram/raw/types/story_view_public_repost.py
@@ -0,0 +1,76 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryViewPublicRepost(TLObject):  # type: ignore
+    """A certain peer has reposted the story.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryView`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BD74CF49``
+
+    Parameters:
+        peer_id (:obj:`Peer `):
+            The peer that reposted the story.
+
+        story (:obj:`StoryItem `):
+            The reposted story.
+
+        blocked (``bool``, *optional*):
+            Whether we have completely blocked this user, including from viewing more of our stories.
+
+        blocked_my_stories_from (``bool``, *optional*):
+            Whether we have blocked this user from viewing more of our stories.
+
+    """
+
+    __slots__: List[str] = ["peer_id", "story", "blocked", "blocked_my_stories_from"]
+
+    ID = 0xbd74cf49
+    QUALNAME = "types.StoryViewPublicRepost"
+
+    def __init__(self, *, peer_id: "raw.base.Peer", story: "raw.base.StoryItem", blocked: Optional[bool] = None, blocked_my_stories_from: Optional[bool] = None) -> None:
+        self.peer_id = peer_id  # Peer
+        self.story = story  # StoryItem
+        self.blocked = blocked  # flags.0?true
+        self.blocked_my_stories_from = blocked_my_stories_from  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryViewPublicRepost":
+
+        flags = Int.read(b)
+
+        blocked = True if flags & (1 << 0) else False
+        blocked_my_stories_from = True if flags & (1 << 1) else False
+        peer_id = TLObject.read(b)
+
+        story = TLObject.read(b)
+
+        return StoryViewPublicRepost(peer_id=peer_id, story=story, blocked=blocked, blocked_my_stories_from=blocked_my_stories_from)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.blocked else 0
+        flags |= (1 << 1) if self.blocked_my_stories_from else 0
+        b.write(Int(flags))
+
+        b.write(self.peer_id.write())
+
+        b.write(self.story.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/story_views.py b/pyrogram/raw/types/story_views.py
new file mode 100644
index 00000000..e6bb930d
--- /dev/null
+++ b/pyrogram/raw/types/story_views.py
@@ -0,0 +1,100 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class StoryViews(TLObject):  # type: ignore
+    """Aggregated view and reaction information of a story.
+
+    Constructor of :obj:`~pyrogram.raw.base.StoryViews`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8D595CD6``
+
+    Parameters:
+        views_count (``int`` ``32-bit``):
+            View counter of the story
+
+        has_viewers (``bool``, *optional*):
+            If set, indicates that the viewers list is currently viewable, and was not yet deleted because the story has expired while the user didn't have a Premium account.
+
+        forwards_count (``int`` ``32-bit``, *optional*):
+            Forward counter of the story
+
+        reactions (List of :obj:`ReactionCount `, *optional*):
+            All reactions sent to this story
+
+        reactions_count (``int`` ``32-bit``, *optional*):
+            Number of reactions added to the story
+
+        recent_viewers (List of ``int`` ``64-bit``, *optional*):
+            User IDs of some recent viewers of the story
+
+    """
+
+    __slots__: List[str] = ["views_count", "has_viewers", "forwards_count", "reactions", "reactions_count", "recent_viewers"]
+
+    ID = 0x8d595cd6
+    QUALNAME = "types.StoryViews"
+
+    def __init__(self, *, views_count: int, has_viewers: Optional[bool] = None, forwards_count: Optional[int] = None, reactions: Optional[List["raw.base.ReactionCount"]] = None, reactions_count: Optional[int] = None, recent_viewers: Optional[List[int]] = None) -> None:
+        self.views_count = views_count  # int
+        self.has_viewers = has_viewers  # flags.1?true
+        self.forwards_count = forwards_count  # flags.2?int
+        self.reactions = reactions  # flags.3?Vector
+        self.reactions_count = reactions_count  # flags.4?int
+        self.recent_viewers = recent_viewers  # flags.0?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "StoryViews":
+
+        flags = Int.read(b)
+
+        has_viewers = True if flags & (1 << 1) else False
+        views_count = Int.read(b)
+
+        forwards_count = Int.read(b) if flags & (1 << 2) else None
+        reactions = TLObject.read(b) if flags & (1 << 3) else []
+
+        reactions_count = Int.read(b) if flags & (1 << 4) else None
+        recent_viewers = TLObject.read(b, Long) if flags & (1 << 0) else []
+
+        return StoryViews(views_count=views_count, has_viewers=has_viewers, forwards_count=forwards_count, reactions=reactions, reactions_count=reactions_count, recent_viewers=recent_viewers)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.has_viewers else 0
+        flags |= (1 << 2) if self.forwards_count is not None else 0
+        flags |= (1 << 3) if self.reactions else 0
+        flags |= (1 << 4) if self.reactions_count is not None else 0
+        flags |= (1 << 0) if self.recent_viewers else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.views_count))
+
+        if self.forwards_count is not None:
+            b.write(Int(self.forwards_count))
+
+        if self.reactions is not None:
+            b.write(Vector(self.reactions))
+
+        if self.reactions_count is not None:
+            b.write(Int(self.reactions_count))
+
+        if self.recent_viewers is not None:
+            b.write(Vector(self.recent_viewers, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/suggested_post.py b/pyrogram/raw/types/suggested_post.py
new file mode 100644
index 00000000..9efa8c1e
--- /dev/null
+++ b/pyrogram/raw/types/suggested_post.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SuggestedPost(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.SuggestedPost`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E8E37E5``
+
+    Parameters:
+        accepted (``bool``, *optional*):
+            N/A
+
+        rejected (``bool``, *optional*):
+            N/A
+
+        price (:obj:`StarsAmount `, *optional*):
+            N/A
+
+        schedule_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["accepted", "rejected", "price", "schedule_date"]
+
+    ID = 0xe8e37e5
+    QUALNAME = "types.SuggestedPost"
+
+    def __init__(self, *, accepted: Optional[bool] = None, rejected: Optional[bool] = None, price: "raw.base.StarsAmount" = None, schedule_date: Optional[int] = None) -> None:
+        self.accepted = accepted  # flags.1?true
+        self.rejected = rejected  # flags.2?true
+        self.price = price  # flags.3?StarsAmount
+        self.schedule_date = schedule_date  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SuggestedPost":
+
+        flags = Int.read(b)
+
+        accepted = True if flags & (1 << 1) else False
+        rejected = True if flags & (1 << 2) else False
+        price = TLObject.read(b) if flags & (1 << 3) else None
+
+        schedule_date = Int.read(b) if flags & (1 << 0) else None
+        return SuggestedPost(accepted=accepted, rejected=rejected, price=price, schedule_date=schedule_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.accepted else 0
+        flags |= (1 << 2) if self.rejected else 0
+        flags |= (1 << 3) if self.price is not None else 0
+        flags |= (1 << 0) if self.schedule_date is not None else 0
+        b.write(Int(flags))
+
+        if self.price is not None:
+            b.write(self.price.write())
+
+        if self.schedule_date is not None:
+            b.write(Int(self.schedule_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_anchor.py b/pyrogram/raw/types/text_anchor.py
new file mode 100644
index 00000000..2b6f0df1
--- /dev/null
+++ b/pyrogram/raw/types/text_anchor.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextAnchor(TLObject):  # type: ignore
+    """Text linking to another section of the page
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``35553762``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+        name (``str``):
+            Section name
+
+    """
+
+    __slots__: List[str] = ["text", "name"]
+
+    ID = 0x35553762
+    QUALNAME = "types.TextAnchor"
+
+    def __init__(self, *, text: "raw.base.RichText", name: str) -> None:
+        self.text = text  # RichText
+        self.name = name  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextAnchor":
+        # No flags
+
+        text = TLObject.read(b)
+
+        name = String.read(b)
+
+        return TextAnchor(text=text, name=name)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(String(self.name))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_bold.py b/pyrogram/raw/types/text_bold.py
new file mode 100644
index 00000000..e743ba15
--- /dev/null
+++ b/pyrogram/raw/types/text_bold.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextBold(TLObject):  # type: ignore
+    """Bold text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6724ABC4``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x6724abc4
+    QUALNAME = "types.TextBold"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextBold":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextBold(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_concat.py b/pyrogram/raw/types/text_concat.py
new file mode 100644
index 00000000..9f4451e2
--- /dev/null
+++ b/pyrogram/raw/types/text_concat.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextConcat(TLObject):  # type: ignore
+    """Concatenation of rich texts
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7E6260D7``
+
+    Parameters:
+        texts (List of :obj:`RichText `):
+            Concatenated rich texts
+
+    """
+
+    __slots__: List[str] = ["texts"]
+
+    ID = 0x7e6260d7
+    QUALNAME = "types.TextConcat"
+
+    def __init__(self, *, texts: List["raw.base.RichText"]) -> None:
+        self.texts = texts  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextConcat":
+        # No flags
+
+        texts = TLObject.read(b)
+
+        return TextConcat(texts=texts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.texts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_email.py b/pyrogram/raw/types/text_email.py
new file mode 100644
index 00000000..d6bbc993
--- /dev/null
+++ b/pyrogram/raw/types/text_email.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextEmail(TLObject):  # type: ignore
+    """Rich text email link
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DE5A0DD6``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Link text
+
+        email (``str``):
+            Email address
+
+    """
+
+    __slots__: List[str] = ["text", "email"]
+
+    ID = 0xde5a0dd6
+    QUALNAME = "types.TextEmail"
+
+    def __init__(self, *, text: "raw.base.RichText", email: str) -> None:
+        self.text = text  # RichText
+        self.email = email  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextEmail":
+        # No flags
+
+        text = TLObject.read(b)
+
+        email = String.read(b)
+
+        return TextEmail(text=text, email=email)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(String(self.email))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_empty.py b/pyrogram/raw/types/text_empty.py
new file mode 100644
index 00000000..93fd837a
--- /dev/null
+++ b/pyrogram/raw/types/text_empty.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextEmpty(TLObject):  # type: ignore
+    """Empty rich text element
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DC3D824F``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xdc3d824f
+    QUALNAME = "types.TextEmpty"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextEmpty":
+        # No flags
+
+        return TextEmpty()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_fixed.py b/pyrogram/raw/types/text_fixed.py
new file mode 100644
index 00000000..8c2e98d5
--- /dev/null
+++ b/pyrogram/raw/types/text_fixed.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextFixed(TLObject):  # type: ignore
+    """fixed-width rich text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6C3F19B9``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x6c3f19b9
+    QUALNAME = "types.TextFixed"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextFixed":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextFixed(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_image.py b/pyrogram/raw/types/text_image.py
new file mode 100644
index 00000000..3fcc92ac
--- /dev/null
+++ b/pyrogram/raw/types/text_image.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextImage(TLObject):  # type: ignore
+    """Inline image
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``81CCF4F``
+
+    Parameters:
+        document_id (``int`` ``64-bit``):
+            Document ID
+
+        w (``int`` ``32-bit``):
+            Width
+
+        h (``int`` ``32-bit``):
+            Height
+
+    """
+
+    __slots__: List[str] = ["document_id", "w", "h"]
+
+    ID = 0x81ccf4f
+    QUALNAME = "types.TextImage"
+
+    def __init__(self, *, document_id: int, w: int, h: int) -> None:
+        self.document_id = document_id  # long
+        self.w = w  # int
+        self.h = h  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextImage":
+        # No flags
+
+        document_id = Long.read(b)
+
+        w = Int.read(b)
+
+        h = Int.read(b)
+
+        return TextImage(document_id=document_id, w=w, h=h)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.document_id))
+
+        b.write(Int(self.w))
+
+        b.write(Int(self.h))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_italic.py b/pyrogram/raw/types/text_italic.py
new file mode 100644
index 00000000..3d589a74
--- /dev/null
+++ b/pyrogram/raw/types/text_italic.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextItalic(TLObject):  # type: ignore
+    """Italic text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D912A59C``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0xd912a59c
+    QUALNAME = "types.TextItalic"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextItalic":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextItalic(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_marked.py b/pyrogram/raw/types/text_marked.py
new file mode 100644
index 00000000..b329d503
--- /dev/null
+++ b/pyrogram/raw/types/text_marked.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextMarked(TLObject):  # type: ignore
+    """Highlighted text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``34B8621``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x34b8621
+    QUALNAME = "types.TextMarked"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextMarked":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextMarked(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_phone.py b/pyrogram/raw/types/text_phone.py
new file mode 100644
index 00000000..e80b40db
--- /dev/null
+++ b/pyrogram/raw/types/text_phone.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextPhone(TLObject):  # type: ignore
+    """Rich text linked to a phone number
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1CCB966A``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+        phone (``str``):
+            Phone number
+
+    """
+
+    __slots__: List[str] = ["text", "phone"]
+
+    ID = 0x1ccb966a
+    QUALNAME = "types.TextPhone"
+
+    def __init__(self, *, text: "raw.base.RichText", phone: str) -> None:
+        self.text = text  # RichText
+        self.phone = phone  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextPhone":
+        # No flags
+
+        text = TLObject.read(b)
+
+        phone = String.read(b)
+
+        return TextPhone(text=text, phone=phone)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(String(self.phone))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_plain.py b/pyrogram/raw/types/text_plain.py
new file mode 100644
index 00000000..28abb187
--- /dev/null
+++ b/pyrogram/raw/types/text_plain.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextPlain(TLObject):  # type: ignore
+    """Plain text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``744694E0``
+
+    Parameters:
+        text (``str``):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x744694e0
+    QUALNAME = "types.TextPlain"
+
+    def __init__(self, *, text: str) -> None:
+        self.text = text  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextPlain":
+        # No flags
+
+        text = String.read(b)
+
+        return TextPlain(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_strike.py b/pyrogram/raw/types/text_strike.py
new file mode 100644
index 00000000..2c112cab
--- /dev/null
+++ b/pyrogram/raw/types/text_strike.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextStrike(TLObject):  # type: ignore
+    """Strikethrough text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9BF8BB95``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0x9bf8bb95
+    QUALNAME = "types.TextStrike"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextStrike":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextStrike(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_subscript.py b/pyrogram/raw/types/text_subscript.py
new file mode 100644
index 00000000..3beb0e32
--- /dev/null
+++ b/pyrogram/raw/types/text_subscript.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextSubscript(TLObject):  # type: ignore
+    """Subscript text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``ED6A8504``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0xed6a8504
+    QUALNAME = "types.TextSubscript"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextSubscript":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextSubscript(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_superscript.py b/pyrogram/raw/types/text_superscript.py
new file mode 100644
index 00000000..d70edd0d
--- /dev/null
+++ b/pyrogram/raw/types/text_superscript.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextSuperscript(TLObject):  # type: ignore
+    """Superscript text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C7FB5E01``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0xc7fb5e01
+    QUALNAME = "types.TextSuperscript"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextSuperscript":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextSuperscript(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_underline.py b/pyrogram/raw/types/text_underline.py
new file mode 100644
index 00000000..3dd3564d
--- /dev/null
+++ b/pyrogram/raw/types/text_underline.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextUnderline(TLObject):  # type: ignore
+    """Underlined text
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C12622C4``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text
+
+    """
+
+    __slots__: List[str] = ["text"]
+
+    ID = 0xc12622c4
+    QUALNAME = "types.TextUnderline"
+
+    def __init__(self, *, text: "raw.base.RichText") -> None:
+        self.text = text  # RichText
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextUnderline":
+        # No flags
+
+        text = TLObject.read(b)
+
+        return TextUnderline(text=text)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_url.py b/pyrogram/raw/types/text_url.py
new file mode 100644
index 00000000..3387a3e8
--- /dev/null
+++ b/pyrogram/raw/types/text_url.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextUrl(TLObject):  # type: ignore
+    """Link
+
+    Constructor of :obj:`~pyrogram.raw.base.RichText`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3C2884C1``
+
+    Parameters:
+        text (:obj:`RichText `):
+            Text of link
+
+        url (``str``):
+            Webpage HTTP URL
+
+        webpage_id (``int`` ``64-bit``):
+            If a preview was already generated for the page, the page ID
+
+    """
+
+    __slots__: List[str] = ["text", "url", "webpage_id"]
+
+    ID = 0x3c2884c1
+    QUALNAME = "types.TextUrl"
+
+    def __init__(self, *, text: "raw.base.RichText", url: str, webpage_id: int) -> None:
+        self.text = text  # RichText
+        self.url = url  # string
+        self.webpage_id = webpage_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextUrl":
+        # No flags
+
+        text = TLObject.read(b)
+
+        url = String.read(b)
+
+        webpage_id = Long.read(b)
+
+        return TextUrl(text=text, url=url, webpage_id=webpage_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.text.write())
+
+        b.write(String(self.url))
+
+        b.write(Long(self.webpage_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/text_with_entities.py b/pyrogram/raw/types/text_with_entities.py
new file mode 100644
index 00000000..097cd5f9
--- /dev/null
+++ b/pyrogram/raw/types/text_with_entities.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TextWithEntities(TLObject):  # type: ignore
+    """Styled text with message entities
+
+    Constructor of :obj:`~pyrogram.raw.base.TextWithEntities`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``751F3146``
+
+    Parameters:
+        text (``str``):
+            Text
+
+        entities (List of :obj:`MessageEntity `):
+            Message entities for styled text
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.SummarizeText
+    """
+
+    __slots__: List[str] = ["text", "entities"]
+
+    ID = 0x751f3146
+    QUALNAME = "types.TextWithEntities"
+
+    def __init__(self, *, text: str, entities: List["raw.base.MessageEntity"]) -> None:
+        self.text = text  # string
+        self.entities = entities  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TextWithEntities":
+        # No flags
+
+        text = String.read(b)
+
+        entities = TLObject.read(b)
+
+        return TextWithEntities(text=text, entities=entities)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.text))
+
+        b.write(Vector(self.entities))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/theme.py b/pyrogram/raw/types/theme.py
new file mode 100644
index 00000000..842825df
--- /dev/null
+++ b/pyrogram/raw/types/theme.py
@@ -0,0 +1,147 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Theme(TLObject):  # type: ignore
+    """Theme
+
+    Constructor of :obj:`~pyrogram.raw.base.Theme`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A00E67D6``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Theme ID
+
+        access_hash (``int`` ``64-bit``):
+            Theme access hash
+
+        slug (``str``):
+            Unique theme ID
+
+        title (``str``):
+            Theme name
+
+        creator (``bool``, *optional*):
+            Whether the current user is the creator of this theme
+
+        default (``bool``, *optional*):
+            Whether this is the default theme
+
+        for_chat (``bool``, *optional*):
+            Whether this theme is meant to be used as a chat theme
+
+        document (:obj:`Document `, *optional*):
+            Theme
+
+        settings (List of :obj:`ThemeSettings `, *optional*):
+            Theme settings
+
+        emoticon (``str``, *optional*):
+            Theme emoji
+
+        installs_count (``int`` ``32-bit``, *optional*):
+            Installation count
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.CreateTheme
+            account.UpdateTheme
+            account.GetTheme
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "slug", "title", "creator", "default", "for_chat", "document", "settings", "emoticon", "installs_count"]
+
+    ID = 0xa00e67d6
+    QUALNAME = "types.Theme"
+
+    def __init__(self, *, id: int, access_hash: int, slug: str, title: str, creator: Optional[bool] = None, default: Optional[bool] = None, for_chat: Optional[bool] = None, document: "raw.base.Document" = None, settings: Optional[List["raw.base.ThemeSettings"]] = None, emoticon: Optional[str] = None, installs_count: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.slug = slug  # string
+        self.title = title  # string
+        self.creator = creator  # flags.0?true
+        self.default = default  # flags.1?true
+        self.for_chat = for_chat  # flags.5?true
+        self.document = document  # flags.2?Document
+        self.settings = settings  # flags.3?Vector
+        self.emoticon = emoticon  # flags.6?string
+        self.installs_count = installs_count  # flags.4?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Theme":
+
+        flags = Int.read(b)
+
+        creator = True if flags & (1 << 0) else False
+        default = True if flags & (1 << 1) else False
+        for_chat = True if flags & (1 << 5) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b)
+
+        slug = String.read(b)
+
+        title = String.read(b)
+
+        document = TLObject.read(b) if flags & (1 << 2) else None
+
+        settings = TLObject.read(b) if flags & (1 << 3) else []
+
+        emoticon = String.read(b) if flags & (1 << 6) else None
+        installs_count = Int.read(b) if flags & (1 << 4) else None
+        return Theme(id=id, access_hash=access_hash, slug=slug, title=title, creator=creator, default=default, for_chat=for_chat, document=document, settings=settings, emoticon=emoticon, installs_count=installs_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.creator else 0
+        flags |= (1 << 1) if self.default else 0
+        flags |= (1 << 5) if self.for_chat else 0
+        flags |= (1 << 2) if self.document is not None else 0
+        flags |= (1 << 3) if self.settings else 0
+        flags |= (1 << 6) if self.emoticon is not None else 0
+        flags |= (1 << 4) if self.installs_count is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(Long(self.access_hash))
+
+        b.write(String(self.slug))
+
+        b.write(String(self.title))
+
+        if self.document is not None:
+            b.write(self.document.write())
+
+        if self.settings is not None:
+            b.write(Vector(self.settings))
+
+        if self.emoticon is not None:
+            b.write(String(self.emoticon))
+
+        if self.installs_count is not None:
+            b.write(Int(self.installs_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/theme_settings.py b/pyrogram/raw/types/theme_settings.py
new file mode 100644
index 00000000..29d287bf
--- /dev/null
+++ b/pyrogram/raw/types/theme_settings.py
@@ -0,0 +1,99 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ThemeSettings(TLObject):  # type: ignore
+    """Theme settings
+
+    Constructor of :obj:`~pyrogram.raw.base.ThemeSettings`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FA58B6D4``
+
+    Parameters:
+        base_theme (:obj:`BaseTheme `):
+            Base theme
+
+        accent_color (``int`` ``32-bit``):
+            Accent color, ARGB format
+
+        message_colors_animated (``bool``, *optional*):
+            If set, the freeform gradient fill needs to be animated on every sent message.
+
+        outbox_accent_color (``int`` ``32-bit``, *optional*):
+            Accent color of outgoing messages in ARGB format
+
+        message_colors (List of ``int`` ``32-bit``, *optional*):
+            The fill to be used as a background for outgoing messages, in RGB24 format. If just one or two equal colors are provided, describes a solid fill of a background. If two different colors are provided, describes the top and bottom colors of a 0-degree gradient.If three or four colors are provided, describes a freeform gradient fill of a background.
+
+        wallpaper (:obj:`WallPaper `, *optional*):
+            Wallpaper
+
+    """
+
+    __slots__: List[str] = ["base_theme", "accent_color", "message_colors_animated", "outbox_accent_color", "message_colors", "wallpaper"]
+
+    ID = 0xfa58b6d4
+    QUALNAME = "types.ThemeSettings"
+
+    def __init__(self, *, base_theme: "raw.base.BaseTheme", accent_color: int, message_colors_animated: Optional[bool] = None, outbox_accent_color: Optional[int] = None, message_colors: Optional[List[int]] = None, wallpaper: "raw.base.WallPaper" = None) -> None:
+        self.base_theme = base_theme  # BaseTheme
+        self.accent_color = accent_color  # int
+        self.message_colors_animated = message_colors_animated  # flags.2?true
+        self.outbox_accent_color = outbox_accent_color  # flags.3?int
+        self.message_colors = message_colors  # flags.0?Vector
+        self.wallpaper = wallpaper  # flags.1?WallPaper
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ThemeSettings":
+
+        flags = Int.read(b)
+
+        message_colors_animated = True if flags & (1 << 2) else False
+        base_theme = TLObject.read(b)
+
+        accent_color = Int.read(b)
+
+        outbox_accent_color = Int.read(b) if flags & (1 << 3) else None
+        message_colors = TLObject.read(b, Int) if flags & (1 << 0) else []
+
+        wallpaper = TLObject.read(b) if flags & (1 << 1) else None
+
+        return ThemeSettings(base_theme=base_theme, accent_color=accent_color, message_colors_animated=message_colors_animated, outbox_accent_color=outbox_accent_color, message_colors=message_colors, wallpaper=wallpaper)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.message_colors_animated else 0
+        flags |= (1 << 3) if self.outbox_accent_color is not None else 0
+        flags |= (1 << 0) if self.message_colors else 0
+        flags |= (1 << 1) if self.wallpaper is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.base_theme.write())
+
+        b.write(Int(self.accent_color))
+
+        if self.outbox_accent_color is not None:
+            b.write(Int(self.outbox_accent_color))
+
+        if self.message_colors is not None:
+            b.write(Vector(self.message_colors, Int))
+
+        if self.wallpaper is not None:
+            b.write(self.wallpaper.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/timezone.py b/pyrogram/raw/types/timezone.py
new file mode 100644
index 00000000..0e9a09e8
--- /dev/null
+++ b/pyrogram/raw/types/timezone.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Timezone(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Timezone`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FF9289F5``
+
+    Parameters:
+        id (``str``):
+
+
+        name (``str``):
+
+
+        utc_offset (``int`` ``32-bit``):
+
+
+    """
+
+    __slots__: List[str] = ["id", "name", "utc_offset"]
+
+    ID = 0xff9289f5
+    QUALNAME = "types.Timezone"
+
+    def __init__(self, *, id: str, name: str, utc_offset: int) -> None:
+        self.id = id  # string
+        self.name = name  # string
+        self.utc_offset = utc_offset  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Timezone":
+        # No flags
+
+        id = String.read(b)
+
+        name = String.read(b)
+
+        utc_offset = Int.read(b)
+
+        return Timezone(id=id, name=name, utc_offset=utc_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.id))
+
+        b.write(String(self.name))
+
+        b.write(Int(self.utc_offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/todo_completion.py b/pyrogram/raw/types/todo_completion.py
new file mode 100644
index 00000000..f1311694
--- /dev/null
+++ b/pyrogram/raw/types/todo_completion.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TodoCompletion(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.TodoCompletion`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``221BB5E4``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            N/A
+
+        completed_by (:obj:`Peer `):
+            N/A
+
+        date (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "completed_by", "date"]
+
+    ID = 0x221bb5e4
+    QUALNAME = "types.TodoCompletion"
+
+    def __init__(self, *, id: int, completed_by: "raw.base.Peer", date: int) -> None:
+        self.id = id  # int
+        self.completed_by = completed_by  # Peer
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TodoCompletion":
+        # No flags
+
+        id = Int.read(b)
+
+        completed_by = TLObject.read(b)
+
+        date = Int.read(b)
+
+        return TodoCompletion(id=id, completed_by=completed_by, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.id))
+
+        b.write(self.completed_by.write())
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/todo_item.py b/pyrogram/raw/types/todo_item.py
new file mode 100644
index 00000000..8e4155fc
--- /dev/null
+++ b/pyrogram/raw/types/todo_item.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TodoItem(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.TodoItem`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CBA9A52F``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            N/A
+
+        title (:obj:`TextWithEntities `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "title"]
+
+    ID = 0xcba9a52f
+    QUALNAME = "types.TodoItem"
+
+    def __init__(self, *, id: int, title: "raw.base.TextWithEntities") -> None:
+        self.id = id  # int
+        self.title = title  # TextWithEntities
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TodoItem":
+        # No flags
+
+        id = Int.read(b)
+
+        title = TLObject.read(b)
+
+        return TodoItem(id=id, title=title)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.id))
+
+        b.write(self.title.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/todo_list.py b/pyrogram/raw/types/todo_list.py
new file mode 100644
index 00000000..e0e3d14e
--- /dev/null
+++ b/pyrogram/raw/types/todo_list.py
@@ -0,0 +1,76 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TodoList(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.TodoList`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``49B92A26``
+
+    Parameters:
+        title (:obj:`TextWithEntities `):
+            N/A
+
+        list (List of :obj:`TodoItem `):
+            N/A
+
+        others_can_append (``bool``, *optional*):
+            N/A
+
+        others_can_complete (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["title", "list", "others_can_append", "others_can_complete"]
+
+    ID = 0x49b92a26
+    QUALNAME = "types.TodoList"
+
+    def __init__(self, *, title: "raw.base.TextWithEntities", list: List["raw.base.TodoItem"], others_can_append: Optional[bool] = None, others_can_complete: Optional[bool] = None) -> None:
+        self.title = title  # TextWithEntities
+        self.list = list  # Vector
+        self.others_can_append = others_can_append  # flags.0?true
+        self.others_can_complete = others_can_complete  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TodoList":
+
+        flags = Int.read(b)
+
+        others_can_append = True if flags & (1 << 0) else False
+        others_can_complete = True if flags & (1 << 1) else False
+        title = TLObject.read(b)
+
+        list = TLObject.read(b)
+
+        return TodoList(title=title, list=list, others_can_append=others_can_append, others_can_complete=others_can_complete)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.others_can_append else 0
+        flags |= (1 << 1) if self.others_can_complete else 0
+        b.write(Int(flags))
+
+        b.write(self.title.write())
+
+        b.write(Vector(self.list))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer.py b/pyrogram/raw/types/top_peer.py
new file mode 100644
index 00000000..1b1281b0
--- /dev/null
+++ b/pyrogram/raw/types/top_peer.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeer(TLObject):  # type: ignore
+    """Top peer
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeer`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EDCDC05B``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        rating (``float`` ``64-bit``):
+            Rating as computed in top peer rating »
+
+    """
+
+    __slots__: List[str] = ["peer", "rating"]
+
+    ID = 0xedcdc05b
+    QUALNAME = "types.TopPeer"
+
+    def __init__(self, *, peer: "raw.base.Peer", rating: float) -> None:
+        self.peer = peer  # Peer
+        self.rating = rating  # double
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeer":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        rating = Double.read(b)
+
+        return TopPeer(peer=peer, rating=rating)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Double(self.rating))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_bots_app.py b/pyrogram/raw/types/top_peer_category_bots_app.py
new file mode 100644
index 00000000..55f689d5
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_bots_app.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryBotsApp(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FD9E7BEC``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfd9e7bec
+    QUALNAME = "types.TopPeerCategoryBotsApp"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryBotsApp":
+        # No flags
+
+        return TopPeerCategoryBotsApp()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_bots_inline.py b/pyrogram/raw/types/top_peer_category_bots_inline.py
new file mode 100644
index 00000000..7e2da0b2
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_bots_inline.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryBotsInline(TLObject):  # type: ignore
+    """Most used inline bots
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``148677E2``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x148677e2
+    QUALNAME = "types.TopPeerCategoryBotsInline"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryBotsInline":
+        # No flags
+
+        return TopPeerCategoryBotsInline()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_bots_pm.py b/pyrogram/raw/types/top_peer_category_bots_pm.py
new file mode 100644
index 00000000..eadb0a8e
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_bots_pm.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryBotsPM(TLObject):  # type: ignore
+    """Most used bots
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AB661B5B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xab661b5b
+    QUALNAME = "types.TopPeerCategoryBotsPM"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryBotsPM":
+        # No flags
+
+        return TopPeerCategoryBotsPM()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_channels.py b/pyrogram/raw/types/top_peer_category_channels.py
new file mode 100644
index 00000000..d7173c17
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_channels.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryChannels(TLObject):  # type: ignore
+    """Most frequently visited channels
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``161D9628``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x161d9628
+    QUALNAME = "types.TopPeerCategoryChannels"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryChannels":
+        # No flags
+
+        return TopPeerCategoryChannels()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_correspondents.py b/pyrogram/raw/types/top_peer_category_correspondents.py
new file mode 100644
index 00000000..3a92d91a
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_correspondents.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryCorrespondents(TLObject):  # type: ignore
+    """Users we've chatted most frequently with
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``637B7ED``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x637b7ed
+    QUALNAME = "types.TopPeerCategoryCorrespondents"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryCorrespondents":
+        # No flags
+
+        return TopPeerCategoryCorrespondents()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_forward_chats.py b/pyrogram/raw/types/top_peer_category_forward_chats.py
new file mode 100644
index 00000000..67b8c535
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_forward_chats.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryForwardChats(TLObject):  # type: ignore
+    """Chats to which the users often forwards messages to
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FBEEC0F0``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfbeec0f0
+    QUALNAME = "types.TopPeerCategoryForwardChats"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryForwardChats":
+        # No flags
+
+        return TopPeerCategoryForwardChats()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_forward_users.py b/pyrogram/raw/types/top_peer_category_forward_users.py
new file mode 100644
index 00000000..4298db3b
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_forward_users.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryForwardUsers(TLObject):  # type: ignore
+    """Users to which the users often forwards messages to
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A8406CA9``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa8406ca9
+    QUALNAME = "types.TopPeerCategoryForwardUsers"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryForwardUsers":
+        # No flags
+
+        return TopPeerCategoryForwardUsers()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_groups.py b/pyrogram/raw/types/top_peer_category_groups.py
new file mode 100644
index 00000000..b5fc8b81
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_groups.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryGroups(TLObject):  # type: ignore
+    """Often-opened groups and supergroups
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BD17A14A``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xbd17a14a
+    QUALNAME = "types.TopPeerCategoryGroups"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryGroups":
+        # No flags
+
+        return TopPeerCategoryGroups()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_peers.py b/pyrogram/raw/types/top_peer_category_peers.py
new file mode 100644
index 00000000..ed32bc5e
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_peers.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryPeers(TLObject):  # type: ignore
+    """Top peer category
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategoryPeers`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FB834291``
+
+    Parameters:
+        category (:obj:`TopPeerCategory `):
+            Top peer category of peers
+
+        count (``int`` ``32-bit``):
+            Count of peers
+
+        peers (List of :obj:`TopPeer `):
+            Peers
+
+    """
+
+    __slots__: List[str] = ["category", "count", "peers"]
+
+    ID = 0xfb834291
+    QUALNAME = "types.TopPeerCategoryPeers"
+
+    def __init__(self, *, category: "raw.base.TopPeerCategory", count: int, peers: List["raw.base.TopPeer"]) -> None:
+        self.category = category  # TopPeerCategory
+        self.count = count  # int
+        self.peers = peers  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryPeers":
+        # No flags
+
+        category = TLObject.read(b)
+
+        count = Int.read(b)
+
+        peers = TLObject.read(b)
+
+        return TopPeerCategoryPeers(category=category, count=count, peers=peers)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.category.write())
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.peers))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/top_peer_category_phone_calls.py b/pyrogram/raw/types/top_peer_category_phone_calls.py
new file mode 100644
index 00000000..6b336c79
--- /dev/null
+++ b/pyrogram/raw/types/top_peer_category_phone_calls.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class TopPeerCategoryPhoneCalls(TLObject):  # type: ignore
+    """Most frequently called users
+
+    Constructor of :obj:`~pyrogram.raw.base.TopPeerCategory`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1E76A78C``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x1e76a78c
+    QUALNAME = "types.TopPeerCategoryPhoneCalls"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "TopPeerCategoryPhoneCalls":
+        # No flags
+
+        return TopPeerCategoryPhoneCalls()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_attach_menu_bots.py b/pyrogram/raw/types/update_attach_menu_bots.py
new file mode 100644
index 00000000..acb85f70
--- /dev/null
+++ b/pyrogram/raw/types/update_attach_menu_bots.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateAttachMenuBots(TLObject):  # type: ignore
+    """The list of installed attachment menu entries » has changed, use messages.getAttachMenuBots to fetch the updated list.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``17B7A20B``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x17b7a20b
+    QUALNAME = "types.UpdateAttachMenuBots"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateAttachMenuBots":
+        # No flags
+
+        return UpdateAttachMenuBots()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_auto_save_settings.py b/pyrogram/raw/types/update_auto_save_settings.py
new file mode 100644
index 00000000..8677bc68
--- /dev/null
+++ b/pyrogram/raw/types/update_auto_save_settings.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateAutoSaveSettings(TLObject):  # type: ignore
+    """Media autosave settings have changed and must be refetched using account.getAutoSaveSettings.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EC05B097``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xec05b097
+    QUALNAME = "types.UpdateAutoSaveSettings"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateAutoSaveSettings":
+        # No flags
+
+        return UpdateAutoSaveSettings()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_business_connect.py b/pyrogram/raw/types/update_bot_business_connect.py
new file mode 100644
index 00000000..346a7cce
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_business_connect.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotBusinessConnect(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8AE5C97A``
+
+    Parameters:
+        connection (:obj:`BotBusinessConnection `):
+
+
+        qts (``int`` ``32-bit``):
+
+
+    """
+
+    __slots__: List[str] = ["connection", "qts"]
+
+    ID = 0x8ae5c97a
+    QUALNAME = "types.UpdateBotBusinessConnect"
+
+    def __init__(self, *, connection: "raw.base.BotBusinessConnection", qts: int) -> None:
+        self.connection = connection  # BotBusinessConnection
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotBusinessConnect":
+        # No flags
+
+        connection = TLObject.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotBusinessConnect(connection=connection, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.connection.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_callback_query.py b/pyrogram/raw/types/update_bot_callback_query.py
new file mode 100644
index 00000000..f4722268
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_callback_query.py
@@ -0,0 +1,106 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotCallbackQuery(TLObject):  # type: ignore
+    """A callback button was pressed, and the button data was sent to the bot that created the button
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B9CFC48D``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Query ID
+
+        user_id (``int`` ``64-bit``):
+            ID of the user that pressed the button
+
+        peer (:obj:`Peer `):
+            Chat where the inline keyboard was sent
+
+        msg_id (``int`` ``32-bit``):
+            Message ID
+
+        chat_instance (``int`` ``64-bit``):
+            Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
+
+        data (``bytes``, *optional*):
+            Callback data
+
+        game_short_name (``str``, *optional*):
+            Short name of a Game to be returned, serves as the unique identifier for the game
+
+    """
+
+    __slots__: List[str] = ["query_id", "user_id", "peer", "msg_id", "chat_instance", "data", "game_short_name"]
+
+    ID = 0xb9cfc48d
+    QUALNAME = "types.UpdateBotCallbackQuery"
+
+    def __init__(self, *, query_id: int, user_id: int, peer: "raw.base.Peer", msg_id: int, chat_instance: int, data: Optional[bytes] = None, game_short_name: Optional[str] = None) -> None:
+        self.query_id = query_id  # long
+        self.user_id = user_id  # long
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+        self.chat_instance = chat_instance  # long
+        self.data = data  # flags.0?bytes
+        self.game_short_name = game_short_name  # flags.1?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotCallbackQuery":
+
+        flags = Int.read(b)
+
+        query_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        chat_instance = Long.read(b)
+
+        data = Bytes.read(b) if flags & (1 << 0) else None
+        game_short_name = String.read(b) if flags & (1 << 1) else None
+        return UpdateBotCallbackQuery(query_id=query_id, user_id=user_id, peer=peer, msg_id=msg_id, chat_instance=chat_instance, data=data, game_short_name=game_short_name)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.data is not None else 0
+        flags |= (1 << 1) if self.game_short_name is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.query_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        b.write(Long(self.chat_instance))
+
+        if self.data is not None:
+            b.write(Bytes(self.data))
+
+        if self.game_short_name is not None:
+            b.write(String(self.game_short_name))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_chat_boost.py b/pyrogram/raw/types/update_bot_chat_boost.py
new file mode 100644
index 00000000..f8d81b54
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_chat_boost.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotChatBoost(TLObject):  # type: ignore
+    """A channel boost has changed (bots only)
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``904DD49C``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Channel
+
+        boost (:obj:`Boost `):
+            New boost information
+
+        qts (``int`` ``32-bit``):
+            QTS event sequence identifier
+
+    """
+
+    __slots__: List[str] = ["peer", "boost", "qts"]
+
+    ID = 0x904dd49c
+    QUALNAME = "types.UpdateBotChatBoost"
+
+    def __init__(self, *, peer: "raw.base.Peer", boost: "raw.base.Boost", qts: int) -> None:
+        self.peer = peer  # Peer
+        self.boost = boost  # Boost
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotChatBoost":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        boost = TLObject.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotChatBoost(peer=peer, boost=boost, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.boost.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_chat_invite_requester.py b/pyrogram/raw/types/update_bot_chat_invite_requester.py
new file mode 100644
index 00000000..3dee7421
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_chat_invite_requester.py
@@ -0,0 +1,94 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotChatInviteRequester(TLObject):  # type: ignore
+    """Someone has requested to join a chat or channel (bots only, users will receive an updatePendingJoinRequests, instead)
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``11DFA986``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The chat or channel in question
+
+        date (``int`` ``32-bit``):
+            When was the join request » made
+
+        user_id (``int`` ``64-bit``):
+            The user ID that is asking to join the chat or channel
+
+        about (``str``):
+            Bio of the user
+
+        invite (:obj:`ExportedChatInvite `):
+            Chat invite link that was used by the user to send the join request »
+
+        qts (``int`` ``32-bit``):
+            QTS event sequence identifier
+
+    """
+
+    __slots__: List[str] = ["peer", "date", "user_id", "about", "invite", "qts"]
+
+    ID = 0x11dfa986
+    QUALNAME = "types.UpdateBotChatInviteRequester"
+
+    def __init__(self, *, peer: "raw.base.Peer", date: int, user_id: int, about: str, invite: "raw.base.ExportedChatInvite", qts: int) -> None:
+        self.peer = peer  # Peer
+        self.date = date  # int
+        self.user_id = user_id  # long
+        self.about = about  # string
+        self.invite = invite  # ExportedChatInvite
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotChatInviteRequester":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        date = Int.read(b)
+
+        user_id = Long.read(b)
+
+        about = String.read(b)
+
+        invite = TLObject.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotChatInviteRequester(peer=peer, date=date, user_id=user_id, about=about, invite=invite, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.about))
+
+        b.write(self.invite.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_commands.py b/pyrogram/raw/types/update_bot_commands.py
new file mode 100644
index 00000000..124af65e
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_commands.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotCommands(TLObject):  # type: ignore
+    """The command set of a certain bot in a certain chat has changed.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4D712F2E``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The affected chat
+
+        bot_id (``int`` ``64-bit``):
+            ID of the bot that changed its command set
+
+        commands (List of :obj:`BotCommand `):
+            New bot commands
+
+    """
+
+    __slots__: List[str] = ["peer", "bot_id", "commands"]
+
+    ID = 0x4d712f2e
+    QUALNAME = "types.UpdateBotCommands"
+
+    def __init__(self, *, peer: "raw.base.Peer", bot_id: int, commands: List["raw.base.BotCommand"]) -> None:
+        self.peer = peer  # Peer
+        self.bot_id = bot_id  # long
+        self.commands = commands  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotCommands":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        bot_id = Long.read(b)
+
+        commands = TLObject.read(b)
+
+        return UpdateBotCommands(peer=peer, bot_id=bot_id, commands=commands)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Long(self.bot_id))
+
+        b.write(Vector(self.commands))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_delete_business_message.py b/pyrogram/raw/types/update_bot_delete_business_message.py
new file mode 100644
index 00000000..9e383298
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_delete_business_message.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotDeleteBusinessMessage(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A02A982E``
+
+    Parameters:
+        connection_id (``str``):
+
+
+        peer (:obj:`Peer `):
+
+
+        messages (List of ``int`` ``32-bit``):
+
+
+        qts (``int`` ``32-bit``):
+
+
+    """
+
+    __slots__: List[str] = ["connection_id", "peer", "messages", "qts"]
+
+    ID = 0xa02a982e
+    QUALNAME = "types.UpdateBotDeleteBusinessMessage"
+
+    def __init__(self, *, connection_id: str, peer: "raw.base.Peer", messages: List[int], qts: int) -> None:
+        self.connection_id = connection_id  # string
+        self.peer = peer  # Peer
+        self.messages = messages  # Vector
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotDeleteBusinessMessage":
+        # No flags
+
+        connection_id = String.read(b)
+
+        peer = TLObject.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        qts = Int.read(b)
+
+        return UpdateBotDeleteBusinessMessage(connection_id=connection_id, peer=peer, messages=messages, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.connection_id))
+
+        b.write(self.peer.write())
+
+        b.write(Vector(self.messages, Int))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_edit_business_message.py b/pyrogram/raw/types/update_bot_edit_business_message.py
new file mode 100644
index 00000000..a3da8a11
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_edit_business_message.py
@@ -0,0 +1,82 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotEditBusinessMessage(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7DF587C``
+
+    Parameters:
+        connection_id (``str``):
+
+
+        message (:obj:`Message `):
+
+
+        qts (``int`` ``32-bit``):
+
+
+        reply_to_message (:obj:`Message `, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["connection_id", "message", "qts", "reply_to_message"]
+
+    ID = 0x7df587c
+    QUALNAME = "types.UpdateBotEditBusinessMessage"
+
+    def __init__(self, *, connection_id: str, message: "raw.base.Message", qts: int, reply_to_message: "raw.base.Message" = None) -> None:
+        self.connection_id = connection_id  # string
+        self.message = message  # Message
+        self.qts = qts  # int
+        self.reply_to_message = reply_to_message  # flags.0?Message
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotEditBusinessMessage":
+
+        flags = Int.read(b)
+
+        connection_id = String.read(b)
+
+        message = TLObject.read(b)
+
+        reply_to_message = TLObject.read(b) if flags & (1 << 0) else None
+
+        qts = Int.read(b)
+
+        return UpdateBotEditBusinessMessage(connection_id=connection_id, message=message, qts=qts, reply_to_message=reply_to_message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.reply_to_message is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.connection_id))
+
+        b.write(self.message.write())
+
+        if self.reply_to_message is not None:
+            b.write(self.reply_to_message.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_inline_query.py b/pyrogram/raw/types/update_bot_inline_query.py
new file mode 100644
index 00000000..1d921bab
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_inline_query.py
@@ -0,0 +1,100 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotInlineQuery(TLObject):  # type: ignore
+    """An incoming inline query
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``496F379C``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Query ID
+
+        user_id (``int`` ``64-bit``):
+            User that sent the query
+
+        query (``str``):
+            Text of query
+
+        offset (``str``):
+            Offset to navigate through results
+
+        geo (:obj:`GeoPoint `, *optional*):
+            Attached geolocation
+
+        peer_type (:obj:`InlineQueryPeerType `, *optional*):
+            Type of the chat from which the inline query was sent.
+
+    """
+
+    __slots__: List[str] = ["query_id", "user_id", "query", "offset", "geo", "peer_type"]
+
+    ID = 0x496f379c
+    QUALNAME = "types.UpdateBotInlineQuery"
+
+    def __init__(self, *, query_id: int, user_id: int, query: str, offset: str, geo: "raw.base.GeoPoint" = None, peer_type: "raw.base.InlineQueryPeerType" = None) -> None:
+        self.query_id = query_id  # long
+        self.user_id = user_id  # long
+        self.query = query  # string
+        self.offset = offset  # string
+        self.geo = geo  # flags.0?GeoPoint
+        self.peer_type = peer_type  # flags.1?InlineQueryPeerType
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotInlineQuery":
+
+        flags = Int.read(b)
+
+        query_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        query = String.read(b)
+
+        geo = TLObject.read(b) if flags & (1 << 0) else None
+
+        peer_type = TLObject.read(b) if flags & (1 << 1) else None
+
+        offset = String.read(b)
+
+        return UpdateBotInlineQuery(query_id=query_id, user_id=user_id, query=query, offset=offset, geo=geo, peer_type=peer_type)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.geo is not None else 0
+        flags |= (1 << 1) if self.peer_type is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.query_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.query))
+
+        if self.geo is not None:
+            b.write(self.geo.write())
+
+        if self.peer_type is not None:
+            b.write(self.peer_type.write())
+
+        b.write(String(self.offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_inline_send.py b/pyrogram/raw/types/update_bot_inline_send.py
new file mode 100644
index 00000000..f9fa81ae
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_inline_send.py
@@ -0,0 +1,92 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotInlineSend(TLObject):  # type: ignore
+    """The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``12F12A07``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            The user that chose the result
+
+        query (``str``):
+            The query that was used to obtain the result
+
+        id (``str``):
+            The unique identifier for the result that was chosen
+
+        geo (:obj:`GeoPoint `, *optional*):
+            Optional. Sender location, only for bots that require user location
+
+        msg_id (:obj:`InputBotInlineMessageID `, *optional*):
+            Identifier of the sent inline message. Available only if there is an inline keyboard attached to the message. Will be also received in callback queries and can be used to edit the message.
+
+    """
+
+    __slots__: List[str] = ["user_id", "query", "id", "geo", "msg_id"]
+
+    ID = 0x12f12a07
+    QUALNAME = "types.UpdateBotInlineSend"
+
+    def __init__(self, *, user_id: int, query: str, id: str, geo: "raw.base.GeoPoint" = None, msg_id: "raw.base.InputBotInlineMessageID" = None) -> None:
+        self.user_id = user_id  # long
+        self.query = query  # string
+        self.id = id  # string
+        self.geo = geo  # flags.0?GeoPoint
+        self.msg_id = msg_id  # flags.1?InputBotInlineMessageID
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotInlineSend":
+
+        flags = Int.read(b)
+
+        user_id = Long.read(b)
+
+        query = String.read(b)
+
+        geo = TLObject.read(b) if flags & (1 << 0) else None
+
+        id = String.read(b)
+
+        msg_id = TLObject.read(b) if flags & (1 << 1) else None
+
+        return UpdateBotInlineSend(user_id=user_id, query=query, id=id, geo=geo, msg_id=msg_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.geo is not None else 0
+        flags |= (1 << 1) if self.msg_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.query))
+
+        if self.geo is not None:
+            b.write(self.geo.write())
+
+        b.write(String(self.id))
+
+        if self.msg_id is not None:
+            b.write(self.msg_id.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_menu_button.py b/pyrogram/raw/types/update_bot_menu_button.py
new file mode 100644
index 00000000..8b77ab4f
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_menu_button.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotMenuButton(TLObject):  # type: ignore
+    """The menu button behavior for the specified bot has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``14B85813``
+
+    Parameters:
+        bot_id (``int`` ``64-bit``):
+            Bot ID
+
+        button (:obj:`BotMenuButton `):
+            New menu button
+
+    """
+
+    __slots__: List[str] = ["bot_id", "button"]
+
+    ID = 0x14b85813
+    QUALNAME = "types.UpdateBotMenuButton"
+
+    def __init__(self, *, bot_id: int, button: "raw.base.BotMenuButton") -> None:
+        self.bot_id = bot_id  # long
+        self.button = button  # BotMenuButton
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotMenuButton":
+        # No flags
+
+        bot_id = Long.read(b)
+
+        button = TLObject.read(b)
+
+        return UpdateBotMenuButton(bot_id=bot_id, button=button)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.bot_id))
+
+        b.write(self.button.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_message_reaction.py b/pyrogram/raw/types/update_bot_message_reaction.py
new file mode 100644
index 00000000..c98a3c2a
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_message_reaction.py
@@ -0,0 +1,102 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotMessageReaction(TLObject):  # type: ignore
+    """Bots only: a user has changed their reactions on a message with public reactions.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AC21D3CE``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer of the reacted-to message.
+
+        msg_id (``int`` ``32-bit``):
+            ID of the reacted-to message.
+
+        date (``int`` ``32-bit``):
+            Date of the change.
+
+        actor (:obj:`Peer `):
+            The user that (un)reacted to the message.
+
+        old_reactions (List of :obj:`Reaction `):
+            Old reactions
+
+        new_reactions (List of :obj:`Reaction `):
+            New reactions
+
+        qts (``int`` ``32-bit``):
+            QTS event sequence identifier
+
+    """
+
+    __slots__: List[str] = ["peer", "msg_id", "date", "actor", "old_reactions", "new_reactions", "qts"]
+
+    ID = 0xac21d3ce
+    QUALNAME = "types.UpdateBotMessageReaction"
+
+    def __init__(self, *, peer: "raw.base.Peer", msg_id: int, date: int, actor: "raw.base.Peer", old_reactions: List["raw.base.Reaction"], new_reactions: List["raw.base.Reaction"], qts: int) -> None:
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+        self.date = date  # int
+        self.actor = actor  # Peer
+        self.old_reactions = old_reactions  # Vector
+        self.new_reactions = new_reactions  # Vector
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotMessageReaction":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        date = Int.read(b)
+
+        actor = TLObject.read(b)
+
+        old_reactions = TLObject.read(b)
+
+        new_reactions = TLObject.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotMessageReaction(peer=peer, msg_id=msg_id, date=date, actor=actor, old_reactions=old_reactions, new_reactions=new_reactions, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        b.write(Int(self.date))
+
+        b.write(self.actor.write())
+
+        b.write(Vector(self.old_reactions))
+
+        b.write(Vector(self.new_reactions))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_message_reactions.py b/pyrogram/raw/types/update_bot_message_reactions.py
new file mode 100644
index 00000000..c3f33633
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_message_reactions.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotMessageReactions(TLObject):  # type: ignore
+    """Bots only: the number of reactions on a message with anonymous reactions has changed.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9CB7759``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer of the reacted-to message.
+
+        msg_id (``int`` ``32-bit``):
+            ID of the reacted-to message.
+
+        date (``int`` ``32-bit``):
+            Date of the change.
+
+        reactions (List of :obj:`ReactionCount `):
+            New reaction counters.
+
+        qts (``int`` ``32-bit``):
+            QTS event sequence identifier
+
+    """
+
+    __slots__: List[str] = ["peer", "msg_id", "date", "reactions", "qts"]
+
+    ID = 0x9cb7759
+    QUALNAME = "types.UpdateBotMessageReactions"
+
+    def __init__(self, *, peer: "raw.base.Peer", msg_id: int, date: int, reactions: List["raw.base.ReactionCount"], qts: int) -> None:
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+        self.date = date  # int
+        self.reactions = reactions  # Vector
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotMessageReactions":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        date = Int.read(b)
+
+        reactions = TLObject.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotMessageReactions(peer=peer, msg_id=msg_id, date=date, reactions=reactions, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        b.write(Int(self.date))
+
+        b.write(Vector(self.reactions))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_new_business_message.py b/pyrogram/raw/types/update_bot_new_business_message.py
new file mode 100644
index 00000000..c742aba5
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_new_business_message.py
@@ -0,0 +1,82 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotNewBusinessMessage(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9DDB347C``
+
+    Parameters:
+        connection_id (``str``):
+
+
+        message (:obj:`Message `):
+
+
+        qts (``int`` ``32-bit``):
+
+
+        reply_to_message (:obj:`Message `, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["connection_id", "message", "qts", "reply_to_message"]
+
+    ID = 0x9ddb347c
+    QUALNAME = "types.UpdateBotNewBusinessMessage"
+
+    def __init__(self, *, connection_id: str, message: "raw.base.Message", qts: int, reply_to_message: "raw.base.Message" = None) -> None:
+        self.connection_id = connection_id  # string
+        self.message = message  # Message
+        self.qts = qts  # int
+        self.reply_to_message = reply_to_message  # flags.0?Message
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotNewBusinessMessage":
+
+        flags = Int.read(b)
+
+        connection_id = String.read(b)
+
+        message = TLObject.read(b)
+
+        reply_to_message = TLObject.read(b) if flags & (1 << 0) else None
+
+        qts = Int.read(b)
+
+        return UpdateBotNewBusinessMessage(connection_id=connection_id, message=message, qts=qts, reply_to_message=reply_to_message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.reply_to_message is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.connection_id))
+
+        b.write(self.message.write())
+
+        if self.reply_to_message is not None:
+            b.write(self.reply_to_message.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_precheckout_query.py b/pyrogram/raw/types/update_bot_precheckout_query.py
new file mode 100644
index 00000000..5780cd67
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_precheckout_query.py
@@ -0,0 +1,107 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotPrecheckoutQuery(TLObject):  # type: ignore
+    """This object contains information about an incoming pre-checkout query.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8CAA9A96``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Unique query identifier
+
+        user_id (``int`` ``64-bit``):
+            User who sent the query
+
+        payload (``bytes``):
+            Bot specified invoice payload
+
+        currency (``str``):
+            Three-letter ISO 4217 currency code
+
+        total_amount (``int`` ``64-bit``):
+            Total amount in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).
+
+        info (:obj:`PaymentRequestedInfo `, *optional*):
+            Order info provided by the user
+
+        shipping_option_id (``str``, *optional*):
+            Identifier of the shipping option chosen by the user
+
+    """
+
+    __slots__: List[str] = ["query_id", "user_id", "payload", "currency", "total_amount", "info", "shipping_option_id"]
+
+    ID = 0x8caa9a96
+    QUALNAME = "types.UpdateBotPrecheckoutQuery"
+
+    def __init__(self, *, query_id: int, user_id: int, payload: bytes, currency: str, total_amount: int, info: "raw.base.PaymentRequestedInfo" = None, shipping_option_id: Optional[str] = None) -> None:
+        self.query_id = query_id  # long
+        self.user_id = user_id  # long
+        self.payload = payload  # bytes
+        self.currency = currency  # string
+        self.total_amount = total_amount  # long
+        self.info = info  # flags.0?PaymentRequestedInfo
+        self.shipping_option_id = shipping_option_id  # flags.1?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotPrecheckoutQuery":
+
+        flags = Int.read(b)
+
+        query_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        payload = Bytes.read(b)
+
+        info = TLObject.read(b) if flags & (1 << 0) else None
+
+        shipping_option_id = String.read(b) if flags & (1 << 1) else None
+        currency = String.read(b)
+
+        total_amount = Long.read(b)
+
+        return UpdateBotPrecheckoutQuery(query_id=query_id, user_id=user_id, payload=payload, currency=currency, total_amount=total_amount, info=info, shipping_option_id=shipping_option_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.info is not None else 0
+        flags |= (1 << 1) if self.shipping_option_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.query_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(Bytes(self.payload))
+
+        if self.info is not None:
+            b.write(self.info.write())
+
+        if self.shipping_option_id is not None:
+            b.write(String(self.shipping_option_id))
+
+        b.write(String(self.currency))
+
+        b.write(Long(self.total_amount))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_purchased_paid_media.py b/pyrogram/raw/types/update_bot_purchased_paid_media.py
new file mode 100644
index 00000000..a2407506
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_purchased_paid_media.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotPurchasedPaidMedia(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``283BD312``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            N/A
+
+        payload (``str``):
+            N/A
+
+        qts (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["user_id", "payload", "qts"]
+
+    ID = 0x283bd312
+    QUALNAME = "types.UpdateBotPurchasedPaidMedia"
+
+    def __init__(self, *, user_id: int, payload: str, qts: int) -> None:
+        self.user_id = user_id  # long
+        self.payload = payload  # string
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotPurchasedPaidMedia":
+        # No flags
+
+        user_id = Long.read(b)
+
+        payload = String.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotPurchasedPaidMedia(user_id=user_id, payload=payload, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.payload))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_shipping_query.py b/pyrogram/raw/types/update_bot_shipping_query.py
new file mode 100644
index 00000000..eccc39f1
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_shipping_query.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotShippingQuery(TLObject):  # type: ignore
+    """This object contains information about an incoming shipping query.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B5AEFD7D``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Unique query identifier
+
+        user_id (``int`` ``64-bit``):
+            User who sent the query
+
+        payload (``bytes``):
+            Bot specified invoice payload
+
+        shipping_address (:obj:`PostAddress `):
+            User specified shipping address
+
+    """
+
+    __slots__: List[str] = ["query_id", "user_id", "payload", "shipping_address"]
+
+    ID = 0xb5aefd7d
+    QUALNAME = "types.UpdateBotShippingQuery"
+
+    def __init__(self, *, query_id: int, user_id: int, payload: bytes, shipping_address: "raw.base.PostAddress") -> None:
+        self.query_id = query_id  # long
+        self.user_id = user_id  # long
+        self.payload = payload  # bytes
+        self.shipping_address = shipping_address  # PostAddress
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotShippingQuery":
+        # No flags
+
+        query_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        payload = Bytes.read(b)
+
+        shipping_address = TLObject.read(b)
+
+        return UpdateBotShippingQuery(query_id=query_id, user_id=user_id, payload=payload, shipping_address=shipping_address)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.query_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(Bytes(self.payload))
+
+        b.write(self.shipping_address.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_stopped.py b/pyrogram/raw/types/update_bot_stopped.py
new file mode 100644
index 00000000..47cbd9fc
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_stopped.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotStopped(TLObject):  # type: ignore
+    """A bot was stopped or re-started.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C4870A49``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            The user ID
+
+        date (``int`` ``32-bit``):
+            When did this action occur
+
+        stopped (``bool``):
+            Whether the bot was stopped or started
+
+        qts (``int`` ``32-bit``):
+            New qts value, see updates » for more info.
+
+    """
+
+    __slots__: List[str] = ["user_id", "date", "stopped", "qts"]
+
+    ID = 0xc4870a49
+    QUALNAME = "types.UpdateBotStopped"
+
+    def __init__(self, *, user_id: int, date: int, stopped: bool, qts: int) -> None:
+        self.user_id = user_id  # long
+        self.date = date  # int
+        self.stopped = stopped  # Bool
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotStopped":
+        # No flags
+
+        user_id = Long.read(b)
+
+        date = Int.read(b)
+
+        stopped = Bool.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotStopped(user_id=user_id, date=date, stopped=stopped, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.date))
+
+        b.write(Bool(self.stopped))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_subscription_expire.py b/pyrogram/raw/types/update_bot_subscription_expire.py
new file mode 100644
index 00000000..200c19c1
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_subscription_expire.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotSubscriptionExpire(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A8AE3EB1``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            N/A
+
+        payload (``str``):
+            N/A
+
+        until_date (``int`` ``32-bit``):
+            N/A
+
+        qts (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["user_id", "payload", "until_date", "qts"]
+
+    ID = 0xa8ae3eb1
+    QUALNAME = "types.UpdateBotSubscriptionExpire"
+
+    def __init__(self, *, user_id: int, payload: str, until_date: int, qts: int) -> None:
+        self.user_id = user_id  # long
+        self.payload = payload  # string
+        self.until_date = until_date  # int
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotSubscriptionExpire":
+        # No flags
+
+        user_id = Long.read(b)
+
+        payload = String.read(b)
+
+        until_date = Int.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateBotSubscriptionExpire(user_id=user_id, payload=payload, until_date=until_date, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.payload))
+
+        b.write(Int(self.until_date))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_webhook_json.py b/pyrogram/raw/types/update_bot_webhook_json.py
new file mode 100644
index 00000000..2dee9733
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_webhook_json.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotWebhookJSON(TLObject):  # type: ignore
+    """A new incoming event; for bots only
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8317C0C3``
+
+    Parameters:
+        data (:obj:`DataJSON `):
+            The event
+
+    """
+
+    __slots__: List[str] = ["data"]
+
+    ID = 0x8317c0c3
+    QUALNAME = "types.UpdateBotWebhookJSON"
+
+    def __init__(self, *, data: "raw.base.DataJSON") -> None:
+        self.data = data  # DataJSON
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotWebhookJSON":
+        # No flags
+
+        data = TLObject.read(b)
+
+        return UpdateBotWebhookJSON(data=data)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.data.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_bot_webhook_json_query.py b/pyrogram/raw/types/update_bot_webhook_json_query.py
new file mode 100644
index 00000000..b85bdd1f
--- /dev/null
+++ b/pyrogram/raw/types/update_bot_webhook_json_query.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBotWebhookJSONQuery(TLObject):  # type: ignore
+    """A new incoming query; for bots only
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9B9240A6``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Query identifier
+
+        data (:obj:`DataJSON `):
+            Query data
+
+        timeout (``int`` ``32-bit``):
+            Query timeout
+
+    """
+
+    __slots__: List[str] = ["query_id", "data", "timeout"]
+
+    ID = 0x9b9240a6
+    QUALNAME = "types.UpdateBotWebhookJSONQuery"
+
+    def __init__(self, *, query_id: int, data: "raw.base.DataJSON", timeout: int) -> None:
+        self.query_id = query_id  # long
+        self.data = data  # DataJSON
+        self.timeout = timeout  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBotWebhookJSONQuery":
+        # No flags
+
+        query_id = Long.read(b)
+
+        data = TLObject.read(b)
+
+        timeout = Int.read(b)
+
+        return UpdateBotWebhookJSONQuery(query_id=query_id, data=data, timeout=timeout)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.query_id))
+
+        b.write(self.data.write())
+
+        b.write(Int(self.timeout))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_business_bot_callback_query.py b/pyrogram/raw/types/update_business_bot_callback_query.py
new file mode 100644
index 00000000..2037d8d8
--- /dev/null
+++ b/pyrogram/raw/types/update_business_bot_callback_query.py
@@ -0,0 +1,107 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateBusinessBotCallbackQuery(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1EA2FDA7``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            N/A
+
+        user_id (``int`` ``64-bit``):
+            N/A
+
+        connection_id (``str``):
+            N/A
+
+        message (:obj:`Message `):
+            N/A
+
+        chat_instance (``int`` ``64-bit``):
+            N/A
+
+        reply_to_message (:obj:`Message `, *optional*):
+            N/A
+
+        data (``bytes``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["query_id", "user_id", "connection_id", "message", "chat_instance", "reply_to_message", "data"]
+
+    ID = 0x1ea2fda7
+    QUALNAME = "types.UpdateBusinessBotCallbackQuery"
+
+    def __init__(self, *, query_id: int, user_id: int, connection_id: str, message: "raw.base.Message", chat_instance: int, reply_to_message: "raw.base.Message" = None, data: Optional[bytes] = None) -> None:
+        self.query_id = query_id  # long
+        self.user_id = user_id  # long
+        self.connection_id = connection_id  # string
+        self.message = message  # Message
+        self.chat_instance = chat_instance  # long
+        self.reply_to_message = reply_to_message  # flags.2?Message
+        self.data = data  # flags.0?bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateBusinessBotCallbackQuery":
+
+        flags = Int.read(b)
+
+        query_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        connection_id = String.read(b)
+
+        message = TLObject.read(b)
+
+        reply_to_message = TLObject.read(b) if flags & (1 << 2) else None
+
+        chat_instance = Long.read(b)
+
+        data = Bytes.read(b) if flags & (1 << 0) else None
+        return UpdateBusinessBotCallbackQuery(query_id=query_id, user_id=user_id, connection_id=connection_id, message=message, chat_instance=chat_instance, reply_to_message=reply_to_message, data=data)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.reply_to_message is not None else 0
+        flags |= (1 << 0) if self.data is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.query_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.connection_id))
+
+        b.write(self.message.write())
+
+        if self.reply_to_message is not None:
+            b.write(self.reply_to_message.write())
+
+        b.write(Long(self.chat_instance))
+
+        if self.data is not None:
+            b.write(Bytes(self.data))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel.py b/pyrogram/raw/types/update_channel.py
new file mode 100644
index 00000000..9276e2ef
--- /dev/null
+++ b/pyrogram/raw/types/update_channel.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannel(TLObject):  # type: ignore
+    """A new channel or supergroup is available, or info about an existing channel has changed and must be refeteched.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``635B4C09``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+    """
+
+    __slots__: List[str] = ["channel_id"]
+
+    ID = 0x635b4c09
+    QUALNAME = "types.UpdateChannel"
+
+    def __init__(self, *, channel_id: int) -> None:
+        self.channel_id = channel_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannel":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        return UpdateChannel(channel_id=channel_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_available_messages.py b/pyrogram/raw/types/update_channel_available_messages.py
new file mode 100644
index 00000000..84cfa0bc
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_available_messages.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelAvailableMessages(TLObject):  # type: ignore
+    """The history of a channel/supergroup was hidden.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B23FC698``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel/supergroup ID
+
+        available_min_id (``int`` ``32-bit``):
+            Identifier of a maximum unavailable message in a channel due to hidden history.
+
+    """
+
+    __slots__: List[str] = ["channel_id", "available_min_id"]
+
+    ID = 0xb23fc698
+    QUALNAME = "types.UpdateChannelAvailableMessages"
+
+    def __init__(self, *, channel_id: int, available_min_id: int) -> None:
+        self.channel_id = channel_id  # long
+        self.available_min_id = available_min_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelAvailableMessages":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        available_min_id = Int.read(b)
+
+        return UpdateChannelAvailableMessages(channel_id=channel_id, available_min_id=available_min_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.available_min_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_message_forwards.py b/pyrogram/raw/types/update_channel_message_forwards.py
new file mode 100644
index 00000000..2c1c7979
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_message_forwards.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelMessageForwards(TLObject):  # type: ignore
+    """The forward counter of a message in a channel has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D29A27F4``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+        id (``int`` ``32-bit``):
+            ID of the message
+
+        forwards (``int`` ``32-bit``):
+            New forward counter
+
+    """
+
+    __slots__: List[str] = ["channel_id", "id", "forwards"]
+
+    ID = 0xd29a27f4
+    QUALNAME = "types.UpdateChannelMessageForwards"
+
+    def __init__(self, *, channel_id: int, id: int, forwards: int) -> None:
+        self.channel_id = channel_id  # long
+        self.id = id  # int
+        self.forwards = forwards  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelMessageForwards":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        id = Int.read(b)
+
+        forwards = Int.read(b)
+
+        return UpdateChannelMessageForwards(channel_id=channel_id, id=id, forwards=forwards)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.id))
+
+        b.write(Int(self.forwards))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_message_views.py b/pyrogram/raw/types/update_channel_message_views.py
new file mode 100644
index 00000000..96b8c7fd
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_message_views.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelMessageViews(TLObject):  # type: ignore
+    """The view counter of a message in a channel has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F226AC08``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+        id (``int`` ``32-bit``):
+            ID of the message
+
+        views (``int`` ``32-bit``):
+            New view counter
+
+    """
+
+    __slots__: List[str] = ["channel_id", "id", "views"]
+
+    ID = 0xf226ac08
+    QUALNAME = "types.UpdateChannelMessageViews"
+
+    def __init__(self, *, channel_id: int, id: int, views: int) -> None:
+        self.channel_id = channel_id  # long
+        self.id = id  # int
+        self.views = views  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelMessageViews":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        id = Int.read(b)
+
+        views = Int.read(b)
+
+        return UpdateChannelMessageViews(channel_id=channel_id, id=id, views=views)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.id))
+
+        b.write(Int(self.views))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_participant.py b/pyrogram/raw/types/update_channel_participant.py
new file mode 100644
index 00000000..36b73e31
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_participant.py
@@ -0,0 +1,124 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelParticipant(TLObject):  # type: ignore
+    """A participant has left, joined, was banned or admined in a channel or supergroup.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``985D3ABB``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+        date (``int`` ``32-bit``):
+            Date of the event
+
+        actor_id (``int`` ``64-bit``):
+            User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)
+
+        user_id (``int`` ``64-bit``):
+            User that was affected by the change
+
+        qts (``int`` ``32-bit``):
+            New qts value, see updates » for more info.
+
+        via_chatlist (``bool``, *optional*):
+            Whether the participant joined using a chat folder deep link ».
+
+        prev_participant (:obj:`ChannelParticipant `, *optional*):
+            Previous participant status
+
+        new_participant (:obj:`ChannelParticipant `, *optional*):
+            New participant status
+
+        invite (:obj:`ExportedChatInvite `, *optional*):
+            Chat invite used to join the channel/supergroup
+
+    """
+
+    __slots__: List[str] = ["channel_id", "date", "actor_id", "user_id", "qts", "via_chatlist", "prev_participant", "new_participant", "invite"]
+
+    ID = 0x985d3abb
+    QUALNAME = "types.UpdateChannelParticipant"
+
+    def __init__(self, *, channel_id: int, date: int, actor_id: int, user_id: int, qts: int, via_chatlist: Optional[bool] = None, prev_participant: "raw.base.ChannelParticipant" = None, new_participant: "raw.base.ChannelParticipant" = None, invite: "raw.base.ExportedChatInvite" = None) -> None:
+        self.channel_id = channel_id  # long
+        self.date = date  # int
+        self.actor_id = actor_id  # long
+        self.user_id = user_id  # long
+        self.qts = qts  # int
+        self.via_chatlist = via_chatlist  # flags.3?true
+        self.prev_participant = prev_participant  # flags.0?ChannelParticipant
+        self.new_participant = new_participant  # flags.1?ChannelParticipant
+        self.invite = invite  # flags.2?ExportedChatInvite
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelParticipant":
+
+        flags = Int.read(b)
+
+        via_chatlist = True if flags & (1 << 3) else False
+        channel_id = Long.read(b)
+
+        date = Int.read(b)
+
+        actor_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        prev_participant = TLObject.read(b) if flags & (1 << 0) else None
+
+        new_participant = TLObject.read(b) if flags & (1 << 1) else None
+
+        invite = TLObject.read(b) if flags & (1 << 2) else None
+
+        qts = Int.read(b)
+
+        return UpdateChannelParticipant(channel_id=channel_id, date=date, actor_id=actor_id, user_id=user_id, qts=qts, via_chatlist=via_chatlist, prev_participant=prev_participant, new_participant=new_participant, invite=invite)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 3) if self.via_chatlist else 0
+        flags |= (1 << 0) if self.prev_participant is not None else 0
+        flags |= (1 << 1) if self.new_participant is not None else 0
+        flags |= (1 << 2) if self.invite is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.actor_id))
+
+        b.write(Long(self.user_id))
+
+        if self.prev_participant is not None:
+            b.write(self.prev_participant.write())
+
+        if self.new_participant is not None:
+            b.write(self.new_participant.write())
+
+        if self.invite is not None:
+            b.write(self.invite.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_read_messages_contents.py b/pyrogram/raw/types/update_channel_read_messages_contents.py
new file mode 100644
index 00000000..d7e71f9c
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_read_messages_contents.py
@@ -0,0 +1,83 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelReadMessagesContents(TLObject):  # type: ignore
+    """The specified channel/supergroup messages were read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``25F324F7``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel/supergroup ID
+
+        messages (List of ``int`` ``32-bit``):
+            IDs of messages that were read
+
+        top_msg_id (``int`` ``32-bit``, *optional*):
+            Forum topic ID.
+
+        saved_peer_id (:obj:`Peer `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["channel_id", "messages", "top_msg_id", "saved_peer_id"]
+
+    ID = 0x25f324f7
+    QUALNAME = "types.UpdateChannelReadMessagesContents"
+
+    def __init__(self, *, channel_id: int, messages: List[int], top_msg_id: Optional[int] = None, saved_peer_id: "raw.base.Peer" = None) -> None:
+        self.channel_id = channel_id  # long
+        self.messages = messages  # Vector
+        self.top_msg_id = top_msg_id  # flags.0?int
+        self.saved_peer_id = saved_peer_id  # flags.1?Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelReadMessagesContents":
+
+        flags = Int.read(b)
+
+        channel_id = Long.read(b)
+
+        top_msg_id = Int.read(b) if flags & (1 << 0) else None
+        saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None
+
+        messages = TLObject.read(b, Int)
+
+        return UpdateChannelReadMessagesContents(channel_id=channel_id, messages=messages, top_msg_id=top_msg_id, saved_peer_id=saved_peer_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.top_msg_id is not None else 0
+        flags |= (1 << 1) if self.saved_peer_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        if self.top_msg_id is not None:
+            b.write(Int(self.top_msg_id))
+
+        if self.saved_peer_id is not None:
+            b.write(self.saved_peer_id.write())
+
+        b.write(Vector(self.messages, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_too_long.py b/pyrogram/raw/types/update_channel_too_long.py
new file mode 100644
index 00000000..b6cca206
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_too_long.py
@@ -0,0 +1,66 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelTooLong(TLObject):  # type: ignore
+    """There are new updates in the specified channel, the client must fetch them.
+If the difference is too long or if the channel isn't currently in the states, start fetching from the specified pts.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``108D941F``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            The channel
+
+        pts (``int`` ``32-bit``, *optional*):
+            The PTS.
+
+    """
+
+    __slots__: List[str] = ["channel_id", "pts"]
+
+    ID = 0x108d941f
+    QUALNAME = "types.UpdateChannelTooLong"
+
+    def __init__(self, *, channel_id: int, pts: Optional[int] = None) -> None:
+        self.channel_id = channel_id  # long
+        self.pts = pts  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelTooLong":
+
+        flags = Int.read(b)
+
+        channel_id = Long.read(b)
+
+        pts = Int.read(b) if flags & (1 << 0) else None
+        return UpdateChannelTooLong(channel_id=channel_id, pts=pts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pts is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        if self.pts is not None:
+            b.write(Int(self.pts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_user_typing.py b/pyrogram/raw/types/update_channel_user_typing.py
new file mode 100644
index 00000000..bad48963
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_user_typing.py
@@ -0,0 +1,81 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelUserTyping(TLObject):  # type: ignore
+    """A user is typing in a supergroup, channel or message thread
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8C88C923``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+        from_id (:obj:`Peer `):
+            The peer that is typing
+
+        action (:obj:`SendMessageAction `):
+            Whether the user is typing, sending a media or doing something else
+
+        top_msg_id (``int`` ``32-bit``, *optional*):
+            Thread ID
+
+    """
+
+    __slots__: List[str] = ["channel_id", "from_id", "action", "top_msg_id"]
+
+    ID = 0x8c88c923
+    QUALNAME = "types.UpdateChannelUserTyping"
+
+    def __init__(self, *, channel_id: int, from_id: "raw.base.Peer", action: "raw.base.SendMessageAction", top_msg_id: Optional[int] = None) -> None:
+        self.channel_id = channel_id  # long
+        self.from_id = from_id  # Peer
+        self.action = action  # SendMessageAction
+        self.top_msg_id = top_msg_id  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelUserTyping":
+
+        flags = Int.read(b)
+
+        channel_id = Long.read(b)
+
+        top_msg_id = Int.read(b) if flags & (1 << 0) else None
+        from_id = TLObject.read(b)
+
+        action = TLObject.read(b)
+
+        return UpdateChannelUserTyping(channel_id=channel_id, from_id=from_id, action=action, top_msg_id=top_msg_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.top_msg_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        if self.top_msg_id is not None:
+            b.write(Int(self.top_msg_id))
+
+        b.write(self.from_id.write())
+
+        b.write(self.action.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_view_forum_as_messages.py b/pyrogram/raw/types/update_channel_view_forum_as_messages.py
new file mode 100644
index 00000000..51d4191d
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_view_forum_as_messages.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelViewForumAsMessages(TLObject):  # type: ignore
+    """Users may also choose to display messages from all topics as if they were sent to a normal group, using a "View as messages" setting in the local client.
+This setting only affects the current account, and is synced to other logged in sessions using the channels.toggleViewForumAsMessages method; invoking this method will update the value of the view_forum_as_messages flag of channelFull or dialog and emit an updateChannelViewForumAsMessages.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7B68920``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            The forum ID
+
+        enabled (``bool``):
+            The new value of the toggle.
+
+    """
+
+    __slots__: List[str] = ["channel_id", "enabled"]
+
+    ID = 0x7b68920
+    QUALNAME = "types.UpdateChannelViewForumAsMessages"
+
+    def __init__(self, *, channel_id: int, enabled: bool) -> None:
+        self.channel_id = channel_id  # long
+        self.enabled = enabled  # Bool
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelViewForumAsMessages":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        enabled = Bool.read(b)
+
+        return UpdateChannelViewForumAsMessages(channel_id=channel_id, enabled=enabled)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Bool(self.enabled))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_channel_web_page.py b/pyrogram/raw/types/update_channel_web_page.py
new file mode 100644
index 00000000..c6485f56
--- /dev/null
+++ b/pyrogram/raw/types/update_channel_web_page.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChannelWebPage(TLObject):  # type: ignore
+    """A webpage preview of a link in a channel/supergroup message was generated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2F2BA99F``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel/supergroup ID
+
+        webpage (:obj:`WebPage `):
+            Generated webpage preview
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["channel_id", "webpage", "pts", "pts_count"]
+
+    ID = 0x2f2ba99f
+    QUALNAME = "types.UpdateChannelWebPage"
+
+    def __init__(self, *, channel_id: int, webpage: "raw.base.WebPage", pts: int, pts_count: int) -> None:
+        self.channel_id = channel_id  # long
+        self.webpage = webpage  # WebPage
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChannelWebPage":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        webpage = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateChannelWebPage(channel_id=channel_id, webpage=webpage, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(self.webpage.write())
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat.py b/pyrogram/raw/types/update_chat.py
new file mode 100644
index 00000000..502c2609
--- /dev/null
+++ b/pyrogram/raw/types/update_chat.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChat(TLObject):  # type: ignore
+    """A new chat is available
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F89A6A4E``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Chat ID
+
+    """
+
+    __slots__: List[str] = ["chat_id"]
+
+    ID = 0xf89a6a4e
+    QUALNAME = "types.UpdateChat"
+
+    def __init__(self, *, chat_id: int) -> None:
+        self.chat_id = chat_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChat":
+        # No flags
+
+        chat_id = Long.read(b)
+
+        return UpdateChat(chat_id=chat_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.chat_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_default_banned_rights.py b/pyrogram/raw/types/update_chat_default_banned_rights.py
new file mode 100644
index 00000000..2fdccfa8
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_default_banned_rights.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatDefaultBannedRights(TLObject):  # type: ignore
+    """Default banned rights in a normal chat were updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``54C01850``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The chat
+
+        default_banned_rights (:obj:`ChatBannedRights `):
+            New default banned rights
+
+        version (``int`` ``32-bit``):
+            Version
+
+    """
+
+    __slots__: List[str] = ["peer", "default_banned_rights", "version"]
+
+    ID = 0x54c01850
+    QUALNAME = "types.UpdateChatDefaultBannedRights"
+
+    def __init__(self, *, peer: "raw.base.Peer", default_banned_rights: "raw.base.ChatBannedRights", version: int) -> None:
+        self.peer = peer  # Peer
+        self.default_banned_rights = default_banned_rights  # ChatBannedRights
+        self.version = version  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatDefaultBannedRights":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        default_banned_rights = TLObject.read(b)
+
+        version = Int.read(b)
+
+        return UpdateChatDefaultBannedRights(peer=peer, default_banned_rights=default_banned_rights, version=version)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.default_banned_rights.write())
+
+        b.write(Int(self.version))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_participant.py b/pyrogram/raw/types/update_chat_participant.py
new file mode 100644
index 00000000..7b58f52e
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_participant.py
@@ -0,0 +1,118 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatParticipant(TLObject):  # type: ignore
+    """A user has joined or left a specific chat
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D087663A``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Chat ID
+
+        date (``int`` ``32-bit``):
+            When did this event occur
+
+        actor_id (``int`` ``64-bit``):
+            User that triggered the change (inviter, admin that kicked the user, or the even the user_id itself)
+
+        user_id (``int`` ``64-bit``):
+            User that was affected by the change
+
+        qts (``int`` ``32-bit``):
+            New qts value, see updates » for more info.
+
+        prev_participant (:obj:`ChatParticipant `, *optional*):
+            Previous participant info (empty if this participant just joined)
+
+        new_participant (:obj:`ChatParticipant `, *optional*):
+            New participant info (empty if this participant just left)
+
+        invite (:obj:`ExportedChatInvite `, *optional*):
+            The invite that was used to join the group
+
+    """
+
+    __slots__: List[str] = ["chat_id", "date", "actor_id", "user_id", "qts", "prev_participant", "new_participant", "invite"]
+
+    ID = 0xd087663a
+    QUALNAME = "types.UpdateChatParticipant"
+
+    def __init__(self, *, chat_id: int, date: int, actor_id: int, user_id: int, qts: int, prev_participant: "raw.base.ChatParticipant" = None, new_participant: "raw.base.ChatParticipant" = None, invite: "raw.base.ExportedChatInvite" = None) -> None:
+        self.chat_id = chat_id  # long
+        self.date = date  # int
+        self.actor_id = actor_id  # long
+        self.user_id = user_id  # long
+        self.qts = qts  # int
+        self.prev_participant = prev_participant  # flags.0?ChatParticipant
+        self.new_participant = new_participant  # flags.1?ChatParticipant
+        self.invite = invite  # flags.2?ExportedChatInvite
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatParticipant":
+
+        flags = Int.read(b)
+
+        chat_id = Long.read(b)
+
+        date = Int.read(b)
+
+        actor_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        prev_participant = TLObject.read(b) if flags & (1 << 0) else None
+
+        new_participant = TLObject.read(b) if flags & (1 << 1) else None
+
+        invite = TLObject.read(b) if flags & (1 << 2) else None
+
+        qts = Int.read(b)
+
+        return UpdateChatParticipant(chat_id=chat_id, date=date, actor_id=actor_id, user_id=user_id, qts=qts, prev_participant=prev_participant, new_participant=new_participant, invite=invite)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.prev_participant is not None else 0
+        flags |= (1 << 1) if self.new_participant is not None else 0
+        flags |= (1 << 2) if self.invite is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.chat_id))
+
+        b.write(Int(self.date))
+
+        b.write(Long(self.actor_id))
+
+        b.write(Long(self.user_id))
+
+        if self.prev_participant is not None:
+            b.write(self.prev_participant.write())
+
+        if self.new_participant is not None:
+            b.write(self.new_participant.write())
+
+        if self.invite is not None:
+            b.write(self.invite.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_participant_add.py b/pyrogram/raw/types/update_chat_participant_add.py
new file mode 100644
index 00000000..1ea54749
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_participant_add.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatParticipantAdd(TLObject):  # type: ignore
+    """New group member.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3DDA5451``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Group ID
+
+        user_id (``int`` ``64-bit``):
+            ID of the new member
+
+        inviter_id (``int`` ``64-bit``):
+            ID of the user, who added member to the group
+
+        date (``int`` ``32-bit``):
+            When was the participant added
+
+        version (``int`` ``32-bit``):
+            Chat version number
+
+    """
+
+    __slots__: List[str] = ["chat_id", "user_id", "inviter_id", "date", "version"]
+
+    ID = 0x3dda5451
+    QUALNAME = "types.UpdateChatParticipantAdd"
+
+    def __init__(self, *, chat_id: int, user_id: int, inviter_id: int, date: int, version: int) -> None:
+        self.chat_id = chat_id  # long
+        self.user_id = user_id  # long
+        self.inviter_id = inviter_id  # long
+        self.date = date  # int
+        self.version = version  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatParticipantAdd":
+        # No flags
+
+        chat_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        inviter_id = Long.read(b)
+
+        date = Int.read(b)
+
+        version = Int.read(b)
+
+        return UpdateChatParticipantAdd(chat_id=chat_id, user_id=user_id, inviter_id=inviter_id, date=date, version=version)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.chat_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(Long(self.inviter_id))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.version))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_participant_admin.py b/pyrogram/raw/types/update_chat_participant_admin.py
new file mode 100644
index 00000000..57597b14
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_participant_admin.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatParticipantAdmin(TLObject):  # type: ignore
+    """Admin permissions of a user in a basic group were changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D7CA61A2``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Chat ID
+
+        user_id (``int`` ``64-bit``):
+            ID of the (de)admined user
+
+        is_admin (``bool``):
+            Whether the user was rendered admin
+
+        version (``int`` ``32-bit``):
+            Used in basic groups to reorder updates and make sure that all of them was received.
+
+    """
+
+    __slots__: List[str] = ["chat_id", "user_id", "is_admin", "version"]
+
+    ID = 0xd7ca61a2
+    QUALNAME = "types.UpdateChatParticipantAdmin"
+
+    def __init__(self, *, chat_id: int, user_id: int, is_admin: bool, version: int) -> None:
+        self.chat_id = chat_id  # long
+        self.user_id = user_id  # long
+        self.is_admin = is_admin  # Bool
+        self.version = version  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatParticipantAdmin":
+        # No flags
+
+        chat_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        is_admin = Bool.read(b)
+
+        version = Int.read(b)
+
+        return UpdateChatParticipantAdmin(chat_id=chat_id, user_id=user_id, is_admin=is_admin, version=version)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.chat_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(Bool(self.is_admin))
+
+        b.write(Int(self.version))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_participant_delete.py b/pyrogram/raw/types/update_chat_participant_delete.py
new file mode 100644
index 00000000..231e8a57
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_participant_delete.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatParticipantDelete(TLObject):  # type: ignore
+    """A member has left the group.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E32F3D77``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Group ID
+
+        user_id (``int`` ``64-bit``):
+            ID of the user
+
+        version (``int`` ``32-bit``):
+            Used in basic groups to reorder updates and make sure that all of them was received.
+
+    """
+
+    __slots__: List[str] = ["chat_id", "user_id", "version"]
+
+    ID = 0xe32f3d77
+    QUALNAME = "types.UpdateChatParticipantDelete"
+
+    def __init__(self, *, chat_id: int, user_id: int, version: int) -> None:
+        self.chat_id = chat_id  # long
+        self.user_id = user_id  # long
+        self.version = version  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatParticipantDelete":
+        # No flags
+
+        chat_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        version = Int.read(b)
+
+        return UpdateChatParticipantDelete(chat_id=chat_id, user_id=user_id, version=version)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.chat_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(Int(self.version))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_participants.py b/pyrogram/raw/types/update_chat_participants.py
new file mode 100644
index 00000000..d6a85c49
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_participants.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatParticipants(TLObject):  # type: ignore
+    """Composition of chat participants changed.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7761198``
+
+    Parameters:
+        participants (:obj:`ChatParticipants `):
+            Updated chat participants
+
+    """
+
+    __slots__: List[str] = ["participants"]
+
+    ID = 0x7761198
+    QUALNAME = "types.UpdateChatParticipants"
+
+    def __init__(self, *, participants: "raw.base.ChatParticipants") -> None:
+        self.participants = participants  # ChatParticipants
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatParticipants":
+        # No flags
+
+        participants = TLObject.read(b)
+
+        return UpdateChatParticipants(participants=participants)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.participants.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_chat_user_typing.py b/pyrogram/raw/types/update_chat_user_typing.py
new file mode 100644
index 00000000..4e2b34c5
--- /dev/null
+++ b/pyrogram/raw/types/update_chat_user_typing.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateChatUserTyping(TLObject):  # type: ignore
+    """The user is preparing a message in a group; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``83487AF0``
+
+    Parameters:
+        chat_id (``int`` ``64-bit``):
+            Group id
+
+        from_id (:obj:`Peer `):
+            Peer that started typing (can be the chat itself, in case of anonymous admins).
+
+        action (:obj:`SendMessageAction `):
+            Type of action
+
+    """
+
+    __slots__: List[str] = ["chat_id", "from_id", "action"]
+
+    ID = 0x83487af0
+    QUALNAME = "types.UpdateChatUserTyping"
+
+    def __init__(self, *, chat_id: int, from_id: "raw.base.Peer", action: "raw.base.SendMessageAction") -> None:
+        self.chat_id = chat_id  # long
+        self.from_id = from_id  # Peer
+        self.action = action  # SendMessageAction
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateChatUserTyping":
+        # No flags
+
+        chat_id = Long.read(b)
+
+        from_id = TLObject.read(b)
+
+        action = TLObject.read(b)
+
+        return UpdateChatUserTyping(chat_id=chat_id, from_id=from_id, action=action)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.chat_id))
+
+        b.write(self.from_id.write())
+
+        b.write(self.action.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_config.py b/pyrogram/raw/types/update_config.py
new file mode 100644
index 00000000..d7fe5b09
--- /dev/null
+++ b/pyrogram/raw/types/update_config.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateConfig(TLObject):  # type: ignore
+    """The server-side configuration has changed; the client should re-fetch the config using help.getConfig
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A229DD06``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa229dd06
+    QUALNAME = "types.UpdateConfig"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateConfig":
+        # No flags
+
+        return UpdateConfig()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_contacts_reset.py b/pyrogram/raw/types/update_contacts_reset.py
new file mode 100644
index 00000000..72b7316a
--- /dev/null
+++ b/pyrogram/raw/types/update_contacts_reset.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateContactsReset(TLObject):  # type: ignore
+    """All contacts were deleted
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7084A7BE``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x7084a7be
+    QUALNAME = "types.UpdateContactsReset"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateContactsReset":
+        # No flags
+
+        return UpdateContactsReset()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_dc_options.py b/pyrogram/raw/types/update_dc_options.py
new file mode 100644
index 00000000..b98d1e1f
--- /dev/null
+++ b/pyrogram/raw/types/update_dc_options.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDcOptions(TLObject):  # type: ignore
+    """Changes in the data center configuration options.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8E5E9873``
+
+    Parameters:
+        dc_options (List of :obj:`DcOption `):
+            New connection options
+
+    """
+
+    __slots__: List[str] = ["dc_options"]
+
+    ID = 0x8e5e9873
+    QUALNAME = "types.UpdateDcOptions"
+
+    def __init__(self, *, dc_options: List["raw.base.DcOption"]) -> None:
+        self.dc_options = dc_options  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDcOptions":
+        # No flags
+
+        dc_options = TLObject.read(b)
+
+        return UpdateDcOptions(dc_options=dc_options)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.dc_options))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_delete_channel_messages.py b/pyrogram/raw/types/update_delete_channel_messages.py
new file mode 100644
index 00000000..39af6476
--- /dev/null
+++ b/pyrogram/raw/types/update_delete_channel_messages.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDeleteChannelMessages(TLObject):  # type: ignore
+    """Some messages in a supergroup/channel were deleted
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C32D5B12``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+        messages (List of ``int`` ``32-bit``):
+            IDs of messages that were deleted
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["channel_id", "messages", "pts", "pts_count"]
+
+    ID = 0xc32d5b12
+    QUALNAME = "types.UpdateDeleteChannelMessages"
+
+    def __init__(self, *, channel_id: int, messages: List[int], pts: int, pts_count: int) -> None:
+        self.channel_id = channel_id  # long
+        self.messages = messages  # Vector
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDeleteChannelMessages":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateDeleteChannelMessages(channel_id=channel_id, messages=messages, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Vector(self.messages, Int))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_delete_group_call_messages.py b/pyrogram/raw/types/update_delete_group_call_messages.py
new file mode 100644
index 00000000..a649497a
--- /dev/null
+++ b/pyrogram/raw/types/update_delete_group_call_messages.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDeleteGroupCallMessages(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3E85E92C``
+
+    Parameters:
+        call (:obj:`InputGroupCall `):
+            N/A
+
+        messages (List of ``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["call", "messages"]
+
+    ID = 0x3e85e92c
+    QUALNAME = "types.UpdateDeleteGroupCallMessages"
+
+    def __init__(self, *, call: "raw.base.InputGroupCall", messages: List[int]) -> None:
+        self.call = call  # InputGroupCall
+        self.messages = messages  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDeleteGroupCallMessages":
+        # No flags
+
+        call = TLObject.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        return UpdateDeleteGroupCallMessages(call=call, messages=messages)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.call.write())
+
+        b.write(Vector(self.messages, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_delete_messages.py b/pyrogram/raw/types/update_delete_messages.py
new file mode 100644
index 00000000..74fb0774
--- /dev/null
+++ b/pyrogram/raw/types/update_delete_messages.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDeleteMessages(TLObject):  # type: ignore
+    """Messages were deleted.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A20DB0E5``
+
+    Parameters:
+        messages (List of ``int`` ``32-bit``):
+            List of identifiers of deleted messages
+
+        pts (``int`` ``32-bit``):
+            New quality of actions in a message box
+
+        pts_count (``int`` ``32-bit``):
+            Number of generated events
+
+    """
+
+    __slots__: List[str] = ["messages", "pts", "pts_count"]
+
+    ID = 0xa20db0e5
+    QUALNAME = "types.UpdateDeleteMessages"
+
+    def __init__(self, *, messages: List[int], pts: int, pts_count: int) -> None:
+        self.messages = messages  # Vector
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDeleteMessages":
+        # No flags
+
+        messages = TLObject.read(b, Int)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateDeleteMessages(messages=messages, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.messages, Int))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_delete_quick_reply.py b/pyrogram/raw/types/update_delete_quick_reply.py
new file mode 100644
index 00000000..892bf1f2
--- /dev/null
+++ b/pyrogram/raw/types/update_delete_quick_reply.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDeleteQuickReply(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``53E6F1EC``
+
+    Parameters:
+        shortcut_id (``int`` ``32-bit``):
+
+
+    """
+
+    __slots__: List[str] = ["shortcut_id"]
+
+    ID = 0x53e6f1ec
+    QUALNAME = "types.UpdateDeleteQuickReply"
+
+    def __init__(self, *, shortcut_id: int) -> None:
+        self.shortcut_id = shortcut_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDeleteQuickReply":
+        # No flags
+
+        shortcut_id = Int.read(b)
+
+        return UpdateDeleteQuickReply(shortcut_id=shortcut_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.shortcut_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_delete_quick_reply_messages.py b/pyrogram/raw/types/update_delete_quick_reply_messages.py
new file mode 100644
index 00000000..32f88d02
--- /dev/null
+++ b/pyrogram/raw/types/update_delete_quick_reply_messages.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDeleteQuickReplyMessages(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``566FE7CD``
+
+    Parameters:
+        shortcut_id (``int`` ``32-bit``):
+
+
+        messages (List of ``int`` ``32-bit``):
+
+
+    """
+
+    __slots__: List[str] = ["shortcut_id", "messages"]
+
+    ID = 0x566fe7cd
+    QUALNAME = "types.UpdateDeleteQuickReplyMessages"
+
+    def __init__(self, *, shortcut_id: int, messages: List[int]) -> None:
+        self.shortcut_id = shortcut_id  # int
+        self.messages = messages  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDeleteQuickReplyMessages":
+        # No flags
+
+        shortcut_id = Int.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        return UpdateDeleteQuickReplyMessages(shortcut_id=shortcut_id, messages=messages)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.shortcut_id))
+
+        b.write(Vector(self.messages, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_delete_scheduled_messages.py b/pyrogram/raw/types/update_delete_scheduled_messages.py
new file mode 100644
index 00000000..c84b65eb
--- /dev/null
+++ b/pyrogram/raw/types/update_delete_scheduled_messages.py
@@ -0,0 +1,74 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDeleteScheduledMessages(TLObject):  # type: ignore
+    """Some scheduled messages were deleted from the schedule queue of a chat
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F2A71983``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        messages (List of ``int`` ``32-bit``):
+            Deleted scheduled messages
+
+        sent_messages (List of ``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "messages", "sent_messages"]
+
+    ID = 0xf2a71983
+    QUALNAME = "types.UpdateDeleteScheduledMessages"
+
+    def __init__(self, *, peer: "raw.base.Peer", messages: List[int], sent_messages: Optional[List[int]] = None) -> None:
+        self.peer = peer  # Peer
+        self.messages = messages  # Vector
+        self.sent_messages = sent_messages  # flags.0?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDeleteScheduledMessages":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        sent_messages = TLObject.read(b, Int) if flags & (1 << 0) else []
+
+        return UpdateDeleteScheduledMessages(peer=peer, messages=messages, sent_messages=sent_messages)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.sent_messages else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Vector(self.messages, Int))
+
+        if self.sent_messages is not None:
+            b.write(Vector(self.sent_messages, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_dialog_filter.py b/pyrogram/raw/types/update_dialog_filter.py
new file mode 100644
index 00000000..94e53797
--- /dev/null
+++ b/pyrogram/raw/types/update_dialog_filter.py
@@ -0,0 +1,66 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDialogFilter(TLObject):  # type: ignore
+    """A new folder was added
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``26FFDE7D``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            Folder ID
+
+        filter (:obj:`DialogFilter `, *optional*):
+            Folder info
+
+    """
+
+    __slots__: List[str] = ["id", "filter"]
+
+    ID = 0x26ffde7d
+    QUALNAME = "types.UpdateDialogFilter"
+
+    def __init__(self, *, id: int, filter: "raw.base.DialogFilter" = None) -> None:
+        self.id = id  # int
+        self.filter = filter  # flags.0?DialogFilter
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDialogFilter":
+
+        flags = Int.read(b)
+
+        id = Int.read(b)
+
+        filter = TLObject.read(b) if flags & (1 << 0) else None
+
+        return UpdateDialogFilter(id=id, filter=filter)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.filter is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.id))
+
+        if self.filter is not None:
+            b.write(self.filter.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_dialog_filter_order.py b/pyrogram/raw/types/update_dialog_filter_order.py
new file mode 100644
index 00000000..ac096331
--- /dev/null
+++ b/pyrogram/raw/types/update_dialog_filter_order.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDialogFilterOrder(TLObject):  # type: ignore
+    """New folder order
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A5D72105``
+
+    Parameters:
+        order (List of ``int`` ``32-bit``):
+            Ordered folder IDs
+
+    """
+
+    __slots__: List[str] = ["order"]
+
+    ID = 0xa5d72105
+    QUALNAME = "types.UpdateDialogFilterOrder"
+
+    def __init__(self, *, order: List[int]) -> None:
+        self.order = order  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDialogFilterOrder":
+        # No flags
+
+        order = TLObject.read(b, Int)
+
+        return UpdateDialogFilterOrder(order=order)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.order, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_dialog_filters.py b/pyrogram/raw/types/update_dialog_filters.py
new file mode 100644
index 00000000..381004fd
--- /dev/null
+++ b/pyrogram/raw/types/update_dialog_filters.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDialogFilters(TLObject):  # type: ignore
+    """Clients should update folder info
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3504914F``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x3504914f
+    QUALNAME = "types.UpdateDialogFilters"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDialogFilters":
+        # No flags
+
+        return UpdateDialogFilters()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_dialog_pinned.py b/pyrogram/raw/types/update_dialog_pinned.py
new file mode 100644
index 00000000..eef5a086
--- /dev/null
+++ b/pyrogram/raw/types/update_dialog_pinned.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDialogPinned(TLObject):  # type: ignore
+    """A dialog was pinned/unpinned
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6E6FE51C``
+
+    Parameters:
+        peer (:obj:`DialogPeer `):
+            The dialog
+
+        pinned (``bool``, *optional*):
+            Whether the dialog was pinned
+
+        folder_id (``int`` ``32-bit``, *optional*):
+            Peer folder ID, for more info click here
+
+    """
+
+    __slots__: List[str] = ["peer", "pinned", "folder_id"]
+
+    ID = 0x6e6fe51c
+    QUALNAME = "types.UpdateDialogPinned"
+
+    def __init__(self, *, peer: "raw.base.DialogPeer", pinned: Optional[bool] = None, folder_id: Optional[int] = None) -> None:
+        self.peer = peer  # DialogPeer
+        self.pinned = pinned  # flags.0?true
+        self.folder_id = folder_id  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDialogPinned":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 0) else False
+        folder_id = Int.read(b) if flags & (1 << 1) else None
+        peer = TLObject.read(b)
+
+        return UpdateDialogPinned(peer=peer, pinned=pinned, folder_id=folder_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pinned else 0
+        flags |= (1 << 1) if self.folder_id is not None else 0
+        b.write(Int(flags))
+
+        if self.folder_id is not None:
+            b.write(Int(self.folder_id))
+
+        b.write(self.peer.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_dialog_unread_mark.py b/pyrogram/raw/types/update_dialog_unread_mark.py
new file mode 100644
index 00000000..08156238
--- /dev/null
+++ b/pyrogram/raw/types/update_dialog_unread_mark.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDialogUnreadMark(TLObject):  # type: ignore
+    """The manual unread mark of a chat was changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B658F23E``
+
+    Parameters:
+        peer (:obj:`DialogPeer `):
+            The dialog
+
+        unread (``bool``, *optional*):
+            Was the chat marked or unmarked as read
+
+        saved_peer_id (:obj:`Peer `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "unread", "saved_peer_id"]
+
+    ID = 0xb658f23e
+    QUALNAME = "types.UpdateDialogUnreadMark"
+
+    def __init__(self, *, peer: "raw.base.DialogPeer", unread: Optional[bool] = None, saved_peer_id: "raw.base.Peer" = None) -> None:
+        self.peer = peer  # DialogPeer
+        self.unread = unread  # flags.0?true
+        self.saved_peer_id = saved_peer_id  # flags.1?Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDialogUnreadMark":
+
+        flags = Int.read(b)
+
+        unread = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None
+
+        return UpdateDialogUnreadMark(peer=peer, unread=unread, saved_peer_id=saved_peer_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.unread else 0
+        flags |= (1 << 1) if self.saved_peer_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        if self.saved_peer_id is not None:
+            b.write(self.saved_peer_id.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_draft_message.py b/pyrogram/raw/types/update_draft_message.py
new file mode 100644
index 00000000..cdac76c3
--- /dev/null
+++ b/pyrogram/raw/types/update_draft_message.py
@@ -0,0 +1,83 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateDraftMessage(TLObject):  # type: ignore
+    """Notifies a change of a message draft.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EDFC111E``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The peer to which the draft is associated
+
+        draft (:obj:`DraftMessage `):
+            The draft
+
+        top_msg_id (``int`` ``32-bit``, *optional*):
+            ID of the forum topic to which the draft is associated
+
+        saved_peer_id (:obj:`Peer `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "draft", "top_msg_id", "saved_peer_id"]
+
+    ID = 0xedfc111e
+    QUALNAME = "types.UpdateDraftMessage"
+
+    def __init__(self, *, peer: "raw.base.Peer", draft: "raw.base.DraftMessage", top_msg_id: Optional[int] = None, saved_peer_id: "raw.base.Peer" = None) -> None:
+        self.peer = peer  # Peer
+        self.draft = draft  # DraftMessage
+        self.top_msg_id = top_msg_id  # flags.0?int
+        self.saved_peer_id = saved_peer_id  # flags.1?Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateDraftMessage":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        top_msg_id = Int.read(b) if flags & (1 << 0) else None
+        saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None
+
+        draft = TLObject.read(b)
+
+        return UpdateDraftMessage(peer=peer, draft=draft, top_msg_id=top_msg_id, saved_peer_id=saved_peer_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.top_msg_id is not None else 0
+        flags |= (1 << 1) if self.saved_peer_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        if self.top_msg_id is not None:
+            b.write(Int(self.top_msg_id))
+
+        if self.saved_peer_id is not None:
+            b.write(self.saved_peer_id.write())
+
+        b.write(self.draft.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_edit_channel_message.py b/pyrogram/raw/types/update_edit_channel_message.py
new file mode 100644
index 00000000..5ee129cd
--- /dev/null
+++ b/pyrogram/raw/types/update_edit_channel_message.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateEditChannelMessage(TLObject):  # type: ignore
+    """A message was edited in a channel/supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1B3F4DF7``
+
+    Parameters:
+        message (:obj:`Message `):
+            The new message
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["message", "pts", "pts_count"]
+
+    ID = 0x1b3f4df7
+    QUALNAME = "types.UpdateEditChannelMessage"
+
+    def __init__(self, *, message: "raw.base.Message", pts: int, pts_count: int) -> None:
+        self.message = message  # Message
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateEditChannelMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateEditChannelMessage(message=message, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_edit_message.py b/pyrogram/raw/types/update_edit_message.py
new file mode 100644
index 00000000..aeee92de
--- /dev/null
+++ b/pyrogram/raw/types/update_edit_message.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateEditMessage(TLObject):  # type: ignore
+    """A message was edited
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E40370A3``
+
+    Parameters:
+        message (:obj:`Message `):
+            The new edited message
+
+        pts (``int`` ``32-bit``):
+            PTS
+
+        pts_count (``int`` ``32-bit``):
+            PTS count
+
+    """
+
+    __slots__: List[str] = ["message", "pts", "pts_count"]
+
+    ID = 0xe40370a3
+    QUALNAME = "types.UpdateEditMessage"
+
+    def __init__(self, *, message: "raw.base.Message", pts: int, pts_count: int) -> None:
+        self.message = message  # Message
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateEditMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateEditMessage(message=message, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_emoji_game_info.py b/pyrogram/raw/types/update_emoji_game_info.py
new file mode 100644
index 00000000..c3deb48d
--- /dev/null
+++ b/pyrogram/raw/types/update_emoji_game_info.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateEmojiGameInfo(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FB9C547A``
+
+    Parameters:
+        info (:obj:`messages.EmojiGameInfo `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["info"]
+
+    ID = 0xfb9c547a
+    QUALNAME = "types.UpdateEmojiGameInfo"
+
+    def __init__(self, *, info: "raw.base.messages.EmojiGameInfo") -> None:
+        self.info = info  # messages.EmojiGameInfo
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateEmojiGameInfo":
+        # No flags
+
+        info = TLObject.read(b)
+
+        return UpdateEmojiGameInfo(info=info)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.info.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_encrypted_chat_typing.py b/pyrogram/raw/types/update_encrypted_chat_typing.py
new file mode 100644
index 00000000..61783181
--- /dev/null
+++ b/pyrogram/raw/types/update_encrypted_chat_typing.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateEncryptedChatTyping(TLObject):  # type: ignore
+    """Interlocutor is typing a message in an encrypted chat. Update period is 6 second. If upon this time there is no repeated update, it shall be considered that the interlocutor stopped typing.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1710F156``
+
+    Parameters:
+        chat_id (``int`` ``32-bit``):
+            Chat ID
+
+    """
+
+    __slots__: List[str] = ["chat_id"]
+
+    ID = 0x1710f156
+    QUALNAME = "types.UpdateEncryptedChatTyping"
+
+    def __init__(self, *, chat_id: int) -> None:
+        self.chat_id = chat_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateEncryptedChatTyping":
+        # No flags
+
+        chat_id = Int.read(b)
+
+        return UpdateEncryptedChatTyping(chat_id=chat_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.chat_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_encrypted_messages_read.py b/pyrogram/raw/types/update_encrypted_messages_read.py
new file mode 100644
index 00000000..14d9d132
--- /dev/null
+++ b/pyrogram/raw/types/update_encrypted_messages_read.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateEncryptedMessagesRead(TLObject):  # type: ignore
+    """Communication history in an encrypted chat was marked as read.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``38FE25B7``
+
+    Parameters:
+        chat_id (``int`` ``32-bit``):
+            Chat ID
+
+        max_date (``int`` ``32-bit``):
+            Maximum value of data for read messages
+
+        date (``int`` ``32-bit``):
+            Time when messages were read
+
+    """
+
+    __slots__: List[str] = ["chat_id", "max_date", "date"]
+
+    ID = 0x38fe25b7
+    QUALNAME = "types.UpdateEncryptedMessagesRead"
+
+    def __init__(self, *, chat_id: int, max_date: int, date: int) -> None:
+        self.chat_id = chat_id  # int
+        self.max_date = max_date  # int
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateEncryptedMessagesRead":
+        # No flags
+
+        chat_id = Int.read(b)
+
+        max_date = Int.read(b)
+
+        date = Int.read(b)
+
+        return UpdateEncryptedMessagesRead(chat_id=chat_id, max_date=max_date, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.chat_id))
+
+        b.write(Int(self.max_date))
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_encryption.py b/pyrogram/raw/types/update_encryption.py
new file mode 100644
index 00000000..80b9e9fc
--- /dev/null
+++ b/pyrogram/raw/types/update_encryption.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateEncryption(TLObject):  # type: ignore
+    """Change of state in an encrypted chat.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B4A2E88D``
+
+    Parameters:
+        chat (:obj:`EncryptedChat `):
+            Encrypted chat
+
+        date (``int`` ``32-bit``):
+            Date of change
+
+    """
+
+    __slots__: List[str] = ["chat", "date"]
+
+    ID = 0xb4a2e88d
+    QUALNAME = "types.UpdateEncryption"
+
+    def __init__(self, *, chat: "raw.base.EncryptedChat", date: int) -> None:
+        self.chat = chat  # EncryptedChat
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateEncryption":
+        # No flags
+
+        chat = TLObject.read(b)
+
+        date = Int.read(b)
+
+        return UpdateEncryption(chat=chat, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.chat.write())
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_faved_stickers.py b/pyrogram/raw/types/update_faved_stickers.py
new file mode 100644
index 00000000..627de505
--- /dev/null
+++ b/pyrogram/raw/types/update_faved_stickers.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateFavedStickers(TLObject):  # type: ignore
+    """The list of favorited stickers was changed, the client should call messages.getFavedStickers to refetch the new list
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E511996D``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xe511996d
+    QUALNAME = "types.UpdateFavedStickers"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateFavedStickers":
+        # No flags
+
+        return UpdateFavedStickers()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_folder_peers.py b/pyrogram/raw/types/update_folder_peers.py
new file mode 100644
index 00000000..5ab1d332
--- /dev/null
+++ b/pyrogram/raw/types/update_folder_peers.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateFolderPeers(TLObject):  # type: ignore
+    """The peer list of a peer folder was updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``19360DC0``
+
+    Parameters:
+        folder_peers (List of :obj:`FolderPeer `):
+            New peer list
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["folder_peers", "pts", "pts_count"]
+
+    ID = 0x19360dc0
+    QUALNAME = "types.UpdateFolderPeers"
+
+    def __init__(self, *, folder_peers: List["raw.base.FolderPeer"], pts: int, pts_count: int) -> None:
+        self.folder_peers = folder_peers  # Vector
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateFolderPeers":
+        # No flags
+
+        folder_peers = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateFolderPeers(folder_peers=folder_peers, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.folder_peers))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_geo_live_viewed.py b/pyrogram/raw/types/update_geo_live_viewed.py
new file mode 100644
index 00000000..30550ea1
--- /dev/null
+++ b/pyrogram/raw/types/update_geo_live_viewed.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGeoLiveViewed(TLObject):  # type: ignore
+    """Live geoposition message was viewed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``871FB939``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The user that viewed the live geoposition
+
+        msg_id (``int`` ``32-bit``):
+            Message ID of geoposition message
+
+    """
+
+    __slots__: List[str] = ["peer", "msg_id"]
+
+    ID = 0x871fb939
+    QUALNAME = "types.UpdateGeoLiveViewed"
+
+    def __init__(self, *, peer: "raw.base.Peer", msg_id: int) -> None:
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGeoLiveViewed":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        return UpdateGeoLiveViewed(peer=peer, msg_id=msg_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_group_call.py b/pyrogram/raw/types/update_group_call.py
new file mode 100644
index 00000000..e98d4eb1
--- /dev/null
+++ b/pyrogram/raw/types/update_group_call.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGroupCall(TLObject):  # type: ignore
+    """A new groupcall was started
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9D2216E0``
+
+    Parameters:
+        call (:obj:`GroupCall `):
+            Info about the group call or livestream
+
+        live_story (``bool``, *optional*):
+            N/A
+
+        peer (:obj:`Peer `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["call", "live_story", "peer"]
+
+    ID = 0x9d2216e0
+    QUALNAME = "types.UpdateGroupCall"
+
+    def __init__(self, *, call: "raw.base.GroupCall", live_story: Optional[bool] = None, peer: "raw.base.Peer" = None) -> None:
+        self.call = call  # GroupCall
+        self.live_story = live_story  # flags.2?true
+        self.peer = peer  # flags.1?Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGroupCall":
+
+        flags = Int.read(b)
+
+        live_story = True if flags & (1 << 2) else False
+        peer = TLObject.read(b) if flags & (1 << 1) else None
+
+        call = TLObject.read(b)
+
+        return UpdateGroupCall(call=call, live_story=live_story, peer=peer)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 2) if self.live_story else 0
+        flags |= (1 << 1) if self.peer is not None else 0
+        b.write(Int(flags))
+
+        if self.peer is not None:
+            b.write(self.peer.write())
+
+        b.write(self.call.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_group_call_chain_blocks.py b/pyrogram/raw/types/update_group_call_chain_blocks.py
new file mode 100644
index 00000000..7198406c
--- /dev/null
+++ b/pyrogram/raw/types/update_group_call_chain_blocks.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGroupCallChainBlocks(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A477288F``
+
+    Parameters:
+        call (:obj:`InputGroupCall `):
+            N/A
+
+        sub_chain_id (``int`` ``32-bit``):
+            N/A
+
+        blocks (List of ``bytes``):
+            N/A
+
+        next_offset (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["call", "sub_chain_id", "blocks", "next_offset"]
+
+    ID = 0xa477288f
+    QUALNAME = "types.UpdateGroupCallChainBlocks"
+
+    def __init__(self, *, call: "raw.base.InputGroupCall", sub_chain_id: int, blocks: List[bytes], next_offset: int) -> None:
+        self.call = call  # InputGroupCall
+        self.sub_chain_id = sub_chain_id  # int
+        self.blocks = blocks  # Vector
+        self.next_offset = next_offset  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGroupCallChainBlocks":
+        # No flags
+
+        call = TLObject.read(b)
+
+        sub_chain_id = Int.read(b)
+
+        blocks = TLObject.read(b, Bytes)
+
+        next_offset = Int.read(b)
+
+        return UpdateGroupCallChainBlocks(call=call, sub_chain_id=sub_chain_id, blocks=blocks, next_offset=next_offset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.call.write())
+
+        b.write(Int(self.sub_chain_id))
+
+        b.write(Vector(self.blocks, Bytes))
+
+        b.write(Int(self.next_offset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_group_call_connection.py b/pyrogram/raw/types/update_group_call_connection.py
new file mode 100644
index 00000000..f8ce54c6
--- /dev/null
+++ b/pyrogram/raw/types/update_group_call_connection.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGroupCallConnection(TLObject):  # type: ignore
+    """New WebRTC parameters
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B783982``
+
+    Parameters:
+        params (:obj:`DataJSON `):
+            WebRTC parameters
+
+        presentation (``bool``, *optional*):
+            Are these parameters related to the screen capture session currently in progress?
+
+    """
+
+    __slots__: List[str] = ["params", "presentation"]
+
+    ID = 0xb783982
+    QUALNAME = "types.UpdateGroupCallConnection"
+
+    def __init__(self, *, params: "raw.base.DataJSON", presentation: Optional[bool] = None) -> None:
+        self.params = params  # DataJSON
+        self.presentation = presentation  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGroupCallConnection":
+
+        flags = Int.read(b)
+
+        presentation = True if flags & (1 << 0) else False
+        params = TLObject.read(b)
+
+        return UpdateGroupCallConnection(params=params, presentation=presentation)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.presentation else 0
+        b.write(Int(flags))
+
+        b.write(self.params.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_group_call_encrypted_message.py b/pyrogram/raw/types/update_group_call_encrypted_message.py
new file mode 100644
index 00000000..8b2789c6
--- /dev/null
+++ b/pyrogram/raw/types/update_group_call_encrypted_message.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGroupCallEncryptedMessage(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C957A766``
+
+    Parameters:
+        call (:obj:`InputGroupCall `):
+            N/A
+
+        from_id (:obj:`Peer `):
+            N/A
+
+        encrypted_message (``bytes``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["call", "from_id", "encrypted_message"]
+
+    ID = 0xc957a766
+    QUALNAME = "types.UpdateGroupCallEncryptedMessage"
+
+    def __init__(self, *, call: "raw.base.InputGroupCall", from_id: "raw.base.Peer", encrypted_message: bytes) -> None:
+        self.call = call  # InputGroupCall
+        self.from_id = from_id  # Peer
+        self.encrypted_message = encrypted_message  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGroupCallEncryptedMessage":
+        # No flags
+
+        call = TLObject.read(b)
+
+        from_id = TLObject.read(b)
+
+        encrypted_message = Bytes.read(b)
+
+        return UpdateGroupCallEncryptedMessage(call=call, from_id=from_id, encrypted_message=encrypted_message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.call.write())
+
+        b.write(self.from_id.write())
+
+        b.write(Bytes(self.encrypted_message))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_group_call_message.py b/pyrogram/raw/types/update_group_call_message.py
new file mode 100644
index 00000000..3b6b4b7c
--- /dev/null
+++ b/pyrogram/raw/types/update_group_call_message.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGroupCallMessage(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D8326F0D``
+
+    Parameters:
+        call (:obj:`InputGroupCall `):
+            N/A
+
+        message (:obj:`GroupCallMessage `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["call", "message"]
+
+    ID = 0xd8326f0d
+    QUALNAME = "types.UpdateGroupCallMessage"
+
+    def __init__(self, *, call: "raw.base.InputGroupCall", message: "raw.base.GroupCallMessage") -> None:
+        self.call = call  # InputGroupCall
+        self.message = message  # GroupCallMessage
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGroupCallMessage":
+        # No flags
+
+        call = TLObject.read(b)
+
+        message = TLObject.read(b)
+
+        return UpdateGroupCallMessage(call=call, message=message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.call.write())
+
+        b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_group_call_participants.py b/pyrogram/raw/types/update_group_call_participants.py
new file mode 100644
index 00000000..91670a28
--- /dev/null
+++ b/pyrogram/raw/types/update_group_call_participants.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateGroupCallParticipants(TLObject):  # type: ignore
+    """The participant list of a certain group call has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F2EBDB4E``
+
+    Parameters:
+        call (:obj:`InputGroupCall `):
+            Group call
+
+        participants (List of :obj:`GroupCallParticipant `):
+            New participant list
+
+        version (``int`` ``32-bit``):
+            Version
+
+    """
+
+    __slots__: List[str] = ["call", "participants", "version"]
+
+    ID = 0xf2ebdb4e
+    QUALNAME = "types.UpdateGroupCallParticipants"
+
+    def __init__(self, *, call: "raw.base.InputGroupCall", participants: List["raw.base.GroupCallParticipant"], version: int) -> None:
+        self.call = call  # InputGroupCall
+        self.participants = participants  # Vector
+        self.version = version  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateGroupCallParticipants":
+        # No flags
+
+        call = TLObject.read(b)
+
+        participants = TLObject.read(b)
+
+        version = Int.read(b)
+
+        return UpdateGroupCallParticipants(call=call, participants=participants, version=version)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.call.write())
+
+        b.write(Vector(self.participants))
+
+        b.write(Int(self.version))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_inline_bot_callback_query.py b/pyrogram/raw/types/update_inline_bot_callback_query.py
new file mode 100644
index 00000000..54753cad
--- /dev/null
+++ b/pyrogram/raw/types/update_inline_bot_callback_query.py
@@ -0,0 +1,98 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateInlineBotCallbackQuery(TLObject):  # type: ignore
+    """This notification is received by bots when a button is pressed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``691E9052``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Query ID
+
+        user_id (``int`` ``64-bit``):
+            ID of the user that pressed the button
+
+        msg_id (:obj:`InputBotInlineMessageID `):
+            ID of the inline message with the button
+
+        chat_instance (``int`` ``64-bit``):
+            Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. Useful for high scores in games.
+
+        data (``bytes``, *optional*):
+            Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
+
+        game_short_name (``str``, *optional*):
+            Short name of a Game to be returned, serves as the unique identifier for the game
+
+    """
+
+    __slots__: List[str] = ["query_id", "user_id", "msg_id", "chat_instance", "data", "game_short_name"]
+
+    ID = 0x691e9052
+    QUALNAME = "types.UpdateInlineBotCallbackQuery"
+
+    def __init__(self, *, query_id: int, user_id: int, msg_id: "raw.base.InputBotInlineMessageID", chat_instance: int, data: Optional[bytes] = None, game_short_name: Optional[str] = None) -> None:
+        self.query_id = query_id  # long
+        self.user_id = user_id  # long
+        self.msg_id = msg_id  # InputBotInlineMessageID
+        self.chat_instance = chat_instance  # long
+        self.data = data  # flags.0?bytes
+        self.game_short_name = game_short_name  # flags.1?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateInlineBotCallbackQuery":
+
+        flags = Int.read(b)
+
+        query_id = Long.read(b)
+
+        user_id = Long.read(b)
+
+        msg_id = TLObject.read(b)
+
+        chat_instance = Long.read(b)
+
+        data = Bytes.read(b) if flags & (1 << 0) else None
+        game_short_name = String.read(b) if flags & (1 << 1) else None
+        return UpdateInlineBotCallbackQuery(query_id=query_id, user_id=user_id, msg_id=msg_id, chat_instance=chat_instance, data=data, game_short_name=game_short_name)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.data is not None else 0
+        flags |= (1 << 1) if self.game_short_name is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.query_id))
+
+        b.write(Long(self.user_id))
+
+        b.write(self.msg_id.write())
+
+        b.write(Long(self.chat_instance))
+
+        if self.data is not None:
+            b.write(Bytes(self.data))
+
+        if self.game_short_name is not None:
+            b.write(String(self.game_short_name))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_lang_pack.py b/pyrogram/raw/types/update_lang_pack.py
new file mode 100644
index 00000000..2a699d32
--- /dev/null
+++ b/pyrogram/raw/types/update_lang_pack.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateLangPack(TLObject):  # type: ignore
+    """Language pack updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``56022F4D``
+
+    Parameters:
+        difference (:obj:`LangPackDifference `):
+            Changed strings
+
+    """
+
+    __slots__: List[str] = ["difference"]
+
+    ID = 0x56022f4d
+    QUALNAME = "types.UpdateLangPack"
+
+    def __init__(self, *, difference: "raw.base.LangPackDifference") -> None:
+        self.difference = difference  # LangPackDifference
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateLangPack":
+        # No flags
+
+        difference = TLObject.read(b)
+
+        return UpdateLangPack(difference=difference)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.difference.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_lang_pack_too_long.py b/pyrogram/raw/types/update_lang_pack_too_long.py
new file mode 100644
index 00000000..c2cc9541
--- /dev/null
+++ b/pyrogram/raw/types/update_lang_pack_too_long.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateLangPackTooLong(TLObject):  # type: ignore
+    """A language pack has changed, the client should manually fetch the changed strings using langpack.getDifference
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``46560264``
+
+    Parameters:
+        lang_code (``str``):
+            Language code
+
+    """
+
+    __slots__: List[str] = ["lang_code"]
+
+    ID = 0x46560264
+    QUALNAME = "types.UpdateLangPackTooLong"
+
+    def __init__(self, *, lang_code: str) -> None:
+        self.lang_code = lang_code  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateLangPackTooLong":
+        # No flags
+
+        lang_code = String.read(b)
+
+        return UpdateLangPackTooLong(lang_code=lang_code)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.lang_code))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_login_token.py b/pyrogram/raw/types/update_login_token.py
new file mode 100644
index 00000000..9c18edee
--- /dev/null
+++ b/pyrogram/raw/types/update_login_token.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateLoginToken(TLObject):  # type: ignore
+    """A login token (for login via QR code) was accepted.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``564FE691``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x564fe691
+    QUALNAME = "types.UpdateLoginToken"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateLoginToken":
+        # No flags
+
+        return UpdateLoginToken()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_message_extended_media.py b/pyrogram/raw/types/update_message_extended_media.py
new file mode 100644
index 00000000..93f7481f
--- /dev/null
+++ b/pyrogram/raw/types/update_message_extended_media.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMessageExtendedMedia(TLObject):  # type: ignore
+    """Extended media update
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D5A41724``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        msg_id (``int`` ``32-bit``):
+            Message ID
+
+        extended_media (List of :obj:`MessageExtendedMedia `):
+            Extended media
+
+    """
+
+    __slots__: List[str] = ["peer", "msg_id", "extended_media"]
+
+    ID = 0xd5a41724
+    QUALNAME = "types.UpdateMessageExtendedMedia"
+
+    def __init__(self, *, peer: "raw.base.Peer", msg_id: int, extended_media: List["raw.base.MessageExtendedMedia"]) -> None:
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+        self.extended_media = extended_media  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMessageExtendedMedia":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        extended_media = TLObject.read(b)
+
+        return UpdateMessageExtendedMedia(peer=peer, msg_id=msg_id, extended_media=extended_media)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        b.write(Vector(self.extended_media))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_message_id.py b/pyrogram/raw/types/update_message_id.py
new file mode 100644
index 00000000..b8030071
--- /dev/null
+++ b/pyrogram/raw/types/update_message_id.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMessageID(TLObject):  # type: ignore
+    """Sent message with random_id client identifier was assigned an identifier.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4E90BFD6``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            id identifier of a respective Message
+
+        random_id (``int`` ``64-bit``):
+            Previously transferred client random_id identifier
+
+    """
+
+    __slots__: List[str] = ["id", "random_id"]
+
+    ID = 0x4e90bfd6
+    QUALNAME = "types.UpdateMessageID"
+
+    def __init__(self, *, id: int, random_id: int) -> None:
+        self.id = id  # int
+        self.random_id = random_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMessageID":
+        # No flags
+
+        id = Int.read(b)
+
+        random_id = Long.read(b)
+
+        return UpdateMessageID(id=id, random_id=random_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.id))
+
+        b.write(Long(self.random_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_message_poll.py b/pyrogram/raw/types/update_message_poll.py
new file mode 100644
index 00000000..28413d54
--- /dev/null
+++ b/pyrogram/raw/types/update_message_poll.py
@@ -0,0 +1,74 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMessagePoll(TLObject):  # type: ignore
+    """The results of a poll have changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``ACA1657B``
+
+    Parameters:
+        poll_id (``int`` ``64-bit``):
+            Poll ID
+
+        results (:obj:`PollResults `):
+            New poll results
+
+        poll (:obj:`Poll `, *optional*):
+            If the server knows the client hasn't cached this poll yet, the poll itself
+
+    """
+
+    __slots__: List[str] = ["poll_id", "results", "poll"]
+
+    ID = 0xaca1657b
+    QUALNAME = "types.UpdateMessagePoll"
+
+    def __init__(self, *, poll_id: int, results: "raw.base.PollResults", poll: "raw.base.Poll" = None) -> None:
+        self.poll_id = poll_id  # long
+        self.results = results  # PollResults
+        self.poll = poll  # flags.0?Poll
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMessagePoll":
+
+        flags = Int.read(b)
+
+        poll_id = Long.read(b)
+
+        poll = TLObject.read(b) if flags & (1 << 0) else None
+
+        results = TLObject.read(b)
+
+        return UpdateMessagePoll(poll_id=poll_id, results=results, poll=poll)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.poll is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.poll_id))
+
+        if self.poll is not None:
+            b.write(self.poll.write())
+
+        b.write(self.results.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_message_poll_vote.py b/pyrogram/raw/types/update_message_poll_vote.py
new file mode 100644
index 00000000..a082b622
--- /dev/null
+++ b/pyrogram/raw/types/update_message_poll_vote.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMessagePollVote(TLObject):  # type: ignore
+    """A specific peer has voted in a poll
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``24F40E77``
+
+    Parameters:
+        poll_id (``int`` ``64-bit``):
+            Poll ID
+
+        peer (:obj:`Peer `):
+            The peer that voted in the poll
+
+        options (List of ``bytes``):
+            Chosen option(s)
+
+        qts (``int`` ``32-bit``):
+            New qts value, see updates » for more info.
+
+    """
+
+    __slots__: List[str] = ["poll_id", "peer", "options", "qts"]
+
+    ID = 0x24f40e77
+    QUALNAME = "types.UpdateMessagePollVote"
+
+    def __init__(self, *, poll_id: int, peer: "raw.base.Peer", options: List[bytes], qts: int) -> None:
+        self.poll_id = poll_id  # long
+        self.peer = peer  # Peer
+        self.options = options  # Vector
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMessagePollVote":
+        # No flags
+
+        poll_id = Long.read(b)
+
+        peer = TLObject.read(b)
+
+        options = TLObject.read(b, Bytes)
+
+        qts = Int.read(b)
+
+        return UpdateMessagePollVote(poll_id=poll_id, peer=peer, options=options, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.poll_id))
+
+        b.write(self.peer.write())
+
+        b.write(Vector(self.options, Bytes))
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_message_reactions.py b/pyrogram/raw/types/update_message_reactions.py
new file mode 100644
index 00000000..4a2a69bc
--- /dev/null
+++ b/pyrogram/raw/types/update_message_reactions.py
@@ -0,0 +1,91 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMessageReactions(TLObject):  # type: ignore
+    """New message reactions » are available
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1E297BFA``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        msg_id (``int`` ``32-bit``):
+            Message ID
+
+        reactions (:obj:`MessageReactions `):
+            Reactions
+
+        top_msg_id (``int`` ``32-bit``, *optional*):
+            Forum topic ID
+
+        saved_peer_id (:obj:`Peer `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "msg_id", "reactions", "top_msg_id", "saved_peer_id"]
+
+    ID = 0x1e297bfa
+    QUALNAME = "types.UpdateMessageReactions"
+
+    def __init__(self, *, peer: "raw.base.Peer", msg_id: int, reactions: "raw.base.MessageReactions", top_msg_id: Optional[int] = None, saved_peer_id: "raw.base.Peer" = None) -> None:
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+        self.reactions = reactions  # MessageReactions
+        self.top_msg_id = top_msg_id  # flags.0?int
+        self.saved_peer_id = saved_peer_id  # flags.1?Peer
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMessageReactions":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        top_msg_id = Int.read(b) if flags & (1 << 0) else None
+        saved_peer_id = TLObject.read(b) if flags & (1 << 1) else None
+
+        reactions = TLObject.read(b)
+
+        return UpdateMessageReactions(peer=peer, msg_id=msg_id, reactions=reactions, top_msg_id=top_msg_id, saved_peer_id=saved_peer_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.top_msg_id is not None else 0
+        flags |= (1 << 1) if self.saved_peer_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        if self.top_msg_id is not None:
+            b.write(Int(self.top_msg_id))
+
+        if self.saved_peer_id is not None:
+            b.write(self.saved_peer_id.write())
+
+        b.write(self.reactions.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_mono_forum_no_paid_exception.py b/pyrogram/raw/types/update_mono_forum_no_paid_exception.py
new file mode 100644
index 00000000..0c2fa3a6
--- /dev/null
+++ b/pyrogram/raw/types/update_mono_forum_no_paid_exception.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMonoForumNoPaidException(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9F812B08``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            N/A
+
+        saved_peer_id (:obj:`Peer `):
+            N/A
+
+        exception (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["channel_id", "saved_peer_id", "exception"]
+
+    ID = 0x9f812b08
+    QUALNAME = "types.UpdateMonoForumNoPaidException"
+
+    def __init__(self, *, channel_id: int, saved_peer_id: "raw.base.Peer", exception: Optional[bool] = None) -> None:
+        self.channel_id = channel_id  # long
+        self.saved_peer_id = saved_peer_id  # Peer
+        self.exception = exception  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMonoForumNoPaidException":
+
+        flags = Int.read(b)
+
+        exception = True if flags & (1 << 0) else False
+        channel_id = Long.read(b)
+
+        saved_peer_id = TLObject.read(b)
+
+        return UpdateMonoForumNoPaidException(channel_id=channel_id, saved_peer_id=saved_peer_id, exception=exception)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.exception else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        b.write(self.saved_peer_id.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_move_sticker_set_to_top.py b/pyrogram/raw/types/update_move_sticker_set_to_top.py
new file mode 100644
index 00000000..ea074a1e
--- /dev/null
+++ b/pyrogram/raw/types/update_move_sticker_set_to_top.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateMoveStickerSetToTop(TLObject):  # type: ignore
+    """A stickerset was just moved to top, see here for more info »
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``86FCCF85``
+
+    Parameters:
+        stickerset (``int`` ``64-bit``):
+            Stickerset ID
+
+        masks (``bool``, *optional*):
+            This update is referring to a mask stickerset
+
+        emojis (``bool``, *optional*):
+            This update is referring to a custom emoji stickerset
+
+    """
+
+    __slots__: List[str] = ["stickerset", "masks", "emojis"]
+
+    ID = 0x86fccf85
+    QUALNAME = "types.UpdateMoveStickerSetToTop"
+
+    def __init__(self, *, stickerset: int, masks: Optional[bool] = None, emojis: Optional[bool] = None) -> None:
+        self.stickerset = stickerset  # long
+        self.masks = masks  # flags.0?true
+        self.emojis = emojis  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateMoveStickerSetToTop":
+
+        flags = Int.read(b)
+
+        masks = True if flags & (1 << 0) else False
+        emojis = True if flags & (1 << 1) else False
+        stickerset = Long.read(b)
+
+        return UpdateMoveStickerSetToTop(stickerset=stickerset, masks=masks, emojis=emojis)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.masks else 0
+        flags |= (1 << 1) if self.emojis else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.stickerset))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_authorization.py b/pyrogram/raw/types/update_new_authorization.py
new file mode 100644
index 00000000..9780abcf
--- /dev/null
+++ b/pyrogram/raw/types/update_new_authorization.py
@@ -0,0 +1,89 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewAuthorization(TLObject):  # type: ignore
+    """A new session logged into the current user's account through an unknown device.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8951ABEF``
+
+    Parameters:
+        hash (``int`` ``64-bit``):
+            Hash for pagination, for more info click here
+
+        unconfirmed (``bool``, *optional*):
+            Whether the session is unconfirmed, see here » for more info.
+
+        date (``int`` ``32-bit``, *optional*):
+            Authorization date
+
+        device (``str``, *optional*):
+            Name of device, for example Android
+
+        location (``str``, *optional*):
+            Location, for example USA, NY (IP=1.2.3.4)
+
+    """
+
+    __slots__: List[str] = ["hash", "unconfirmed", "date", "device", "location"]
+
+    ID = 0x8951abef
+    QUALNAME = "types.UpdateNewAuthorization"
+
+    def __init__(self, *, hash: int, unconfirmed: Optional[bool] = None, date: Optional[int] = None, device: Optional[str] = None, location: Optional[str] = None) -> None:
+        self.hash = hash  # long
+        self.unconfirmed = unconfirmed  # flags.0?true
+        self.date = date  # flags.0?int
+        self.device = device  # flags.0?string
+        self.location = location  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewAuthorization":
+
+        flags = Int.read(b)
+
+        unconfirmed = True if flags & (1 << 0) else False
+        hash = Long.read(b)
+
+        date = Int.read(b) if flags & (1 << 0) else None
+        device = String.read(b) if flags & (1 << 0) else None
+        location = String.read(b) if flags & (1 << 0) else None
+        return UpdateNewAuthorization(hash=hash, unconfirmed=unconfirmed, date=date, device=device, location=location)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.unconfirmed else 0
+        flags |= (1 << 0) if self.date is not None else 0
+        flags |= (1 << 0) if self.device is not None else 0
+        flags |= (1 << 0) if self.location is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.hash))
+
+        if self.date is not None:
+            b.write(Int(self.date))
+
+        if self.device is not None:
+            b.write(String(self.device))
+
+        if self.location is not None:
+            b.write(String(self.location))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_channel_message.py b/pyrogram/raw/types/update_new_channel_message.py
new file mode 100644
index 00000000..6a0d0e06
--- /dev/null
+++ b/pyrogram/raw/types/update_new_channel_message.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewChannelMessage(TLObject):  # type: ignore
+    """A new message was sent in a channel/supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``62BA04D9``
+
+    Parameters:
+        message (:obj:`Message `):
+            New message
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["message", "pts", "pts_count"]
+
+    ID = 0x62ba04d9
+    QUALNAME = "types.UpdateNewChannelMessage"
+
+    def __init__(self, *, message: "raw.base.Message", pts: int, pts_count: int) -> None:
+        self.message = message  # Message
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewChannelMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateNewChannelMessage(message=message, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_encrypted_message.py b/pyrogram/raw/types/update_new_encrypted_message.py
new file mode 100644
index 00000000..f30813c1
--- /dev/null
+++ b/pyrogram/raw/types/update_new_encrypted_message.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewEncryptedMessage(TLObject):  # type: ignore
+    """New encrypted message.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``12BCBD9A``
+
+    Parameters:
+        message (:obj:`EncryptedMessage `):
+            Message
+
+        qts (``int`` ``32-bit``):
+            New qts value, see updates » for more info.
+
+    """
+
+    __slots__: List[str] = ["message", "qts"]
+
+    ID = 0x12bcbd9a
+    QUALNAME = "types.UpdateNewEncryptedMessage"
+
+    def __init__(self, *, message: "raw.base.EncryptedMessage", qts: int) -> None:
+        self.message = message  # EncryptedMessage
+        self.qts = qts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewEncryptedMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        qts = Int.read(b)
+
+        return UpdateNewEncryptedMessage(message=message, qts=qts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        b.write(Int(self.qts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_message.py b/pyrogram/raw/types/update_new_message.py
new file mode 100644
index 00000000..5578fb61
--- /dev/null
+++ b/pyrogram/raw/types/update_new_message.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewMessage(TLObject):  # type: ignore
+    """New message in a private chat or in a basic group.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1F2B0AFD``
+
+    Parameters:
+        message (:obj:`Message `):
+            Message
+
+        pts (``int`` ``32-bit``):
+            New quantity of actions in a message box
+
+        pts_count (``int`` ``32-bit``):
+            Number of generated events
+
+    """
+
+    __slots__: List[str] = ["message", "pts", "pts_count"]
+
+    ID = 0x1f2b0afd
+    QUALNAME = "types.UpdateNewMessage"
+
+    def __init__(self, *, message: "raw.base.Message", pts: int, pts_count: int) -> None:
+        self.message = message  # Message
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateNewMessage(message=message, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_quick_reply.py b/pyrogram/raw/types/update_new_quick_reply.py
new file mode 100644
index 00000000..749b98e2
--- /dev/null
+++ b/pyrogram/raw/types/update_new_quick_reply.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewQuickReply(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F53DA717``
+
+    Parameters:
+        quick_reply (:obj:`QuickReply `):
+
+
+    """
+
+    __slots__: List[str] = ["quick_reply"]
+
+    ID = 0xf53da717
+    QUALNAME = "types.UpdateNewQuickReply"
+
+    def __init__(self, *, quick_reply: "raw.base.QuickReply") -> None:
+        self.quick_reply = quick_reply  # QuickReply
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewQuickReply":
+        # No flags
+
+        quick_reply = TLObject.read(b)
+
+        return UpdateNewQuickReply(quick_reply=quick_reply)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.quick_reply.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_scheduled_message.py b/pyrogram/raw/types/update_new_scheduled_message.py
new file mode 100644
index 00000000..a3edbe45
--- /dev/null
+++ b/pyrogram/raw/types/update_new_scheduled_message.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewScheduledMessage(TLObject):  # type: ignore
+    """A message was added to the schedule queue of a chat
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``39A51DFB``
+
+    Parameters:
+        message (:obj:`Message `):
+            Message
+
+    """
+
+    __slots__: List[str] = ["message"]
+
+    ID = 0x39a51dfb
+    QUALNAME = "types.UpdateNewScheduledMessage"
+
+    def __init__(self, *, message: "raw.base.Message") -> None:
+        self.message = message  # Message
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewScheduledMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        return UpdateNewScheduledMessage(message=message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_sticker_set.py b/pyrogram/raw/types/update_new_sticker_set.py
new file mode 100644
index 00000000..816237f3
--- /dev/null
+++ b/pyrogram/raw/types/update_new_sticker_set.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewStickerSet(TLObject):  # type: ignore
+    """A new stickerset was installed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``688A30AA``
+
+    Parameters:
+        stickerset (:obj:`messages.StickerSet `):
+            The installed stickerset
+
+    """
+
+    __slots__: List[str] = ["stickerset"]
+
+    ID = 0x688a30aa
+    QUALNAME = "types.UpdateNewStickerSet"
+
+    def __init__(self, *, stickerset: "raw.base.messages.StickerSet") -> None:
+        self.stickerset = stickerset  # messages.StickerSet
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewStickerSet":
+        # No flags
+
+        stickerset = TLObject.read(b)
+
+        return UpdateNewStickerSet(stickerset=stickerset)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.stickerset.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_new_story_reaction.py b/pyrogram/raw/types/update_new_story_reaction.py
new file mode 100644
index 00000000..3aae0d76
--- /dev/null
+++ b/pyrogram/raw/types/update_new_story_reaction.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNewStoryReaction(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1824E40B``
+
+    Parameters:
+        story_id (``int`` ``32-bit``):
+
+
+        peer (:obj:`Peer `):
+
+
+        reaction (:obj:`Reaction `):
+
+
+    """
+
+    __slots__: List[str] = ["story_id", "peer", "reaction"]
+
+    ID = 0x1824e40b
+    QUALNAME = "types.UpdateNewStoryReaction"
+
+    def __init__(self, *, story_id: int, peer: "raw.base.Peer", reaction: "raw.base.Reaction") -> None:
+        self.story_id = story_id  # int
+        self.peer = peer  # Peer
+        self.reaction = reaction  # Reaction
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNewStoryReaction":
+        # No flags
+
+        story_id = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        reaction = TLObject.read(b)
+
+        return UpdateNewStoryReaction(story_id=story_id, peer=peer, reaction=reaction)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.story_id))
+
+        b.write(self.peer.write())
+
+        b.write(self.reaction.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_notify_settings.py b/pyrogram/raw/types/update_notify_settings.py
new file mode 100644
index 00000000..61d3df7e
--- /dev/null
+++ b/pyrogram/raw/types/update_notify_settings.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateNotifySettings(TLObject):  # type: ignore
+    """Changes in notification settings.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BEC268EF``
+
+    Parameters:
+        peer (:obj:`NotifyPeer `):
+            Notification source
+
+        notify_settings (:obj:`PeerNotifySettings `):
+            New notification settings
+
+    """
+
+    __slots__: List[str] = ["peer", "notify_settings"]
+
+    ID = 0xbec268ef
+    QUALNAME = "types.UpdateNotifySettings"
+
+    def __init__(self, *, peer: "raw.base.NotifyPeer", notify_settings: "raw.base.PeerNotifySettings") -> None:
+        self.peer = peer  # NotifyPeer
+        self.notify_settings = notify_settings  # PeerNotifySettings
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateNotifySettings":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        notify_settings = TLObject.read(b)
+
+        return UpdateNotifySettings(peer=peer, notify_settings=notify_settings)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.notify_settings.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_paid_reaction_privacy.py b/pyrogram/raw/types/update_paid_reaction_privacy.py
new file mode 100644
index 00000000..85aadc05
--- /dev/null
+++ b/pyrogram/raw/types/update_paid_reaction_privacy.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePaidReactionPrivacy(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8B725FCE``
+
+    Parameters:
+        private (:obj:`PaidReactionPrivacy `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["private"]
+
+    ID = 0x8b725fce
+    QUALNAME = "types.UpdatePaidReactionPrivacy"
+
+    def __init__(self, *, private: "raw.base.PaidReactionPrivacy") -> None:
+        self.private = private  # PaidReactionPrivacy
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePaidReactionPrivacy":
+        # No flags
+
+        private = TLObject.read(b)
+
+        return UpdatePaidReactionPrivacy(private=private)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.private.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_peer_blocked.py b/pyrogram/raw/types/update_peer_blocked.py
new file mode 100644
index 00000000..6e84d9cd
--- /dev/null
+++ b/pyrogram/raw/types/update_peer_blocked.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePeerBlocked(TLObject):  # type: ignore
+    """We blocked a peer, see here » for more info on blocklists.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EBE07752``
+
+    Parameters:
+        peer_id (:obj:`Peer `):
+            The (un)blocked peer
+
+        blocked (``bool``, *optional*):
+            Whether the peer was blocked or unblocked
+
+        blocked_my_stories_from (``bool``, *optional*):
+            Whether the peer was added/removed to/from the story blocklist; if not set, this update affects the main blocklist, see here » for more info.
+
+    """
+
+    __slots__: List[str] = ["peer_id", "blocked", "blocked_my_stories_from"]
+
+    ID = 0xebe07752
+    QUALNAME = "types.UpdatePeerBlocked"
+
+    def __init__(self, *, peer_id: "raw.base.Peer", blocked: Optional[bool] = None, blocked_my_stories_from: Optional[bool] = None) -> None:
+        self.peer_id = peer_id  # Peer
+        self.blocked = blocked  # flags.0?true
+        self.blocked_my_stories_from = blocked_my_stories_from  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePeerBlocked":
+
+        flags = Int.read(b)
+
+        blocked = True if flags & (1 << 0) else False
+        blocked_my_stories_from = True if flags & (1 << 1) else False
+        peer_id = TLObject.read(b)
+
+        return UpdatePeerBlocked(peer_id=peer_id, blocked=blocked, blocked_my_stories_from=blocked_my_stories_from)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.blocked else 0
+        flags |= (1 << 1) if self.blocked_my_stories_from else 0
+        b.write(Int(flags))
+
+        b.write(self.peer_id.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_peer_history_ttl.py b/pyrogram/raw/types/update_peer_history_ttl.py
new file mode 100644
index 00000000..bb3d971a
--- /dev/null
+++ b/pyrogram/raw/types/update_peer_history_ttl.py
@@ -0,0 +1,65 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePeerHistoryTTL(TLObject):  # type: ignore
+    """The Time-To-Live for messages sent by the current user in a specific chat has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BB9BB9A5``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The chat
+
+        ttl_period (``int`` ``32-bit``, *optional*):
+            The new Time-To-Live
+
+    """
+
+    __slots__: List[str] = ["peer", "ttl_period"]
+
+    ID = 0xbb9bb9a5
+    QUALNAME = "types.UpdatePeerHistoryTTL"
+
+    def __init__(self, *, peer: "raw.base.Peer", ttl_period: Optional[int] = None) -> None:
+        self.peer = peer  # Peer
+        self.ttl_period = ttl_period  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePeerHistoryTTL":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        ttl_period = Int.read(b) if flags & (1 << 0) else None
+        return UpdatePeerHistoryTTL(peer=peer, ttl_period=ttl_period)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.ttl_period is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        if self.ttl_period is not None:
+            b.write(Int(self.ttl_period))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_peer_located.py b/pyrogram/raw/types/update_peer_located.py
new file mode 100644
index 00000000..12998d8c
--- /dev/null
+++ b/pyrogram/raw/types/update_peer_located.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePeerLocated(TLObject):  # type: ignore
+    """List of peers near you was updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B4AFCFB0``
+
+    Parameters:
+        peers (List of :obj:`PeerLocated `):
+            Geolocated peer list update
+
+    """
+
+    __slots__: List[str] = ["peers"]
+
+    ID = 0xb4afcfb0
+    QUALNAME = "types.UpdatePeerLocated"
+
+    def __init__(self, *, peers: List["raw.base.PeerLocated"]) -> None:
+        self.peers = peers  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePeerLocated":
+        # No flags
+
+        peers = TLObject.read(b)
+
+        return UpdatePeerLocated(peers=peers)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.peers))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_peer_settings.py b/pyrogram/raw/types/update_peer_settings.py
new file mode 100644
index 00000000..9efdb711
--- /dev/null
+++ b/pyrogram/raw/types/update_peer_settings.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePeerSettings(TLObject):  # type: ignore
+    """Settings of a certain peer have changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6A7E7366``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The peer
+
+        settings (:obj:`PeerSettings `):
+            Associated peer settings
+
+    """
+
+    __slots__: List[str] = ["peer", "settings"]
+
+    ID = 0x6a7e7366
+    QUALNAME = "types.UpdatePeerSettings"
+
+    def __init__(self, *, peer: "raw.base.Peer", settings: "raw.base.PeerSettings") -> None:
+        self.peer = peer  # Peer
+        self.settings = settings  # PeerSettings
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePeerSettings":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        settings = TLObject.read(b)
+
+        return UpdatePeerSettings(peer=peer, settings=settings)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.settings.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_peer_wallpaper.py b/pyrogram/raw/types/update_peer_wallpaper.py
new file mode 100644
index 00000000..42f02b1f
--- /dev/null
+++ b/pyrogram/raw/types/update_peer_wallpaper.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePeerWallpaper(TLObject):  # type: ignore
+    """The wallpaper » of a given peer has changed.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AE3F101D``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The peer where the wallpaper has changed.
+
+        wallpaper_overridden (``bool``, *optional*):
+            Whether the other user has chosen a custom wallpaper for us using messages.setChatWallPaper and the for_both flag, see here » for more info.
+
+        wallpaper (:obj:`WallPaper `, *optional*):
+            The new wallpaper, if none the wallpaper was removed and the default wallpaper should be used.
+
+    """
+
+    __slots__: List[str] = ["peer", "wallpaper_overridden", "wallpaper"]
+
+    ID = 0xae3f101d
+    QUALNAME = "types.UpdatePeerWallpaper"
+
+    def __init__(self, *, peer: "raw.base.Peer", wallpaper_overridden: Optional[bool] = None, wallpaper: "raw.base.WallPaper" = None) -> None:
+        self.peer = peer  # Peer
+        self.wallpaper_overridden = wallpaper_overridden  # flags.1?true
+        self.wallpaper = wallpaper  # flags.0?WallPaper
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePeerWallpaper":
+
+        flags = Int.read(b)
+
+        wallpaper_overridden = True if flags & (1 << 1) else False
+        peer = TLObject.read(b)
+
+        wallpaper = TLObject.read(b) if flags & (1 << 0) else None
+
+        return UpdatePeerWallpaper(peer=peer, wallpaper_overridden=wallpaper_overridden, wallpaper=wallpaper)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.wallpaper_overridden else 0
+        flags |= (1 << 0) if self.wallpaper is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        if self.wallpaper is not None:
+            b.write(self.wallpaper.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pending_join_requests.py b/pyrogram/raw/types/update_pending_join_requests.py
new file mode 100644
index 00000000..29870dd4
--- /dev/null
+++ b/pyrogram/raw/types/update_pending_join_requests.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePendingJoinRequests(TLObject):  # type: ignore
+    """Someone has requested to join a chat or channel
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7063C3DB``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Chat or channel
+
+        requests_pending (``int`` ``32-bit``):
+            Number of pending join requests » for the chat or channel
+
+        recent_requesters (List of ``int`` ``64-bit``):
+            IDs of users that have recently requested to join
+
+    """
+
+    __slots__: List[str] = ["peer", "requests_pending", "recent_requesters"]
+
+    ID = 0x7063c3db
+    QUALNAME = "types.UpdatePendingJoinRequests"
+
+    def __init__(self, *, peer: "raw.base.Peer", requests_pending: int, recent_requesters: List[int]) -> None:
+        self.peer = peer  # Peer
+        self.requests_pending = requests_pending  # int
+        self.recent_requesters = recent_requesters  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePendingJoinRequests":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        requests_pending = Int.read(b)
+
+        recent_requesters = TLObject.read(b, Long)
+
+        return UpdatePendingJoinRequests(peer=peer, requests_pending=requests_pending, recent_requesters=recent_requesters)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.requests_pending))
+
+        b.write(Vector(self.recent_requesters, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_phone_call.py b/pyrogram/raw/types/update_phone_call.py
new file mode 100644
index 00000000..2abd85b1
--- /dev/null
+++ b/pyrogram/raw/types/update_phone_call.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePhoneCall(TLObject):  # type: ignore
+    """An incoming phone call
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AB0F6B1E``
+
+    Parameters:
+        phone_call (:obj:`PhoneCall `):
+            Phone call
+
+    """
+
+    __slots__: List[str] = ["phone_call"]
+
+    ID = 0xab0f6b1e
+    QUALNAME = "types.UpdatePhoneCall"
+
+    def __init__(self, *, phone_call: "raw.base.PhoneCall") -> None:
+        self.phone_call = phone_call  # PhoneCall
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePhoneCall":
+        # No flags
+
+        phone_call = TLObject.read(b)
+
+        return UpdatePhoneCall(phone_call=phone_call)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.phone_call.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_phone_call_signaling_data.py b/pyrogram/raw/types/update_phone_call_signaling_data.py
new file mode 100644
index 00000000..87e858c8
--- /dev/null
+++ b/pyrogram/raw/types/update_phone_call_signaling_data.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePhoneCallSignalingData(TLObject):  # type: ignore
+    """Incoming phone call signaling payload
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2661BF09``
+
+    Parameters:
+        phone_call_id (``int`` ``64-bit``):
+            Phone call ID
+
+        data (``bytes``):
+            Signaling payload
+
+    """
+
+    __slots__: List[str] = ["phone_call_id", "data"]
+
+    ID = 0x2661bf09
+    QUALNAME = "types.UpdatePhoneCallSignalingData"
+
+    def __init__(self, *, phone_call_id: int, data: bytes) -> None:
+        self.phone_call_id = phone_call_id  # long
+        self.data = data  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePhoneCallSignalingData":
+        # No flags
+
+        phone_call_id = Long.read(b)
+
+        data = Bytes.read(b)
+
+        return UpdatePhoneCallSignalingData(phone_call_id=phone_call_id, data=data)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.phone_call_id))
+
+        b.write(Bytes(self.data))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pinned_channel_messages.py b/pyrogram/raw/types/update_pinned_channel_messages.py
new file mode 100644
index 00000000..a270e7f1
--- /dev/null
+++ b/pyrogram/raw/types/update_pinned_channel_messages.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePinnedChannelMessages(TLObject):  # type: ignore
+    """Messages were pinned/unpinned in a channel/supergroup
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5BB98608``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel ID
+
+        messages (List of ``int`` ``32-bit``):
+            Messages
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+        pinned (``bool``, *optional*):
+            Whether the messages were pinned or unpinned
+
+    """
+
+    __slots__: List[str] = ["channel_id", "messages", "pts", "pts_count", "pinned"]
+
+    ID = 0x5bb98608
+    QUALNAME = "types.UpdatePinnedChannelMessages"
+
+    def __init__(self, *, channel_id: int, messages: List[int], pts: int, pts_count: int, pinned: Optional[bool] = None) -> None:
+        self.channel_id = channel_id  # long
+        self.messages = messages  # Vector
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.pinned = pinned  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePinnedChannelMessages":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 0) else False
+        channel_id = Long.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdatePinnedChannelMessages(channel_id=channel_id, messages=messages, pts=pts, pts_count=pts_count, pinned=pinned)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pinned else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        b.write(Vector(self.messages, Int))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pinned_dialogs.py b/pyrogram/raw/types/update_pinned_dialogs.py
new file mode 100644
index 00000000..d22adebc
--- /dev/null
+++ b/pyrogram/raw/types/update_pinned_dialogs.py
@@ -0,0 +1,67 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePinnedDialogs(TLObject):  # type: ignore
+    """Pinned dialogs were updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FA0F3CA2``
+
+    Parameters:
+        folder_id (``int`` ``32-bit``, *optional*):
+            Peer folder ID, for more info click here
+
+        order (List of :obj:`DialogPeer `, *optional*):
+            New order of pinned dialogs
+
+    """
+
+    __slots__: List[str] = ["folder_id", "order"]
+
+    ID = 0xfa0f3ca2
+    QUALNAME = "types.UpdatePinnedDialogs"
+
+    def __init__(self, *, folder_id: Optional[int] = None, order: Optional[List["raw.base.DialogPeer"]] = None) -> None:
+        self.folder_id = folder_id  # flags.1?int
+        self.order = order  # flags.0?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePinnedDialogs":
+
+        flags = Int.read(b)
+
+        folder_id = Int.read(b) if flags & (1 << 1) else None
+        order = TLObject.read(b) if flags & (1 << 0) else []
+
+        return UpdatePinnedDialogs(folder_id=folder_id, order=order)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.folder_id is not None else 0
+        flags |= (1 << 0) if self.order else 0
+        b.write(Int(flags))
+
+        if self.folder_id is not None:
+            b.write(Int(self.folder_id))
+
+        if self.order is not None:
+            b.write(Vector(self.order))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pinned_forum_topic.py b/pyrogram/raw/types/update_pinned_forum_topic.py
new file mode 100644
index 00000000..4aa39a47
--- /dev/null
+++ b/pyrogram/raw/types/update_pinned_forum_topic.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePinnedForumTopic(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``683B2C52``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            N/A
+
+        topic_id (``int`` ``32-bit``):
+            N/A
+
+        pinned (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "topic_id", "pinned"]
+
+    ID = 0x683b2c52
+    QUALNAME = "types.UpdatePinnedForumTopic"
+
+    def __init__(self, *, peer: "raw.base.Peer", topic_id: int, pinned: Optional[bool] = None) -> None:
+        self.peer = peer  # Peer
+        self.topic_id = topic_id  # int
+        self.pinned = pinned  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePinnedForumTopic":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        topic_id = Int.read(b)
+
+        return UpdatePinnedForumTopic(peer=peer, topic_id=topic_id, pinned=pinned)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pinned else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.topic_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pinned_forum_topics.py b/pyrogram/raw/types/update_pinned_forum_topics.py
new file mode 100644
index 00000000..17926d20
--- /dev/null
+++ b/pyrogram/raw/types/update_pinned_forum_topics.py
@@ -0,0 +1,66 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePinnedForumTopics(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DEF143D0``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            N/A
+
+        order (List of ``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "order"]
+
+    ID = 0xdef143d0
+    QUALNAME = "types.UpdatePinnedForumTopics"
+
+    def __init__(self, *, peer: "raw.base.Peer", order: Optional[List[int]] = None) -> None:
+        self.peer = peer  # Peer
+        self.order = order  # flags.0?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePinnedForumTopics":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        order = TLObject.read(b, Int) if flags & (1 << 0) else []
+
+        return UpdatePinnedForumTopics(peer=peer, order=order)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.order else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        if self.order is not None:
+            b.write(Vector(self.order, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pinned_messages.py b/pyrogram/raw/types/update_pinned_messages.py
new file mode 100644
index 00000000..25bc38da
--- /dev/null
+++ b/pyrogram/raw/types/update_pinned_messages.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePinnedMessages(TLObject):  # type: ignore
+    """Some messages were pinned in a chat
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``ED85EAB5``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        messages (List of ``int`` ``32-bit``):
+            Message IDs
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+        pinned (``bool``, *optional*):
+            Whether the messages were pinned or unpinned
+
+    """
+
+    __slots__: List[str] = ["peer", "messages", "pts", "pts_count", "pinned"]
+
+    ID = 0xed85eab5
+    QUALNAME = "types.UpdatePinnedMessages"
+
+    def __init__(self, *, peer: "raw.base.Peer", messages: List[int], pts: int, pts_count: int, pinned: Optional[bool] = None) -> None:
+        self.peer = peer  # Peer
+        self.messages = messages  # Vector
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.pinned = pinned  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePinnedMessages":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdatePinnedMessages(peer=peer, messages=messages, pts=pts, pts_count=pts_count, pinned=pinned)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pinned else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Vector(self.messages, Int))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pinned_saved_dialogs.py b/pyrogram/raw/types/update_pinned_saved_dialogs.py
new file mode 100644
index 00000000..dc530206
--- /dev/null
+++ b/pyrogram/raw/types/update_pinned_saved_dialogs.py
@@ -0,0 +1,58 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePinnedSavedDialogs(TLObject):  # type: ignore
+    """Pinned saved dialogs » were updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``686C85A6``
+
+    Parameters:
+        order (List of :obj:`DialogPeer `, *optional*):
+            New order of pinned saved dialogs
+
+    """
+
+    __slots__: List[str] = ["order"]
+
+    ID = 0x686c85a6
+    QUALNAME = "types.UpdatePinnedSavedDialogs"
+
+    def __init__(self, *, order: Optional[List["raw.base.DialogPeer"]] = None) -> None:
+        self.order = order  # flags.0?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePinnedSavedDialogs":
+
+        flags = Int.read(b)
+
+        order = TLObject.read(b) if flags & (1 << 0) else []
+
+        return UpdatePinnedSavedDialogs(order=order)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.order else 0
+        b.write(Int(flags))
+
+        if self.order is not None:
+            b.write(Vector(self.order))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_privacy.py b/pyrogram/raw/types/update_privacy.py
new file mode 100644
index 00000000..c15f890d
--- /dev/null
+++ b/pyrogram/raw/types/update_privacy.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePrivacy(TLObject):  # type: ignore
+    """Privacy rules were changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EE3B272A``
+
+    Parameters:
+        key (:obj:`PrivacyKey `):
+            Peers to which the privacy rules apply
+
+        rules (List of :obj:`PrivacyRule `):
+            New privacy rules
+
+    """
+
+    __slots__: List[str] = ["key", "rules"]
+
+    ID = 0xee3b272a
+    QUALNAME = "types.UpdatePrivacy"
+
+    def __init__(self, *, key: "raw.base.PrivacyKey", rules: List["raw.base.PrivacyRule"]) -> None:
+        self.key = key  # PrivacyKey
+        self.rules = rules  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePrivacy":
+        # No flags
+
+        key = TLObject.read(b)
+
+        rules = TLObject.read(b)
+
+        return UpdatePrivacy(key=key, rules=rules)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.key.write())
+
+        b.write(Vector(self.rules))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_pts_changed.py b/pyrogram/raw/types/update_pts_changed.py
new file mode 100644
index 00000000..71747b7b
--- /dev/null
+++ b/pyrogram/raw/types/update_pts_changed.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatePtsChanged(TLObject):  # type: ignore
+    """Common message box sequence PTS has changed, state has to be refetched using updates.getState
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3354678F``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x3354678f
+    QUALNAME = "types.UpdatePtsChanged"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatePtsChanged":
+        # No flags
+
+        return UpdatePtsChanged()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_quick_replies.py b/pyrogram/raw/types/update_quick_replies.py
new file mode 100644
index 00000000..a36835e7
--- /dev/null
+++ b/pyrogram/raw/types/update_quick_replies.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateQuickReplies(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F9470AB2``
+
+    Parameters:
+        quick_replies (List of :obj:`QuickReply `):
+
+
+    """
+
+    __slots__: List[str] = ["quick_replies"]
+
+    ID = 0xf9470ab2
+    QUALNAME = "types.UpdateQuickReplies"
+
+    def __init__(self, *, quick_replies: List["raw.base.QuickReply"]) -> None:
+        self.quick_replies = quick_replies  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateQuickReplies":
+        # No flags
+
+        quick_replies = TLObject.read(b)
+
+        return UpdateQuickReplies(quick_replies=quick_replies)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.quick_replies))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_quick_reply_message.py b/pyrogram/raw/types/update_quick_reply_message.py
new file mode 100644
index 00000000..848b45a6
--- /dev/null
+++ b/pyrogram/raw/types/update_quick_reply_message.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateQuickReplyMessage(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3E050D0F``
+
+    Parameters:
+        message (:obj:`Message `):
+
+
+    """
+
+    __slots__: List[str] = ["message"]
+
+    ID = 0x3e050d0f
+    QUALNAME = "types.UpdateQuickReplyMessage"
+
+    def __init__(self, *, message: "raw.base.Message") -> None:
+        self.message = message  # Message
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateQuickReplyMessage":
+        # No flags
+
+        message = TLObject.read(b)
+
+        return UpdateQuickReplyMessage(message=message)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.message.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_channel_discussion_inbox.py b/pyrogram/raw/types/update_read_channel_discussion_inbox.py
new file mode 100644
index 00000000..31c8a610
--- /dev/null
+++ b/pyrogram/raw/types/update_read_channel_discussion_inbox.py
@@ -0,0 +1,90 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadChannelDiscussionInbox(TLObject):  # type: ignore
+    """Incoming comments in a discussion thread were marked as read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D6B19546``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Discussion group ID
+
+        top_msg_id (``int`` ``32-bit``):
+            ID of the group message that started the thread (message in linked discussion group)
+
+        read_max_id (``int`` ``32-bit``):
+            Message ID of latest read incoming message for this thread
+
+        broadcast_id (``int`` ``64-bit``, *optional*):
+            If set, contains the ID of the channel that contains the post that started the comment thread in the discussion group (channel_id)
+
+        broadcast_post (``int`` ``32-bit``, *optional*):
+            If set, contains the ID of the channel post that started the comment thread
+
+    """
+
+    __slots__: List[str] = ["channel_id", "top_msg_id", "read_max_id", "broadcast_id", "broadcast_post"]
+
+    ID = 0xd6b19546
+    QUALNAME = "types.UpdateReadChannelDiscussionInbox"
+
+    def __init__(self, *, channel_id: int, top_msg_id: int, read_max_id: int, broadcast_id: Optional[int] = None, broadcast_post: Optional[int] = None) -> None:
+        self.channel_id = channel_id  # long
+        self.top_msg_id = top_msg_id  # int
+        self.read_max_id = read_max_id  # int
+        self.broadcast_id = broadcast_id  # flags.0?long
+        self.broadcast_post = broadcast_post  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadChannelDiscussionInbox":
+
+        flags = Int.read(b)
+
+        channel_id = Long.read(b)
+
+        top_msg_id = Int.read(b)
+
+        read_max_id = Int.read(b)
+
+        broadcast_id = Long.read(b) if flags & (1 << 0) else None
+        broadcast_post = Int.read(b) if flags & (1 << 0) else None
+        return UpdateReadChannelDiscussionInbox(channel_id=channel_id, top_msg_id=top_msg_id, read_max_id=read_max_id, broadcast_id=broadcast_id, broadcast_post=broadcast_post)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.broadcast_id is not None else 0
+        flags |= (1 << 0) if self.broadcast_post is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.top_msg_id))
+
+        b.write(Int(self.read_max_id))
+
+        if self.broadcast_id is not None:
+            b.write(Long(self.broadcast_id))
+
+        if self.broadcast_post is not None:
+            b.write(Int(self.broadcast_post))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_channel_discussion_outbox.py b/pyrogram/raw/types/update_read_channel_discussion_outbox.py
new file mode 100644
index 00000000..e99853bf
--- /dev/null
+++ b/pyrogram/raw/types/update_read_channel_discussion_outbox.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadChannelDiscussionOutbox(TLObject):  # type: ignore
+    """Outgoing comments in a discussion thread were marked as read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``695C9E7C``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Supergroup ID
+
+        top_msg_id (``int`` ``32-bit``):
+            ID of the group message that started the thread
+
+        read_max_id (``int`` ``32-bit``):
+            Message ID of latest read outgoing message for this thread
+
+    """
+
+    __slots__: List[str] = ["channel_id", "top_msg_id", "read_max_id"]
+
+    ID = 0x695c9e7c
+    QUALNAME = "types.UpdateReadChannelDiscussionOutbox"
+
+    def __init__(self, *, channel_id: int, top_msg_id: int, read_max_id: int) -> None:
+        self.channel_id = channel_id  # long
+        self.top_msg_id = top_msg_id  # int
+        self.read_max_id = read_max_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadChannelDiscussionOutbox":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        top_msg_id = Int.read(b)
+
+        read_max_id = Int.read(b)
+
+        return UpdateReadChannelDiscussionOutbox(channel_id=channel_id, top_msg_id=top_msg_id, read_max_id=read_max_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.top_msg_id))
+
+        b.write(Int(self.read_max_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_channel_inbox.py b/pyrogram/raw/types/update_read_channel_inbox.py
new file mode 100644
index 00000000..e5ccf3c6
--- /dev/null
+++ b/pyrogram/raw/types/update_read_channel_inbox.py
@@ -0,0 +1,89 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadChannelInbox(TLObject):  # type: ignore
+    """Incoming messages in a channel/supergroup were read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``922E6E10``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel/supergroup ID
+
+        max_id (``int`` ``32-bit``):
+            Position up to which all incoming messages are read.
+
+        still_unread_count (``int`` ``32-bit``):
+            Count of messages weren't read yet
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        folder_id (``int`` ``32-bit``, *optional*):
+            Peer folder ID, for more info click here
+
+    """
+
+    __slots__: List[str] = ["channel_id", "max_id", "still_unread_count", "pts", "folder_id"]
+
+    ID = 0x922e6e10
+    QUALNAME = "types.UpdateReadChannelInbox"
+
+    def __init__(self, *, channel_id: int, max_id: int, still_unread_count: int, pts: int, folder_id: Optional[int] = None) -> None:
+        self.channel_id = channel_id  # long
+        self.max_id = max_id  # int
+        self.still_unread_count = still_unread_count  # int
+        self.pts = pts  # int
+        self.folder_id = folder_id  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadChannelInbox":
+
+        flags = Int.read(b)
+
+        folder_id = Int.read(b) if flags & (1 << 0) else None
+        channel_id = Long.read(b)
+
+        max_id = Int.read(b)
+
+        still_unread_count = Int.read(b)
+
+        pts = Int.read(b)
+
+        return UpdateReadChannelInbox(channel_id=channel_id, max_id=max_id, still_unread_count=still_unread_count, pts=pts, folder_id=folder_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.folder_id is not None else 0
+        b.write(Int(flags))
+
+        if self.folder_id is not None:
+            b.write(Int(self.folder_id))
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.max_id))
+
+        b.write(Int(self.still_unread_count))
+
+        b.write(Int(self.pts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_channel_outbox.py b/pyrogram/raw/types/update_read_channel_outbox.py
new file mode 100644
index 00000000..d8740535
--- /dev/null
+++ b/pyrogram/raw/types/update_read_channel_outbox.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadChannelOutbox(TLObject):  # type: ignore
+    """Outgoing messages in a channel/supergroup were read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B75F99A9``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            Channel/supergroup ID
+
+        max_id (``int`` ``32-bit``):
+            Position up to which all outgoing messages are read.
+
+    """
+
+    __slots__: List[str] = ["channel_id", "max_id"]
+
+    ID = 0xb75f99a9
+    QUALNAME = "types.UpdateReadChannelOutbox"
+
+    def __init__(self, *, channel_id: int, max_id: int) -> None:
+        self.channel_id = channel_id  # long
+        self.max_id = max_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadChannelOutbox":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        max_id = Int.read(b)
+
+        return UpdateReadChannelOutbox(channel_id=channel_id, max_id=max_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(Int(self.max_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_featured_emoji_stickers.py b/pyrogram/raw/types/update_read_featured_emoji_stickers.py
new file mode 100644
index 00000000..5e79b557
--- /dev/null
+++ b/pyrogram/raw/types/update_read_featured_emoji_stickers.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadFeaturedEmojiStickers(TLObject):  # type: ignore
+    """Some featured custom emoji stickers were marked as read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``FB4C496C``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xfb4c496c
+    QUALNAME = "types.UpdateReadFeaturedEmojiStickers"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadFeaturedEmojiStickers":
+        # No flags
+
+        return UpdateReadFeaturedEmojiStickers()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_featured_stickers.py b/pyrogram/raw/types/update_read_featured_stickers.py
new file mode 100644
index 00000000..6db1d82c
--- /dev/null
+++ b/pyrogram/raw/types/update_read_featured_stickers.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadFeaturedStickers(TLObject):  # type: ignore
+    """Some featured stickers were marked as read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``571D2742``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x571d2742
+    QUALNAME = "types.UpdateReadFeaturedStickers"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadFeaturedStickers":
+        # No flags
+
+        return UpdateReadFeaturedStickers()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_history_inbox.py b/pyrogram/raw/types/update_read_history_inbox.py
new file mode 100644
index 00000000..52dab43d
--- /dev/null
+++ b/pyrogram/raw/types/update_read_history_inbox.py
@@ -0,0 +1,106 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadHistoryInbox(TLObject):  # type: ignore
+    """Incoming messages were read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9E84BC99``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        max_id (``int`` ``32-bit``):
+            Maximum ID of messages read
+
+        still_unread_count (``int`` ``32-bit``):
+            Number of messages that are still unread
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+        folder_id (``int`` ``32-bit``, *optional*):
+            Peer folder ID, for more info click here
+
+        top_msg_id (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "max_id", "still_unread_count", "pts", "pts_count", "folder_id", "top_msg_id"]
+
+    ID = 0x9e84bc99
+    QUALNAME = "types.UpdateReadHistoryInbox"
+
+    def __init__(self, *, peer: "raw.base.Peer", max_id: int, still_unread_count: int, pts: int, pts_count: int, folder_id: Optional[int] = None, top_msg_id: Optional[int] = None) -> None:
+        self.peer = peer  # Peer
+        self.max_id = max_id  # int
+        self.still_unread_count = still_unread_count  # int
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.folder_id = folder_id  # flags.0?int
+        self.top_msg_id = top_msg_id  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadHistoryInbox":
+
+        flags = Int.read(b)
+
+        folder_id = Int.read(b) if flags & (1 << 0) else None
+        peer = TLObject.read(b)
+
+        top_msg_id = Int.read(b) if flags & (1 << 1) else None
+        max_id = Int.read(b)
+
+        still_unread_count = Int.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateReadHistoryInbox(peer=peer, max_id=max_id, still_unread_count=still_unread_count, pts=pts, pts_count=pts_count, folder_id=folder_id, top_msg_id=top_msg_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.folder_id is not None else 0
+        flags |= (1 << 1) if self.top_msg_id is not None else 0
+        b.write(Int(flags))
+
+        if self.folder_id is not None:
+            b.write(Int(self.folder_id))
+
+        b.write(self.peer.write())
+
+        if self.top_msg_id is not None:
+            b.write(Int(self.top_msg_id))
+
+        b.write(Int(self.max_id))
+
+        b.write(Int(self.still_unread_count))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_history_outbox.py b/pyrogram/raw/types/update_read_history_outbox.py
new file mode 100644
index 00000000..f37041bb
--- /dev/null
+++ b/pyrogram/raw/types/update_read_history_outbox.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadHistoryOutbox(TLObject):  # type: ignore
+    """Outgoing messages were read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2F2F21BF``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer
+
+        max_id (``int`` ``32-bit``):
+            Maximum ID of read outgoing messages
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["peer", "max_id", "pts", "pts_count"]
+
+    ID = 0x2f2f21bf
+    QUALNAME = "types.UpdateReadHistoryOutbox"
+
+    def __init__(self, *, peer: "raw.base.Peer", max_id: int, pts: int, pts_count: int) -> None:
+        self.peer = peer  # Peer
+        self.max_id = max_id  # int
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadHistoryOutbox":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        max_id = Int.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateReadHistoryOutbox(peer=peer, max_id=max_id, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.max_id))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_messages_contents.py b/pyrogram/raw/types/update_read_messages_contents.py
new file mode 100644
index 00000000..84e22a85
--- /dev/null
+++ b/pyrogram/raw/types/update_read_messages_contents.py
@@ -0,0 +1,81 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadMessagesContents(TLObject):  # type: ignore
+    """Contents of messages in the common message box were read
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F8227181``
+
+    Parameters:
+        messages (List of ``int`` ``32-bit``):
+            IDs of read messages
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+        date (``int`` ``32-bit``, *optional*):
+            When was the last message in messages marked as read.
+
+    """
+
+    __slots__: List[str] = ["messages", "pts", "pts_count", "date"]
+
+    ID = 0xf8227181
+    QUALNAME = "types.UpdateReadMessagesContents"
+
+    def __init__(self, *, messages: List[int], pts: int, pts_count: int, date: Optional[int] = None) -> None:
+        self.messages = messages  # Vector
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.date = date  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadMessagesContents":
+
+        flags = Int.read(b)
+
+        messages = TLObject.read(b, Int)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        date = Int.read(b) if flags & (1 << 0) else None
+        return UpdateReadMessagesContents(messages=messages, pts=pts, pts_count=pts_count, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.date is not None else 0
+        b.write(Int(flags))
+
+        b.write(Vector(self.messages, Int))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        if self.date is not None:
+            b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_mono_forum_inbox.py b/pyrogram/raw/types/update_read_mono_forum_inbox.py
new file mode 100644
index 00000000..385c79f6
--- /dev/null
+++ b/pyrogram/raw/types/update_read_mono_forum_inbox.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadMonoForumInbox(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``77B0E372``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            N/A
+
+        saved_peer_id (:obj:`Peer `):
+            N/A
+
+        read_max_id (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["channel_id", "saved_peer_id", "read_max_id"]
+
+    ID = 0x77b0e372
+    QUALNAME = "types.UpdateReadMonoForumInbox"
+
+    def __init__(self, *, channel_id: int, saved_peer_id: "raw.base.Peer", read_max_id: int) -> None:
+        self.channel_id = channel_id  # long
+        self.saved_peer_id = saved_peer_id  # Peer
+        self.read_max_id = read_max_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadMonoForumInbox":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        saved_peer_id = TLObject.read(b)
+
+        read_max_id = Int.read(b)
+
+        return UpdateReadMonoForumInbox(channel_id=channel_id, saved_peer_id=saved_peer_id, read_max_id=read_max_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(self.saved_peer_id.write())
+
+        b.write(Int(self.read_max_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_mono_forum_outbox.py b/pyrogram/raw/types/update_read_mono_forum_outbox.py
new file mode 100644
index 00000000..d1719d3d
--- /dev/null
+++ b/pyrogram/raw/types/update_read_mono_forum_outbox.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadMonoForumOutbox(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A4A79376``
+
+    Parameters:
+        channel_id (``int`` ``64-bit``):
+            N/A
+
+        saved_peer_id (:obj:`Peer `):
+            N/A
+
+        read_max_id (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["channel_id", "saved_peer_id", "read_max_id"]
+
+    ID = 0xa4a79376
+    QUALNAME = "types.UpdateReadMonoForumOutbox"
+
+    def __init__(self, *, channel_id: int, saved_peer_id: "raw.base.Peer", read_max_id: int) -> None:
+        self.channel_id = channel_id  # long
+        self.saved_peer_id = saved_peer_id  # Peer
+        self.read_max_id = read_max_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadMonoForumOutbox":
+        # No flags
+
+        channel_id = Long.read(b)
+
+        saved_peer_id = TLObject.read(b)
+
+        read_max_id = Int.read(b)
+
+        return UpdateReadMonoForumOutbox(channel_id=channel_id, saved_peer_id=saved_peer_id, read_max_id=read_max_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.channel_id))
+
+        b.write(self.saved_peer_id.write())
+
+        b.write(Int(self.read_max_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_read_stories.py b/pyrogram/raw/types/update_read_stories.py
new file mode 100644
index 00000000..d249ac76
--- /dev/null
+++ b/pyrogram/raw/types/update_read_stories.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateReadStories(TLObject):  # type: ignore
+    """Stories of a specific peer were marked as read.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F74E932B``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The peer
+
+        max_id (``int`` ``32-bit``):
+            ID of the last story that was marked as read
+
+    """
+
+    __slots__: List[str] = ["peer", "max_id"]
+
+    ID = 0xf74e932b
+    QUALNAME = "types.UpdateReadStories"
+
+    def __init__(self, *, peer: "raw.base.Peer", max_id: int) -> None:
+        self.peer = peer  # Peer
+        self.max_id = max_id  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateReadStories":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        max_id = Int.read(b)
+
+        return UpdateReadStories(peer=peer, max_id=max_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.max_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_recent_emoji_statuses.py b/pyrogram/raw/types/update_recent_emoji_statuses.py
new file mode 100644
index 00000000..0c36cb52
--- /dev/null
+++ b/pyrogram/raw/types/update_recent_emoji_statuses.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateRecentEmojiStatuses(TLObject):  # type: ignore
+    """The list of recent emoji statuses has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``30F443DB``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x30f443db
+    QUALNAME = "types.UpdateRecentEmojiStatuses"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateRecentEmojiStatuses":
+        # No flags
+
+        return UpdateRecentEmojiStatuses()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_recent_reactions.py b/pyrogram/raw/types/update_recent_reactions.py
new file mode 100644
index 00000000..033c6891
--- /dev/null
+++ b/pyrogram/raw/types/update_recent_reactions.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateRecentReactions(TLObject):  # type: ignore
+    """The list of recent message reactions has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``6F7863F4``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x6f7863f4
+    QUALNAME = "types.UpdateRecentReactions"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateRecentReactions":
+        # No flags
+
+        return UpdateRecentReactions()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_recent_stickers.py b/pyrogram/raw/types/update_recent_stickers.py
new file mode 100644
index 00000000..c93d8046
--- /dev/null
+++ b/pyrogram/raw/types/update_recent_stickers.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateRecentStickers(TLObject):  # type: ignore
+    """The recent sticker list was updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9A422C20``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x9a422c20
+    QUALNAME = "types.UpdateRecentStickers"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateRecentStickers":
+        # No flags
+
+        return UpdateRecentStickers()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_saved_dialog_pinned.py b/pyrogram/raw/types/update_saved_dialog_pinned.py
new file mode 100644
index 00000000..dec447b2
--- /dev/null
+++ b/pyrogram/raw/types/update_saved_dialog_pinned.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSavedDialogPinned(TLObject):  # type: ignore
+    """A saved message dialog was pinned/unpinned
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AEAF9E74``
+
+    Parameters:
+        peer (:obj:`DialogPeer `):
+            The dialog
+
+        pinned (``bool``, *optional*):
+            Whether the dialog was pinned
+
+    """
+
+    __slots__: List[str] = ["peer", "pinned"]
+
+    ID = 0xaeaf9e74
+    QUALNAME = "types.UpdateSavedDialogPinned"
+
+    def __init__(self, *, peer: "raw.base.DialogPeer", pinned: Optional[bool] = None) -> None:
+        self.peer = peer  # DialogPeer
+        self.pinned = pinned  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSavedDialogPinned":
+
+        flags = Int.read(b)
+
+        pinned = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        return UpdateSavedDialogPinned(peer=peer, pinned=pinned)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pinned else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_saved_gifs.py b/pyrogram/raw/types/update_saved_gifs.py
new file mode 100644
index 00000000..b55729b0
--- /dev/null
+++ b/pyrogram/raw/types/update_saved_gifs.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSavedGifs(TLObject):  # type: ignore
+    """The saved gif list has changed, the client should refetch it using messages.getSavedGifs
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9375341E``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x9375341e
+    QUALNAME = "types.UpdateSavedGifs"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSavedGifs":
+        # No flags
+
+        return UpdateSavedGifs()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_saved_reaction_tags.py b/pyrogram/raw/types/update_saved_reaction_tags.py
new file mode 100644
index 00000000..64b83c6c
--- /dev/null
+++ b/pyrogram/raw/types/update_saved_reaction_tags.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSavedReactionTags(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``39C67432``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x39c67432
+    QUALNAME = "types.UpdateSavedReactionTags"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSavedReactionTags":
+        # No flags
+
+        return UpdateSavedReactionTags()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_saved_ringtones.py b/pyrogram/raw/types/update_saved_ringtones.py
new file mode 100644
index 00000000..5411b1bf
--- /dev/null
+++ b/pyrogram/raw/types/update_saved_ringtones.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSavedRingtones(TLObject):  # type: ignore
+    """The list of saved notification sounds has changed, use account.getSavedRingtones to fetch the new list.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``74D8BE99``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x74d8be99
+    QUALNAME = "types.UpdateSavedRingtones"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSavedRingtones":
+        # No flags
+
+        return UpdateSavedRingtones()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_sent_phone_code.py b/pyrogram/raw/types/update_sent_phone_code.py
new file mode 100644
index 00000000..779b53de
--- /dev/null
+++ b/pyrogram/raw/types/update_sent_phone_code.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSentPhoneCode(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``504AA18F``
+
+    Parameters:
+        sent_code (:obj:`auth.SentCode `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["sent_code"]
+
+    ID = 0x504aa18f
+    QUALNAME = "types.UpdateSentPhoneCode"
+
+    def __init__(self, *, sent_code: "raw.base.auth.SentCode") -> None:
+        self.sent_code = sent_code  # auth.SentCode
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSentPhoneCode":
+        # No flags
+
+        sent_code = TLObject.read(b)
+
+        return UpdateSentPhoneCode(sent_code=sent_code)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.sent_code.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_sent_story_reaction.py b/pyrogram/raw/types/update_sent_story_reaction.py
new file mode 100644
index 00000000..a45def59
--- /dev/null
+++ b/pyrogram/raw/types/update_sent_story_reaction.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSentStoryReaction(TLObject):  # type: ignore
+    """Indicates we reacted to a story ».
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7D627683``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            The peer that sent the story
+
+        story_id (``int`` ``32-bit``):
+            ID of the story we reacted to
+
+        reaction (:obj:`Reaction `):
+            The reaction that was sent
+
+    """
+
+    __slots__: List[str] = ["peer", "story_id", "reaction"]
+
+    ID = 0x7d627683
+    QUALNAME = "types.UpdateSentStoryReaction"
+
+    def __init__(self, *, peer: "raw.base.Peer", story_id: int, reaction: "raw.base.Reaction") -> None:
+        self.peer = peer  # Peer
+        self.story_id = story_id  # int
+        self.reaction = reaction  # Reaction
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSentStoryReaction":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        story_id = Int.read(b)
+
+        reaction = TLObject.read(b)
+
+        return UpdateSentStoryReaction(peer=peer, story_id=story_id, reaction=reaction)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.story_id))
+
+        b.write(self.reaction.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_service_notification.py b/pyrogram/raw/types/update_service_notification.py
new file mode 100644
index 00000000..4c3898aa
--- /dev/null
+++ b/pyrogram/raw/types/update_service_notification.py
@@ -0,0 +1,101 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateServiceNotification(TLObject):  # type: ignore
+    """A service message for the user.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EBE46819``
+
+    Parameters:
+        type (``str``):
+            String, identical in format and contents to the type field in API errors. Describes type of service message. It is acceptable to ignore repeated messages of the same type within a short period of time (15 minutes).
+
+        message (``str``):
+            Message text
+
+        media (:obj:`MessageMedia `):
+            Media content (optional)
+
+        entities (List of :obj:`MessageEntity `):
+            Message entities for styled text
+
+        popup (``bool``, *optional*):
+            If set, the message must be displayed in a popup.
+
+        invert_media (``bool``, *optional*):
+            If set, any eventual webpage preview will be shown on top of the message instead of at the bottom.
+
+        inbox_date (``int`` ``32-bit``, *optional*):
+            When was the notification receivedThe message must also be stored locally as part of the message history with the user id 777000 (Telegram Notifications).
+
+    """
+
+    __slots__: List[str] = ["type", "message", "media", "entities", "popup", "invert_media", "inbox_date"]
+
+    ID = 0xebe46819
+    QUALNAME = "types.UpdateServiceNotification"
+
+    def __init__(self, *, type: str, message: str, media: "raw.base.MessageMedia", entities: List["raw.base.MessageEntity"], popup: Optional[bool] = None, invert_media: Optional[bool] = None, inbox_date: Optional[int] = None) -> None:
+        self.type = type  # string
+        self.message = message  # string
+        self.media = media  # MessageMedia
+        self.entities = entities  # Vector
+        self.popup = popup  # flags.0?true
+        self.invert_media = invert_media  # flags.2?true
+        self.inbox_date = inbox_date  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateServiceNotification":
+
+        flags = Int.read(b)
+
+        popup = True if flags & (1 << 0) else False
+        invert_media = True if flags & (1 << 2) else False
+        inbox_date = Int.read(b) if flags & (1 << 1) else None
+        type = String.read(b)
+
+        message = String.read(b)
+
+        media = TLObject.read(b)
+
+        entities = TLObject.read(b)
+
+        return UpdateServiceNotification(type=type, message=message, media=media, entities=entities, popup=popup, invert_media=invert_media, inbox_date=inbox_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.popup else 0
+        flags |= (1 << 2) if self.invert_media else 0
+        flags |= (1 << 1) if self.inbox_date is not None else 0
+        b.write(Int(flags))
+
+        if self.inbox_date is not None:
+            b.write(Int(self.inbox_date))
+
+        b.write(String(self.type))
+
+        b.write(String(self.message))
+
+        b.write(self.media.write())
+
+        b.write(Vector(self.entities))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_short.py b/pyrogram/raw/types/update_short.py
new file mode 100644
index 00000000..e75d7786
--- /dev/null
+++ b/pyrogram/raw/types/update_short.py
@@ -0,0 +1,200 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateShort(TLObject):  # type: ignore
+    """Shortened constructor containing info on one update not requiring auxiliary data
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``78D4DEC1``
+
+    Parameters:
+        update (:obj:`Update `):
+            Update
+
+        date (``int`` ``32-bit``):
+            Date of event
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = ["update", "date"]
+
+    ID = 0x78d4dec1
+    QUALNAME = "types.UpdateShort"
+
+    def __init__(self, *, update: "raw.base.Update", date: int) -> None:
+        self.update = update  # Update
+        self.date = date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateShort":
+        # No flags
+
+        update = TLObject.read(b)
+
+        date = Int.read(b)
+
+        return UpdateShort(update=update, date=date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.update.write())
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_short_chat_message.py b/pyrogram/raw/types/update_short_chat_message.py
new file mode 100644
index 00000000..a82cfbf5
--- /dev/null
+++ b/pyrogram/raw/types/update_short_chat_message.py
@@ -0,0 +1,314 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateShortChatMessage(TLObject):  # type: ignore
+    """Shortened constructor containing info on one new incoming text message from a chat
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4D6DEEA5``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            ID of the message
+
+        from_id (``int`` ``64-bit``):
+            ID of the sender of the message
+
+        chat_id (``int`` ``64-bit``):
+            ID of the chat where the message was sent
+
+        message (``str``):
+            Message
+
+        pts (``int`` ``32-bit``):
+            PTS
+
+        pts_count (``int`` ``32-bit``):
+            PTS count
+
+        date (``int`` ``32-bit``):
+            date
+
+        out (``bool``, *optional*):
+            Whether the message is outgoing
+
+        mentioned (``bool``, *optional*):
+            Whether we were mentioned in this message
+
+        media_unread (``bool``, *optional*):
+            Whether the message contains some unread mentions
+
+        silent (``bool``, *optional*):
+            If true, the message is a silent message, no notifications should be triggered
+
+        fwd_from (:obj:`MessageFwdHeader `, *optional*):
+            Info about a forwarded message
+
+        via_bot_id (``int`` ``64-bit``, *optional*):
+            Info about the inline bot used to generate this message
+
+        reply_to (:obj:`MessageReplyHeader `, *optional*):
+            Reply (thread) information
+
+        entities (List of :obj:`MessageEntity `, *optional*):
+            Entities for styled text
+
+        ttl_period (``int`` ``32-bit``, *optional*):
+            Time To Live of the message, once updateShortChatMessage.date+updateShortChatMessage.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = ["id", "from_id", "chat_id", "message", "pts", "pts_count", "date", "out", "mentioned", "media_unread", "silent", "fwd_from", "via_bot_id", "reply_to", "entities", "ttl_period"]
+
+    ID = 0x4d6deea5
+    QUALNAME = "types.UpdateShortChatMessage"
+
+    def __init__(self, *, id: int, from_id: int, chat_id: int, message: str, pts: int, pts_count: int, date: int, out: Optional[bool] = None, mentioned: Optional[bool] = None, media_unread: Optional[bool] = None, silent: Optional[bool] = None, fwd_from: "raw.base.MessageFwdHeader" = None, via_bot_id: Optional[int] = None, reply_to: "raw.base.MessageReplyHeader" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, ttl_period: Optional[int] = None) -> None:
+        self.id = id  # int
+        self.from_id = from_id  # long
+        self.chat_id = chat_id  # long
+        self.message = message  # string
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.date = date  # int
+        self.out = out  # flags.1?true
+        self.mentioned = mentioned  # flags.4?true
+        self.media_unread = media_unread  # flags.5?true
+        self.silent = silent  # flags.13?true
+        self.fwd_from = fwd_from  # flags.2?MessageFwdHeader
+        self.via_bot_id = via_bot_id  # flags.11?long
+        self.reply_to = reply_to  # flags.3?MessageReplyHeader
+        self.entities = entities  # flags.7?Vector
+        self.ttl_period = ttl_period  # flags.25?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateShortChatMessage":
+
+        flags = Int.read(b)
+
+        out = True if flags & (1 << 1) else False
+        mentioned = True if flags & (1 << 4) else False
+        media_unread = True if flags & (1 << 5) else False
+        silent = True if flags & (1 << 13) else False
+        id = Int.read(b)
+
+        from_id = Long.read(b)
+
+        chat_id = Long.read(b)
+
+        message = String.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        date = Int.read(b)
+
+        fwd_from = TLObject.read(b) if flags & (1 << 2) else None
+
+        via_bot_id = Long.read(b) if flags & (1 << 11) else None
+        reply_to = TLObject.read(b) if flags & (1 << 3) else None
+
+        entities = TLObject.read(b) if flags & (1 << 7) else []
+
+        ttl_period = Int.read(b) if flags & (1 << 25) else None
+        return UpdateShortChatMessage(id=id, from_id=from_id, chat_id=chat_id, message=message, pts=pts, pts_count=pts_count, date=date, out=out, mentioned=mentioned, media_unread=media_unread, silent=silent, fwd_from=fwd_from, via_bot_id=via_bot_id, reply_to=reply_to, entities=entities, ttl_period=ttl_period)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.out else 0
+        flags |= (1 << 4) if self.mentioned else 0
+        flags |= (1 << 5) if self.media_unread else 0
+        flags |= (1 << 13) if self.silent else 0
+        flags |= (1 << 2) if self.fwd_from is not None else 0
+        flags |= (1 << 11) if self.via_bot_id is not None else 0
+        flags |= (1 << 3) if self.reply_to is not None else 0
+        flags |= (1 << 7) if self.entities else 0
+        flags |= (1 << 25) if self.ttl_period is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.id))
+
+        b.write(Long(self.from_id))
+
+        b.write(Long(self.chat_id))
+
+        b.write(String(self.message))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        b.write(Int(self.date))
+
+        if self.fwd_from is not None:
+            b.write(self.fwd_from.write())
+
+        if self.via_bot_id is not None:
+            b.write(Long(self.via_bot_id))
+
+        if self.reply_to is not None:
+            b.write(self.reply_to.write())
+
+        if self.entities is not None:
+            b.write(Vector(self.entities))
+
+        if self.ttl_period is not None:
+            b.write(Int(self.ttl_period))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_short_message.py b/pyrogram/raw/types/update_short_message.py
new file mode 100644
index 00000000..7221fe27
--- /dev/null
+++ b/pyrogram/raw/types/update_short_message.py
@@ -0,0 +1,306 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateShortMessage(TLObject):  # type: ignore
+    """Info about a message sent to (received from) another user
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``313BC7F8``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            The message ID
+
+        user_id (``int`` ``64-bit``):
+            The ID of the sender (if outgoing will be the ID of the destination) of the message
+
+        message (``str``):
+            The message
+
+        pts (``int`` ``32-bit``):
+            PTS
+
+        pts_count (``int`` ``32-bit``):
+            PTS count
+
+        date (``int`` ``32-bit``):
+            date
+
+        out (``bool``, *optional*):
+            Whether the message is outgoing
+
+        mentioned (``bool``, *optional*):
+            Whether we were mentioned in the message
+
+        media_unread (``bool``, *optional*):
+            Whether there are some unread mentions in this message
+
+        silent (``bool``, *optional*):
+            If true, the message is a silent message, no notifications should be triggered
+
+        fwd_from (:obj:`MessageFwdHeader `, *optional*):
+            Info about a forwarded message
+
+        via_bot_id (``int`` ``64-bit``, *optional*):
+            Info about the inline bot used to generate this message
+
+        reply_to (:obj:`MessageReplyHeader `, *optional*):
+            Reply and thread information
+
+        entities (List of :obj:`MessageEntity `, *optional*):
+            Entities for styled text
+
+        ttl_period (``int`` ``32-bit``, *optional*):
+            Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = ["id", "user_id", "message", "pts", "pts_count", "date", "out", "mentioned", "media_unread", "silent", "fwd_from", "via_bot_id", "reply_to", "entities", "ttl_period"]
+
+    ID = 0x313bc7f8
+    QUALNAME = "types.UpdateShortMessage"
+
+    def __init__(self, *, id: int, user_id: int, message: str, pts: int, pts_count: int, date: int, out: Optional[bool] = None, mentioned: Optional[bool] = None, media_unread: Optional[bool] = None, silent: Optional[bool] = None, fwd_from: "raw.base.MessageFwdHeader" = None, via_bot_id: Optional[int] = None, reply_to: "raw.base.MessageReplyHeader" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, ttl_period: Optional[int] = None) -> None:
+        self.id = id  # int
+        self.user_id = user_id  # long
+        self.message = message  # string
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.date = date  # int
+        self.out = out  # flags.1?true
+        self.mentioned = mentioned  # flags.4?true
+        self.media_unread = media_unread  # flags.5?true
+        self.silent = silent  # flags.13?true
+        self.fwd_from = fwd_from  # flags.2?MessageFwdHeader
+        self.via_bot_id = via_bot_id  # flags.11?long
+        self.reply_to = reply_to  # flags.3?MessageReplyHeader
+        self.entities = entities  # flags.7?Vector
+        self.ttl_period = ttl_period  # flags.25?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateShortMessage":
+
+        flags = Int.read(b)
+
+        out = True if flags & (1 << 1) else False
+        mentioned = True if flags & (1 << 4) else False
+        media_unread = True if flags & (1 << 5) else False
+        silent = True if flags & (1 << 13) else False
+        id = Int.read(b)
+
+        user_id = Long.read(b)
+
+        message = String.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        date = Int.read(b)
+
+        fwd_from = TLObject.read(b) if flags & (1 << 2) else None
+
+        via_bot_id = Long.read(b) if flags & (1 << 11) else None
+        reply_to = TLObject.read(b) if flags & (1 << 3) else None
+
+        entities = TLObject.read(b) if flags & (1 << 7) else []
+
+        ttl_period = Int.read(b) if flags & (1 << 25) else None
+        return UpdateShortMessage(id=id, user_id=user_id, message=message, pts=pts, pts_count=pts_count, date=date, out=out, mentioned=mentioned, media_unread=media_unread, silent=silent, fwd_from=fwd_from, via_bot_id=via_bot_id, reply_to=reply_to, entities=entities, ttl_period=ttl_period)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.out else 0
+        flags |= (1 << 4) if self.mentioned else 0
+        flags |= (1 << 5) if self.media_unread else 0
+        flags |= (1 << 13) if self.silent else 0
+        flags |= (1 << 2) if self.fwd_from is not None else 0
+        flags |= (1 << 11) if self.via_bot_id is not None else 0
+        flags |= (1 << 3) if self.reply_to is not None else 0
+        flags |= (1 << 7) if self.entities else 0
+        flags |= (1 << 25) if self.ttl_period is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.id))
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.message))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        b.write(Int(self.date))
+
+        if self.fwd_from is not None:
+            b.write(self.fwd_from.write())
+
+        if self.via_bot_id is not None:
+            b.write(Long(self.via_bot_id))
+
+        if self.reply_to is not None:
+            b.write(self.reply_to.write())
+
+        if self.entities is not None:
+            b.write(Vector(self.entities))
+
+        if self.ttl_period is not None:
+            b.write(Int(self.ttl_period))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_short_sent_message.py b/pyrogram/raw/types/update_short_sent_message.py
new file mode 100644
index 00000000..b60cdb77
--- /dev/null
+++ b/pyrogram/raw/types/update_short_sent_message.py
@@ -0,0 +1,253 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateShortSentMessage(TLObject):  # type: ignore
+    """Shortened constructor containing info on one outgoing message to a contact (the destination chat has to be extracted from the method call that returned this object).
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9015E101``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            ID of the sent message
+
+        pts (``int`` ``32-bit``):
+            PTS
+
+        pts_count (``int`` ``32-bit``):
+            PTS count
+
+        date (``int`` ``32-bit``):
+            date
+
+        out (``bool``, *optional*):
+            Whether the message is outgoing
+
+        media (:obj:`MessageMedia `, *optional*):
+            Attached media
+
+        entities (List of :obj:`MessageEntity `, *optional*):
+            Entities for styled text
+
+        ttl_period (``int`` ``32-bit``, *optional*):
+            Time To Live of the message, once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well.
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = ["id", "pts", "pts_count", "date", "out", "media", "entities", "ttl_period"]
+
+    ID = 0x9015e101
+    QUALNAME = "types.UpdateShortSentMessage"
+
+    def __init__(self, *, id: int, pts: int, pts_count: int, date: int, out: Optional[bool] = None, media: "raw.base.MessageMedia" = None, entities: Optional[List["raw.base.MessageEntity"]] = None, ttl_period: Optional[int] = None) -> None:
+        self.id = id  # int
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+        self.date = date  # int
+        self.out = out  # flags.1?true
+        self.media = media  # flags.9?MessageMedia
+        self.entities = entities  # flags.7?Vector
+        self.ttl_period = ttl_period  # flags.25?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateShortSentMessage":
+
+        flags = Int.read(b)
+
+        out = True if flags & (1 << 1) else False
+        id = Int.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        date = Int.read(b)
+
+        media = TLObject.read(b) if flags & (1 << 9) else None
+
+        entities = TLObject.read(b) if flags & (1 << 7) else []
+
+        ttl_period = Int.read(b) if flags & (1 << 25) else None
+        return UpdateShortSentMessage(id=id, pts=pts, pts_count=pts_count, date=date, out=out, media=media, entities=entities, ttl_period=ttl_period)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.out else 0
+        flags |= (1 << 9) if self.media is not None else 0
+        flags |= (1 << 7) if self.entities else 0
+        flags |= (1 << 25) if self.ttl_period is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.id))
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        b.write(Int(self.date))
+
+        if self.media is not None:
+            b.write(self.media.write())
+
+        if self.entities is not None:
+            b.write(Vector(self.entities))
+
+        if self.ttl_period is not None:
+            b.write(Int(self.ttl_period))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_sms_job.py b/pyrogram/raw/types/update_sms_job.py
new file mode 100644
index 00000000..7a0974d5
--- /dev/null
+++ b/pyrogram/raw/types/update_sms_job.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateSmsJob(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F16269D4``
+
+    Parameters:
+        job_id (``str``):
+
+
+    """
+
+    __slots__: List[str] = ["job_id"]
+
+    ID = 0xf16269d4
+    QUALNAME = "types.UpdateSmsJob"
+
+    def __init__(self, *, job_id: str) -> None:
+        self.job_id = job_id  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateSmsJob":
+        # No flags
+
+        job_id = String.read(b)
+
+        return UpdateSmsJob(job_id=job_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.job_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_star_gift_auction_state.py b/pyrogram/raw/types/update_star_gift_auction_state.py
new file mode 100644
index 00000000..f278dee7
--- /dev/null
+++ b/pyrogram/raw/types/update_star_gift_auction_state.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStarGiftAuctionState(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``48E246C2``
+
+    Parameters:
+        gift_id (``int`` ``64-bit``):
+            N/A
+
+        state (:obj:`StarGiftAuctionState `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["gift_id", "state"]
+
+    ID = 0x48e246c2
+    QUALNAME = "types.UpdateStarGiftAuctionState"
+
+    def __init__(self, *, gift_id: int, state: "raw.base.StarGiftAuctionState") -> None:
+        self.gift_id = gift_id  # long
+        self.state = state  # StarGiftAuctionState
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStarGiftAuctionState":
+        # No flags
+
+        gift_id = Long.read(b)
+
+        state = TLObject.read(b)
+
+        return UpdateStarGiftAuctionState(gift_id=gift_id, state=state)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.gift_id))
+
+        b.write(self.state.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_star_gift_auction_user_state.py b/pyrogram/raw/types/update_star_gift_auction_user_state.py
new file mode 100644
index 00000000..f964661c
--- /dev/null
+++ b/pyrogram/raw/types/update_star_gift_auction_user_state.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStarGiftAuctionUserState(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DC58F31E``
+
+    Parameters:
+        gift_id (``int`` ``64-bit``):
+            N/A
+
+        user_state (:obj:`StarGiftAuctionUserState `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["gift_id", "user_state"]
+
+    ID = 0xdc58f31e
+    QUALNAME = "types.UpdateStarGiftAuctionUserState"
+
+    def __init__(self, *, gift_id: int, user_state: "raw.base.StarGiftAuctionUserState") -> None:
+        self.gift_id = gift_id  # long
+        self.user_state = user_state  # StarGiftAuctionUserState
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStarGiftAuctionUserState":
+        # No flags
+
+        gift_id = Long.read(b)
+
+        user_state = TLObject.read(b)
+
+        return UpdateStarGiftAuctionUserState(gift_id=gift_id, user_state=user_state)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.gift_id))
+
+        b.write(self.user_state.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_star_gift_craft_fail.py b/pyrogram/raw/types/update_star_gift_craft_fail.py
new file mode 100644
index 00000000..2d8bc971
--- /dev/null
+++ b/pyrogram/raw/types/update_star_gift_craft_fail.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStarGiftCraftFail(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``AC072444``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xac072444
+    QUALNAME = "types.UpdateStarGiftCraftFail"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStarGiftCraftFail":
+        # No flags
+
+        return UpdateStarGiftCraftFail()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_stars_balance.py b/pyrogram/raw/types/update_stars_balance.py
new file mode 100644
index 00000000..c2476704
--- /dev/null
+++ b/pyrogram/raw/types/update_stars_balance.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStarsBalance(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4E80A379``
+
+    Parameters:
+        balance (:obj:`StarsAmount `):
+
+
+    """
+
+    __slots__: List[str] = ["balance"]
+
+    ID = 0x4e80a379
+    QUALNAME = "types.UpdateStarsBalance"
+
+    def __init__(self, *, balance: "raw.base.StarsAmount") -> None:
+        self.balance = balance  # StarsAmount
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStarsBalance":
+        # No flags
+
+        balance = TLObject.read(b)
+
+        return UpdateStarsBalance(balance=balance)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.balance.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_stars_revenue_status.py b/pyrogram/raw/types/update_stars_revenue_status.py
new file mode 100644
index 00000000..81a6da82
--- /dev/null
+++ b/pyrogram/raw/types/update_stars_revenue_status.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStarsRevenueStatus(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A584B019``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            N/A
+
+        status (:obj:`StarsRevenueStatus `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["peer", "status"]
+
+    ID = 0xa584b019
+    QUALNAME = "types.UpdateStarsRevenueStatus"
+
+    def __init__(self, *, peer: "raw.base.Peer", status: "raw.base.StarsRevenueStatus") -> None:
+        self.peer = peer  # Peer
+        self.status = status  # StarsRevenueStatus
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStarsRevenueStatus":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        status = TLObject.read(b)
+
+        return UpdateStarsRevenueStatus(peer=peer, status=status)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.status.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_sticker_sets.py b/pyrogram/raw/types/update_sticker_sets.py
new file mode 100644
index 00000000..1e5c058f
--- /dev/null
+++ b/pyrogram/raw/types/update_sticker_sets.py
@@ -0,0 +1,60 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStickerSets(TLObject):  # type: ignore
+    """Installed stickersets have changed, the client should refetch them as described in the docs.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``31C24808``
+
+    Parameters:
+        masks (``bool``, *optional*):
+            Whether mask stickersets have changed
+
+        emojis (``bool``, *optional*):
+            Whether the list of installed custom emoji stickersets has changed
+
+    """
+
+    __slots__: List[str] = ["masks", "emojis"]
+
+    ID = 0x31c24808
+    QUALNAME = "types.UpdateStickerSets"
+
+    def __init__(self, *, masks: Optional[bool] = None, emojis: Optional[bool] = None) -> None:
+        self.masks = masks  # flags.0?true
+        self.emojis = emojis  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStickerSets":
+
+        flags = Int.read(b)
+
+        masks = True if flags & (1 << 0) else False
+        emojis = True if flags & (1 << 1) else False
+        return UpdateStickerSets(masks=masks, emojis=emojis)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.masks else 0
+        flags |= (1 << 1) if self.emojis else 0
+        b.write(Int(flags))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_sticker_sets_order.py b/pyrogram/raw/types/update_sticker_sets_order.py
new file mode 100644
index 00000000..83ff1fc8
--- /dev/null
+++ b/pyrogram/raw/types/update_sticker_sets_order.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStickerSetsOrder(TLObject):  # type: ignore
+    """The order of stickersets was changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``BB2D201``
+
+    Parameters:
+        order (List of ``int`` ``64-bit``):
+            New sticker order by sticker ID
+
+        masks (``bool``, *optional*):
+            Whether the updated stickers are mask stickers
+
+        emojis (``bool``, *optional*):
+            Whether the updated stickers are custom emoji stickers
+
+    """
+
+    __slots__: List[str] = ["order", "masks", "emojis"]
+
+    ID = 0xbb2d201
+    QUALNAME = "types.UpdateStickerSetsOrder"
+
+    def __init__(self, *, order: List[int], masks: Optional[bool] = None, emojis: Optional[bool] = None) -> None:
+        self.order = order  # Vector
+        self.masks = masks  # flags.0?true
+        self.emojis = emojis  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStickerSetsOrder":
+
+        flags = Int.read(b)
+
+        masks = True if flags & (1 << 0) else False
+        emojis = True if flags & (1 << 1) else False
+        order = TLObject.read(b, Long)
+
+        return UpdateStickerSetsOrder(order=order, masks=masks, emojis=emojis)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.masks else 0
+        flags |= (1 << 1) if self.emojis else 0
+        b.write(Int(flags))
+
+        b.write(Vector(self.order, Long))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_stories_stealth_mode.py b/pyrogram/raw/types/update_stories_stealth_mode.py
new file mode 100644
index 00000000..d7a2a87e
--- /dev/null
+++ b/pyrogram/raw/types/update_stories_stealth_mode.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStoriesStealthMode(TLObject):  # type: ignore
+    """Indicates that stories stealth mode was activated.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2C084DC1``
+
+    Parameters:
+        stealth_mode (:obj:`StoriesStealthMode `):
+            Information about the current stealth mode session.
+
+    """
+
+    __slots__: List[str] = ["stealth_mode"]
+
+    ID = 0x2c084dc1
+    QUALNAME = "types.UpdateStoriesStealthMode"
+
+    def __init__(self, *, stealth_mode: "raw.base.StoriesStealthMode") -> None:
+        self.stealth_mode = stealth_mode  # StoriesStealthMode
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStoriesStealthMode":
+        # No flags
+
+        stealth_mode = TLObject.read(b)
+
+        return UpdateStoriesStealthMode(stealth_mode=stealth_mode)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.stealth_mode.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_story.py b/pyrogram/raw/types/update_story.py
new file mode 100644
index 00000000..7e376855
--- /dev/null
+++ b/pyrogram/raw/types/update_story.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStory(TLObject):  # type: ignore
+    """A new story was posted.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``75B3B798``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            ID of the poster.
+
+        story (:obj:`StoryItem `):
+            The story that was posted.
+
+    """
+
+    __slots__: List[str] = ["peer", "story"]
+
+    ID = 0x75b3b798
+    QUALNAME = "types.UpdateStory"
+
+    def __init__(self, *, peer: "raw.base.Peer", story: "raw.base.StoryItem") -> None:
+        self.peer = peer  # Peer
+        self.story = story  # StoryItem
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStory":
+        # No flags
+
+        peer = TLObject.read(b)
+
+        story = TLObject.read(b)
+
+        return UpdateStory(peer=peer, story=story)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.peer.write())
+
+        b.write(self.story.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_story_id.py b/pyrogram/raw/types/update_story_id.py
new file mode 100644
index 00000000..2a5388f6
--- /dev/null
+++ b/pyrogram/raw/types/update_story_id.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateStoryID(TLObject):  # type: ignore
+    """A story was successfully uploaded.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1BF335B9``
+
+    Parameters:
+        id (``int`` ``32-bit``):
+            The id that was attributed to the story.
+
+        random_id (``int`` ``64-bit``):
+            The random_id that was passed to stories.sendStory.
+
+    """
+
+    __slots__: List[str] = ["id", "random_id"]
+
+    ID = 0x1bf335b9
+    QUALNAME = "types.UpdateStoryID"
+
+    def __init__(self, *, id: int, random_id: int) -> None:
+        self.id = id  # int
+        self.random_id = random_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateStoryID":
+        # No flags
+
+        id = Int.read(b)
+
+        random_id = Long.read(b)
+
+        return UpdateStoryID(id=id, random_id=random_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.id))
+
+        b.write(Long(self.random_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_theme.py b/pyrogram/raw/types/update_theme.py
new file mode 100644
index 00000000..81c2d2f9
--- /dev/null
+++ b/pyrogram/raw/types/update_theme.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateTheme(TLObject):  # type: ignore
+    """A cloud theme was updated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8216FBA3``
+
+    Parameters:
+        theme (:obj:`Theme `):
+            Theme
+
+    """
+
+    __slots__: List[str] = ["theme"]
+
+    ID = 0x8216fba3
+    QUALNAME = "types.UpdateTheme"
+
+    def __init__(self, *, theme: "raw.base.Theme") -> None:
+        self.theme = theme  # Theme
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateTheme":
+        # No flags
+
+        theme = TLObject.read(b)
+
+        return UpdateTheme(theme=theme)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.theme.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_transcribe_audio.py b/pyrogram/raw/types/update_transcribe_audio.py
new file mode 100644
index 00000000..0bf7c17b
--- /dev/null
+++ b/pyrogram/raw/types/update_transcribe_audio.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateTranscribeAudio(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``88617090``
+
+    Parameters:
+        transcription_id (``int`` ``64-bit``):
+            N/A
+
+        text (``str``):
+            N/A
+
+        final (``bool``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["transcription_id", "text", "final"]
+
+    ID = 0x88617090
+    QUALNAME = "types.UpdateTranscribeAudio"
+
+    def __init__(self, *, transcription_id: int, text: str, final: Optional[bool] = None) -> None:
+        self.transcription_id = transcription_id  # long
+        self.text = text  # string
+        self.final = final  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateTranscribeAudio":
+
+        flags = Int.read(b)
+
+        final = True if flags & (1 << 0) else False
+        transcription_id = Long.read(b)
+
+        text = String.read(b)
+
+        return UpdateTranscribeAudio(transcription_id=transcription_id, text=text, final=final)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.final else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.transcription_id))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_transcribed_audio.py b/pyrogram/raw/types/update_transcribed_audio.py
new file mode 100644
index 00000000..279c99f6
--- /dev/null
+++ b/pyrogram/raw/types/update_transcribed_audio.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateTranscribedAudio(TLObject):  # type: ignore
+    """A pending voice message transcription » initiated with messages.transcribeAudio was updated.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``84CD5A``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer of the transcribed message
+
+        msg_id (``int`` ``32-bit``):
+            Transcribed message ID
+
+        transcription_id (``int`` ``64-bit``):
+            Transcription ID
+
+        text (``str``):
+            Transcribed text
+
+        pending (``bool``, *optional*):
+            Whether this transcription is still pending and further updateTranscribedAudio about it will be sent in the future.
+
+    """
+
+    __slots__: List[str] = ["peer", "msg_id", "transcription_id", "text", "pending"]
+
+    ID = 0x84cd5a
+    QUALNAME = "types.UpdateTranscribedAudio"
+
+    def __init__(self, *, peer: "raw.base.Peer", msg_id: int, transcription_id: int, text: str, pending: Optional[bool] = None) -> None:
+        self.peer = peer  # Peer
+        self.msg_id = msg_id  # int
+        self.transcription_id = transcription_id  # long
+        self.text = text  # string
+        self.pending = pending  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateTranscribedAudio":
+
+        flags = Int.read(b)
+
+        pending = True if flags & (1 << 0) else False
+        peer = TLObject.read(b)
+
+        msg_id = Int.read(b)
+
+        transcription_id = Long.read(b)
+
+        text = String.read(b)
+
+        return UpdateTranscribedAudio(peer=peer, msg_id=msg_id, transcription_id=transcription_id, text=text, pending=pending)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.pending else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.msg_id))
+
+        b.write(Long(self.transcription_id))
+
+        b.write(String(self.text))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_user.py b/pyrogram/raw/types/update_user.py
new file mode 100644
index 00000000..417df2b9
--- /dev/null
+++ b/pyrogram/raw/types/update_user.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateUser(TLObject):  # type: ignore
+    """User information was updated, it must be refetched using users.getFullUser.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``20529438``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+    """
+
+    __slots__: List[str] = ["user_id"]
+
+    ID = 0x20529438
+    QUALNAME = "types.UpdateUser"
+
+    def __init__(self, *, user_id: int) -> None:
+        self.user_id = user_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateUser":
+        # No flags
+
+        user_id = Long.read(b)
+
+        return UpdateUser(user_id=user_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_user_emoji_status.py b/pyrogram/raw/types/update_user_emoji_status.py
new file mode 100644
index 00000000..5a2c6202
--- /dev/null
+++ b/pyrogram/raw/types/update_user_emoji_status.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateUserEmojiStatus(TLObject):  # type: ignore
+    """The emoji status of a certain user has changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``28373599``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+        emoji_status (:obj:`EmojiStatus `):
+            New emoji status
+
+    """
+
+    __slots__: List[str] = ["user_id", "emoji_status"]
+
+    ID = 0x28373599
+    QUALNAME = "types.UpdateUserEmojiStatus"
+
+    def __init__(self, *, user_id: int, emoji_status: "raw.base.EmojiStatus") -> None:
+        self.user_id = user_id  # long
+        self.emoji_status = emoji_status  # EmojiStatus
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateUserEmojiStatus":
+        # No flags
+
+        user_id = Long.read(b)
+
+        emoji_status = TLObject.read(b)
+
+        return UpdateUserEmojiStatus(user_id=user_id, emoji_status=emoji_status)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(self.emoji_status.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_user_name.py b/pyrogram/raw/types/update_user_name.py
new file mode 100644
index 00000000..8f9a176c
--- /dev/null
+++ b/pyrogram/raw/types/update_user_name.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateUserName(TLObject):  # type: ignore
+    """Changes the user's first name, last name and username.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A7848924``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User identifier
+
+        first_name (``str``):
+            New first name. Corresponds to the new value of real_first_name field of the userFull constructor.
+
+        last_name (``str``):
+            New last name. Corresponds to the new value of real_last_name field of the userFull constructor.
+
+        usernames (List of :obj:`Username `):
+            Usernames.
+
+    """
+
+    __slots__: List[str] = ["user_id", "first_name", "last_name", "usernames"]
+
+    ID = 0xa7848924
+    QUALNAME = "types.UpdateUserName"
+
+    def __init__(self, *, user_id: int, first_name: str, last_name: str, usernames: List["raw.base.Username"]) -> None:
+        self.user_id = user_id  # long
+        self.first_name = first_name  # string
+        self.last_name = last_name  # string
+        self.usernames = usernames  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateUserName":
+        # No flags
+
+        user_id = Long.read(b)
+
+        first_name = String.read(b)
+
+        last_name = String.read(b)
+
+        usernames = TLObject.read(b)
+
+        return UpdateUserName(user_id=user_id, first_name=first_name, last_name=last_name, usernames=usernames)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.first_name))
+
+        b.write(String(self.last_name))
+
+        b.write(Vector(self.usernames))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_user_phone.py b/pyrogram/raw/types/update_user_phone.py
new file mode 100644
index 00000000..3b93edc9
--- /dev/null
+++ b/pyrogram/raw/types/update_user_phone.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateUserPhone(TLObject):  # type: ignore
+    """A user's phone number was changed
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5492A13``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User ID
+
+        phone (``str``):
+            New phone number
+
+    """
+
+    __slots__: List[str] = ["user_id", "phone"]
+
+    ID = 0x5492a13
+    QUALNAME = "types.UpdateUserPhone"
+
+    def __init__(self, *, user_id: int, phone: str) -> None:
+        self.user_id = user_id  # long
+        self.phone = phone  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateUserPhone":
+        # No flags
+
+        user_id = Long.read(b)
+
+        phone = String.read(b)
+
+        return UpdateUserPhone(user_id=user_id, phone=phone)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(String(self.phone))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_user_status.py b/pyrogram/raw/types/update_user_status.py
new file mode 100644
index 00000000..cabd32fb
--- /dev/null
+++ b/pyrogram/raw/types/update_user_status.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateUserStatus(TLObject):  # type: ignore
+    """Contact status update.
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E5BDF8DE``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User identifier
+
+        status (:obj:`UserStatus `):
+            New status
+
+    """
+
+    __slots__: List[str] = ["user_id", "status"]
+
+    ID = 0xe5bdf8de
+    QUALNAME = "types.UpdateUserStatus"
+
+    def __init__(self, *, user_id: int, status: "raw.base.UserStatus") -> None:
+        self.user_id = user_id  # long
+        self.status = status  # UserStatus
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateUserStatus":
+        # No flags
+
+        user_id = Long.read(b)
+
+        status = TLObject.read(b)
+
+        return UpdateUserStatus(user_id=user_id, status=status)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.user_id))
+
+        b.write(self.status.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_user_typing.py b/pyrogram/raw/types/update_user_typing.py
new file mode 100644
index 00000000..8f97cc26
--- /dev/null
+++ b/pyrogram/raw/types/update_user_typing.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateUserTyping(TLObject):  # type: ignore
+    """The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2A17BF5C``
+
+    Parameters:
+        user_id (``int`` ``64-bit``):
+            User id
+
+        action (:obj:`SendMessageAction `):
+            Action type
+
+        top_msg_id (``int`` ``32-bit``, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["user_id", "action", "top_msg_id"]
+
+    ID = 0x2a17bf5c
+    QUALNAME = "types.UpdateUserTyping"
+
+    def __init__(self, *, user_id: int, action: "raw.base.SendMessageAction", top_msg_id: Optional[int] = None) -> None:
+        self.user_id = user_id  # long
+        self.action = action  # SendMessageAction
+        self.top_msg_id = top_msg_id  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateUserTyping":
+
+        flags = Int.read(b)
+
+        user_id = Long.read(b)
+
+        top_msg_id = Int.read(b) if flags & (1 << 0) else None
+        action = TLObject.read(b)
+
+        return UpdateUserTyping(user_id=user_id, action=action, top_msg_id=top_msg_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.top_msg_id is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.user_id))
+
+        if self.top_msg_id is not None:
+            b.write(Int(self.top_msg_id))
+
+        b.write(self.action.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_web_page.py b/pyrogram/raw/types/update_web_page.py
new file mode 100644
index 00000000..f0c06cd6
--- /dev/null
+++ b/pyrogram/raw/types/update_web_page.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateWebPage(TLObject):  # type: ignore
+    """An instant view webpage preview was generated
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7F891213``
+
+    Parameters:
+        webpage (:obj:`WebPage `):
+            Webpage preview
+
+        pts (``int`` ``32-bit``):
+            Event count after generation
+
+        pts_count (``int`` ``32-bit``):
+            Number of events that were generated
+
+    """
+
+    __slots__: List[str] = ["webpage", "pts", "pts_count"]
+
+    ID = 0x7f891213
+    QUALNAME = "types.UpdateWebPage"
+
+    def __init__(self, *, webpage: "raw.base.WebPage", pts: int, pts_count: int) -> None:
+        self.webpage = webpage  # WebPage
+        self.pts = pts  # int
+        self.pts_count = pts_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateWebPage":
+        # No flags
+
+        webpage = TLObject.read(b)
+
+        pts = Int.read(b)
+
+        pts_count = Int.read(b)
+
+        return UpdateWebPage(webpage=webpage, pts=pts, pts_count=pts_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.webpage.write())
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.pts_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/update_web_view_result_sent.py b/pyrogram/raw/types/update_web_view_result_sent.py
new file mode 100644
index 00000000..1bba1deb
--- /dev/null
+++ b/pyrogram/raw/types/update_web_view_result_sent.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdateWebViewResultSent(TLObject):  # type: ignore
+    """Indicates to a bot that a webview was closed and an inline message was sent on behalf of the user using messages.sendWebViewResultMessage
+
+    Constructor of :obj:`~pyrogram.raw.base.Update`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1592B79D``
+
+    Parameters:
+        query_id (``int`` ``64-bit``):
+            Web app interaction ID
+
+    """
+
+    __slots__: List[str] = ["query_id"]
+
+    ID = 0x1592b79d
+    QUALNAME = "types.UpdateWebViewResultSent"
+
+    def __init__(self, *, query_id: int) -> None:
+        self.query_id = query_id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdateWebViewResultSent":
+        # No flags
+
+        query_id = Long.read(b)
+
+        return UpdateWebViewResultSent(query_id=query_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.query_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/__init__.py b/pyrogram/raw/types/updates/__init__.py
new file mode 100644
index 00000000..a8a88696
--- /dev/null
+++ b/pyrogram/raw/types/updates/__init__.py
@@ -0,0 +1,47 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .state import State
+from .difference_empty import DifferenceEmpty
+from .difference import Difference
+from .difference_slice import DifferenceSlice
+from .difference_too_long import DifferenceTooLong
+from .channel_difference_empty import ChannelDifferenceEmpty
+from .channel_difference_too_long import ChannelDifferenceTooLong
+from .channel_difference import ChannelDifference
+
+
+__all__ = [
+    "State",
+    "DifferenceEmpty",
+    "Difference",
+    "DifferenceSlice",
+    "DifferenceTooLong",
+    "ChannelDifferenceEmpty",
+    "ChannelDifferenceTooLong",
+    "ChannelDifference",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/updates/channel_difference.py b/pyrogram/raw/types/updates/channel_difference.py
new file mode 100644
index 00000000..78cabfec
--- /dev/null
+++ b/pyrogram/raw/types/updates/channel_difference.py
@@ -0,0 +1,112 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ChannelDifference(TLObject):  # type: ignore
+    """The new updates
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.ChannelDifference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2064674E``
+
+    Parameters:
+        pts (``int`` ``32-bit``):
+            The PTS from which to start getting updates the next time
+
+        new_messages (List of :obj:`Message `):
+            New messages
+
+        other_updates (List of :obj:`Update `):
+            Other updates
+
+        chats (List of :obj:`Chat `):
+            Chats
+
+        users (List of :obj:`User `):
+            Users
+
+        final (``bool``, *optional*):
+            Whether there are more updates to be fetched using getDifference, starting from the provided pts
+
+        timeout (``int`` ``32-bit``, *optional*):
+            Clients are supposed to refetch the channel difference after timeout seconds have elapsed
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetChannelDifference
+    """
+
+    __slots__: List[str] = ["pts", "new_messages", "other_updates", "chats", "users", "final", "timeout"]
+
+    ID = 0x2064674e
+    QUALNAME = "types.updates.ChannelDifference"
+
+    def __init__(self, *, pts: int, new_messages: List["raw.base.Message"], other_updates: List["raw.base.Update"], chats: List["raw.base.Chat"], users: List["raw.base.User"], final: Optional[bool] = None, timeout: Optional[int] = None) -> None:
+        self.pts = pts  # int
+        self.new_messages = new_messages  # Vector
+        self.other_updates = other_updates  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.final = final  # flags.0?true
+        self.timeout = timeout  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ChannelDifference":
+
+        flags = Int.read(b)
+
+        final = True if flags & (1 << 0) else False
+        pts = Int.read(b)
+
+        timeout = Int.read(b) if flags & (1 << 1) else None
+        new_messages = TLObject.read(b)
+
+        other_updates = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return ChannelDifference(pts=pts, new_messages=new_messages, other_updates=other_updates, chats=chats, users=users, final=final, timeout=timeout)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.final else 0
+        flags |= (1 << 1) if self.timeout is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.pts))
+
+        if self.timeout is not None:
+            b.write(Int(self.timeout))
+
+        b.write(Vector(self.new_messages))
+
+        b.write(Vector(self.other_updates))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/channel_difference_empty.py b/pyrogram/raw/types/updates/channel_difference_empty.py
new file mode 100644
index 00000000..59983b4e
--- /dev/null
+++ b/pyrogram/raw/types/updates/channel_difference_empty.py
@@ -0,0 +1,80 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ChannelDifferenceEmpty(TLObject):  # type: ignore
+    """There are no new updates
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.ChannelDifference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3E11AFFB``
+
+    Parameters:
+        pts (``int`` ``32-bit``):
+            The latest PTS
+
+        final (``bool``, *optional*):
+            Whether there are more updates that must be fetched (always false)
+
+        timeout (``int`` ``32-bit``, *optional*):
+            Clients are supposed to refetch the channel difference after timeout seconds have elapsed
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetChannelDifference
+    """
+
+    __slots__: List[str] = ["pts", "final", "timeout"]
+
+    ID = 0x3e11affb
+    QUALNAME = "types.updates.ChannelDifferenceEmpty"
+
+    def __init__(self, *, pts: int, final: Optional[bool] = None, timeout: Optional[int] = None) -> None:
+        self.pts = pts  # int
+        self.final = final  # flags.0?true
+        self.timeout = timeout  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ChannelDifferenceEmpty":
+
+        flags = Int.read(b)
+
+        final = True if flags & (1 << 0) else False
+        pts = Int.read(b)
+
+        timeout = Int.read(b) if flags & (1 << 1) else None
+        return ChannelDifferenceEmpty(pts=pts, final=final, timeout=timeout)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.final else 0
+        flags |= (1 << 1) if self.timeout is not None else 0
+        b.write(Int(flags))
+
+        b.write(Int(self.pts))
+
+        if self.timeout is not None:
+            b.write(Int(self.timeout))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/channel_difference_too_long.py b/pyrogram/raw/types/updates/channel_difference_too_long.py
new file mode 100644
index 00000000..b9ffbbb4
--- /dev/null
+++ b/pyrogram/raw/types/updates/channel_difference_too_long.py
@@ -0,0 +1,104 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class ChannelDifferenceTooLong(TLObject):  # type: ignore
+    """The provided pts + limit < remote pts. Simply, there are too many updates to be fetched (more than limit), the client has to resolve the update gap in one of the following ways (assuming the existence of a persistent database to locally store messages):
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.ChannelDifference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A4BCC6FE``
+
+    Parameters:
+        dialog (:obj:`Dialog `):
+            Dialog containing the latest PTS that can be used to reset the channel state
+
+        messages (List of :obj:`Message `):
+            The latest messages
+
+        chats (List of :obj:`Chat `):
+            Chats from messages
+
+        users (List of :obj:`User `):
+            Users from messages
+
+        final (``bool``, *optional*):
+            Whether there are more updates that must be fetched (always false)
+
+        timeout (``int`` ``32-bit``, *optional*):
+            Clients are supposed to refetch the channel difference after timeout seconds have elapsed
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetChannelDifference
+    """
+
+    __slots__: List[str] = ["dialog", "messages", "chats", "users", "final", "timeout"]
+
+    ID = 0xa4bcc6fe
+    QUALNAME = "types.updates.ChannelDifferenceTooLong"
+
+    def __init__(self, *, dialog: "raw.base.Dialog", messages: List["raw.base.Message"], chats: List["raw.base.Chat"], users: List["raw.base.User"], final: Optional[bool] = None, timeout: Optional[int] = None) -> None:
+        self.dialog = dialog  # Dialog
+        self.messages = messages  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.final = final  # flags.0?true
+        self.timeout = timeout  # flags.1?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "ChannelDifferenceTooLong":
+
+        flags = Int.read(b)
+
+        final = True if flags & (1 << 0) else False
+        timeout = Int.read(b) if flags & (1 << 1) else None
+        dialog = TLObject.read(b)
+
+        messages = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return ChannelDifferenceTooLong(dialog=dialog, messages=messages, chats=chats, users=users, final=final, timeout=timeout)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.final else 0
+        flags |= (1 << 1) if self.timeout is not None else 0
+        b.write(Int(flags))
+
+        if self.timeout is not None:
+            b.write(Int(self.timeout))
+
+        b.write(self.dialog.write())
+
+        b.write(Vector(self.messages))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/difference.py b/pyrogram/raw/types/updates/difference.py
new file mode 100644
index 00000000..c8ae2255
--- /dev/null
+++ b/pyrogram/raw/types/updates/difference.py
@@ -0,0 +1,103 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Difference(TLObject):  # type: ignore
+    """Full list of occurred events.
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.Difference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F49CA0``
+
+    Parameters:
+        new_messages (List of :obj:`Message `):
+            List of new messages
+
+        new_encrypted_messages (List of :obj:`EncryptedMessage `):
+            List of new encrypted secret chat messages
+
+        other_updates (List of :obj:`Update `):
+            List of updates
+
+        chats (List of :obj:`Chat `):
+            List of chats mentioned in events
+
+        users (List of :obj:`User `):
+            List of users mentioned in events
+
+        state (:obj:`updates.State `):
+            Current state
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetDifference
+    """
+
+    __slots__: List[str] = ["new_messages", "new_encrypted_messages", "other_updates", "chats", "users", "state"]
+
+    ID = 0xf49ca0
+    QUALNAME = "types.updates.Difference"
+
+    def __init__(self, *, new_messages: List["raw.base.Message"], new_encrypted_messages: List["raw.base.EncryptedMessage"], other_updates: List["raw.base.Update"], chats: List["raw.base.Chat"], users: List["raw.base.User"], state: "raw.base.updates.State") -> None:
+        self.new_messages = new_messages  # Vector
+        self.new_encrypted_messages = new_encrypted_messages  # Vector
+        self.other_updates = other_updates  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.state = state  # updates.State
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Difference":
+        # No flags
+
+        new_messages = TLObject.read(b)
+
+        new_encrypted_messages = TLObject.read(b)
+
+        other_updates = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        state = TLObject.read(b)
+
+        return Difference(new_messages=new_messages, new_encrypted_messages=new_encrypted_messages, other_updates=other_updates, chats=chats, users=users, state=state)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.new_messages))
+
+        b.write(Vector(self.new_encrypted_messages))
+
+        b.write(Vector(self.other_updates))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        b.write(self.state.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/difference_empty.py b/pyrogram/raw/types/updates/difference_empty.py
new file mode 100644
index 00000000..e27057d7
--- /dev/null
+++ b/pyrogram/raw/types/updates/difference_empty.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class DifferenceEmpty(TLObject):  # type: ignore
+    """No events.
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.Difference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``5D75A138``
+
+    Parameters:
+        date (``int`` ``32-bit``):
+            Current date
+
+        seq (``int`` ``32-bit``):
+            Number of sent updates
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetDifference
+    """
+
+    __slots__: List[str] = ["date", "seq"]
+
+    ID = 0x5d75a138
+    QUALNAME = "types.updates.DifferenceEmpty"
+
+    def __init__(self, *, date: int, seq: int) -> None:
+        self.date = date  # int
+        self.seq = seq  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "DifferenceEmpty":
+        # No flags
+
+        date = Int.read(b)
+
+        seq = Int.read(b)
+
+        return DifferenceEmpty(date=date, seq=seq)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.seq))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/difference_slice.py b/pyrogram/raw/types/updates/difference_slice.py
new file mode 100644
index 00000000..777f78f7
--- /dev/null
+++ b/pyrogram/raw/types/updates/difference_slice.py
@@ -0,0 +1,103 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class DifferenceSlice(TLObject):  # type: ignore
+    """Incomplete list of occurred events.
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.Difference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A8FB1981``
+
+    Parameters:
+        new_messages (List of :obj:`Message `):
+            List of new messages
+
+        new_encrypted_messages (List of :obj:`EncryptedMessage `):
+            New messages from the encrypted event sequence
+
+        other_updates (List of :obj:`Update `):
+            List of updates
+
+        chats (List of :obj:`Chat `):
+            List of chats mentioned in events
+
+        users (List of :obj:`User `):
+            List of users mentioned in events
+
+        intermediate_state (:obj:`updates.State `):
+            Intermediary state
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetDifference
+    """
+
+    __slots__: List[str] = ["new_messages", "new_encrypted_messages", "other_updates", "chats", "users", "intermediate_state"]
+
+    ID = 0xa8fb1981
+    QUALNAME = "types.updates.DifferenceSlice"
+
+    def __init__(self, *, new_messages: List["raw.base.Message"], new_encrypted_messages: List["raw.base.EncryptedMessage"], other_updates: List["raw.base.Update"], chats: List["raw.base.Chat"], users: List["raw.base.User"], intermediate_state: "raw.base.updates.State") -> None:
+        self.new_messages = new_messages  # Vector
+        self.new_encrypted_messages = new_encrypted_messages  # Vector
+        self.other_updates = other_updates  # Vector
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+        self.intermediate_state = intermediate_state  # updates.State
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "DifferenceSlice":
+        # No flags
+
+        new_messages = TLObject.read(b)
+
+        new_encrypted_messages = TLObject.read(b)
+
+        other_updates = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        intermediate_state = TLObject.read(b)
+
+        return DifferenceSlice(new_messages=new_messages, new_encrypted_messages=new_encrypted_messages, other_updates=other_updates, chats=chats, users=users, intermediate_state=intermediate_state)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.new_messages))
+
+        b.write(Vector(self.new_encrypted_messages))
+
+        b.write(Vector(self.other_updates))
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        b.write(self.intermediate_state.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/difference_too_long.py b/pyrogram/raw/types/updates/difference_too_long.py
new file mode 100644
index 00000000..8c43698b
--- /dev/null
+++ b/pyrogram/raw/types/updates/difference_too_long.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class DifferenceTooLong(TLObject):  # type: ignore
+    """The difference is too long, and the specified state must be used to refetch updates.
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.Difference`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4AFE8F6D``
+
+    Parameters:
+        pts (``int`` ``32-bit``):
+            The new state to use.
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetDifference
+    """
+
+    __slots__: List[str] = ["pts"]
+
+    ID = 0x4afe8f6d
+    QUALNAME = "types.updates.DifferenceTooLong"
+
+    def __init__(self, *, pts: int) -> None:
+        self.pts = pts  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "DifferenceTooLong":
+        # No flags
+
+        pts = Int.read(b)
+
+        return DifferenceTooLong(pts=pts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.pts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates/state.py b/pyrogram/raw/types/updates/state.py
new file mode 100644
index 00000000..823b6ea6
--- /dev/null
+++ b/pyrogram/raw/types/updates/state.py
@@ -0,0 +1,95 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class State(TLObject):  # type: ignore
+    """Updates state.
+
+    Constructor of :obj:`~pyrogram.raw.base.updates.State`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A56C2A3E``
+
+    Parameters:
+        pts (``int`` ``32-bit``):
+            Number of events occurred in a text box
+
+        qts (``int`` ``32-bit``):
+            Position in a sequence of updates in secret chats. For further details refer to article secret chats
+
+        date (``int`` ``32-bit``):
+            Date of condition
+
+        seq (``int`` ``32-bit``):
+            Number of sent updates
+
+        unread_count (``int`` ``32-bit``):
+            Number of unread messages
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            updates.GetState
+    """
+
+    __slots__: List[str] = ["pts", "qts", "date", "seq", "unread_count"]
+
+    ID = 0xa56c2a3e
+    QUALNAME = "types.updates.State"
+
+    def __init__(self, *, pts: int, qts: int, date: int, seq: int, unread_count: int) -> None:
+        self.pts = pts  # int
+        self.qts = qts  # int
+        self.date = date  # int
+        self.seq = seq  # int
+        self.unread_count = unread_count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "State":
+        # No flags
+
+        pts = Int.read(b)
+
+        qts = Int.read(b)
+
+        date = Int.read(b)
+
+        seq = Int.read(b)
+
+        unread_count = Int.read(b)
+
+        return State(pts=pts, qts=qts, date=date, seq=seq, unread_count=unread_count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.pts))
+
+        b.write(Int(self.qts))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.seq))
+
+        b.write(Int(self.unread_count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates_combined.py b/pyrogram/raw/types/updates_combined.py
new file mode 100644
index 00000000..8c6ab505
--- /dev/null
+++ b/pyrogram/raw/types/updates_combined.py
@@ -0,0 +1,232 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatesCombined(TLObject):  # type: ignore
+    """Constructor for a group of updates.
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``725B04C3``
+
+    Parameters:
+        updates (List of :obj:`Update `):
+            List of updates
+
+        users (List of :obj:`User `):
+            List of users mentioned in updates
+
+        chats (List of :obj:`Chat `):
+            List of chats mentioned in updates
+
+        date (``int`` ``32-bit``):
+            Current date
+
+        seq_start (``int`` ``32-bit``):
+            Value seq for the earliest update in a group
+
+        seq (``int`` ``32-bit``):
+            Value seq for the latest update in a group
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = ["updates", "users", "chats", "date", "seq_start", "seq"]
+
+    ID = 0x725b04c3
+    QUALNAME = "types.UpdatesCombined"
+
+    def __init__(self, *, updates: List["raw.base.Update"], users: List["raw.base.User"], chats: List["raw.base.Chat"], date: int, seq_start: int, seq: int) -> None:
+        self.updates = updates  # Vector
+        self.users = users  # Vector
+        self.chats = chats  # Vector
+        self.date = date  # int
+        self.seq_start = seq_start  # int
+        self.seq = seq  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatesCombined":
+        # No flags
+
+        updates = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        date = Int.read(b)
+
+        seq_start = Int.read(b)
+
+        seq = Int.read(b)
+
+        return UpdatesCombined(updates=updates, users=users, chats=chats, date=date, seq_start=seq_start, seq=seq)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.updates))
+
+        b.write(Vector(self.users))
+
+        b.write(Vector(self.chats))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.seq_start))
+
+        b.write(Int(self.seq))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates_t.py b/pyrogram/raw/types/updates_t.py
new file mode 100644
index 00000000..6a426713
--- /dev/null
+++ b/pyrogram/raw/types/updates_t.py
@@ -0,0 +1,224 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Updates(TLObject):  # type: ignore
+    """Full constructor of updates
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``74AE4240``
+
+    Parameters:
+        updates (List of :obj:`Update `):
+            List of updates
+
+        users (List of :obj:`User `):
+            List of users mentioned in updates
+
+        chats (List of :obj:`Chat `):
+            List of chats mentioned in updates
+
+        date (``int`` ``32-bit``):
+            Current date
+
+        seq (``int`` ``32-bit``):
+            Total number of sent updates
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = ["updates", "users", "chats", "date", "seq"]
+
+    ID = 0x74ae4240
+    QUALNAME = "types.Updates"
+
+    def __init__(self, *, updates: List["raw.base.Update"], users: List["raw.base.User"], chats: List["raw.base.Chat"], date: int, seq: int) -> None:
+        self.updates = updates  # Vector
+        self.users = users  # Vector
+        self.chats = chats  # Vector
+        self.date = date  # int
+        self.seq = seq  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Updates":
+        # No flags
+
+        updates = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        date = Int.read(b)
+
+        seq = Int.read(b)
+
+        return Updates(updates=updates, users=users, chats=chats, date=date, seq=seq)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.updates))
+
+        b.write(Vector(self.users))
+
+        b.write(Vector(self.chats))
+
+        b.write(Int(self.date))
+
+        b.write(Int(self.seq))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/updates_too_long.py b/pyrogram/raw/types/updates_too_long.py
new file mode 100644
index 00000000..d9b173b0
--- /dev/null
+++ b/pyrogram/raw/types/updates_too_long.py
@@ -0,0 +1,187 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UpdatesTooLong(TLObject):  # type: ignore
+    """Too many updates, it is necessary to execute updates.getDifference.
+
+    Constructor of :obj:`~pyrogram.raw.base.Updates`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E317AF7E``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 130 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetNotifyExceptions
+            account.UpdateConnectedBot
+            account.GetBotBusinessConnection
+            users.SuggestBirthday
+            contacts.DeleteContacts
+            contacts.AddContact
+            contacts.AcceptContact
+            contacts.GetLocated
+            contacts.BlockFromReplies
+            messages.SendMessage
+            messages.SendMedia
+            messages.ForwardMessages
+            messages.EditChatTitle
+            messages.EditChatPhoto
+            messages.DeleteChatUser
+            messages.ImportChatInvite
+            messages.StartBot
+            messages.MigrateChat
+            messages.SendInlineBotResult
+            messages.EditMessage
+            messages.GetAllDrafts
+            messages.SetGameScore
+            messages.SendScreenshotNotification
+            messages.SendMultiMedia
+            messages.UpdatePinnedMessage
+            messages.SendVote
+            messages.GetPollResults
+            messages.EditChatDefaultBannedRights
+            messages.SendScheduledMessages
+            messages.DeleteScheduledMessages
+            messages.SetHistoryTTL
+            messages.SetChatTheme
+            messages.HideChatJoinRequest
+            messages.HideAllChatJoinRequests
+            messages.ToggleNoForwards
+            messages.SendReaction
+            messages.GetMessagesReactions
+            messages.SetChatAvailableReactions
+            messages.SendWebViewData
+            messages.GetExtendedMedia
+            messages.SendBotRequestedPeer
+            messages.SetChatWallPaper
+            messages.SendQuickReplyMessages
+            messages.DeleteQuickReplyMessages
+            messages.EditFactCheck
+            messages.DeleteFactCheck
+            messages.SendPaidReaction
+            messages.GetPaidReactionPrivacy
+            messages.ToggleTodoCompleted
+            messages.AppendTodoList
+            messages.ToggleSuggestedPostApproval
+            messages.EditForumTopic
+            messages.UpdatePinnedForumTopic
+            messages.ReorderPinnedForumTopics
+            messages.CreateForumTopic
+            messages.ForwardMessage
+            messages.CraftStarGift
+            channels.CreateChannel
+            channels.EditAdmin
+            channels.EditTitle
+            channels.EditPhoto
+            channels.JoinChannel
+            channels.LeaveChannel
+            channels.DeleteChannel
+            channels.ToggleSignatures
+            channels.EditBanned
+            channels.DeleteHistory
+            channels.TogglePreHistoryHidden
+            channels.EditCreator
+            channels.ToggleSlowMode
+            channels.ConvertToGigagroup
+            channels.ToggleJoinToSend
+            channels.ToggleJoinRequest
+            channels.ToggleForum
+            channels.ToggleAntiSpam
+            channels.ToggleParticipantsHidden
+            channels.UpdateColor
+            channels.ToggleViewForumAsMessages
+            channels.UpdateEmojiStatus
+            channels.SetBoostsToUnblockRestrictions
+            channels.RestrictSponsoredMessages
+            channels.UpdatePaidMessagesPrice
+            channels.ToggleAutotranslation
+            bots.AllowSendMessage
+            payments.AssignAppStoreTransaction
+            payments.AssignPlayMarketTransaction
+            payments.ApplyGiftCode
+            payments.LaunchPrepaidGiveaway
+            payments.RefundStarsCharge
+            payments.UpgradeStarGift
+            payments.TransferStarGift
+            payments.UpdateStarGiftPrice
+            payments.ResolveStarGiftOffer
+            payments.SendStarGiftOffer
+            payments.RequestRecurringPayment
+            phone.DiscardCall
+            phone.SetCallRating
+            phone.CreateGroupCall
+            phone.JoinGroupCall
+            phone.LeaveGroupCall
+            phone.InviteToGroupCall
+            phone.DiscardGroupCall
+            phone.ToggleGroupCallSettings
+            phone.ToggleGroupCallRecord
+            phone.EditGroupCallParticipant
+            phone.EditGroupCallTitle
+            phone.ToggleGroupCallStartSubscription
+            phone.StartScheduledGroupCall
+            phone.JoinGroupCallPresentation
+            phone.LeaveGroupCallPresentation
+            phone.CreateConferenceCall
+            phone.DeleteConferenceCallParticipants
+            phone.SendConferenceCallBroadcast
+            phone.InviteConferenceCallParticipant
+            phone.DeclineConferenceCallInvite
+            phone.GetGroupCallChainBlocks
+            phone.SendGroupCallMessage
+            phone.DeleteGroupCallMessages
+            phone.DeleteGroupCallParticipantMessages
+            folders.EditPeerFolders
+            folders.DeleteFolder
+            chatlists.JoinChatlistInvite
+            chatlists.JoinChatlistUpdates
+            chatlists.LeaveChatlist
+            stories.SendStory
+            stories.EditStory
+            stories.ActivateStealthMode
+            stories.SendReaction
+            stories.GetAllReadPeerStories
+            stories.StartLive
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xe317af7e
+    QUALNAME = "types.UpdatesTooLong"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UpdatesTooLong":
+        # No flags
+
+        return UpdatesTooLong()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/upload/__init__.py b/pyrogram/raw/types/upload/__init__.py
new file mode 100644
index 00000000..4d599d68
--- /dev/null
+++ b/pyrogram/raw/types/upload/__init__.py
@@ -0,0 +1,41 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .file import File
+from .file_cdn_redirect import FileCdnRedirect
+from .web_file import WebFile
+from .cdn_file_reupload_needed import CdnFileReuploadNeeded
+from .cdn_file import CdnFile
+
+
+__all__ = [
+    "File",
+    "FileCdnRedirect",
+    "WebFile",
+    "CdnFileReuploadNeeded",
+    "CdnFile",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/upload/cdn_file.py b/pyrogram/raw/types/upload/cdn_file.py
new file mode 100644
index 00000000..95e2fc57
--- /dev/null
+++ b/pyrogram/raw/types/upload/cdn_file.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class CdnFile(TLObject):  # type: ignore
+    """Represent a chunk of a CDN file.
+
+    Constructor of :obj:`~pyrogram.raw.base.upload.CdnFile`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A99FCA4F``
+
+    Parameters:
+        bytes (``bytes``):
+            The data
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            upload.GetCdnFile
+    """
+
+    __slots__: List[str] = ["bytes"]
+
+    ID = 0xa99fca4f
+    QUALNAME = "types.upload.CdnFile"
+
+    def __init__(self, *, bytes: bytes) -> None:
+        self.bytes = bytes  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "CdnFile":
+        # No flags
+
+        bytes = Bytes.read(b)
+
+        return CdnFile(bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/upload/cdn_file_reupload_needed.py b/pyrogram/raw/types/upload/cdn_file_reupload_needed.py
new file mode 100644
index 00000000..71065461
--- /dev/null
+++ b/pyrogram/raw/types/upload/cdn_file_reupload_needed.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class CdnFileReuploadNeeded(TLObject):  # type: ignore
+    """The file was cleared from the temporary RAM cache of the CDN and has to be re-uploaded.
+
+    Constructor of :obj:`~pyrogram.raw.base.upload.CdnFile`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EEA8E46E``
+
+    Parameters:
+        request_token (``bytes``):
+            Request token (see CDN)
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            upload.GetCdnFile
+    """
+
+    __slots__: List[str] = ["request_token"]
+
+    ID = 0xeea8e46e
+    QUALNAME = "types.upload.CdnFileReuploadNeeded"
+
+    def __init__(self, *, request_token: bytes) -> None:
+        self.request_token = request_token  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "CdnFileReuploadNeeded":
+        # No flags
+
+        request_token = Bytes.read(b)
+
+        return CdnFileReuploadNeeded(request_token=request_token)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Bytes(self.request_token))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/upload/file.py b/pyrogram/raw/types/upload/file.py
new file mode 100644
index 00000000..d88ee253
--- /dev/null
+++ b/pyrogram/raw/types/upload/file.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class File(TLObject):  # type: ignore
+    """File content.
+
+    Constructor of :obj:`~pyrogram.raw.base.upload.File`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``96A18D5``
+
+    Parameters:
+        type (:obj:`storage.FileType `):
+            File type
+
+        mtime (``int`` ``32-bit``):
+            Modification time
+
+        bytes (``bytes``):
+            Binary data, file content
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            upload.GetFile
+    """
+
+    __slots__: List[str] = ["type", "mtime", "bytes"]
+
+    ID = 0x96a18d5
+    QUALNAME = "types.upload.File"
+
+    def __init__(self, *, type: "raw.base.storage.FileType", mtime: int, bytes: bytes) -> None:
+        self.type = type  # storage.FileType
+        self.mtime = mtime  # int
+        self.bytes = bytes  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "File":
+        # No flags
+
+        type = TLObject.read(b)
+
+        mtime = Int.read(b)
+
+        bytes = Bytes.read(b)
+
+        return File(type=type, mtime=mtime, bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.type.write())
+
+        b.write(Int(self.mtime))
+
+        b.write(Bytes(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/upload/file_cdn_redirect.py b/pyrogram/raw/types/upload/file_cdn_redirect.py
new file mode 100644
index 00000000..6d667f29
--- /dev/null
+++ b/pyrogram/raw/types/upload/file_cdn_redirect.py
@@ -0,0 +1,95 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class FileCdnRedirect(TLObject):  # type: ignore
+    """The file must be downloaded from a CDN DC.
+
+    Constructor of :obj:`~pyrogram.raw.base.upload.File`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F18CDA44``
+
+    Parameters:
+        dc_id (``int`` ``32-bit``):
+            CDN DC ID
+
+        file_token (``bytes``):
+            File token (see CDN files)
+
+        encryption_key (``bytes``):
+            Encryption key (see CDN files)
+
+        encryption_iv (``bytes``):
+            Encryption IV (see CDN files)
+
+        file_hashes (List of :obj:`FileHash `):
+            File hashes (see CDN files)
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            upload.GetFile
+    """
+
+    __slots__: List[str] = ["dc_id", "file_token", "encryption_key", "encryption_iv", "file_hashes"]
+
+    ID = 0xf18cda44
+    QUALNAME = "types.upload.FileCdnRedirect"
+
+    def __init__(self, *, dc_id: int, file_token: bytes, encryption_key: bytes, encryption_iv: bytes, file_hashes: List["raw.base.FileHash"]) -> None:
+        self.dc_id = dc_id  # int
+        self.file_token = file_token  # bytes
+        self.encryption_key = encryption_key  # bytes
+        self.encryption_iv = encryption_iv  # bytes
+        self.file_hashes = file_hashes  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "FileCdnRedirect":
+        # No flags
+
+        dc_id = Int.read(b)
+
+        file_token = Bytes.read(b)
+
+        encryption_key = Bytes.read(b)
+
+        encryption_iv = Bytes.read(b)
+
+        file_hashes = TLObject.read(b)
+
+        return FileCdnRedirect(dc_id=dc_id, file_token=file_token, encryption_key=encryption_key, encryption_iv=encryption_iv, file_hashes=file_hashes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.dc_id))
+
+        b.write(Bytes(self.file_token))
+
+        b.write(Bytes(self.encryption_key))
+
+        b.write(Bytes(self.encryption_iv))
+
+        b.write(Vector(self.file_hashes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/upload/web_file.py b/pyrogram/raw/types/upload/web_file.py
new file mode 100644
index 00000000..48f8cced
--- /dev/null
+++ b/pyrogram/raw/types/upload/web_file.py
@@ -0,0 +1,95 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebFile(TLObject):  # type: ignore
+    """Represents a chunk of an HTTP webfile downloaded through telegram's secure MTProto servers
+
+    Constructor of :obj:`~pyrogram.raw.base.upload.WebFile`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``21E753BC``
+
+    Parameters:
+        size (``int`` ``32-bit``):
+            File size
+
+        mime_type (``str``):
+            Mime type
+
+        file_type (:obj:`storage.FileType `):
+            File type
+
+        mtime (``int`` ``32-bit``):
+            Modified time
+
+        bytes (``bytes``):
+            Data
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            upload.GetWebFile
+    """
+
+    __slots__: List[str] = ["size", "mime_type", "file_type", "mtime", "bytes"]
+
+    ID = 0x21e753bc
+    QUALNAME = "types.upload.WebFile"
+
+    def __init__(self, *, size: int, mime_type: str, file_type: "raw.base.storage.FileType", mtime: int, bytes: bytes) -> None:
+        self.size = size  # int
+        self.mime_type = mime_type  # string
+        self.file_type = file_type  # storage.FileType
+        self.mtime = mtime  # int
+        self.bytes = bytes  # bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebFile":
+        # No flags
+
+        size = Int.read(b)
+
+        mime_type = String.read(b)
+
+        file_type = TLObject.read(b)
+
+        mtime = Int.read(b)
+
+        bytes = Bytes.read(b)
+
+        return WebFile(size=size, mime_type=mime_type, file_type=file_type, mtime=mtime, bytes=bytes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.size))
+
+        b.write(String(self.mime_type))
+
+        b.write(self.file_type.write())
+
+        b.write(Int(self.mtime))
+
+        b.write(Bytes(self.bytes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/url_auth_result_accepted.py b/pyrogram/raw/types/url_auth_result_accepted.py
new file mode 100644
index 00000000..3f2f0b43
--- /dev/null
+++ b/pyrogram/raw/types/url_auth_result_accepted.py
@@ -0,0 +1,67 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UrlAuthResultAccepted(TLObject):  # type: ignore
+    """Details about an accepted authorization request, for more info click here »
+
+    Constructor of :obj:`~pyrogram.raw.base.UrlAuthResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``623A8FA0``
+
+    Parameters:
+        url (``str``, *optional*):
+            The URL name of the website on which the user has logged in.
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.RequestUrlAuth
+            messages.AcceptUrlAuth
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0x623a8fa0
+    QUALNAME = "types.UrlAuthResultAccepted"
+
+    def __init__(self, *, url: Optional[str] = None) -> None:
+        self.url = url  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UrlAuthResultAccepted":
+
+        flags = Int.read(b)
+
+        url = String.read(b) if flags & (1 << 0) else None
+        return UrlAuthResultAccepted(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.url is not None else 0
+        b.write(Int(flags))
+
+        if self.url is not None:
+            b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/url_auth_result_default.py b/pyrogram/raw/types/url_auth_result_default.py
new file mode 100644
index 00000000..356469c0
--- /dev/null
+++ b/pyrogram/raw/types/url_auth_result_default.py
@@ -0,0 +1,59 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UrlAuthResultDefault(TLObject):  # type: ignore
+    """Details about an accepted authorization request, for more info click here »
+
+    Constructor of :obj:`~pyrogram.raw.base.UrlAuthResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A9D6DB1F``
+
+    Parameters:
+        No parameters required.
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.RequestUrlAuth
+            messages.AcceptUrlAuth
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xa9d6db1f
+    QUALNAME = "types.UrlAuthResultDefault"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UrlAuthResultDefault":
+        # No flags
+
+        return UrlAuthResultDefault()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/url_auth_result_request.py b/pyrogram/raw/types/url_auth_result_request.py
new file mode 100644
index 00000000..b316f178
--- /dev/null
+++ b/pyrogram/raw/types/url_auth_result_request.py
@@ -0,0 +1,122 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UrlAuthResultRequest(TLObject):  # type: ignore
+    """Details about the authorization request, for more info click here »
+
+    Constructor of :obj:`~pyrogram.raw.base.UrlAuthResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``32FABF1A``
+
+    Parameters:
+        bot (:obj:`User `):
+            Username of a bot, which will be used for user authorization. If not specified, the current bot's username will be assumed. The url's domain must be the same as the domain linked with the bot. See Linking your domain to the bot for more details.
+
+        domain (``str``):
+            The domain name of the website on which the user will log in.
+
+        request_write_access (``bool``, *optional*):
+            Whether the bot would like to send messages to the user
+
+        request_phone_number (``bool``, *optional*):
+            N/A
+
+        browser (``str``, *optional*):
+            N/A
+
+        platform (``str``, *optional*):
+            N/A
+
+        ip (``str``, *optional*):
+            N/A
+
+        region (``str``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.RequestUrlAuth
+            messages.AcceptUrlAuth
+    """
+
+    __slots__: List[str] = ["bot", "domain", "request_write_access", "request_phone_number", "browser", "platform", "ip", "region"]
+
+    ID = 0x32fabf1a
+    QUALNAME = "types.UrlAuthResultRequest"
+
+    def __init__(self, *, bot: "raw.base.User", domain: str, request_write_access: Optional[bool] = None, request_phone_number: Optional[bool] = None, browser: Optional[str] = None, platform: Optional[str] = None, ip: Optional[str] = None, region: Optional[str] = None) -> None:
+        self.bot = bot  # User
+        self.domain = domain  # string
+        self.request_write_access = request_write_access  # flags.0?true
+        self.request_phone_number = request_phone_number  # flags.1?true
+        self.browser = browser  # flags.2?string
+        self.platform = platform  # flags.2?string
+        self.ip = ip  # flags.2?string
+        self.region = region  # flags.2?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UrlAuthResultRequest":
+
+        flags = Int.read(b)
+
+        request_write_access = True if flags & (1 << 0) else False
+        request_phone_number = True if flags & (1 << 1) else False
+        bot = TLObject.read(b)
+
+        domain = String.read(b)
+
+        browser = String.read(b) if flags & (1 << 2) else None
+        platform = String.read(b) if flags & (1 << 2) else None
+        ip = String.read(b) if flags & (1 << 2) else None
+        region = String.read(b) if flags & (1 << 2) else None
+        return UrlAuthResultRequest(bot=bot, domain=domain, request_write_access=request_write_access, request_phone_number=request_phone_number, browser=browser, platform=platform, ip=ip, region=region)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.request_write_access else 0
+        flags |= (1 << 1) if self.request_phone_number else 0
+        flags |= (1 << 2) if self.browser is not None else 0
+        flags |= (1 << 2) if self.platform is not None else 0
+        flags |= (1 << 2) if self.ip is not None else 0
+        flags |= (1 << 2) if self.region is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.bot.write())
+
+        b.write(String(self.domain))
+
+        if self.browser is not None:
+            b.write(String(self.browser))
+
+        if self.platform is not None:
+            b.write(String(self.platform))
+
+        if self.ip is not None:
+            b.write(String(self.ip))
+
+        if self.region is not None:
+            b.write(String(self.region))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user.py b/pyrogram/raw/types/user.py
new file mode 100644
index 00000000..5535cb2d
--- /dev/null
+++ b/pyrogram/raw/types/user.py
@@ -0,0 +1,418 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class User(TLObject):  # type: ignore
+    """Indicates info about a certain user
+
+    Constructor of :obj:`~pyrogram.raw.base.User`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``31774388``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID of the user
+
+        is_self (``bool``, *optional*):
+            N/A
+
+        contact (``bool``, *optional*):
+            Whether this user is a contact
+
+        mutual_contact (``bool``, *optional*):
+            Whether this user is a mutual contact
+
+        deleted (``bool``, *optional*):
+            Whether the account of this user was deleted
+
+        bot (``bool``, *optional*):
+            Is this user a bot?
+
+        bot_chat_history (``bool``, *optional*):
+            Can the bot see all messages in groups?
+
+        bot_nochats (``bool``, *optional*):
+            Can the bot be added to groups?
+
+        verified (``bool``, *optional*):
+            Whether this user is verified
+
+        restricted (``bool``, *optional*):
+            Access to this user must be restricted for the reason specified in restriction_reason
+
+        min (``bool``, *optional*):
+            See min
+
+        bot_inline_geo (``bool``, *optional*):
+            Whether the bot can request our geolocation in inline mode
+
+        support (``bool``, *optional*):
+            Whether this is an official support user
+
+        scam (``bool``, *optional*):
+            This may be a scam user
+
+        apply_min_photo (``bool``, *optional*):
+            If set, the profile picture for this user should be refetched
+
+        fake (``bool``, *optional*):
+            If set, this user was reported by many users as a fake or scam user: be careful when interacting with them.
+
+        bot_attach_menu (``bool``, *optional*):
+            Whether this bot offers an attachment menu web app
+
+        premium (``bool``, *optional*):
+            Whether this user is a Telegram Premium user
+
+        attach_menu_enabled (``bool``, *optional*):
+            Whether we installed the attachment menu web app offered by this bot
+
+        bot_can_edit (``bool``, *optional*):
+            Whether we can edit the profile picture, name, about text and description of this bot because we own it.
+
+        close_friend (``bool``, *optional*):
+            Whether we marked this user as a close friend, see here » for more info
+
+        stories_hidden (``bool``, *optional*):
+            Whether we have hidden » all active stories of this user.
+
+        stories_unavailable (``bool``, *optional*):
+            No stories from this user are visible.
+
+        contact_require_premium (``bool``, *optional*):
+
+
+        bot_business (``bool``, *optional*):
+
+
+        bot_has_main_app (``bool``, *optional*):
+            N/A
+
+        bot_forum_view (``bool``, *optional*):
+            N/A
+
+        bot_forum_can_manage_topics (``bool``, *optional*):
+            N/A
+
+        access_hash (``int`` ``64-bit``, *optional*):
+            Access hash of the user
+
+        first_name (``str``, *optional*):
+            First name
+
+        last_name (``str``, *optional*):
+            Last name
+
+        username (``str``, *optional*):
+            Username
+
+        phone (``str``, *optional*):
+            Phone number
+
+        photo (:obj:`UserProfilePhoto `, *optional*):
+            Profile picture of user
+
+        status (:obj:`UserStatus `, *optional*):
+            Online status of user
+
+        bot_info_version (``int`` ``32-bit``, *optional*):
+            Version of the bot_info field in userFull, incremented every time it changes
+
+        restriction_reason (List of :obj:`RestrictionReason `, *optional*):
+            Contains the reason why access to this user must be restricted.
+
+        bot_inline_placeholder (``str``, *optional*):
+            Inline placeholder for this inline bot
+
+        lang_code (``str``, *optional*):
+            Language code of the user
+
+        emoji_status (:obj:`EmojiStatus `, *optional*):
+            Emoji status
+
+        usernames (List of :obj:`Username `, *optional*):
+            Additional usernames
+
+        stories_max_id (:obj:`RecentStory `, *optional*):
+            ID of the maximum read story.
+
+        color (:obj:`PeerColor `, *optional*):
+            The user's accent color.
+
+        profile_color (:obj:`PeerColor `, *optional*):
+            The user's profile color.
+
+        bot_active_users (``int`` ``32-bit``, *optional*):
+            N/A
+
+        bot_verification_icon (``int`` ``64-bit``, *optional*):
+            N/A
+
+        send_paid_messages_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+    Functions:
+        This object can be returned by 9 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.UpdateProfile
+            account.UpdateUsername
+            account.ChangePhone
+            users.GetUsers
+            contacts.ImportContactToken
+            contacts.ImportCard
+            channels.GetMessageAuthor
+            channels.GetFutureCreatorAfterLeave
+            bots.GetAdminedBots
+    """
+
+    __slots__: List[str] = ["id", "is_self", "contact", "mutual_contact", "deleted", "bot", "bot_chat_history", "bot_nochats", "verified", "restricted", "min", "bot_inline_geo", "support", "scam", "apply_min_photo", "fake", "bot_attach_menu", "premium", "attach_menu_enabled", "bot_can_edit", "close_friend", "stories_hidden", "stories_unavailable", "contact_require_premium", "bot_business", "bot_has_main_app", "bot_forum_view", "bot_forum_can_manage_topics", "access_hash", "first_name", "last_name", "username", "phone", "photo", "status", "bot_info_version", "restriction_reason", "bot_inline_placeholder", "lang_code", "emoji_status", "usernames", "stories_max_id", "color", "profile_color", "bot_active_users", "bot_verification_icon", "send_paid_messages_stars"]
+
+    ID = 0x31774388
+    QUALNAME = "types.User"
+
+    def __init__(self, *, id: int, is_self: Optional[bool] = None, contact: Optional[bool] = None, mutual_contact: Optional[bool] = None, deleted: Optional[bool] = None, bot: Optional[bool] = None, bot_chat_history: Optional[bool] = None, bot_nochats: Optional[bool] = None, verified: Optional[bool] = None, restricted: Optional[bool] = None, min: Optional[bool] = None, bot_inline_geo: Optional[bool] = None, support: Optional[bool] = None, scam: Optional[bool] = None, apply_min_photo: Optional[bool] = None, fake: Optional[bool] = None, bot_attach_menu: Optional[bool] = None, premium: Optional[bool] = None, attach_menu_enabled: Optional[bool] = None, bot_can_edit: Optional[bool] = None, close_friend: Optional[bool] = None, stories_hidden: Optional[bool] = None, stories_unavailable: Optional[bool] = None, contact_require_premium: Optional[bool] = None, bot_business: Optional[bool] = None, bot_has_main_app: Optional[bool] = None, bot_forum_view: Optional[bool] = None, bot_forum_can_manage_topics: Optional[bool] = None, access_hash: Optional[int] = None, first_name: Optional[str] = None, last_name: Optional[str] = None, username: Optional[str] = None, phone: Optional[str] = None, photo: "raw.base.UserProfilePhoto" = None, status: "raw.base.UserStatus" = None, bot_info_version: Optional[int] = None, restriction_reason: Optional[List["raw.base.RestrictionReason"]] = None, bot_inline_placeholder: Optional[str] = None, lang_code: Optional[str] = None, emoji_status: "raw.base.EmojiStatus" = None, usernames: Optional[List["raw.base.Username"]] = None, stories_max_id: "raw.base.RecentStory" = None, color: "raw.base.PeerColor" = None, profile_color: "raw.base.PeerColor" = None, bot_active_users: Optional[int] = None, bot_verification_icon: Optional[int] = None, send_paid_messages_stars: Optional[int] = None) -> None:
+        self.id = id  # long
+        self.is_self = is_self  # flags.10?true
+        self.contact = contact  # flags.11?true
+        self.mutual_contact = mutual_contact  # flags.12?true
+        self.deleted = deleted  # flags.13?true
+        self.bot = bot  # flags.14?true
+        self.bot_chat_history = bot_chat_history  # flags.15?true
+        self.bot_nochats = bot_nochats  # flags.16?true
+        self.verified = verified  # flags.17?true
+        self.restricted = restricted  # flags.18?true
+        self.min = min  # flags.20?true
+        self.bot_inline_geo = bot_inline_geo  # flags.21?true
+        self.support = support  # flags.23?true
+        self.scam = scam  # flags.24?true
+        self.apply_min_photo = apply_min_photo  # flags.25?true
+        self.fake = fake  # flags.26?true
+        self.bot_attach_menu = bot_attach_menu  # flags.27?true
+        self.premium = premium  # flags.28?true
+        self.attach_menu_enabled = attach_menu_enabled  # flags.29?true
+        self.bot_can_edit = bot_can_edit  # flags2.1?true
+        self.close_friend = close_friend  # flags2.2?true
+        self.stories_hidden = stories_hidden  # flags2.3?true
+        self.stories_unavailable = stories_unavailable  # flags2.4?true
+        self.contact_require_premium = contact_require_premium  # flags2.10?true
+        self.bot_business = bot_business  # flags2.11?true
+        self.bot_has_main_app = bot_has_main_app  # flags2.13?true
+        self.bot_forum_view = bot_forum_view  # flags2.16?true
+        self.bot_forum_can_manage_topics = bot_forum_can_manage_topics  # flags2.17?true
+        self.access_hash = access_hash  # flags.0?long
+        self.first_name = first_name  # flags.1?string
+        self.last_name = last_name  # flags.2?string
+        self.username = username  # flags.3?string
+        self.phone = phone  # flags.4?string
+        self.photo = photo  # flags.5?UserProfilePhoto
+        self.status = status  # flags.6?UserStatus
+        self.bot_info_version = bot_info_version  # flags.14?int
+        self.restriction_reason = restriction_reason  # flags.18?Vector
+        self.bot_inline_placeholder = bot_inline_placeholder  # flags.19?string
+        self.lang_code = lang_code  # flags.22?string
+        self.emoji_status = emoji_status  # flags.30?EmojiStatus
+        self.usernames = usernames  # flags2.0?Vector
+        self.stories_max_id = stories_max_id  # flags2.5?RecentStory
+        self.color = color  # flags2.8?PeerColor
+        self.profile_color = profile_color  # flags2.9?PeerColor
+        self.bot_active_users = bot_active_users  # flags2.12?int
+        self.bot_verification_icon = bot_verification_icon  # flags2.14?long
+        self.send_paid_messages_stars = send_paid_messages_stars  # flags2.15?long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "User":
+
+        flags = Int.read(b)
+
+        is_self = True if flags & (1 << 10) else False
+        contact = True if flags & (1 << 11) else False
+        mutual_contact = True if flags & (1 << 12) else False
+        deleted = True if flags & (1 << 13) else False
+        bot = True if flags & (1 << 14) else False
+        bot_chat_history = True if flags & (1 << 15) else False
+        bot_nochats = True if flags & (1 << 16) else False
+        verified = True if flags & (1 << 17) else False
+        restricted = True if flags & (1 << 18) else False
+        min = True if flags & (1 << 20) else False
+        bot_inline_geo = True if flags & (1 << 21) else False
+        support = True if flags & (1 << 23) else False
+        scam = True if flags & (1 << 24) else False
+        apply_min_photo = True if flags & (1 << 25) else False
+        fake = True if flags & (1 << 26) else False
+        bot_attach_menu = True if flags & (1 << 27) else False
+        premium = True if flags & (1 << 28) else False
+        attach_menu_enabled = True if flags & (1 << 29) else False
+        flags2 = Int.read(b)
+
+        bot_can_edit = True if flags2 & (1 << 1) else False
+        close_friend = True if flags2 & (1 << 2) else False
+        stories_hidden = True if flags2 & (1 << 3) else False
+        stories_unavailable = True if flags2 & (1 << 4) else False
+        contact_require_premium = True if flags2 & (1 << 10) else False
+        bot_business = True if flags2 & (1 << 11) else False
+        bot_has_main_app = True if flags2 & (1 << 13) else False
+        bot_forum_view = True if flags2 & (1 << 16) else False
+        bot_forum_can_manage_topics = True if flags2 & (1 << 17) else False
+        id = Long.read(b)
+
+        access_hash = Long.read(b) if flags & (1 << 0) else None
+        first_name = String.read(b) if flags & (1 << 1) else None
+        last_name = String.read(b) if flags & (1 << 2) else None
+        username = String.read(b) if flags & (1 << 3) else None
+        phone = String.read(b) if flags & (1 << 4) else None
+        photo = TLObject.read(b) if flags & (1 << 5) else None
+
+        status = TLObject.read(b) if flags & (1 << 6) else None
+
+        bot_info_version = Int.read(b) if flags & (1 << 14) else None
+        restriction_reason = TLObject.read(b) if flags & (1 << 18) else []
+
+        bot_inline_placeholder = String.read(b) if flags & (1 << 19) else None
+        lang_code = String.read(b) if flags & (1 << 22) else None
+        emoji_status = TLObject.read(b) if flags & (1 << 30) else None
+
+        usernames = TLObject.read(b) if flags2 & (1 << 0) else []
+
+        stories_max_id = TLObject.read(b) if flags2 & (1 << 5) else None
+
+        color = TLObject.read(b) if flags2 & (1 << 8) else None
+
+        profile_color = TLObject.read(b) if flags2 & (1 << 9) else None
+
+        bot_active_users = Int.read(b) if flags2 & (1 << 12) else None
+        bot_verification_icon = Long.read(b) if flags2 & (1 << 14) else None
+        send_paid_messages_stars = Long.read(b) if flags2 & (1 << 15) else None
+        return User(id=id, is_self=is_self, contact=contact, mutual_contact=mutual_contact, deleted=deleted, bot=bot, bot_chat_history=bot_chat_history, bot_nochats=bot_nochats, verified=verified, restricted=restricted, min=min, bot_inline_geo=bot_inline_geo, support=support, scam=scam, apply_min_photo=apply_min_photo, fake=fake, bot_attach_menu=bot_attach_menu, premium=premium, attach_menu_enabled=attach_menu_enabled, bot_can_edit=bot_can_edit, close_friend=close_friend, stories_hidden=stories_hidden, stories_unavailable=stories_unavailable, contact_require_premium=contact_require_premium, bot_business=bot_business, bot_has_main_app=bot_has_main_app, bot_forum_view=bot_forum_view, bot_forum_can_manage_topics=bot_forum_can_manage_topics, access_hash=access_hash, first_name=first_name, last_name=last_name, username=username, phone=phone, photo=photo, status=status, bot_info_version=bot_info_version, restriction_reason=restriction_reason, bot_inline_placeholder=bot_inline_placeholder, lang_code=lang_code, emoji_status=emoji_status, usernames=usernames, stories_max_id=stories_max_id, color=color, profile_color=profile_color, bot_active_users=bot_active_users, bot_verification_icon=bot_verification_icon, send_paid_messages_stars=send_paid_messages_stars)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 10) if self.is_self else 0
+        flags |= (1 << 11) if self.contact else 0
+        flags |= (1 << 12) if self.mutual_contact else 0
+        flags |= (1 << 13) if self.deleted else 0
+        flags |= (1 << 14) if self.bot else 0
+        flags |= (1 << 15) if self.bot_chat_history else 0
+        flags |= (1 << 16) if self.bot_nochats else 0
+        flags |= (1 << 17) if self.verified else 0
+        flags |= (1 << 18) if self.restricted else 0
+        flags |= (1 << 20) if self.min else 0
+        flags |= (1 << 21) if self.bot_inline_geo else 0
+        flags |= (1 << 23) if self.support else 0
+        flags |= (1 << 24) if self.scam else 0
+        flags |= (1 << 25) if self.apply_min_photo else 0
+        flags |= (1 << 26) if self.fake else 0
+        flags |= (1 << 27) if self.bot_attach_menu else 0
+        flags |= (1 << 28) if self.premium else 0
+        flags |= (1 << 29) if self.attach_menu_enabled else 0
+        flags |= (1 << 0) if self.access_hash is not None else 0
+        flags |= (1 << 1) if self.first_name is not None else 0
+        flags |= (1 << 2) if self.last_name is not None else 0
+        flags |= (1 << 3) if self.username is not None else 0
+        flags |= (1 << 4) if self.phone is not None else 0
+        flags |= (1 << 5) if self.photo is not None else 0
+        flags |= (1 << 6) if self.status is not None else 0
+        flags |= (1 << 14) if self.bot_info_version is not None else 0
+        flags |= (1 << 18) if self.restriction_reason else 0
+        flags |= (1 << 19) if self.bot_inline_placeholder is not None else 0
+        flags |= (1 << 22) if self.lang_code is not None else 0
+        flags |= (1 << 30) if self.emoji_status is not None else 0
+        b.write(Int(flags))
+        flags2 = 0
+        flags2 |= (1 << 1) if self.bot_can_edit else 0
+        flags2 |= (1 << 2) if self.close_friend else 0
+        flags2 |= (1 << 3) if self.stories_hidden else 0
+        flags2 |= (1 << 4) if self.stories_unavailable else 0
+        flags2 |= (1 << 10) if self.contact_require_premium else 0
+        flags2 |= (1 << 11) if self.bot_business else 0
+        flags2 |= (1 << 13) if self.bot_has_main_app else 0
+        flags2 |= (1 << 16) if self.bot_forum_view else 0
+        flags2 |= (1 << 17) if self.bot_forum_can_manage_topics else 0
+        flags2 |= (1 << 0) if self.usernames else 0
+        flags2 |= (1 << 5) if self.stories_max_id is not None else 0
+        flags2 |= (1 << 8) if self.color is not None else 0
+        flags2 |= (1 << 9) if self.profile_color is not None else 0
+        flags2 |= (1 << 12) if self.bot_active_users is not None else 0
+        flags2 |= (1 << 14) if self.bot_verification_icon is not None else 0
+        flags2 |= (1 << 15) if self.send_paid_messages_stars is not None else 0
+        b.write(Int(flags2))
+
+        b.write(Long(self.id))
+
+        if self.access_hash is not None:
+            b.write(Long(self.access_hash))
+
+        if self.first_name is not None:
+            b.write(String(self.first_name))
+
+        if self.last_name is not None:
+            b.write(String(self.last_name))
+
+        if self.username is not None:
+            b.write(String(self.username))
+
+        if self.phone is not None:
+            b.write(String(self.phone))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        if self.status is not None:
+            b.write(self.status.write())
+
+        if self.bot_info_version is not None:
+            b.write(Int(self.bot_info_version))
+
+        if self.restriction_reason is not None:
+            b.write(Vector(self.restriction_reason))
+
+        if self.bot_inline_placeholder is not None:
+            b.write(String(self.bot_inline_placeholder))
+
+        if self.lang_code is not None:
+            b.write(String(self.lang_code))
+
+        if self.emoji_status is not None:
+            b.write(self.emoji_status.write())
+
+        if self.usernames is not None:
+            b.write(Vector(self.usernames))
+
+        if self.stories_max_id is not None:
+            b.write(self.stories_max_id.write())
+
+        if self.color is not None:
+            b.write(self.color.write())
+
+        if self.profile_color is not None:
+            b.write(self.profile_color.write())
+
+        if self.bot_active_users is not None:
+            b.write(Int(self.bot_active_users))
+
+        if self.bot_verification_icon is not None:
+            b.write(Long(self.bot_verification_icon))
+
+        if self.send_paid_messages_stars is not None:
+            b.write(Long(self.send_paid_messages_stars))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_empty.py b/pyrogram/raw/types/user_empty.py
new file mode 100644
index 00000000..f6bdc4d1
--- /dev/null
+++ b/pyrogram/raw/types/user_empty.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserEmpty(TLObject):  # type: ignore
+    """Empty constructor, non-existent user.
+
+    Constructor of :obj:`~pyrogram.raw.base.User`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D3BC4B7A``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            User identifier or 0
+
+    Functions:
+        This object can be returned by 9 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.UpdateProfile
+            account.UpdateUsername
+            account.ChangePhone
+            users.GetUsers
+            contacts.ImportContactToken
+            contacts.ImportCard
+            channels.GetMessageAuthor
+            channels.GetFutureCreatorAfterLeave
+            bots.GetAdminedBots
+    """
+
+    __slots__: List[str] = ["id"]
+
+    ID = 0xd3bc4b7a
+    QUALNAME = "types.UserEmpty"
+
+    def __init__(self, *, id: int) -> None:
+        self.id = id  # long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserEmpty":
+        # No flags
+
+        id = Long.read(b)
+
+        return UserEmpty(id=id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_full.py b/pyrogram/raw/types/user_full.py
new file mode 100644
index 00000000..f5d635bc
--- /dev/null
+++ b/pyrogram/raw/types/user_full.py
@@ -0,0 +1,506 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserFull(TLObject):  # type: ignore
+    """Extended user info
+
+    Constructor of :obj:`~pyrogram.raw.base.UserFull`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A02BC13E``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            User ID
+
+        settings (:obj:`PeerSettings `):
+            Peer settings
+
+        notify_settings (:obj:`PeerNotifySettings `):
+            Notification settings
+
+        common_chats_count (``int`` ``32-bit``):
+            Chats in common with this user
+
+        blocked (``bool``, *optional*):
+            Whether you have blocked this user
+
+        phone_calls_available (``bool``, *optional*):
+            Whether this user can make VoIP calls
+
+        phone_calls_private (``bool``, *optional*):
+            Whether this user's privacy settings allow you to call them
+
+        can_pin_message (``bool``, *optional*):
+            Whether you can pin messages in the chat with this user, you can do this only for a chat with yourself
+
+        has_scheduled (``bool``, *optional*):
+            Whether scheduled messages are available
+
+        video_calls_available (``bool``, *optional*):
+            Whether the user can receive video calls
+
+        voice_messages_forbidden (``bool``, *optional*):
+            Whether this user doesn't allow sending voice messages in a private chat with them
+
+        translations_disabled (``bool``, *optional*):
+            Whether the real-time chat translation popup should be hidden.
+
+        stories_pinned_available (``bool``, *optional*):
+            Whether this user has some pinned stories.
+
+        blocked_my_stories_from (``bool``, *optional*):
+            Whether we've blocked this user, preventing them from seeing our stories ».
+
+        wallpaper_overridden (``bool``, *optional*):
+            Whether the other user has chosen a custom wallpaper for us using messages.setChatWallPaper and the for_both flag, see here » for more info.
+
+        contact_require_premium (``bool``, *optional*):
+
+
+        read_dates_private (``bool``, *optional*):
+
+
+        sponsored_enabled (``bool``, *optional*):
+
+
+        can_view_revenue (``bool``, *optional*):
+            N/A
+
+        bot_can_manage_emoji_status (``bool``, *optional*):
+            N/A
+
+        display_gifts_button (``bool``, *optional*):
+            N/A
+
+        about (``str``, *optional*):
+            Bio of the user
+
+        personal_photo (:obj:`Photo `, *optional*):
+            Personal profile photo, to be shown instead of profile_photo.
+
+        profile_photo (:obj:`Photo `, *optional*):
+            Profile photo
+
+        fallback_photo (:obj:`Photo `, *optional*):
+            Fallback profile photo, displayed if no photo is present in profile_photo or personal_photo, due to privacy settings.
+
+        bot_info (:obj:`BotInfo `, *optional*):
+            For bots, info about the bot (bot commands, etc)
+
+        pinned_msg_id (``int`` ``32-bit``, *optional*):
+            Message ID of the last pinned message
+
+        folder_id (``int`` ``32-bit``, *optional*):
+            Peer folder ID, for more info click here
+
+        ttl_period (``int`` ``32-bit``, *optional*):
+            Time To Live of all messages in this chat; once a message is this many seconds old, it must be deleted.
+
+        theme (:obj:`ChatTheme `, *optional*):
+            N/A
+
+        private_forward_name (``str``, *optional*):
+            Anonymized text to be shown instead of the user's name on forwarded messages
+
+        bot_group_admin_rights (:obj:`ChatAdminRights `, *optional*):
+            A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a group, see here for more info on how to handle them ».
+
+        bot_broadcast_admin_rights (:obj:`ChatAdminRights `, *optional*):
+            A suggested set of administrator rights for the bot, to be shown when adding the bot as admin to a channel, see here for more info on how to handle them ».
+
+        wallpaper (:obj:`WallPaper `, *optional*):
+            Wallpaper to use in the private chat with the user.
+
+        stories (:obj:`PeerStories `, *optional*):
+            Active stories »
+
+        business_work_hours (:obj:`BusinessWorkHours `, *optional*):
+
+
+        business_location (:obj:`BusinessLocation `, *optional*):
+
+
+        business_greeting_message (:obj:`BusinessGreetingMessage `, *optional*):
+
+
+        business_away_message (:obj:`BusinessAwayMessage `, *optional*):
+
+
+        business_intro (:obj:`BusinessIntro `, *optional*):
+
+
+        birthday (:obj:`Birthday `, *optional*):
+
+
+        personal_channel_id (``int`` ``64-bit``, *optional*):
+
+
+        personal_channel_message (``int`` ``32-bit``, *optional*):
+
+
+        stargifts_count (``int`` ``32-bit``, *optional*):
+            N/A
+
+        starref_program (:obj:`StarRefProgram `, *optional*):
+            N/A
+
+        bot_verification (:obj:`BotVerification `, *optional*):
+            N/A
+
+        send_paid_messages_stars (``int`` ``64-bit``, *optional*):
+            N/A
+
+        disallowed_gifts (:obj:`DisallowedGiftsSettings `, *optional*):
+            N/A
+
+        stars_rating (:obj:`StarsRating `, *optional*):
+            N/A
+
+        stars_my_pending_rating (:obj:`StarsRating `, *optional*):
+            N/A
+
+        stars_my_pending_rating_date (``int`` ``32-bit``, *optional*):
+            N/A
+
+        main_tab (:obj:`ProfileTab `, *optional*):
+            N/A
+
+        saved_music (:obj:`Document `, *optional*):
+            N/A
+
+        note (:obj:`TextWithEntities `, *optional*):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["id", "settings", "notify_settings", "common_chats_count", "blocked", "phone_calls_available", "phone_calls_private", "can_pin_message", "has_scheduled", "video_calls_available", "voice_messages_forbidden", "translations_disabled", "stories_pinned_available", "blocked_my_stories_from", "wallpaper_overridden", "contact_require_premium", "read_dates_private", "sponsored_enabled", "can_view_revenue", "bot_can_manage_emoji_status", "display_gifts_button", "about", "personal_photo", "profile_photo", "fallback_photo", "bot_info", "pinned_msg_id", "folder_id", "ttl_period", "theme", "private_forward_name", "bot_group_admin_rights", "bot_broadcast_admin_rights", "wallpaper", "stories", "business_work_hours", "business_location", "business_greeting_message", "business_away_message", "business_intro", "birthday", "personal_channel_id", "personal_channel_message", "stargifts_count", "starref_program", "bot_verification", "send_paid_messages_stars", "disallowed_gifts", "stars_rating", "stars_my_pending_rating", "stars_my_pending_rating_date", "main_tab", "saved_music", "note"]
+
+    ID = 0xa02bc13e
+    QUALNAME = "types.UserFull"
+
+    def __init__(self, *, id: int, settings: "raw.base.PeerSettings", notify_settings: "raw.base.PeerNotifySettings", common_chats_count: int, blocked: Optional[bool] = None, phone_calls_available: Optional[bool] = None, phone_calls_private: Optional[bool] = None, can_pin_message: Optional[bool] = None, has_scheduled: Optional[bool] = None, video_calls_available: Optional[bool] = None, voice_messages_forbidden: Optional[bool] = None, translations_disabled: Optional[bool] = None, stories_pinned_available: Optional[bool] = None, blocked_my_stories_from: Optional[bool] = None, wallpaper_overridden: Optional[bool] = None, contact_require_premium: Optional[bool] = None, read_dates_private: Optional[bool] = None, sponsored_enabled: Optional[bool] = None, can_view_revenue: Optional[bool] = None, bot_can_manage_emoji_status: Optional[bool] = None, display_gifts_button: Optional[bool] = None, about: Optional[str] = None, personal_photo: "raw.base.Photo" = None, profile_photo: "raw.base.Photo" = None, fallback_photo: "raw.base.Photo" = None, bot_info: "raw.base.BotInfo" = None, pinned_msg_id: Optional[int] = None, folder_id: Optional[int] = None, ttl_period: Optional[int] = None, theme: "raw.base.ChatTheme" = None, private_forward_name: Optional[str] = None, bot_group_admin_rights: "raw.base.ChatAdminRights" = None, bot_broadcast_admin_rights: "raw.base.ChatAdminRights" = None, wallpaper: "raw.base.WallPaper" = None, stories: "raw.base.PeerStories" = None, business_work_hours: "raw.base.BusinessWorkHours" = None, business_location: "raw.base.BusinessLocation" = None, business_greeting_message: "raw.base.BusinessGreetingMessage" = None, business_away_message: "raw.base.BusinessAwayMessage" = None, business_intro: "raw.base.BusinessIntro" = None, birthday: "raw.base.Birthday" = None, personal_channel_id: Optional[int] = None, personal_channel_message: Optional[int] = None, stargifts_count: Optional[int] = None, starref_program: "raw.base.StarRefProgram" = None, bot_verification: "raw.base.BotVerification" = None, send_paid_messages_stars: Optional[int] = None, disallowed_gifts: "raw.base.DisallowedGiftsSettings" = None, stars_rating: "raw.base.StarsRating" = None, stars_my_pending_rating: "raw.base.StarsRating" = None, stars_my_pending_rating_date: Optional[int] = None, main_tab: "raw.base.ProfileTab" = None, saved_music: "raw.base.Document" = None, note: "raw.base.TextWithEntities" = None) -> None:
+        self.id = id  # long
+        self.settings = settings  # PeerSettings
+        self.notify_settings = notify_settings  # PeerNotifySettings
+        self.common_chats_count = common_chats_count  # int
+        self.blocked = blocked  # flags.0?true
+        self.phone_calls_available = phone_calls_available  # flags.4?true
+        self.phone_calls_private = phone_calls_private  # flags.5?true
+        self.can_pin_message = can_pin_message  # flags.7?true
+        self.has_scheduled = has_scheduled  # flags.12?true
+        self.video_calls_available = video_calls_available  # flags.13?true
+        self.voice_messages_forbidden = voice_messages_forbidden  # flags.20?true
+        self.translations_disabled = translations_disabled  # flags.23?true
+        self.stories_pinned_available = stories_pinned_available  # flags.26?true
+        self.blocked_my_stories_from = blocked_my_stories_from  # flags.27?true
+        self.wallpaper_overridden = wallpaper_overridden  # flags.28?true
+        self.contact_require_premium = contact_require_premium  # flags.29?true
+        self.read_dates_private = read_dates_private  # flags.30?true
+        self.sponsored_enabled = sponsored_enabled  # flags2.7?true
+        self.can_view_revenue = can_view_revenue  # flags2.9?true
+        self.bot_can_manage_emoji_status = bot_can_manage_emoji_status  # flags2.10?true
+        self.display_gifts_button = display_gifts_button  # flags2.16?true
+        self.about = about  # flags.1?string
+        self.personal_photo = personal_photo  # flags.21?Photo
+        self.profile_photo = profile_photo  # flags.2?Photo
+        self.fallback_photo = fallback_photo  # flags.22?Photo
+        self.bot_info = bot_info  # flags.3?BotInfo
+        self.pinned_msg_id = pinned_msg_id  # flags.6?int
+        self.folder_id = folder_id  # flags.11?int
+        self.ttl_period = ttl_period  # flags.14?int
+        self.theme = theme  # flags.15?ChatTheme
+        self.private_forward_name = private_forward_name  # flags.16?string
+        self.bot_group_admin_rights = bot_group_admin_rights  # flags.17?ChatAdminRights
+        self.bot_broadcast_admin_rights = bot_broadcast_admin_rights  # flags.18?ChatAdminRights
+        self.wallpaper = wallpaper  # flags.24?WallPaper
+        self.stories = stories  # flags.25?PeerStories
+        self.business_work_hours = business_work_hours  # flags2.0?BusinessWorkHours
+        self.business_location = business_location  # flags2.1?BusinessLocation
+        self.business_greeting_message = business_greeting_message  # flags2.2?BusinessGreetingMessage
+        self.business_away_message = business_away_message  # flags2.3?BusinessAwayMessage
+        self.business_intro = business_intro  # flags2.4?BusinessIntro
+        self.birthday = birthday  # flags2.5?Birthday
+        self.personal_channel_id = personal_channel_id  # flags2.6?long
+        self.personal_channel_message = personal_channel_message  # flags2.6?int
+        self.stargifts_count = stargifts_count  # flags2.8?int
+        self.starref_program = starref_program  # flags2.11?StarRefProgram
+        self.bot_verification = bot_verification  # flags2.12?BotVerification
+        self.send_paid_messages_stars = send_paid_messages_stars  # flags2.14?long
+        self.disallowed_gifts = disallowed_gifts  # flags2.15?DisallowedGiftsSettings
+        self.stars_rating = stars_rating  # flags2.17?StarsRating
+        self.stars_my_pending_rating = stars_my_pending_rating  # flags2.18?StarsRating
+        self.stars_my_pending_rating_date = stars_my_pending_rating_date  # flags2.18?int
+        self.main_tab = main_tab  # flags2.20?ProfileTab
+        self.saved_music = saved_music  # flags2.21?Document
+        self.note = note  # flags2.22?TextWithEntities
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserFull":
+
+        flags = Int.read(b)
+
+        blocked = True if flags & (1 << 0) else False
+        phone_calls_available = True if flags & (1 << 4) else False
+        phone_calls_private = True if flags & (1 << 5) else False
+        can_pin_message = True if flags & (1 << 7) else False
+        has_scheduled = True if flags & (1 << 12) else False
+        video_calls_available = True if flags & (1 << 13) else False
+        voice_messages_forbidden = True if flags & (1 << 20) else False
+        translations_disabled = True if flags & (1 << 23) else False
+        stories_pinned_available = True if flags & (1 << 26) else False
+        blocked_my_stories_from = True if flags & (1 << 27) else False
+        wallpaper_overridden = True if flags & (1 << 28) else False
+        contact_require_premium = True if flags & (1 << 29) else False
+        read_dates_private = True if flags & (1 << 30) else False
+        flags2 = Int.read(b)
+
+        sponsored_enabled = True if flags2 & (1 << 7) else False
+        can_view_revenue = True if flags2 & (1 << 9) else False
+        bot_can_manage_emoji_status = True if flags2 & (1 << 10) else False
+        display_gifts_button = True if flags2 & (1 << 16) else False
+        id = Long.read(b)
+
+        about = String.read(b) if flags & (1 << 1) else None
+        settings = TLObject.read(b)
+
+        personal_photo = TLObject.read(b) if flags & (1 << 21) else None
+
+        profile_photo = TLObject.read(b) if flags & (1 << 2) else None
+
+        fallback_photo = TLObject.read(b) if flags & (1 << 22) else None
+
+        notify_settings = TLObject.read(b)
+
+        bot_info = TLObject.read(b) if flags & (1 << 3) else None
+
+        pinned_msg_id = Int.read(b) if flags & (1 << 6) else None
+        common_chats_count = Int.read(b)
+
+        folder_id = Int.read(b) if flags & (1 << 11) else None
+        ttl_period = Int.read(b) if flags & (1 << 14) else None
+        theme = TLObject.read(b) if flags & (1 << 15) else None
+
+        private_forward_name = String.read(b) if flags & (1 << 16) else None
+        bot_group_admin_rights = TLObject.read(b) if flags & (1 << 17) else None
+
+        bot_broadcast_admin_rights = TLObject.read(b) if flags & (1 << 18) else None
+
+        wallpaper = TLObject.read(b) if flags & (1 << 24) else None
+
+        stories = TLObject.read(b) if flags & (1 << 25) else None
+
+        business_work_hours = TLObject.read(b) if flags2 & (1 << 0) else None
+
+        business_location = TLObject.read(b) if flags2 & (1 << 1) else None
+
+        business_greeting_message = TLObject.read(b) if flags2 & (1 << 2) else None
+
+        business_away_message = TLObject.read(b) if flags2 & (1 << 3) else None
+
+        business_intro = TLObject.read(b) if flags2 & (1 << 4) else None
+
+        birthday = TLObject.read(b) if flags2 & (1 << 5) else None
+
+        personal_channel_id = Long.read(b) if flags2 & (1 << 6) else None
+        personal_channel_message = Int.read(b) if flags2 & (1 << 6) else None
+        stargifts_count = Int.read(b) if flags2 & (1 << 8) else None
+        starref_program = TLObject.read(b) if flags2 & (1 << 11) else None
+
+        bot_verification = TLObject.read(b) if flags2 & (1 << 12) else None
+
+        send_paid_messages_stars = Long.read(b) if flags2 & (1 << 14) else None
+        disallowed_gifts = TLObject.read(b) if flags2 & (1 << 15) else None
+
+        stars_rating = TLObject.read(b) if flags2 & (1 << 17) else None
+
+        stars_my_pending_rating = TLObject.read(b) if flags2 & (1 << 18) else None
+
+        stars_my_pending_rating_date = Int.read(b) if flags2 & (1 << 18) else None
+        main_tab = TLObject.read(b) if flags2 & (1 << 20) else None
+
+        saved_music = TLObject.read(b) if flags2 & (1 << 21) else None
+
+        note = TLObject.read(b) if flags2 & (1 << 22) else None
+
+        return UserFull(id=id, settings=settings, notify_settings=notify_settings, common_chats_count=common_chats_count, blocked=blocked, phone_calls_available=phone_calls_available, phone_calls_private=phone_calls_private, can_pin_message=can_pin_message, has_scheduled=has_scheduled, video_calls_available=video_calls_available, voice_messages_forbidden=voice_messages_forbidden, translations_disabled=translations_disabled, stories_pinned_available=stories_pinned_available, blocked_my_stories_from=blocked_my_stories_from, wallpaper_overridden=wallpaper_overridden, contact_require_premium=contact_require_premium, read_dates_private=read_dates_private, sponsored_enabled=sponsored_enabled, can_view_revenue=can_view_revenue, bot_can_manage_emoji_status=bot_can_manage_emoji_status, display_gifts_button=display_gifts_button, about=about, personal_photo=personal_photo, profile_photo=profile_photo, fallback_photo=fallback_photo, bot_info=bot_info, pinned_msg_id=pinned_msg_id, folder_id=folder_id, ttl_period=ttl_period, theme=theme, private_forward_name=private_forward_name, bot_group_admin_rights=bot_group_admin_rights, bot_broadcast_admin_rights=bot_broadcast_admin_rights, wallpaper=wallpaper, stories=stories, business_work_hours=business_work_hours, business_location=business_location, business_greeting_message=business_greeting_message, business_away_message=business_away_message, business_intro=business_intro, birthday=birthday, personal_channel_id=personal_channel_id, personal_channel_message=personal_channel_message, stargifts_count=stargifts_count, starref_program=starref_program, bot_verification=bot_verification, send_paid_messages_stars=send_paid_messages_stars, disallowed_gifts=disallowed_gifts, stars_rating=stars_rating, stars_my_pending_rating=stars_my_pending_rating, stars_my_pending_rating_date=stars_my_pending_rating_date, main_tab=main_tab, saved_music=saved_music, note=note)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.blocked else 0
+        flags |= (1 << 4) if self.phone_calls_available else 0
+        flags |= (1 << 5) if self.phone_calls_private else 0
+        flags |= (1 << 7) if self.can_pin_message else 0
+        flags |= (1 << 12) if self.has_scheduled else 0
+        flags |= (1 << 13) if self.video_calls_available else 0
+        flags |= (1 << 20) if self.voice_messages_forbidden else 0
+        flags |= (1 << 23) if self.translations_disabled else 0
+        flags |= (1 << 26) if self.stories_pinned_available else 0
+        flags |= (1 << 27) if self.blocked_my_stories_from else 0
+        flags |= (1 << 28) if self.wallpaper_overridden else 0
+        flags |= (1 << 29) if self.contact_require_premium else 0
+        flags |= (1 << 30) if self.read_dates_private else 0
+        flags |= (1 << 1) if self.about is not None else 0
+        flags |= (1 << 21) if self.personal_photo is not None else 0
+        flags |= (1 << 2) if self.profile_photo is not None else 0
+        flags |= (1 << 22) if self.fallback_photo is not None else 0
+        flags |= (1 << 3) if self.bot_info is not None else 0
+        flags |= (1 << 6) if self.pinned_msg_id is not None else 0
+        flags |= (1 << 11) if self.folder_id is not None else 0
+        flags |= (1 << 14) if self.ttl_period is not None else 0
+        flags |= (1 << 15) if self.theme is not None else 0
+        flags |= (1 << 16) if self.private_forward_name is not None else 0
+        flags |= (1 << 17) if self.bot_group_admin_rights is not None else 0
+        flags |= (1 << 18) if self.bot_broadcast_admin_rights is not None else 0
+        flags |= (1 << 24) if self.wallpaper is not None else 0
+        flags |= (1 << 25) if self.stories is not None else 0
+        b.write(Int(flags))
+        flags2 = 0
+        flags2 |= (1 << 7) if self.sponsored_enabled else 0
+        flags2 |= (1 << 9) if self.can_view_revenue else 0
+        flags2 |= (1 << 10) if self.bot_can_manage_emoji_status else 0
+        flags2 |= (1 << 16) if self.display_gifts_button else 0
+        flags2 |= (1 << 0) if self.business_work_hours is not None else 0
+        flags2 |= (1 << 1) if self.business_location is not None else 0
+        flags2 |= (1 << 2) if self.business_greeting_message is not None else 0
+        flags2 |= (1 << 3) if self.business_away_message is not None else 0
+        flags2 |= (1 << 4) if self.business_intro is not None else 0
+        flags2 |= (1 << 5) if self.birthday is not None else 0
+        flags2 |= (1 << 6) if self.personal_channel_id is not None else 0
+        flags2 |= (1 << 6) if self.personal_channel_message is not None else 0
+        flags2 |= (1 << 8) if self.stargifts_count is not None else 0
+        flags2 |= (1 << 11) if self.starref_program is not None else 0
+        flags2 |= (1 << 12) if self.bot_verification is not None else 0
+        flags2 |= (1 << 14) if self.send_paid_messages_stars is not None else 0
+        flags2 |= (1 << 15) if self.disallowed_gifts is not None else 0
+        flags2 |= (1 << 17) if self.stars_rating is not None else 0
+        flags2 |= (1 << 18) if self.stars_my_pending_rating is not None else 0
+        flags2 |= (1 << 18) if self.stars_my_pending_rating_date is not None else 0
+        flags2 |= (1 << 20) if self.main_tab is not None else 0
+        flags2 |= (1 << 21) if self.saved_music is not None else 0
+        flags2 |= (1 << 22) if self.note is not None else 0
+        b.write(Int(flags2))
+
+        b.write(Long(self.id))
+
+        if self.about is not None:
+            b.write(String(self.about))
+
+        b.write(self.settings.write())
+
+        if self.personal_photo is not None:
+            b.write(self.personal_photo.write())
+
+        if self.profile_photo is not None:
+            b.write(self.profile_photo.write())
+
+        if self.fallback_photo is not None:
+            b.write(self.fallback_photo.write())
+
+        b.write(self.notify_settings.write())
+
+        if self.bot_info is not None:
+            b.write(self.bot_info.write())
+
+        if self.pinned_msg_id is not None:
+            b.write(Int(self.pinned_msg_id))
+
+        b.write(Int(self.common_chats_count))
+
+        if self.folder_id is not None:
+            b.write(Int(self.folder_id))
+
+        if self.ttl_period is not None:
+            b.write(Int(self.ttl_period))
+
+        if self.theme is not None:
+            b.write(self.theme.write())
+
+        if self.private_forward_name is not None:
+            b.write(String(self.private_forward_name))
+
+        if self.bot_group_admin_rights is not None:
+            b.write(self.bot_group_admin_rights.write())
+
+        if self.bot_broadcast_admin_rights is not None:
+            b.write(self.bot_broadcast_admin_rights.write())
+
+        if self.wallpaper is not None:
+            b.write(self.wallpaper.write())
+
+        if self.stories is not None:
+            b.write(self.stories.write())
+
+        if self.business_work_hours is not None:
+            b.write(self.business_work_hours.write())
+
+        if self.business_location is not None:
+            b.write(self.business_location.write())
+
+        if self.business_greeting_message is not None:
+            b.write(self.business_greeting_message.write())
+
+        if self.business_away_message is not None:
+            b.write(self.business_away_message.write())
+
+        if self.business_intro is not None:
+            b.write(self.business_intro.write())
+
+        if self.birthday is not None:
+            b.write(self.birthday.write())
+
+        if self.personal_channel_id is not None:
+            b.write(Long(self.personal_channel_id))
+
+        if self.personal_channel_message is not None:
+            b.write(Int(self.personal_channel_message))
+
+        if self.stargifts_count is not None:
+            b.write(Int(self.stargifts_count))
+
+        if self.starref_program is not None:
+            b.write(self.starref_program.write())
+
+        if self.bot_verification is not None:
+            b.write(self.bot_verification.write())
+
+        if self.send_paid_messages_stars is not None:
+            b.write(Long(self.send_paid_messages_stars))
+
+        if self.disallowed_gifts is not None:
+            b.write(self.disallowed_gifts.write())
+
+        if self.stars_rating is not None:
+            b.write(self.stars_rating.write())
+
+        if self.stars_my_pending_rating is not None:
+            b.write(self.stars_my_pending_rating.write())
+
+        if self.stars_my_pending_rating_date is not None:
+            b.write(Int(self.stars_my_pending_rating_date))
+
+        if self.main_tab is not None:
+            b.write(self.main_tab.write())
+
+        if self.saved_music is not None:
+            b.write(self.saved_music.write())
+
+        if self.note is not None:
+            b.write(self.note.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_profile_photo.py b/pyrogram/raw/types/user_profile_photo.py
new file mode 100644
index 00000000..b9a7ce9c
--- /dev/null
+++ b/pyrogram/raw/types/user_profile_photo.py
@@ -0,0 +1,85 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserProfilePhoto(TLObject):  # type: ignore
+    """User profile photo.
+
+    Constructor of :obj:`~pyrogram.raw.base.UserProfilePhoto`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``82D1F706``
+
+    Parameters:
+        photo_id (``int`` ``64-bit``):
+            Identifier of the respective photo
+
+        dc_id (``int`` ``32-bit``):
+            DC ID where the photo is stored
+
+        has_video (``bool``, *optional*):
+            Whether an animated profile picture is available for this user
+
+        personal (``bool``, *optional*):
+            Whether this profile photo is only visible to us (i.e. it was set using photos.uploadContactProfilePhoto).
+
+        stripped_thumb (``bytes``, *optional*):
+            Stripped thumbnail
+
+    """
+
+    __slots__: List[str] = ["photo_id", "dc_id", "has_video", "personal", "stripped_thumb"]
+
+    ID = 0x82d1f706
+    QUALNAME = "types.UserProfilePhoto"
+
+    def __init__(self, *, photo_id: int, dc_id: int, has_video: Optional[bool] = None, personal: Optional[bool] = None, stripped_thumb: Optional[bytes] = None) -> None:
+        self.photo_id = photo_id  # long
+        self.dc_id = dc_id  # int
+        self.has_video = has_video  # flags.0?true
+        self.personal = personal  # flags.2?true
+        self.stripped_thumb = stripped_thumb  # flags.1?bytes
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserProfilePhoto":
+
+        flags = Int.read(b)
+
+        has_video = True if flags & (1 << 0) else False
+        personal = True if flags & (1 << 2) else False
+        photo_id = Long.read(b)
+
+        stripped_thumb = Bytes.read(b) if flags & (1 << 1) else None
+        dc_id = Int.read(b)
+
+        return UserProfilePhoto(photo_id=photo_id, dc_id=dc_id, has_video=has_video, personal=personal, stripped_thumb=stripped_thumb)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.has_video else 0
+        flags |= (1 << 2) if self.personal else 0
+        flags |= (1 << 1) if self.stripped_thumb is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.photo_id))
+
+        if self.stripped_thumb is not None:
+            b.write(Bytes(self.stripped_thumb))
+
+        b.write(Int(self.dc_id))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_profile_photo_empty.py b/pyrogram/raw/types/user_profile_photo_empty.py
new file mode 100644
index 00000000..59a9760a
--- /dev/null
+++ b/pyrogram/raw/types/user_profile_photo_empty.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserProfilePhotoEmpty(TLObject):  # type: ignore
+    """Profile photo has not been set, or was hidden.
+
+    Constructor of :obj:`~pyrogram.raw.base.UserProfilePhoto`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4F11BAE1``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x4f11bae1
+    QUALNAME = "types.UserProfilePhotoEmpty"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserProfilePhotoEmpty":
+        # No flags
+
+        return UserProfilePhotoEmpty()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_empty.py b/pyrogram/raw/types/user_status_empty.py
new file mode 100644
index 00000000..c7727d40
--- /dev/null
+++ b/pyrogram/raw/types/user_status_empty.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusEmpty(TLObject):  # type: ignore
+    """User status has not been set yet.
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``9D05049``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0x9d05049
+    QUALNAME = "types.UserStatusEmpty"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusEmpty":
+        # No flags
+
+        return UserStatusEmpty()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_hidden.py b/pyrogram/raw/types/user_status_hidden.py
new file mode 100644
index 00000000..3ca9c5aa
--- /dev/null
+++ b/pyrogram/raw/types/user_status_hidden.py
@@ -0,0 +1,49 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusHidden(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CF7D64B1``
+
+    Parameters:
+        No parameters required.
+
+    """
+
+    __slots__: List[str] = []
+
+    ID = 0xcf7d64b1
+    QUALNAME = "types.UserStatusHidden"
+
+    def __init__(self) -> None:
+        pass
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusHidden":
+        # No flags
+
+        return UserStatusHidden()
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_last_month.py b/pyrogram/raw/types/user_status_last_month.py
new file mode 100644
index 00000000..bf4cb9d4
--- /dev/null
+++ b/pyrogram/raw/types/user_status_last_month.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusLastMonth(TLObject):  # type: ignore
+    """Online status: last seen last month
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``65899777``
+
+    Parameters:
+        by_me (``bool``, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["by_me"]
+
+    ID = 0x65899777
+    QUALNAME = "types.UserStatusLastMonth"
+
+    def __init__(self, *, by_me: Optional[bool] = None) -> None:
+        self.by_me = by_me  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusLastMonth":
+
+        flags = Int.read(b)
+
+        by_me = True if flags & (1 << 0) else False
+        return UserStatusLastMonth(by_me=by_me)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.by_me else 0
+        b.write(Int(flags))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_last_week.py b/pyrogram/raw/types/user_status_last_week.py
new file mode 100644
index 00000000..c1257f26
--- /dev/null
+++ b/pyrogram/raw/types/user_status_last_week.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusLastWeek(TLObject):  # type: ignore
+    """Online status: last seen last week
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``541A1D1A``
+
+    Parameters:
+        by_me (``bool``, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["by_me"]
+
+    ID = 0x541a1d1a
+    QUALNAME = "types.UserStatusLastWeek"
+
+    def __init__(self, *, by_me: Optional[bool] = None) -> None:
+        self.by_me = by_me  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusLastWeek":
+
+        flags = Int.read(b)
+
+        by_me = True if flags & (1 << 0) else False
+        return UserStatusLastWeek(by_me=by_me)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.by_me else 0
+        b.write(Int(flags))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_offline.py b/pyrogram/raw/types/user_status_offline.py
new file mode 100644
index 00000000..86095a88
--- /dev/null
+++ b/pyrogram/raw/types/user_status_offline.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusOffline(TLObject):  # type: ignore
+    """The user's offline status.
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``8C703F``
+
+    Parameters:
+        was_online (``int`` ``32-bit``):
+            Time the user was last seen online
+
+    """
+
+    __slots__: List[str] = ["was_online"]
+
+    ID = 0x8c703f
+    QUALNAME = "types.UserStatusOffline"
+
+    def __init__(self, *, was_online: int) -> None:
+        self.was_online = was_online  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusOffline":
+        # No flags
+
+        was_online = Int.read(b)
+
+        return UserStatusOffline(was_online=was_online)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.was_online))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_online.py b/pyrogram/raw/types/user_status_online.py
new file mode 100644
index 00000000..4775d4db
--- /dev/null
+++ b/pyrogram/raw/types/user_status_online.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusOnline(TLObject):  # type: ignore
+    """Online status of the user.
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``EDB93949``
+
+    Parameters:
+        expires (``int`` ``32-bit``):
+            Time to expiration of the current online status
+
+    """
+
+    __slots__: List[str] = ["expires"]
+
+    ID = 0xedb93949
+    QUALNAME = "types.UserStatusOnline"
+
+    def __init__(self, *, expires: int) -> None:
+        self.expires = expires  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusOnline":
+        # No flags
+
+        expires = Int.read(b)
+
+        return UserStatusOnline(expires=expires)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.expires))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/user_status_recently.py b/pyrogram/raw/types/user_status_recently.py
new file mode 100644
index 00000000..84ab27de
--- /dev/null
+++ b/pyrogram/raw/types/user_status_recently.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserStatusRecently(TLObject):  # type: ignore
+    """Online status: last seen recently
+
+    Constructor of :obj:`~pyrogram.raw.base.UserStatus`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7B197DC8``
+
+    Parameters:
+        by_me (``bool``, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["by_me"]
+
+    ID = 0x7b197dc8
+    QUALNAME = "types.UserStatusRecently"
+
+    def __init__(self, *, by_me: Optional[bool] = None) -> None:
+        self.by_me = by_me  # flags.0?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserStatusRecently":
+
+        flags = Int.read(b)
+
+        by_me = True if flags & (1 << 0) else False
+        return UserStatusRecently(by_me=by_me)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.by_me else 0
+        b.write(Int(flags))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/username.py b/pyrogram/raw/types/username.py
new file mode 100644
index 00000000..9bdae84c
--- /dev/null
+++ b/pyrogram/raw/types/username.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Username(TLObject):  # type: ignore
+    """Contains information about a username.
+
+    Constructor of :obj:`~pyrogram.raw.base.Username`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B4073647``
+
+    Parameters:
+        username (``str``):
+            The username.
+
+        editable (``bool``, *optional*):
+            Whether the username is editable, meaning it wasn't bought on fragment.
+
+        active (``bool``, *optional*):
+            Whether the username is active.
+
+    """
+
+    __slots__: List[str] = ["username", "editable", "active"]
+
+    ID = 0xb4073647
+    QUALNAME = "types.Username"
+
+    def __init__(self, *, username: str, editable: Optional[bool] = None, active: Optional[bool] = None) -> None:
+        self.username = username  # string
+        self.editable = editable  # flags.0?true
+        self.active = active  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Username":
+
+        flags = Int.read(b)
+
+        editable = True if flags & (1 << 0) else False
+        active = True if flags & (1 << 1) else False
+        username = String.read(b)
+
+        return Username(username=username, editable=editable, active=active)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.editable else 0
+        flags |= (1 << 1) if self.active else 0
+        b.write(Int(flags))
+
+        b.write(String(self.username))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/users/__init__.py b/pyrogram/raw/types/users/__init__.py
new file mode 100644
index 00000000..08eb660e
--- /dev/null
+++ b/pyrogram/raw/types/users/__init__.py
@@ -0,0 +1,41 @@
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+from .user_full import UserFull
+from .users import Users
+from .users_slice import UsersSlice
+from .saved_music_not_modified import SavedMusicNotModified
+from .saved_music import SavedMusic
+
+
+__all__ = [
+    "UserFull",
+    "Users",
+    "UsersSlice",
+    "SavedMusicNotModified",
+    "SavedMusic",
+    "help",
+    "storage",
+    "auth",
+    "contacts",
+    "messages",
+    "updates",
+    "photos",
+    "upload",
+    "account",
+    "channels",
+    "payments",
+    "phone",
+    "stats",
+    "stickers",
+    "users",
+    "chatlists",
+    "bots",
+    "stories",
+    "premium",
+    "smsjobs",
+    "fragment",
+]
diff --git a/pyrogram/raw/types/users/saved_music.py b/pyrogram/raw/types/users/saved_music.py
new file mode 100644
index 00000000..14e4955b
--- /dev/null
+++ b/pyrogram/raw/types/users/saved_music.py
@@ -0,0 +1,72 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedMusic(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.users.SavedMusic`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``34A2F297``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        documents (List of :obj:`Document `):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            users.GetSavedMusic
+            users.GetSavedMusicByID
+    """
+
+    __slots__: List[str] = ["count", "documents"]
+
+    ID = 0x34a2f297
+    QUALNAME = "types.users.SavedMusic"
+
+    def __init__(self, *, count: int, documents: List["raw.base.Document"]) -> None:
+        self.count = count  # int
+        self.documents = documents  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedMusic":
+        # No flags
+
+        count = Int.read(b)
+
+        documents = TLObject.read(b)
+
+        return SavedMusic(count=count, documents=documents)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.documents))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/users/saved_music_not_modified.py b/pyrogram/raw/types/users/saved_music_not_modified.py
new file mode 100644
index 00000000..dcdf97d2
--- /dev/null
+++ b/pyrogram/raw/types/users/saved_music_not_modified.py
@@ -0,0 +1,64 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class SavedMusicNotModified(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.users.SavedMusic`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E3878AA4``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+    Functions:
+        This object can be returned by 2 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            users.GetSavedMusic
+            users.GetSavedMusicByID
+    """
+
+    __slots__: List[str] = ["count"]
+
+    ID = 0xe3878aa4
+    QUALNAME = "types.users.SavedMusicNotModified"
+
+    def __init__(self, *, count: int) -> None:
+        self.count = count  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "SavedMusicNotModified":
+        # No flags
+
+        count = Int.read(b)
+
+        return SavedMusicNotModified(count=count)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/users/user_full.py b/pyrogram/raw/types/users/user_full.py
new file mode 100644
index 00000000..9c685e24
--- /dev/null
+++ b/pyrogram/raw/types/users/user_full.py
@@ -0,0 +1,79 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UserFull(TLObject):  # type: ignore
+    """Full user information
+
+    Constructor of :obj:`~pyrogram.raw.base.users.UserFull`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``3B6D152E``
+
+    Parameters:
+        full_user (:obj:`UserFull `):
+            Full user information
+
+        chats (List of :obj:`Chat `):
+            Mentioned chats
+
+        users (List of :obj:`User `):
+            Mentioned users
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            users.GetFullUser
+    """
+
+    __slots__: List[str] = ["full_user", "chats", "users"]
+
+    ID = 0x3b6d152e
+    QUALNAME = "types.users.UserFull"
+
+    def __init__(self, *, full_user: "raw.base.UserFull", chats: List["raw.base.Chat"], users: List["raw.base.User"]) -> None:
+        self.full_user = full_user  # UserFull
+        self.chats = chats  # Vector
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UserFull":
+        # No flags
+
+        full_user = TLObject.read(b)
+
+        chats = TLObject.read(b)
+
+        users = TLObject.read(b)
+
+        return UserFull(full_user=full_user, chats=chats, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.full_user.write())
+
+        b.write(Vector(self.chats))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/users/users.py b/pyrogram/raw/types/users/users.py
new file mode 100644
index 00000000..505f1111
--- /dev/null
+++ b/pyrogram/raw/types/users/users.py
@@ -0,0 +1,63 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class Users(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.users.Users`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``62D706B8``
+
+    Parameters:
+        users (List of :obj:`User `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            bots.GetBotRecommendations
+    """
+
+    __slots__: List[str] = ["users"]
+
+    ID = 0x62d706b8
+    QUALNAME = "types.users.Users"
+
+    def __init__(self, *, users: List["raw.base.User"]) -> None:
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "Users":
+        # No flags
+
+        users = TLObject.read(b)
+
+        return Users(users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/users/users_slice.py b/pyrogram/raw/types/users/users_slice.py
new file mode 100644
index 00000000..5ba78c60
--- /dev/null
+++ b/pyrogram/raw/types/users/users_slice.py
@@ -0,0 +1,71 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class UsersSlice(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.users.Users`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``315A4974``
+
+    Parameters:
+        count (``int`` ``32-bit``):
+            N/A
+
+        users (List of :obj:`User `):
+            N/A
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            bots.GetBotRecommendations
+    """
+
+    __slots__: List[str] = ["count", "users"]
+
+    ID = 0x315a4974
+    QUALNAME = "types.users.UsersSlice"
+
+    def __init__(self, *, count: int, users: List["raw.base.User"]) -> None:
+        self.count = count  # int
+        self.users = users  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "UsersSlice":
+        # No flags
+
+        count = Int.read(b)
+
+        users = TLObject.read(b)
+
+        return UsersSlice(count=count, users=users)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Int(self.count))
+
+        b.write(Vector(self.users))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/video_size.py b/pyrogram/raw/types/video_size.py
new file mode 100644
index 00000000..e9e4b97d
--- /dev/null
+++ b/pyrogram/raw/types/video_size.py
@@ -0,0 +1,89 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class VideoSize(TLObject):  # type: ignore
+    """An animated profile picture in MPEG4 format
+
+    Constructor of :obj:`~pyrogram.raw.base.VideoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DE33B094``
+
+    Parameters:
+        type (``str``):
+            u for animated profile pictures, and v for trimmed and downscaled video previews
+
+        w (``int`` ``32-bit``):
+            Video width
+
+        h (``int`` ``32-bit``):
+            Video height
+
+        size (``int`` ``32-bit``):
+            File size
+
+        video_start_ts (``float`` ``64-bit``, *optional*):
+            Timestamp that should be shown as static preview to the user (seconds)
+
+    """
+
+    __slots__: List[str] = ["type", "w", "h", "size", "video_start_ts"]
+
+    ID = 0xde33b094
+    QUALNAME = "types.VideoSize"
+
+    def __init__(self, *, type: str, w: int, h: int, size: int, video_start_ts: Optional[float] = None) -> None:
+        self.type = type  # string
+        self.w = w  # int
+        self.h = h  # int
+        self.size = size  # int
+        self.video_start_ts = video_start_ts  # flags.0?double
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "VideoSize":
+
+        flags = Int.read(b)
+
+        type = String.read(b)
+
+        w = Int.read(b)
+
+        h = Int.read(b)
+
+        size = Int.read(b)
+
+        video_start_ts = Double.read(b) if flags & (1 << 0) else None
+        return VideoSize(type=type, w=w, h=h, size=size, video_start_ts=video_start_ts)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.video_start_ts is not None else 0
+        b.write(Int(flags))
+
+        b.write(String(self.type))
+
+        b.write(Int(self.w))
+
+        b.write(Int(self.h))
+
+        b.write(Int(self.size))
+
+        if self.video_start_ts is not None:
+            b.write(Double(self.video_start_ts))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/video_size_emoji_markup.py b/pyrogram/raw/types/video_size_emoji_markup.py
new file mode 100644
index 00000000..b41c45f8
--- /dev/null
+++ b/pyrogram/raw/types/video_size_emoji_markup.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class VideoSizeEmojiMarkup(TLObject):  # type: ignore
+    """An animated profile picture based on a custom emoji sticker.
+
+    Constructor of :obj:`~pyrogram.raw.base.VideoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F85C413C``
+
+    Parameters:
+        emoji_id (``int`` ``64-bit``):
+            Custom emoji ID: the custom emoji sticker is shown at the center of the profile picture and occupies at most 67% of it.
+
+        background_colors (List of ``int`` ``32-bit``):
+            1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0.
+
+    """
+
+    __slots__: List[str] = ["emoji_id", "background_colors"]
+
+    ID = 0xf85c413c
+    QUALNAME = "types.VideoSizeEmojiMarkup"
+
+    def __init__(self, *, emoji_id: int, background_colors: List[int]) -> None:
+        self.emoji_id = emoji_id  # long
+        self.background_colors = background_colors  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "VideoSizeEmojiMarkup":
+        # No flags
+
+        emoji_id = Long.read(b)
+
+        background_colors = TLObject.read(b, Int)
+
+        return VideoSizeEmojiMarkup(emoji_id=emoji_id, background_colors=background_colors)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.emoji_id))
+
+        b.write(Vector(self.background_colors, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/video_size_sticker_markup.py b/pyrogram/raw/types/video_size_sticker_markup.py
new file mode 100644
index 00000000..cc486f04
--- /dev/null
+++ b/pyrogram/raw/types/video_size_sticker_markup.py
@@ -0,0 +1,70 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class VideoSizeStickerMarkup(TLObject):  # type: ignore
+    """An animated profile picture based on a sticker.
+
+    Constructor of :obj:`~pyrogram.raw.base.VideoSize`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``DA082FE``
+
+    Parameters:
+        stickerset (:obj:`InputStickerSet `):
+            Stickerset
+
+        sticker_id (``int`` ``64-bit``):
+            Sticker ID
+
+        background_colors (List of ``int`` ``32-bit``):
+            1, 2, 3 or 4 RBG-24 colors used to generate a solid (1), gradient (2) or freeform gradient (3, 4) background, similar to how fill wallpapers are generated. The rotation angle for gradient backgrounds is 0.
+
+    """
+
+    __slots__: List[str] = ["stickerset", "sticker_id", "background_colors"]
+
+    ID = 0xda082fe
+    QUALNAME = "types.VideoSizeStickerMarkup"
+
+    def __init__(self, *, stickerset: "raw.base.InputStickerSet", sticker_id: int, background_colors: List[int]) -> None:
+        self.stickerset = stickerset  # InputStickerSet
+        self.sticker_id = sticker_id  # long
+        self.background_colors = background_colors  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "VideoSizeStickerMarkup":
+        # No flags
+
+        stickerset = TLObject.read(b)
+
+        sticker_id = Long.read(b)
+
+        background_colors = TLObject.read(b, Int)
+
+        return VideoSizeStickerMarkup(stickerset=stickerset, sticker_id=sticker_id, background_colors=background_colors)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.stickerset.write())
+
+        b.write(Long(self.sticker_id))
+
+        b.write(Vector(self.background_colors, Int))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/wall_paper.py b/pyrogram/raw/types/wall_paper.py
new file mode 100644
index 00000000..2b7580ed
--- /dev/null
+++ b/pyrogram/raw/types/wall_paper.py
@@ -0,0 +1,125 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WallPaper(TLObject):  # type: ignore
+    """Represents a wallpaper based on an image.
+
+    Constructor of :obj:`~pyrogram.raw.base.WallPaper`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A437C3ED``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Identifier
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        slug (``str``):
+            Unique wallpaper ID, used when generating wallpaper links or importing wallpaper links.
+
+        document (:obj:`Document `):
+            The actual wallpaper
+
+        creator (``bool``, *optional*):
+            Whether we created this wallpaper
+
+        default (``bool``, *optional*):
+            Whether this is the default wallpaper
+
+        pattern (``bool``, *optional*):
+            Whether this is a pattern wallpaper »
+
+        dark (``bool``, *optional*):
+            Whether this wallpaper should be used in dark mode.
+
+        settings (:obj:`WallPaperSettings `, *optional*):
+            Info on how to generate the wallpaper, according to these instructions ».
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetWallPaper
+            account.UploadWallPaper
+            account.GetMultiWallPapers
+    """
+
+    __slots__: List[str] = ["id", "access_hash", "slug", "document", "creator", "default", "pattern", "dark", "settings"]
+
+    ID = 0xa437c3ed
+    QUALNAME = "types.WallPaper"
+
+    def __init__(self, *, id: int, access_hash: int, slug: str, document: "raw.base.Document", creator: Optional[bool] = None, default: Optional[bool] = None, pattern: Optional[bool] = None, dark: Optional[bool] = None, settings: "raw.base.WallPaperSettings" = None) -> None:
+        self.id = id  # long
+        self.access_hash = access_hash  # long
+        self.slug = slug  # string
+        self.document = document  # Document
+        self.creator = creator  # flags.0?true
+        self.default = default  # flags.1?true
+        self.pattern = pattern  # flags.3?true
+        self.dark = dark  # flags.4?true
+        self.settings = settings  # flags.2?WallPaperSettings
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WallPaper":
+
+        id = Long.read(b)
+
+        flags = Int.read(b)
+
+        creator = True if flags & (1 << 0) else False
+        default = True if flags & (1 << 1) else False
+        pattern = True if flags & (1 << 3) else False
+        dark = True if flags & (1 << 4) else False
+        access_hash = Long.read(b)
+
+        slug = String.read(b)
+
+        document = TLObject.read(b)
+
+        settings = TLObject.read(b) if flags & (1 << 2) else None
+
+        return WallPaper(id=id, access_hash=access_hash, slug=slug, document=document, creator=creator, default=default, pattern=pattern, dark=dark, settings=settings)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+
+        b.write(Long(self.id))
+        flags = 0
+        flags |= (1 << 0) if self.creator else 0
+        flags |= (1 << 1) if self.default else 0
+        flags |= (1 << 3) if self.pattern else 0
+        flags |= (1 << 4) if self.dark else 0
+        flags |= (1 << 2) if self.settings is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.access_hash))
+
+        b.write(String(self.slug))
+
+        b.write(self.document.write())
+
+        if self.settings is not None:
+            b.write(self.settings.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/wall_paper_no_file.py b/pyrogram/raw/types/wall_paper_no_file.py
new file mode 100644
index 00000000..b3c1dd9a
--- /dev/null
+++ b/pyrogram/raw/types/wall_paper_no_file.py
@@ -0,0 +1,89 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WallPaperNoFile(TLObject):  # type: ignore
+    """Represents a wallpaper only based on colors/gradients.
+
+    Constructor of :obj:`~pyrogram.raw.base.WallPaper`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E0804116``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Wallpaper ID
+
+        default (``bool``, *optional*):
+            Whether this is the default wallpaper
+
+        dark (``bool``, *optional*):
+            Whether this wallpaper should be used in dark mode.
+
+        settings (:obj:`WallPaperSettings `, *optional*):
+            Info on how to generate the wallpaper.
+
+    Functions:
+        This object can be returned by 3 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            account.GetWallPaper
+            account.UploadWallPaper
+            account.GetMultiWallPapers
+    """
+
+    __slots__: List[str] = ["id", "default", "dark", "settings"]
+
+    ID = 0xe0804116
+    QUALNAME = "types.WallPaperNoFile"
+
+    def __init__(self, *, id: int, default: Optional[bool] = None, dark: Optional[bool] = None, settings: "raw.base.WallPaperSettings" = None) -> None:
+        self.id = id  # long
+        self.default = default  # flags.1?true
+        self.dark = dark  # flags.4?true
+        self.settings = settings  # flags.2?WallPaperSettings
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WallPaperNoFile":
+
+        id = Long.read(b)
+
+        flags = Int.read(b)
+
+        default = True if flags & (1 << 1) else False
+        dark = True if flags & (1 << 4) else False
+        settings = TLObject.read(b) if flags & (1 << 2) else None
+
+        return WallPaperNoFile(id=id, default=default, dark=dark, settings=settings)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+
+        b.write(Long(self.id))
+        flags = 0
+        flags |= (1 << 1) if self.default else 0
+        flags |= (1 << 4) if self.dark else 0
+        flags |= (1 << 2) if self.settings is not None else 0
+        b.write(Int(flags))
+
+        if self.settings is not None:
+            b.write(self.settings.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/wall_paper_settings.py b/pyrogram/raw/types/wall_paper_settings.py
new file mode 100644
index 00000000..7e0b0188
--- /dev/null
+++ b/pyrogram/raw/types/wall_paper_settings.py
@@ -0,0 +1,123 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WallPaperSettings(TLObject):  # type: ignore
+    """Wallpaper rendering information.
+
+    Constructor of :obj:`~pyrogram.raw.base.WallPaperSettings`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``372EFCD0``
+
+    Parameters:
+        blur (``bool``, *optional*):
+            For image wallpapers »: if set, the JPEG must be downscaled to fit in 450x450 square and then box-blurred with radius 12.
+
+        motion (``bool``, *optional*):
+            If set, the background needs to be slightly moved when the device is rotated.
+
+        background_color (``int`` ``32-bit``, *optional*):
+            Used for solid », gradient » and freeform gradient » fills.
+
+        second_background_color (``int`` ``32-bit``, *optional*):
+            Used for gradient » and freeform gradient » fills.
+
+        third_background_color (``int`` ``32-bit``, *optional*):
+            Used for freeform gradient » fills.
+
+        fourth_background_color (``int`` ``32-bit``, *optional*):
+            Used for freeform gradient » fills.
+
+        intensity (``int`` ``32-bit``, *optional*):
+            Used for pattern wallpapers ».
+
+        rotation (``int`` ``32-bit``, *optional*):
+            Clockwise rotation angle of the gradient, in degrees; 0-359. Should be always divisible by 45.
+
+        emoticon (``str``, *optional*):
+            If set, this wallpaper can be used as a channel wallpaper and is represented by the specified UTF-8 emoji.
+
+    """
+
+    __slots__: List[str] = ["blur", "motion", "background_color", "second_background_color", "third_background_color", "fourth_background_color", "intensity", "rotation", "emoticon"]
+
+    ID = 0x372efcd0
+    QUALNAME = "types.WallPaperSettings"
+
+    def __init__(self, *, blur: Optional[bool] = None, motion: Optional[bool] = None, background_color: Optional[int] = None, second_background_color: Optional[int] = None, third_background_color: Optional[int] = None, fourth_background_color: Optional[int] = None, intensity: Optional[int] = None, rotation: Optional[int] = None, emoticon: Optional[str] = None) -> None:
+        self.blur = blur  # flags.1?true
+        self.motion = motion  # flags.2?true
+        self.background_color = background_color  # flags.0?int
+        self.second_background_color = second_background_color  # flags.4?int
+        self.third_background_color = third_background_color  # flags.5?int
+        self.fourth_background_color = fourth_background_color  # flags.6?int
+        self.intensity = intensity  # flags.3?int
+        self.rotation = rotation  # flags.4?int
+        self.emoticon = emoticon  # flags.7?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WallPaperSettings":
+
+        flags = Int.read(b)
+
+        blur = True if flags & (1 << 1) else False
+        motion = True if flags & (1 << 2) else False
+        background_color = Int.read(b) if flags & (1 << 0) else None
+        second_background_color = Int.read(b) if flags & (1 << 4) else None
+        third_background_color = Int.read(b) if flags & (1 << 5) else None
+        fourth_background_color = Int.read(b) if flags & (1 << 6) else None
+        intensity = Int.read(b) if flags & (1 << 3) else None
+        rotation = Int.read(b) if flags & (1 << 4) else None
+        emoticon = String.read(b) if flags & (1 << 7) else None
+        return WallPaperSettings(blur=blur, motion=motion, background_color=background_color, second_background_color=second_background_color, third_background_color=third_background_color, fourth_background_color=fourth_background_color, intensity=intensity, rotation=rotation, emoticon=emoticon)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.blur else 0
+        flags |= (1 << 2) if self.motion else 0
+        flags |= (1 << 0) if self.background_color is not None else 0
+        flags |= (1 << 4) if self.second_background_color is not None else 0
+        flags |= (1 << 5) if self.third_background_color is not None else 0
+        flags |= (1 << 6) if self.fourth_background_color is not None else 0
+        flags |= (1 << 3) if self.intensity is not None else 0
+        flags |= (1 << 4) if self.rotation is not None else 0
+        flags |= (1 << 7) if self.emoticon is not None else 0
+        b.write(Int(flags))
+
+        if self.background_color is not None:
+            b.write(Int(self.background_color))
+
+        if self.second_background_color is not None:
+            b.write(Int(self.second_background_color))
+
+        if self.third_background_color is not None:
+            b.write(Int(self.third_background_color))
+
+        if self.fourth_background_color is not None:
+            b.write(Int(self.fourth_background_color))
+
+        if self.intensity is not None:
+            b.write(Int(self.intensity))
+
+        if self.rotation is not None:
+            b.write(Int(self.rotation))
+
+        if self.emoticon is not None:
+            b.write(String(self.emoticon))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_authorization.py b/pyrogram/raw/types/web_authorization.py
new file mode 100644
index 00000000..e27bef12
--- /dev/null
+++ b/pyrogram/raw/types/web_authorization.py
@@ -0,0 +1,118 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebAuthorization(TLObject):  # type: ignore
+    """Represents a bot logged in using the Telegram login widget
+
+    Constructor of :obj:`~pyrogram.raw.base.WebAuthorization`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``A6F8F452``
+
+    Parameters:
+        hash (``int`` ``64-bit``):
+            Authorization hash
+
+        bot_id (``int`` ``64-bit``):
+            Bot ID
+
+        domain (``str``):
+            The domain name of the website on which the user has logged in.
+
+        browser (``str``):
+            Browser user-agent
+
+        platform (``str``):
+            Platform
+
+        date_created (``int`` ``32-bit``):
+            When was the web session created
+
+        date_active (``int`` ``32-bit``):
+            When was the web session last active
+
+        ip (``str``):
+            IP address
+
+        region (``str``):
+            Region, determined from IP address
+
+    """
+
+    __slots__: List[str] = ["hash", "bot_id", "domain", "browser", "platform", "date_created", "date_active", "ip", "region"]
+
+    ID = 0xa6f8f452
+    QUALNAME = "types.WebAuthorization"
+
+    def __init__(self, *, hash: int, bot_id: int, domain: str, browser: str, platform: str, date_created: int, date_active: int, ip: str, region: str) -> None:
+        self.hash = hash  # long
+        self.bot_id = bot_id  # long
+        self.domain = domain  # string
+        self.browser = browser  # string
+        self.platform = platform  # string
+        self.date_created = date_created  # int
+        self.date_active = date_active  # int
+        self.ip = ip  # string
+        self.region = region  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebAuthorization":
+        # No flags
+
+        hash = Long.read(b)
+
+        bot_id = Long.read(b)
+
+        domain = String.read(b)
+
+        browser = String.read(b)
+
+        platform = String.read(b)
+
+        date_created = Int.read(b)
+
+        date_active = Int.read(b)
+
+        ip = String.read(b)
+
+        region = String.read(b)
+
+        return WebAuthorization(hash=hash, bot_id=bot_id, domain=domain, browser=browser, platform=platform, date_created=date_created, date_active=date_active, ip=ip, region=region)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Long(self.hash))
+
+        b.write(Long(self.bot_id))
+
+        b.write(String(self.domain))
+
+        b.write(String(self.browser))
+
+        b.write(String(self.platform))
+
+        b.write(Int(self.date_created))
+
+        b.write(Int(self.date_active))
+
+        b.write(String(self.ip))
+
+        b.write(String(self.region))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_document.py b/pyrogram/raw/types/web_document.py
new file mode 100644
index 00000000..988204ca
--- /dev/null
+++ b/pyrogram/raw/types/web_document.py
@@ -0,0 +1,86 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebDocument(TLObject):  # type: ignore
+    """Remote document
+
+    Constructor of :obj:`~pyrogram.raw.base.WebDocument`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1C570ED1``
+
+    Parameters:
+        url (``str``):
+            Document URL
+
+        access_hash (``int`` ``64-bit``):
+            Access hash
+
+        size (``int`` ``32-bit``):
+            File size
+
+        mime_type (``str``):
+            MIME type
+
+        attributes (List of :obj:`DocumentAttribute `):
+            Attributes for media types
+
+    """
+
+    __slots__: List[str] = ["url", "access_hash", "size", "mime_type", "attributes"]
+
+    ID = 0x1c570ed1
+    QUALNAME = "types.WebDocument"
+
+    def __init__(self, *, url: str, access_hash: int, size: int, mime_type: str, attributes: List["raw.base.DocumentAttribute"]) -> None:
+        self.url = url  # string
+        self.access_hash = access_hash  # long
+        self.size = size  # int
+        self.mime_type = mime_type  # string
+        self.attributes = attributes  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebDocument":
+        # No flags
+
+        url = String.read(b)
+
+        access_hash = Long.read(b)
+
+        size = Int.read(b)
+
+        mime_type = String.read(b)
+
+        attributes = TLObject.read(b)
+
+        return WebDocument(url=url, access_hash=access_hash, size=size, mime_type=mime_type, attributes=attributes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(Long(self.access_hash))
+
+        b.write(Int(self.size))
+
+        b.write(String(self.mime_type))
+
+        b.write(Vector(self.attributes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_document_no_proxy.py b/pyrogram/raw/types/web_document_no_proxy.py
new file mode 100644
index 00000000..ae3bd6dc
--- /dev/null
+++ b/pyrogram/raw/types/web_document_no_proxy.py
@@ -0,0 +1,78 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebDocumentNoProxy(TLObject):  # type: ignore
+    """Remote document that can be downloaded without proxying through telegram
+
+    Constructor of :obj:`~pyrogram.raw.base.WebDocument`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``F9C8BCC6``
+
+    Parameters:
+        url (``str``):
+            Document URL
+
+        size (``int`` ``32-bit``):
+            File size
+
+        mime_type (``str``):
+            MIME type
+
+        attributes (List of :obj:`DocumentAttribute `):
+            Attributes for media types
+
+    """
+
+    __slots__: List[str] = ["url", "size", "mime_type", "attributes"]
+
+    ID = 0xf9c8bcc6
+    QUALNAME = "types.WebDocumentNoProxy"
+
+    def __init__(self, *, url: str, size: int, mime_type: str, attributes: List["raw.base.DocumentAttribute"]) -> None:
+        self.url = url  # string
+        self.size = size  # int
+        self.mime_type = mime_type  # string
+        self.attributes = attributes  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebDocumentNoProxy":
+        # No flags
+
+        url = String.read(b)
+
+        size = Int.read(b)
+
+        mime_type = String.read(b)
+
+        attributes = TLObject.read(b)
+
+        return WebDocumentNoProxy(url=url, size=size, mime_type=mime_type, attributes=attributes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        b.write(Int(self.size))
+
+        b.write(String(self.mime_type))
+
+        b.write(Vector(self.attributes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page.py b/pyrogram/raw/types/web_page.py
new file mode 100644
index 00000000..d008bb24
--- /dev/null
+++ b/pyrogram/raw/types/web_page.py
@@ -0,0 +1,222 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPage(TLObject):  # type: ignore
+    """Webpage preview
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``E89C45B2``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Preview ID
+
+        url (``str``):
+            URL of previewed webpage
+
+        display_url (``str``):
+            Webpage URL to be displayed to the user
+
+        hash (``int`` ``32-bit``):
+            Hash for pagination, for more info click here
+
+        has_large_media (``bool``, *optional*):
+            Whether the size of the media in the preview can be changed.
+
+        video_cover_photo (``bool``, *optional*):
+            N/A
+
+        type (``str``, *optional*):
+            Type of the web page. Can be: article, photo, audio, video, document, profile, app, or something else
+
+        site_name (``str``, *optional*):
+            Short name of the site (e.g., Google Docs, App Store)
+
+        title (``str``, *optional*):
+            Title of the content
+
+        description (``str``, *optional*):
+            Content description
+
+        photo (:obj:`Photo `, *optional*):
+            Image representing the content
+
+        embed_url (``str``, *optional*):
+            URL to show in the embedded preview
+
+        embed_type (``str``, *optional*):
+            MIME type of the embedded preview, (e.g., text/html or video/mp4)
+
+        embed_width (``int`` ``32-bit``, *optional*):
+            Width of the embedded preview
+
+        embed_height (``int`` ``32-bit``, *optional*):
+            Height of the embedded preview
+
+        duration (``int`` ``32-bit``, *optional*):
+            Duration of the content, in seconds
+
+        author (``str``, *optional*):
+            Author of the content
+
+        document (:obj:`Document `, *optional*):
+            Preview of the content as a media file
+
+        cached_page (:obj:`Page `, *optional*):
+            Page contents in instant view format
+
+        attributes (List of :obj:`WebPageAttribute `, *optional*):
+            Webpage attributes
+
+    """
+
+    __slots__: List[str] = ["id", "url", "display_url", "hash", "has_large_media", "video_cover_photo", "type", "site_name", "title", "description", "photo", "embed_url", "embed_type", "embed_width", "embed_height", "duration", "author", "document", "cached_page", "attributes"]
+
+    ID = 0xe89c45b2
+    QUALNAME = "types.WebPage"
+
+    def __init__(self, *, id: int, url: str, display_url: str, hash: int, has_large_media: Optional[bool] = None, video_cover_photo: Optional[bool] = None, type: Optional[str] = None, site_name: Optional[str] = None, title: Optional[str] = None, description: Optional[str] = None, photo: "raw.base.Photo" = None, embed_url: Optional[str] = None, embed_type: Optional[str] = None, embed_width: Optional[int] = None, embed_height: Optional[int] = None, duration: Optional[int] = None, author: Optional[str] = None, document: "raw.base.Document" = None, cached_page: "raw.base.Page" = None, attributes: Optional[List["raw.base.WebPageAttribute"]] = None) -> None:
+        self.id = id  # long
+        self.url = url  # string
+        self.display_url = display_url  # string
+        self.hash = hash  # int
+        self.has_large_media = has_large_media  # flags.13?true
+        self.video_cover_photo = video_cover_photo  # flags.14?true
+        self.type = type  # flags.0?string
+        self.site_name = site_name  # flags.1?string
+        self.title = title  # flags.2?string
+        self.description = description  # flags.3?string
+        self.photo = photo  # flags.4?Photo
+        self.embed_url = embed_url  # flags.5?string
+        self.embed_type = embed_type  # flags.5?string
+        self.embed_width = embed_width  # flags.6?int
+        self.embed_height = embed_height  # flags.6?int
+        self.duration = duration  # flags.7?int
+        self.author = author  # flags.8?string
+        self.document = document  # flags.9?Document
+        self.cached_page = cached_page  # flags.10?Page
+        self.attributes = attributes  # flags.12?Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPage":
+
+        flags = Int.read(b)
+
+        has_large_media = True if flags & (1 << 13) else False
+        video_cover_photo = True if flags & (1 << 14) else False
+        id = Long.read(b)
+
+        url = String.read(b)
+
+        display_url = String.read(b)
+
+        hash = Int.read(b)
+
+        type = String.read(b) if flags & (1 << 0) else None
+        site_name = String.read(b) if flags & (1 << 1) else None
+        title = String.read(b) if flags & (1 << 2) else None
+        description = String.read(b) if flags & (1 << 3) else None
+        photo = TLObject.read(b) if flags & (1 << 4) else None
+
+        embed_url = String.read(b) if flags & (1 << 5) else None
+        embed_type = String.read(b) if flags & (1 << 5) else None
+        embed_width = Int.read(b) if flags & (1 << 6) else None
+        embed_height = Int.read(b) if flags & (1 << 6) else None
+        duration = Int.read(b) if flags & (1 << 7) else None
+        author = String.read(b) if flags & (1 << 8) else None
+        document = TLObject.read(b) if flags & (1 << 9) else None
+
+        cached_page = TLObject.read(b) if flags & (1 << 10) else None
+
+        attributes = TLObject.read(b) if flags & (1 << 12) else []
+
+        return WebPage(id=id, url=url, display_url=display_url, hash=hash, has_large_media=has_large_media, video_cover_photo=video_cover_photo, type=type, site_name=site_name, title=title, description=description, photo=photo, embed_url=embed_url, embed_type=embed_type, embed_width=embed_width, embed_height=embed_height, duration=duration, author=author, document=document, cached_page=cached_page, attributes=attributes)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 13) if self.has_large_media else 0
+        flags |= (1 << 14) if self.video_cover_photo else 0
+        flags |= (1 << 0) if self.type is not None else 0
+        flags |= (1 << 1) if self.site_name is not None else 0
+        flags |= (1 << 2) if self.title is not None else 0
+        flags |= (1 << 3) if self.description is not None else 0
+        flags |= (1 << 4) if self.photo is not None else 0
+        flags |= (1 << 5) if self.embed_url is not None else 0
+        flags |= (1 << 5) if self.embed_type is not None else 0
+        flags |= (1 << 6) if self.embed_width is not None else 0
+        flags |= (1 << 6) if self.embed_height is not None else 0
+        flags |= (1 << 7) if self.duration is not None else 0
+        flags |= (1 << 8) if self.author is not None else 0
+        flags |= (1 << 9) if self.document is not None else 0
+        flags |= (1 << 10) if self.cached_page is not None else 0
+        flags |= (1 << 12) if self.attributes else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        b.write(String(self.url))
+
+        b.write(String(self.display_url))
+
+        b.write(Int(self.hash))
+
+        if self.type is not None:
+            b.write(String(self.type))
+
+        if self.site_name is not None:
+            b.write(String(self.site_name))
+
+        if self.title is not None:
+            b.write(String(self.title))
+
+        if self.description is not None:
+            b.write(String(self.description))
+
+        if self.photo is not None:
+            b.write(self.photo.write())
+
+        if self.embed_url is not None:
+            b.write(String(self.embed_url))
+
+        if self.embed_type is not None:
+            b.write(String(self.embed_type))
+
+        if self.embed_width is not None:
+            b.write(Int(self.embed_width))
+
+        if self.embed_height is not None:
+            b.write(Int(self.embed_height))
+
+        if self.duration is not None:
+            b.write(Int(self.duration))
+
+        if self.author is not None:
+            b.write(String(self.author))
+
+        if self.document is not None:
+            b.write(self.document.write())
+
+        if self.cached_page is not None:
+            b.write(self.cached_page.write())
+
+        if self.attributes is not None:
+            b.write(Vector(self.attributes))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_attribute_star_gift_auction.py b/pyrogram/raw/types/web_page_attribute_star_gift_auction.py
new file mode 100644
index 00000000..fa1d74ed
--- /dev/null
+++ b/pyrogram/raw/types/web_page_attribute_star_gift_auction.py
@@ -0,0 +1,62 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageAttributeStarGiftAuction(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPageAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``1C641C2``
+
+    Parameters:
+        gift (:obj:`StarGift `):
+            N/A
+
+        end_date (``int`` ``32-bit``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["gift", "end_date"]
+
+    ID = 0x1c641c2
+    QUALNAME = "types.WebPageAttributeStarGiftAuction"
+
+    def __init__(self, *, gift: "raw.base.StarGift", end_date: int) -> None:
+        self.gift = gift  # StarGift
+        self.end_date = end_date  # int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageAttributeStarGiftAuction":
+        # No flags
+
+        gift = TLObject.read(b)
+
+        end_date = Int.read(b)
+
+        return WebPageAttributeStarGiftAuction(gift=gift, end_date=end_date)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.gift.write())
+
+        b.write(Int(self.end_date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_attribute_star_gift_collection.py b/pyrogram/raw/types/web_page_attribute_star_gift_collection.py
new file mode 100644
index 00000000..4e429c54
--- /dev/null
+++ b/pyrogram/raw/types/web_page_attribute_star_gift_collection.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageAttributeStarGiftCollection(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPageAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``31CAD303``
+
+    Parameters:
+        icons (List of :obj:`Document `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["icons"]
+
+    ID = 0x31cad303
+    QUALNAME = "types.WebPageAttributeStarGiftCollection"
+
+    def __init__(self, *, icons: List["raw.base.Document"]) -> None:
+        self.icons = icons  # Vector
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageAttributeStarGiftCollection":
+        # No flags
+
+        icons = TLObject.read(b)
+
+        return WebPageAttributeStarGiftCollection(icons=icons)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(Vector(self.icons))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_attribute_sticker_set.py b/pyrogram/raw/types/web_page_attribute_sticker_set.py
new file mode 100644
index 00000000..defe277e
--- /dev/null
+++ b/pyrogram/raw/types/web_page_attribute_sticker_set.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageAttributeStickerSet(TLObject):  # type: ignore
+    """{schema}
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPageAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``50CC03D3``
+
+    Parameters:
+        stickers (List of :obj:`Document `):
+
+
+        emojis (``bool``, *optional*):
+
+
+        text_color (``bool``, *optional*):
+
+
+    """
+
+    __slots__: List[str] = ["stickers", "emojis", "text_color"]
+
+    ID = 0x50cc03d3
+    QUALNAME = "types.WebPageAttributeStickerSet"
+
+    def __init__(self, *, stickers: List["raw.base.Document"], emojis: Optional[bool] = None, text_color: Optional[bool] = None) -> None:
+        self.stickers = stickers  # Vector
+        self.emojis = emojis  # flags.0?true
+        self.text_color = text_color  # flags.1?true
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageAttributeStickerSet":
+
+        flags = Int.read(b)
+
+        emojis = True if flags & (1 << 0) else False
+        text_color = True if flags & (1 << 1) else False
+        stickers = TLObject.read(b)
+
+        return WebPageAttributeStickerSet(stickers=stickers, emojis=emojis, text_color=text_color)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.emojis else 0
+        flags |= (1 << 1) if self.text_color else 0
+        b.write(Int(flags))
+
+        b.write(Vector(self.stickers))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_attribute_story.py b/pyrogram/raw/types/web_page_attribute_story.py
new file mode 100644
index 00000000..dcaec1bd
--- /dev/null
+++ b/pyrogram/raw/types/web_page_attribute_story.py
@@ -0,0 +1,74 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageAttributeStory(TLObject):  # type: ignore
+    """Webpage preview of a Telegram story
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPageAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``2E94C3E7``
+
+    Parameters:
+        peer (:obj:`Peer `):
+            Peer that posted the story
+
+        id (``int`` ``32-bit``):
+            Story ID
+
+        story (:obj:`StoryItem `, *optional*):
+            May contain the story, if not the story should be fetched when and if needed using stories.getStoriesByID with the above id and peer.
+
+    """
+
+    __slots__: List[str] = ["peer", "id", "story"]
+
+    ID = 0x2e94c3e7
+    QUALNAME = "types.WebPageAttributeStory"
+
+    def __init__(self, *, peer: "raw.base.Peer", id: int, story: "raw.base.StoryItem" = None) -> None:
+        self.peer = peer  # Peer
+        self.id = id  # int
+        self.story = story  # flags.0?StoryItem
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageAttributeStory":
+
+        flags = Int.read(b)
+
+        peer = TLObject.read(b)
+
+        id = Int.read(b)
+
+        story = TLObject.read(b) if flags & (1 << 0) else None
+
+        return WebPageAttributeStory(peer=peer, id=id, story=story)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.story is not None else 0
+        b.write(Int(flags))
+
+        b.write(self.peer.write())
+
+        b.write(Int(self.id))
+
+        if self.story is not None:
+            b.write(self.story.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_attribute_theme.py b/pyrogram/raw/types/web_page_attribute_theme.py
new file mode 100644
index 00000000..7a2fa898
--- /dev/null
+++ b/pyrogram/raw/types/web_page_attribute_theme.py
@@ -0,0 +1,68 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageAttributeTheme(TLObject):  # type: ignore
+    """Page theme
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPageAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``54B56617``
+
+    Parameters:
+        documents (List of :obj:`Document `, *optional*):
+            Theme files
+
+        settings (:obj:`ThemeSettings `, *optional*):
+            Theme settings
+
+    """
+
+    __slots__: List[str] = ["documents", "settings"]
+
+    ID = 0x54b56617
+    QUALNAME = "types.WebPageAttributeTheme"
+
+    def __init__(self, *, documents: Optional[List["raw.base.Document"]] = None, settings: "raw.base.ThemeSettings" = None) -> None:
+        self.documents = documents  # flags.0?Vector
+        self.settings = settings  # flags.1?ThemeSettings
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageAttributeTheme":
+
+        flags = Int.read(b)
+
+        documents = TLObject.read(b) if flags & (1 << 0) else []
+
+        settings = TLObject.read(b) if flags & (1 << 1) else None
+
+        return WebPageAttributeTheme(documents=documents, settings=settings)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.documents else 0
+        flags |= (1 << 1) if self.settings is not None else 0
+        b.write(Int(flags))
+
+        if self.documents is not None:
+            b.write(Vector(self.documents))
+
+        if self.settings is not None:
+            b.write(self.settings.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_attribute_unique_star_gift.py b/pyrogram/raw/types/web_page_attribute_unique_star_gift.py
new file mode 100644
index 00000000..5925c212
--- /dev/null
+++ b/pyrogram/raw/types/web_page_attribute_unique_star_gift.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageAttributeUniqueStarGift(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPageAttribute`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``CF6F6DB8``
+
+    Parameters:
+        gift (:obj:`StarGift `):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["gift"]
+
+    ID = 0xcf6f6db8
+    QUALNAME = "types.WebPageAttributeUniqueStarGift"
+
+    def __init__(self, *, gift: "raw.base.StarGift") -> None:
+        self.gift = gift  # StarGift
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageAttributeUniqueStarGift":
+        # No flags
+
+        gift = TLObject.read(b)
+
+        return WebPageAttributeUniqueStarGift(gift=gift)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(self.gift.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_empty.py b/pyrogram/raw/types/web_page_empty.py
new file mode 100644
index 00000000..13a8c7a0
--- /dev/null
+++ b/pyrogram/raw/types/web_page_empty.py
@@ -0,0 +1,65 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageEmpty(TLObject):  # type: ignore
+    """No preview is available for the webpage
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``211A1788``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            Preview ID
+
+        url (``str``, *optional*):
+            URL of the webpage.
+
+    """
+
+    __slots__: List[str] = ["id", "url"]
+
+    ID = 0x211a1788
+    QUALNAME = "types.WebPageEmpty"
+
+    def __init__(self, *, id: int, url: Optional[str] = None) -> None:
+        self.id = id  # long
+        self.url = url  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageEmpty":
+
+        flags = Int.read(b)
+
+        id = Long.read(b)
+
+        url = String.read(b) if flags & (1 << 0) else None
+        return WebPageEmpty(id=id, url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.url is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        if self.url is not None:
+            b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_not_modified.py b/pyrogram/raw/types/web_page_not_modified.py
new file mode 100644
index 00000000..f595f66b
--- /dev/null
+++ b/pyrogram/raw/types/web_page_not_modified.py
@@ -0,0 +1,57 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageNotModified(TLObject):  # type: ignore
+    """The preview of the webpage hasn't changed
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``7311CA11``
+
+    Parameters:
+        cached_page_views (``int`` ``32-bit``, *optional*):
+            Page view count
+
+    """
+
+    __slots__: List[str] = ["cached_page_views"]
+
+    ID = 0x7311ca11
+    QUALNAME = "types.WebPageNotModified"
+
+    def __init__(self, *, cached_page_views: Optional[int] = None) -> None:
+        self.cached_page_views = cached_page_views  # flags.0?int
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageNotModified":
+
+        flags = Int.read(b)
+
+        cached_page_views = Int.read(b) if flags & (1 << 0) else None
+        return WebPageNotModified(cached_page_views=cached_page_views)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.cached_page_views is not None else 0
+        b.write(Int(flags))
+
+        if self.cached_page_views is not None:
+            b.write(Int(self.cached_page_views))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_pending.py b/pyrogram/raw/types/web_page_pending.py
new file mode 100644
index 00000000..0827eef1
--- /dev/null
+++ b/pyrogram/raw/types/web_page_pending.py
@@ -0,0 +1,73 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPagePending(TLObject):  # type: ignore
+    """A preview of the webpage is currently being generated
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``B0D13E47``
+
+    Parameters:
+        id (``int`` ``64-bit``):
+            ID of preview
+
+        date (``int`` ``32-bit``):
+            When was the processing started
+
+        url (``str``, *optional*):
+            URL of the webpage
+
+    """
+
+    __slots__: List[str] = ["id", "date", "url"]
+
+    ID = 0xb0d13e47
+    QUALNAME = "types.WebPagePending"
+
+    def __init__(self, *, id: int, date: int, url: Optional[str] = None) -> None:
+        self.id = id  # long
+        self.date = date  # int
+        self.url = url  # flags.0?string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPagePending":
+
+        flags = Int.read(b)
+
+        id = Long.read(b)
+
+        url = String.read(b) if flags & (1 << 0) else None
+        date = Int.read(b)
+
+        return WebPagePending(id=id, date=date, url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.url is not None else 0
+        b.write(Int(flags))
+
+        b.write(Long(self.id))
+
+        if self.url is not None:
+            b.write(String(self.url))
+
+        b.write(Int(self.date))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_page_url_pending.py b/pyrogram/raw/types/web_page_url_pending.py
new file mode 100644
index 00000000..a90081a1
--- /dev/null
+++ b/pyrogram/raw/types/web_page_url_pending.py
@@ -0,0 +1,54 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebPageUrlPending(TLObject):  # type: ignore
+    """Telegram API type.
+
+    Constructor of :obj:`~pyrogram.raw.base.WebPage`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``D41A5167``
+
+    Parameters:
+        url (``str``):
+            N/A
+
+    """
+
+    __slots__: List[str] = ["url"]
+
+    ID = 0xd41a5167
+    QUALNAME = "types.WebPageUrlPending"
+
+    def __init__(self, *, url: str) -> None:
+        self.url = url  # string
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebPageUrlPending":
+        # No flags
+
+        url = String.read(b)
+
+        return WebPageUrlPending(url=url)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        # No flags
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_view_message_sent.py b/pyrogram/raw/types/web_view_message_sent.py
new file mode 100644
index 00000000..6b3532f5
--- /dev/null
+++ b/pyrogram/raw/types/web_view_message_sent.py
@@ -0,0 +1,67 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebViewMessageSent(TLObject):  # type: ignore
+    """Info about a sent inline webview message
+
+    Constructor of :obj:`~pyrogram.raw.base.WebViewMessageSent`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``C94511C``
+
+    Parameters:
+        msg_id (:obj:`InputBotInlineMessageID `, *optional*):
+            Message ID
+
+    Functions:
+        This object can be returned by 1 function.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.SendWebViewResultMessage
+    """
+
+    __slots__: List[str] = ["msg_id"]
+
+    ID = 0xc94511c
+    QUALNAME = "types.WebViewMessageSent"
+
+    def __init__(self, *, msg_id: "raw.base.InputBotInlineMessageID" = None) -> None:
+        self.msg_id = msg_id  # flags.0?InputBotInlineMessageID
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebViewMessageSent":
+
+        flags = Int.read(b)
+
+        msg_id = TLObject.read(b) if flags & (1 << 0) else None
+
+        return WebViewMessageSent(msg_id=msg_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 0) if self.msg_id is not None else 0
+        b.write(Int(flags))
+
+        if self.msg_id is not None:
+            b.write(self.msg_id.write())
+
+        return b.getvalue()
diff --git a/pyrogram/raw/types/web_view_result_url.py b/pyrogram/raw/types/web_view_result_url.py
new file mode 100644
index 00000000..c097b20b
--- /dev/null
+++ b/pyrogram/raw/types/web_view_result_url.py
@@ -0,0 +1,89 @@
+from io import BytesIO
+
+from pyrogram.raw.core.primitives import Int, Long, Int128, Int256, Bool, Bytes, String, Double, Vector
+from pyrogram.raw.core import TLObject
+from pyrogram import raw
+from typing import List, Optional, Any
+
+# # # # # # # # # # # # # # # # # # # # # # # #
+#               !!! WARNING !!!               #
+#          This is a generated file!          #
+# All changes made in this file will be lost! #
+# # # # # # # # # # # # # # # # # # # # # # # #
+
+
+class WebViewResultUrl(TLObject):  # type: ignore
+    """Contains the webview URL with appropriate theme and user info parameters added
+
+    Constructor of :obj:`~pyrogram.raw.base.WebViewResult`.
+
+    Details:
+        - Layer: ``224``
+        - ID: ``4D22FF98``
+
+    Parameters:
+        url (``str``):
+            Webview URL to open
+
+        fullsize (``bool``, *optional*):
+            N/A
+
+        fullscreen (``bool``, *optional*):
+            N/A
+
+        query_id (``int`` ``64-bit``, *optional*):
+            Webview session ID
+
+    Functions:
+        This object can be returned by 4 functions.
+
+        .. currentmodule:: pyrogram.raw.functions
+
+        .. autosummary::
+            :nosignatures:
+
+            messages.RequestWebView
+            messages.RequestSimpleWebView
+            messages.RequestAppWebView
+            messages.RequestMainWebView
+    """
+
+    __slots__: List[str] = ["url", "fullsize", "fullscreen", "query_id"]
+
+    ID = 0x4d22ff98
+    QUALNAME = "types.WebViewResultUrl"
+
+    def __init__(self, *, url: str, fullsize: Optional[bool] = None, fullscreen: Optional[bool] = None, query_id: Optional[int] = None) -> None:
+        self.url = url  # string
+        self.fullsize = fullsize  # flags.1?true
+        self.fullscreen = fullscreen  # flags.2?true
+        self.query_id = query_id  # flags.0?long
+
+    @staticmethod
+    def read(b: BytesIO, *args: Any) -> "WebViewResultUrl":
+
+        flags = Int.read(b)
+
+        fullsize = True if flags & (1 << 1) else False
+        fullscreen = True if flags & (1 << 2) else False
+        query_id = Long.read(b) if flags & (1 << 0) else None
+        url = String.read(b)
+
+        return WebViewResultUrl(url=url, fullsize=fullsize, fullscreen=fullscreen, query_id=query_id)
+
+    def write(self, *args) -> bytes:
+        b = BytesIO()
+        b.write(Int(self.ID, False))
+
+        flags = 0
+        flags |= (1 << 1) if self.fullsize else 0
+        flags |= (1 << 2) if self.fullscreen else 0
+        flags |= (1 << 0) if self.query_id is not None else 0
+        b.write(Int(flags))
+
+        if self.query_id is not None:
+            b.write(Long(self.query_id))
+
+        b.write(String(self.url))
+
+        return b.getvalue()
diff --git a/pyrogram/sync.py b/pyrogram/sync.py
deleted file mode 100644
index fb2e567c..00000000
--- a/pyrogram/sync.py
+++ /dev/null
@@ -1,106 +0,0 @@
-from __future__ import annotations
-
-import asyncio
-import functools
-import inspect
-import threading
-
-from pyrogram import types
-from pyrogram.methods import Methods
-from pyrogram.methods.utilities import compose as compose_module
-from pyrogram.methods.utilities import idle as idle_module
-
-
-def async_to_sync(obj, name) -> None:
-    function = getattr(obj, name)
-    main_loop = asyncio.get_event_loop()
-
-    def async_to_sync_gen(agen, loop, is_main_thread):
-        async def anext(agen):
-            try:
-                return await agen.__anext__(), False
-            except StopAsyncIteration:
-                return None, True
-
-        while True:
-            if is_main_thread:
-                item, done = loop.run_until_complete(anext(agen))
-            else:
-                item, done = asyncio.run_coroutine_threadsafe(
-                    anext(agen),
-                    loop,
-                ).result()
-
-            if done:
-                break
-
-            yield item
-
-    @functools.wraps(function)
-    def async_to_sync_wrap(*args, **kwargs):
-        coroutine = function(*args, **kwargs)
-
-        try:
-            loop = asyncio.get_event_loop()
-        except RuntimeError:
-            loop = asyncio.new_event_loop()
-            asyncio.set_event_loop(loop)
-
-        if (
-            threading.current_thread() is threading.main_thread()
-            or not main_loop.is_running()
-        ):
-            if loop.is_running():
-                return coroutine
-            if inspect.iscoroutine(coroutine):
-                return loop.run_until_complete(coroutine)
-
-            if inspect.isasyncgen(coroutine):
-                return async_to_sync_gen(coroutine, loop, True)
-            return None
-        if inspect.iscoroutine(coroutine):
-            if loop.is_running():
-
-                async def coro_wrapper():
-                    return await asyncio.wrap_future(
-                        asyncio.run_coroutine_threadsafe(coroutine, main_loop),
-                    )
-
-                return coro_wrapper()
-            return asyncio.run_coroutine_threadsafe(coroutine, main_loop).result()
-
-        if inspect.isasyncgen(coroutine):
-            if loop.is_running():
-                return coroutine
-            return async_to_sync_gen(coroutine, main_loop, False)
-        return None
-
-    setattr(obj, name, async_to_sync_wrap)
-
-
-def wrap(source) -> None:
-    for name in dir(source):
-        method = getattr(source, name)
-
-        if not name.startswith("_") and (
-            inspect.iscoroutinefunction(method) or inspect.isasyncgenfunction(method)
-        ):
-            async_to_sync(source, name)
-
-
-# Wrap all Client's relevant methods
-wrap(Methods)
-
-# Wrap types' bound methods
-for class_name in dir(types):
-    cls = getattr(types, class_name)
-
-    if inspect.isclass(cls):
-        wrap(cls)
-
-# Special case for idle and compose, because they are not inside Methods
-async_to_sync(idle_module, "idle")
-idle = idle_module.idle
-
-async_to_sync(compose_module, "compose")
-compose = compose_module.compose
diff --git a/pyrogram/types/bots_and_keyboards/bot_app.py b/pyrogram/types/bots_and_keyboards/bot_app.py
index 0137b1f1..b2812740 100644
--- a/pyrogram/types/bots_and_keyboards/bot_app.py
+++ b/pyrogram/types/bots_and_keyboards/bot_app.py
@@ -52,7 +52,7 @@ def _parse(client: pyrogram.Client, bot_app: raw.types.BotApp) -> BotApp:
         if isinstance(bot_app.document, raw.types.Document):
             attributes = {type(i): i for i in bot_app.document.attributes}
             file_name = getattr(
-                attributes.get(raw.types.DocumentAttributeFilename, None),
+                attributes.get(raw.types.DocumentAttributeFilename),
                 "file_name",
                 None,
             )
diff --git a/pyrogram/types/bots_and_keyboards/collectible_item_info.py b/pyrogram/types/bots_and_keyboards/collectible_item_info.py
index 53627233..8536da68 100644
--- a/pyrogram/types/bots_and_keyboards/collectible_item_info.py
+++ b/pyrogram/types/bots_and_keyboards/collectible_item_info.py
@@ -11,6 +11,7 @@
 
 class CollectibleItemInfo(Object):
     """Contains information about a collectible item and its last purchase.
+
     Parameters:
         purchase_date (``datetime``):
             Point in time (Unix timestamp) when the item was purchased
diff --git a/pyrogram/types/business/paid_media.py b/pyrogram/types/business/paid_media.py
index 959c6cf8..b1aab29d 100644
--- a/pyrogram/types/business/paid_media.py
+++ b/pyrogram/types/business/paid_media.py
@@ -42,14 +42,13 @@ def _parse(client, media: raw.types.MessageMediaPaidMedia) -> PaidMedia:
             elif isinstance(m.media, raw.types.MessageMediaDocument):
                 attributes = {type(i): i for i in m.media.document.attributes}
                 file_name = getattr(
-                    attributes.get(raw.types.DocumentAttributeFilename, None),
+                    attributes.get(raw.types.DocumentAttributeFilename),
                     "file_name",
                     None,
                 )
                 if raw.types.DocumentAttributeAnimated in attributes:
                     video_attributes = attributes.get(
-                        raw.types.DocumentAttributeVideo,
-                        None,
+                        raw.types.DocumentAttributeVideo
                     )
                     extended_media.append(
                         types.Animation._parse(
diff --git a/pyrogram/types/business/paid_media_preview.py b/pyrogram/types/business/paid_media_preview.py
index 511062f3..f1a63043 100644
--- a/pyrogram/types/business/paid_media_preview.py
+++ b/pyrogram/types/business/paid_media_preview.py
@@ -10,6 +10,7 @@
 
 class PaidMediaPreview(Object):
     """The paid media isn't available before the payment.
+
     Parameters:
         width (``int``, *optional*):
             Media width as defined by the sender.
diff --git a/pyrogram/types/input_message_content/input_invoice_message_content.py b/pyrogram/types/input_message_content/input_invoice_message_content.py
index 137ccffa..e7281193 100644
--- a/pyrogram/types/input_message_content/input_invoice_message_content.py
+++ b/pyrogram/types/input_message_content/input_invoice_message_content.py
@@ -156,7 +156,7 @@ async def write(self, client: pyrogram.Client, reply_markup):
             else self.payload,
             provider=self.provider_token,
             provider_data=raw.types.DataJSON(
-                data=self.provider_data if self.provider_data else "{}",
+                data=self.provider_data or "{}",
             ),
             reply_markup=await reply_markup.write(client) if reply_markup else None,
         )
diff --git a/pyrogram/types/messages_and_media/draft_message.py b/pyrogram/types/messages_and_media/draft_message.py
index 0e02f5e5..fca676fb 100644
--- a/pyrogram/types/messages_and_media/draft_message.py
+++ b/pyrogram/types/messages_and_media/draft_message.py
@@ -135,7 +135,7 @@ def _parse(
                     attributes = {type(i): i for i in doc.attributes}
 
                     file_name = getattr(
-                        attributes.get(raw.types.DocumentAttributeFilename, None),
+                        attributes.get(raw.types.DocumentAttributeFilename),
                         "file_name",
                         None,
                     )
diff --git a/pyrogram/types/messages_and_media/game.py b/pyrogram/types/messages_and_media/game.py
index b6db47dc..bb667e70 100644
--- a/pyrogram/types/messages_and_media/game.py
+++ b/pyrogram/types/messages_and_media/game.py
@@ -59,7 +59,7 @@ def _parse(client, message: raw.types.Message) -> Game:
             attributes = {type(i): i for i in game.document.attributes}
 
             file_name = getattr(
-                attributes.get(raw.types.DocumentAttributeFilename, None),
+                attributes.get(raw.types.DocumentAttributeFilename),
                 "file_name",
                 None,
             )
@@ -67,7 +67,7 @@ def _parse(client, message: raw.types.Message) -> Game:
             animation = types.Animation._parse(
                 client,
                 game.document,
-                attributes.get(raw.types.DocumentAttributeVideo, None),
+                attributes.get(raw.types.DocumentAttributeVideo),
                 file_name,
             )
 
diff --git a/pyrogram/types/messages_and_media/message.py b/pyrogram/types/messages_and_media/message.py
index 7fdb952e..a22af786 100644
--- a/pyrogram/types/messages_and_media/message.py
+++ b/pyrogram/types/messages_and_media/message.py
@@ -1181,18 +1181,14 @@ async def _parse(  # noqa: C901
                         attributes = {type(i): i for i in doc.attributes}
 
                         file_name = getattr(
-                            attributes.get(
-                                raw.types.DocumentAttributeFilename,
-                                None,
-                            ),
+                            attributes.get(raw.types.DocumentAttributeFilename),
                             "file_name",
                             None,
                         )
 
                         if raw.types.DocumentAttributeAnimated in attributes:
                             video_attributes = attributes.get(
-                                raw.types.DocumentAttributeVideo,
-                                None,
+                                raw.types.DocumentAttributeVideo
                             )
                             animation = types.Animation._parse(
                                 client,
@@ -1239,16 +1235,14 @@ async def _parse(  # noqa: C901
                                         }
                                         altdoc_file_name = getattr(
                                             altdoc_attributes.get(
-                                                raw.types.DocumentAttributeFilename,
-                                                None,
+                                                raw.types.DocumentAttributeFilename
                                             ),
                                             "file_name",
                                             None,
                                         )
                                         altdoc_video_attribute = (
                                             altdoc_attributes.get(
-                                                raw.types.DocumentAttributeVideo,
-                                                None,
+                                                raw.types.DocumentAttributeVideo
                                             )
                                         )
                                         if altdoc_video_attribute:
@@ -1418,7 +1412,7 @@ async def _parse(  # noqa: C901
                 forwards=message.forwards,
                 via_bot=types.User._parse(
                     client,
-                    users.get(message.via_bot_id, None),
+                    users.get(message.via_bot_id),
                 ),
                 outgoing=message.out,
                 reply_markup=reply_markup,
diff --git a/pyrogram/types/messages_and_media/message_reactor.py b/pyrogram/types/messages_and_media/message_reactor.py
index 41c32450..7ce9830d 100644
--- a/pyrogram/types/messages_and_media/message_reactor.py
+++ b/pyrogram/types/messages_and_media/message_reactor.py
@@ -7,6 +7,7 @@
 
 class MessageReactor(Object):
     """Contains information about a message reactor.
+
     Parameters:
         amount (``int``):
             Stars amount.
diff --git a/pyrogram/types/messages_and_media/sticker.py b/pyrogram/types/messages_and_media/sticker.py
index daef374b..b15d578a 100644
--- a/pyrogram/types/messages_and_media/sticker.py
+++ b/pyrogram/types/messages_and_media/sticker.py
@@ -159,18 +159,14 @@ async def _parse(
         )
 
         image_size_attributes = document_attributes.get(
-            raw.types.DocumentAttributeImageSize,
-            None,
+            raw.types.DocumentAttributeImageSize
         )
         file_name = getattr(
-            document_attributes.get(raw.types.DocumentAttributeFilename, None),
+            document_attributes.get(raw.types.DocumentAttributeFilename),
             "file_name",
             None,
         )
-        video_attributes = document_attributes.get(
-            raw.types.DocumentAttributeVideo,
-            None,
-        )
+        video_attributes = document_attributes.get(raw.types.DocumentAttributeVideo)
 
         sticker_set = sticker_attributes.stickerset
 
diff --git a/pyrogram/types/messages_and_media/story.py b/pyrogram/types/messages_and_media/story.py
index 95b6753d..458207d8 100644
--- a/pyrogram/types/messages_and_media/story.py
+++ b/pyrogram/types/messages_and_media/story.py
@@ -202,8 +202,7 @@ async def _parse(
 
                     if raw.types.DocumentAttributeAnimated in attributes:
                         video_attributes = attributes.get(
-                            raw.types.DocumentAttributeVideo,
-                            None,
+                            raw.types.DocumentAttributeVideo
                         )
                         animation = types.Animation._parse(
                             client,
@@ -214,8 +213,7 @@ async def _parse(
                         media_type = enums.MessageMediaType.ANIMATION
                     elif raw.types.DocumentAttributeVideo in attributes:
                         video_attributes = attributes.get(
-                            raw.types.DocumentAttributeVideo,
-                            None,
+                            raw.types.DocumentAttributeVideo
                         )
                         video = types.Video._parse(
                             client,
diff --git a/pyrogram/types/messages_and_media/web_page.py b/pyrogram/types/messages_and_media/web_page.py
index 22e90e8b..b3b43106 100644
--- a/pyrogram/types/messages_and_media/web_page.py
+++ b/pyrogram/types/messages_and_media/web_page.py
@@ -128,7 +128,7 @@ def _parse(client, webpage: raw.types.WebPage) -> WebPage:
             attributes = {type(i): i for i in doc.attributes}
 
             file_name = getattr(
-                attributes.get(raw.types.DocumentAttributeFilename, None),
+                attributes.get(raw.types.DocumentAttributeFilename),
                 "file_name",
                 None,
             )
@@ -138,10 +138,7 @@ def _parse(client, webpage: raw.types.WebPage) -> WebPage:
                 audio = types.Audio._parse(client, doc, audio_attributes, file_name)
 
             elif raw.types.DocumentAttributeAnimated in attributes:
-                video_attributes = attributes.get(
-                    raw.types.DocumentAttributeVideo,
-                    None,
-                )
+                video_attributes = attributes.get(raw.types.DocumentAttributeVideo)
                 animation = types.Animation._parse(
                     client,
                     doc,
diff --git a/pyrogram/types/user_and_chats/chat.py b/pyrogram/types/user_and_chats/chat.py
index 1d6e7072..94ac7b44 100644
--- a/pyrogram/types/user_and_chats/chat.py
+++ b/pyrogram/types/user_and_chats/chat.py
@@ -567,7 +567,7 @@ async def _parse_full(
                     full_chat.paid_reactions_available
                 )
 
-                linked_chat_raw = chats.get(full_chat.linked_chat_id, None)
+                linked_chat_raw = chats.get(full_chat.linked_chat_id)
 
                 if linked_chat_raw:
                     parsed_chat.linked_chat = Chat._parse_channel_chat(
diff --git a/pyrogram/types/user_and_chats/emoji_status.py b/pyrogram/types/user_and_chats/emoji_status.py
index 9d289cfe..d6bea128 100644
--- a/pyrogram/types/user_and_chats/emoji_status.py
+++ b/pyrogram/types/user_and_chats/emoji_status.py
@@ -27,6 +27,7 @@ def __init__(
         client: pyrogram.Client = None,
         custom_emoji_id: int,
         until_date: datetime | None = None,
+        _raw: raw.base.EmojiStatus = None,
     ) -> None:
         super().__init__(client)
 
@@ -39,13 +40,20 @@ def _parse(client, emoji_status: raw.base.EmojiStatus) -> EmojiStatus | None:
             return EmojiStatus(
                 client=client,
                 custom_emoji_id=emoji_status.document_id,
+                until_date=utils.timestamp_to_datetime(emoji_status.until)
+                if emoji_status.until
+                else None,
+                _raw=emoji_status,
             )
 
-        if isinstance(emoji_status, raw.types.EmojiStatusUntil):
+        if isinstance(emoji_status, raw.types.EmojiStatusCollectible):
             return EmojiStatus(
                 client=client,
                 custom_emoji_id=emoji_status.document_id,
-                until_date=utils.timestamp_to_datetime(emoji_status.until),
+                until_date=utils.timestamp_to_datetime(emoji_status.until)
+                if emoji_status.until
+                else None,
+                _raw=emoji_status,
             )
 
         return None
diff --git a/pyrogram/types/user_and_chats/found_contacts.py b/pyrogram/types/user_and_chats/found_contacts.py
index 27462607..4b568acc 100644
--- a/pyrogram/types/user_and_chats/found_contacts.py
+++ b/pyrogram/types/user_and_chats/found_contacts.py
@@ -7,6 +7,7 @@
 
 class FoundContacts(Object):
     """Chats found by name substring and auxiliary data.
+
     Parameters:
         my_results (List of :obj:`~pyrogram.types.Chat`, *optional*):
             Personalized results.
diff --git a/pyrogram/utils.py b/pyrogram/utils.py
index 3995435d..98dfdfa6 100644
--- a/pyrogram/utils.py
+++ b/pyrogram/utils.py
@@ -9,7 +9,6 @@
 from concurrent.futures.thread import ThreadPoolExecutor
 from datetime import datetime, timezone
 from getpass import getpass
-from typing import TYPE_CHECKING, Any, TypeVar
 
 import pyrogram
 from pyrogram import enums, raw, types
@@ -20,9 +19,6 @@
     FileType,
 )
 
-if TYPE_CHECKING:
-    from collections.abc import Callable
-
 
 async def ainput(prompt: str = "", *, hide: bool = False):
     """Just like the built-in input, but async"""
@@ -395,15 +391,6 @@ def datetime_to_timestamp(dt: datetime | None) -> int | None:
     return int(dt.timestamp()) if dt else None
 
 
-async def run_sync(
-    func: Callable[..., TypeVar("Result")],
-    *args: Any,
-    **kwargs: Any,
-) -> TypeVar("Result"):
-    loop = asyncio.get_event_loop()
-    return await loop.run_in_executor(None, functools.partial(func, *args, **kwargs))
-
-
 async def get_reply_to(
     client: pyrogram.Client,
     chat_id: int | str | None = None,
diff --git a/uv.lock b/uv.lock
new file mode 100644
index 00000000..77741719
--- /dev/null
+++ b/uv.lock
@@ -0,0 +1,2078 @@
+version = 1
+revision = 3
+requires-python = ">=3.10"
+resolution-markers = [
+    "python_full_version >= '3.11'",
+    "python_full_version < '3.11'",
+]
+
+[[package]]
+name = "aiosqlite"
+version = "0.22.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/4e/8a/64761f4005f17809769d23e518d915db74e6310474e733e3593cfc854ef1/aiosqlite-0.22.1.tar.gz", hash = "sha256:043e0bd78d32888c0a9ca90fc788b38796843360c855a7262a532813133a0650", size = 14821, upload-time = "2025-12-23T19:25:43.997Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/00/b7/e3bf5133d697a08128598c8d0abc5e16377b51465a33756de24fa7dee953/aiosqlite-0.22.1-py3-none-any.whl", hash = "sha256:21c002eb13823fad740196c5a2e9d8e62f6243bd9e7e4a1f87fb5e44ecb4fceb", size = 17405, upload-time = "2025-12-23T19:25:42.139Z" },
+]
+
+[[package]]
+name = "alabaster"
+version = "0.7.16"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/c9/3e/13dd8e5ed9094e734ac430b5d0eb4f2bb001708a8b7856cbf8e084e001ba/alabaster-0.7.16.tar.gz", hash = "sha256:75a8b99c28a5dad50dd7f8ccdd447a121ddb3892da9e53d1ca5cca3106d58d65", size = 23776, upload-time = "2024-01-10T00:56:10.189Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/32/34/d4e1c02d3bee589efb5dfa17f88ea08bdb3e3eac12bc475462aec52ed223/alabaster-0.7.16-py3-none-any.whl", hash = "sha256:b46733c07dce03ae4e150330b975c75737fa60f0a7c591b6c8bf4928a28e2c92", size = 13511, upload-time = "2024-01-10T00:56:08.388Z" },
+]
+
+[[package]]
+name = "annotated-types"
+version = "0.7.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ee/67/531ea369ba64dcff5ec9c3402f9f51bf748cec26dde048a2f973a4eea7f5/annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89", size = 16081, upload-time = "2024-05-20T21:33:25.928Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" },
+]
+
+[[package]]
+name = "anyio"
+version = "4.12.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "exceptiongroup", marker = "python_full_version < '3.11'" },
+    { name = "idna" },
+    { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/96/f0/5eb65b2bb0d09ac6776f2eb54adee6abe8228ea05b20a5ad0e4945de8aac/anyio-4.12.1.tar.gz", hash = "sha256:41cfcc3a4c85d3f05c932da7c26d0201ac36f72abd4435ba90d0464a3ffed703", size = 228685, upload-time = "2026-01-06T11:45:21.246Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/38/0e/27be9fdef66e72d64c0cdc3cc2823101b80585f8119b5c112c2e8f5f7dab/anyio-4.12.1-py3-none-any.whl", hash = "sha256:d405828884fc140aa80a3c667b8beed277f1dfedec42ba031bd6ac3db606ab6c", size = 113592, upload-time = "2026-01-06T11:45:19.497Z" },
+]
+
+[[package]]
+name = "appdirs"
+version = "1.4.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/d7/d8/05696357e0311f5b5c316d7b95f46c669dd9c15aaeecbb48c7d0aeb88c40/appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", size = 13470, upload-time = "2020-05-11T07:59:51.037Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3b/00/2344469e2084fb287c2e0b57b72910309874c3245463acd6cf5e3db69324/appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128", size = 9566, upload-time = "2020-05-11T07:59:49.499Z" },
+]
+
+[[package]]
+name = "babel"
+version = "2.18.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554, upload-time = "2026-02-01T12:30:56.078Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845, upload-time = "2026-02-01T12:30:53.445Z" },
+]
+
+[[package]]
+name = "backports-asyncio-runner"
+version = "1.2.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/8e/ff/70dca7d7cb1cbc0edb2c6cc0c38b65cba36cccc491eca64cabd5fe7f8670/backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162", size = 69893, upload-time = "2025-07-02T02:27:15.685Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/a0/59/76ab57e3fe74484f48a53f8e337171b4a2349e506eabe136d7e01d059086/backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5", size = 12313, upload-time = "2025-07-02T02:27:14.263Z" },
+]
+
+[[package]]
+name = "backports-tarfile"
+version = "1.2.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/86/72/cd9b395f25e290e633655a100af28cb253e4393396264a98bd5f5951d50f/backports_tarfile-1.2.0.tar.gz", hash = "sha256:d75e02c268746e1b8144c278978b6e98e85de6ad16f8e4b0844a154557eca991", size = 86406, upload-time = "2024-05-28T17:01:54.731Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b9/fa/123043af240e49752f1c4bd24da5053b6bd00cad78c2be53c0d1e8b975bc/backports.tarfile-1.2.0-py3-none-any.whl", hash = "sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34", size = 30181, upload-time = "2024-05-28T17:01:53.112Z" },
+]
+
+[[package]]
+name = "backports-zstd"
+version = "1.3.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/f4/b1/36a5182ce1d8ef9ef32bff69037bd28b389bbdb66338f8069e61da7028cb/backports_zstd-1.3.0.tar.gz", hash = "sha256:e8b2d68e2812f5c9970cabc5e21da8b409b5ed04e79b4585dbffa33e9b45ebe2", size = 997138, upload-time = "2025-12-29T17:28:06.143Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/76/70/766f6ebbb9db2ed75951f0a671ee15931dc69278c84d9f09b08dd6b67c3e/backports_zstd-1.3.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a2db17a6d9bf6b4dc223b3f6414aa9db6d1afe9de9bff61d582c2934ca456a0", size = 435664, upload-time = "2025-12-29T17:25:29.201Z" },
+    { url = "https://files.pythonhosted.org/packages/55/f8/7b3fad9c6ee5ff3bcd7c941586675007330197ff4a388f01c73198ecc8bb/backports_zstd-1.3.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a7f16b98ba81780a9517ce6c493e1aea9b7d72de2b1efa08375136c270e1ecba", size = 362060, upload-time = "2025-12-29T17:25:30.94Z" },
+    { url = "https://files.pythonhosted.org/packages/68/9e/cad0f508ed7c3fbd07398f22b5bf25aa0523fcf56c84c3def642909e80ae/backports_zstd-1.3.0-cp310-cp310-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:1124a169a647671ccb4654a0ef1d0b42d6735c45ce3d0adf609df22fb1f099db", size = 505958, upload-time = "2025-12-29T17:25:32.694Z" },
+    { url = "https://files.pythonhosted.org/packages/b7/dc/96dc55c043b0d86e53ae9608b496196936244c1ecf7e95cdf66d0dbc0f23/backports_zstd-1.3.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8410fda08b36202d01ab4503f6787c763898888cb1a48c19fce94711563d3ee3", size = 475571, upload-time = "2025-12-29T17:25:33.9Z" },
+    { url = "https://files.pythonhosted.org/packages/20/48/d9c8c8c2a5ac57fc5697f1945254af31407b0c5f80335a175a7c215b4118/backports_zstd-1.3.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ab139d1fc0e91a697e82fa834e6404098802f11b6035607174776173ded9a2cc", size = 581199, upload-time = "2025-12-29T17:25:35.566Z" },
+    { url = "https://files.pythonhosted.org/packages/0d/ca/7fe70d2d39ed39e26a6c6f6c1dd229f1ab889500d5c90b17527702b1a21e/backports_zstd-1.3.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:6f3115d203f387f77c23b5461fb6678d282d4f276f9f39298ad242b00120afc7", size = 640846, upload-time = "2025-12-29T17:25:36.86Z" },
+    { url = "https://files.pythonhosted.org/packages/0e/d8/5b8580469e70b72402212885bf19b9d31eaf23549b602e0c294edf380e25/backports_zstd-1.3.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:116f65cce84e215dfac0414924b051faf8d29dc7188cf3944dd1e5be8dd15a32", size = 491061, upload-time = "2025-12-29T17:25:38.721Z" },
+    { url = "https://files.pythonhosted.org/packages/cc/dd/17a752263fccd1ba24184b7e89c14cd31553d512e2e5b065f38e63a0ba86/backports_zstd-1.3.0-cp310-cp310-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:04def169e4a9ae291298124da4e097c6d6545d0e93164f934b716da04d24630a", size = 565071, upload-time = "2025-12-29T17:25:40.372Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/81/df23d3fe664b2497ab2ec01dc012cb9304e7d568c67f50b1b324fb2d8cbb/backports_zstd-1.3.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:481b586291ef02a250f03d4c31a37c9881e5e93556568abbd20ca1ad720d443f", size = 481518, upload-time = "2025-12-29T17:25:41.925Z" },
+    { url = "https://files.pythonhosted.org/packages/ba/cd/e50dd85fde890c5d79e1ed5dc241f1c45f87b6c12571fdb60add57f2ee66/backports_zstd-1.3.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:0290979eea67f7275fa42d5859cc5bea94f2c08cca6bc36396673476773d2bad", size = 509464, upload-time = "2025-12-29T17:25:43.844Z" },
+    { url = "https://files.pythonhosted.org/packages/d3/bb/e429156e4b834837fe78b4f32ed512491aea39415444420c79ccd3aa0526/backports_zstd-1.3.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:01c699d8c803dc9f9c9d6ede21b75ec99f45c3b411821011692befca538928cb", size = 585563, upload-time = "2025-12-29T17:25:45.038Z" },
+    { url = "https://files.pythonhosted.org/packages/95/c0/1a0d245325827242aefe76f4f3477ec183b996b8db5105698564f8303481/backports_zstd-1.3.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:2c662912cfc1a5ebd1d2162ac651549d58bd3c97a8096130ec13c703fca355f2", size = 562889, upload-time = "2025-12-29T17:25:46.576Z" },
+    { url = "https://files.pythonhosted.org/packages/93/42/126b2bc7540a15452c3ebdf190ebfea8a8644e29b22f4e10e2a6aa2389e4/backports_zstd-1.3.0-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:3180c8eb085396928e9946167e610aa625922b82c3e2263c5f17000556370168", size = 631423, upload-time = "2025-12-29T17:25:47.81Z" },
+    { url = "https://files.pythonhosted.org/packages/dc/32/018e49657411582569032b7d1bb5d62e514aad8b44952de740ec6250588d/backports_zstd-1.3.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5b9a8c75a294e7ffa18fc8425a763facc366435a8b442e4dffdc19fa9499a22c", size = 495122, upload-time = "2025-12-29T17:25:49.377Z" },
+    { url = "https://files.pythonhosted.org/packages/c2/9e/cdd1d2e1d3612bb90d9cf9b23bea06f2155cdafccd8b6f28a1c4d7750004/backports_zstd-1.3.0-cp310-cp310-win32.whl", hash = "sha256:845defdb172385f17123d92a00d2e952d341e9ae310bfa2410c292bf03846034", size = 288573, upload-time = "2025-12-29T17:25:51.167Z" },
+    { url = "https://files.pythonhosted.org/packages/55/7c/2e9c80f08375bd14262cefa69297a926134f517c9955c0795eec5e1d470e/backports_zstd-1.3.0-cp310-cp310-win_amd64.whl", hash = "sha256:43a9fea6299c801da85221e387b32d90a9ad7c62aa2a34edf525359ce5ad8f3a", size = 313506, upload-time = "2025-12-29T17:25:52.778Z" },
+    { url = "https://files.pythonhosted.org/packages/c5/5d/fa67e8174f54db44eb33498abb7f98bea4f2329e873b225391bda0113a5e/backports_zstd-1.3.0-cp310-cp310-win_arm64.whl", hash = "sha256:df8473cb117e1316e6c6101f2724e025bd8f50af2dc009d0001c0aabfb5eb57c", size = 288688, upload-time = "2025-12-29T17:25:54.012Z" },
+    { url = "https://files.pythonhosted.org/packages/ac/28/ed31a0e35feb4538a996348362051b52912d50f00d25c2d388eccef9242c/backports_zstd-1.3.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:249f90b39d3741c48620021a968b35f268ca70e35f555abeea9ff95a451f35f9", size = 435660, upload-time = "2025-12-29T17:25:55.207Z" },
+    { url = "https://files.pythonhosted.org/packages/00/0d/3db362169d80442adda9dd563c4f0bb10091c8c1c9a158037f4ecd53988e/backports_zstd-1.3.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b0e71e83e46154a9d3ced6d4de9a2fea8207ee1e4832aeecf364dc125eda305c", size = 362056, upload-time = "2025-12-29T17:25:56.729Z" },
+    { url = "https://files.pythonhosted.org/packages/bd/00/b67ba053a7d6f6dbe2f8a704b7d3a5e01b1d2e2e8edbc9b634f2702ef73c/backports_zstd-1.3.0-cp311-cp311-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:cbc6193acd21f96760c94dd71bf32b161223e8503f5277acb0a5ab54e5598957", size = 505957, upload-time = "2025-12-29T17:25:57.941Z" },
+    { url = "https://files.pythonhosted.org/packages/6f/3e/2667c0ddb53ddf28667e330bf9fe92e8e17705a481c9b698e283120565f7/backports_zstd-1.3.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1df583adc0ae84a8d13d7139f42eade6d90182b1dd3e0d28f7df3c564b9fd55d", size = 475569, upload-time = "2025-12-29T17:25:59.075Z" },
+    { url = "https://files.pythonhosted.org/packages/eb/86/4052473217bd954ccdffda5f7264a0e99e7c4ecf70c0f729845c6a45fc5a/backports_zstd-1.3.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d833fc23aa3cc2e05aeffc7cfadd87b796654ad3a7fb214555cda3f1db2d4dc2", size = 581196, upload-time = "2025-12-29T17:26:00.508Z" },
+    { url = "https://files.pythonhosted.org/packages/e5/bd/064f6fdb61db3d2c473159ebc844243e650dc032de0f8208443a00127925/backports_zstd-1.3.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:142178fe981061f1d2a57c5348f2cd31a3b6397a35593e7a17dbda817b793a7f", size = 640888, upload-time = "2025-12-29T17:26:02.134Z" },
+    { url = "https://files.pythonhosted.org/packages/d8/09/0822403f40932a165a4f1df289d41653683019e4fd7a86b63ed20e9b6177/backports_zstd-1.3.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5eed0a09a163f3a8125a857cb031be87ed052e4a47bc75085ed7fca786e9bb5b", size = 491100, upload-time = "2025-12-29T17:26:03.418Z" },
+    { url = "https://files.pythonhosted.org/packages/a6/a3/f5ac28d74039b7e182a780809dc66b9dbfc893186f5d5444340bba135389/backports_zstd-1.3.0-cp311-cp311-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:60aa483fef5843749e993dde01229e5eedebca8c283023d27d6bf6800d1d4ce3", size = 565071, upload-time = "2025-12-29T17:26:05.022Z" },
+    { url = "https://files.pythonhosted.org/packages/e1/ac/50209aeb92257a642ee987afa1e61d5b6731ab6bf0bff70905856e5aede6/backports_zstd-1.3.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:ea0886c1b619773544546e243ed73f6d6c2b1ae3c00c904ccc9903a352d731e1", size = 481519, upload-time = "2025-12-29T17:26:06.255Z" },
+    { url = "https://files.pythonhosted.org/packages/08/1f/b06f64199fb4b2e9437cedbf96d0155ca08aeec35fe81d41065acd44762e/backports_zstd-1.3.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:5e137657c830a5ce99be40a1d713eb1d246bae488ada28ff0666ac4387aebdd5", size = 509465, upload-time = "2025-12-29T17:26:07.602Z" },
+    { url = "https://files.pythonhosted.org/packages/f4/37/2c365196e61c8fffbbc930ffd69f1ada7aa1c7210857b3e565031c787ac6/backports_zstd-1.3.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:94048c8089755e482e4b34608029cf1142523a625873c272be2b1c9253871a72", size = 585552, upload-time = "2025-12-29T17:26:08.911Z" },
+    { url = "https://files.pythonhosted.org/packages/93/8d/c2c4f448bb6b6c9df17410eaedce415e8db0eb25b60d09a3d22a98294d09/backports_zstd-1.3.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:d339c1ec40485e97e600eb9a285fb13169dbf44c5094b945788a62f38b96e533", size = 562893, upload-time = "2025-12-29T17:26:10.566Z" },
+    { url = "https://files.pythonhosted.org/packages/74/e8/2110d4d39115130f7514cbbcec673a885f4052bb68d15e41bc96a7558856/backports_zstd-1.3.0-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:8aeee9210c54cf8bf83f4d263a6d0d6e7a0298aeb5a14a0a95e90487c5c3157c", size = 631462, upload-time = "2025-12-29T17:26:11.99Z" },
+    { url = "https://files.pythonhosted.org/packages/b9/a8/d64b59ae0714fdace14e43873f794eff93613e35e3e85eead33a4f44cd80/backports_zstd-1.3.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ba7114a3099e5ea05cbb46568bd0e08bca2ca11e12c6a7b563a24b86b2b4a67f", size = 495125, upload-time = "2025-12-29T17:26:13.218Z" },
+    { url = "https://files.pythonhosted.org/packages/ef/d8/bcff0a091fcf27172c57ae463e49d8dec6dc31e01d7e7bf1ae3aad9c3566/backports_zstd-1.3.0-cp311-cp311-win32.whl", hash = "sha256:08dfdfb85da5915383bfae680b6ac10ab5769ab22e690f9a854320720011ae8e", size = 288664, upload-time = "2025-12-29T17:26:14.791Z" },
+    { url = "https://files.pythonhosted.org/packages/28/1a/379061e2abf8c3150ad51c1baab9ac723e01cf7538860a6a74c48f8b73ee/backports_zstd-1.3.0-cp311-cp311-win_amd64.whl", hash = "sha256:d8aac2e7cdcc8f310c16f98a0062b48d0a081dbb82862794f4f4f5bdafde30a4", size = 313633, upload-time = "2025-12-29T17:26:16.31Z" },
+    { url = "https://files.pythonhosted.org/packages/35/e7/eca40858883029fc716660106069b23253e2ec5fd34e86b4101c8cfe864b/backports_zstd-1.3.0-cp311-cp311-win_arm64.whl", hash = "sha256:440ef1be06e82dc0d69dbb57177f2ce98bbd2151013ee7e551e2f2b54caa6120", size = 288814, upload-time = "2025-12-29T17:26:17.571Z" },
+    { url = "https://files.pythonhosted.org/packages/72/d4/356da49d3053f4bc50e71a8535631b57bc9ca4e8c6d2442e073e0ab41c44/backports_zstd-1.3.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:f4a292e357f3046d18766ce06d990ccbab97411708d3acb934e63529c2ea7786", size = 435972, upload-time = "2025-12-29T17:26:18.752Z" },
+    { url = "https://files.pythonhosted.org/packages/30/8f/dbe389e60c7e47af488520f31a4aa14028d66da5bf3c60d3044b571eb906/backports_zstd-1.3.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fb4c386f38323698991b38edcc9c091d46d4713f5df02a3b5c80a28b40e289ea", size = 362124, upload-time = "2025-12-29T17:26:19.995Z" },
+    { url = "https://files.pythonhosted.org/packages/55/4b/173beafc99e99e7276ce008ef060b704471e75124c826bc5e2092815da37/backports_zstd-1.3.0-cp312-cp312-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:f52523d2bdada29e653261abdc9cfcecd9e5500d305708b7e37caddb24909d4e", size = 506378, upload-time = "2025-12-29T17:26:21.855Z" },
+    { url = "https://files.pythonhosted.org/packages/df/c8/3f12a411d9a99d262cdb37b521025eecc2aa7e4a93277be3f4f4889adb74/backports_zstd-1.3.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3321d00beaacbd647252a7f581c1e1cdbdbda2407f2addce4bfb10e8e404b7c7", size = 476201, upload-time = "2025-12-29T17:26:23.047Z" },
+    { url = "https://files.pythonhosted.org/packages/43/dc/73c090e4a2d5671422512e1b6d276ca6ea0cc0c45ec4634789106adc0d66/backports_zstd-1.3.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:88f94d238ef36c639c0ae17cf41054ce103da9c4d399c6a778ce82690d9f4919", size = 581659, upload-time = "2025-12-29T17:26:24.189Z" },
+    { url = "https://files.pythonhosted.org/packages/08/4f/11bfcef534aa2bf3f476f52130217b45337f334d8a287edb2e06744a6515/backports_zstd-1.3.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:97d8c78fe20c7442c810adccfd5e3ea6a4e6f4f1fa4c73da2bc083260ebead17", size = 640388, upload-time = "2025-12-29T17:26:25.47Z" },
+    { url = "https://files.pythonhosted.org/packages/71/17/8faea426d4f49b63238bdfd9f211a9f01c862efe0d756d3abeb84265a4e2/backports_zstd-1.3.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eefda80c3dbfbd924f1c317e7b0543d39304ee645583cb58bae29e19f42948ed", size = 494173, upload-time = "2025-12-29T17:26:26.736Z" },
+    { url = "https://files.pythonhosted.org/packages/ba/9d/901f19ac90f3cd999bdcfb6edb4d7b4dc383dfba537f06f533fc9ac4777b/backports_zstd-1.3.0-cp312-cp312-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2ab5d3b5a54a674f4f6367bb9e0914063f22cd102323876135e9cc7a8f14f17e", size = 568628, upload-time = "2025-12-29T17:26:28.12Z" },
+    { url = "https://files.pythonhosted.org/packages/60/39/4d29788590c2465a570c2fae49dbff05741d1f0c8e4a0fb2c1c310f31804/backports_zstd-1.3.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:7558fb0e8c8197c59a5f80c56bf8f56c3690c45fd62f14e9e2081661556e3e64", size = 482233, upload-time = "2025-12-29T17:26:29.399Z" },
+    { url = "https://files.pythonhosted.org/packages/d9/4b/24c7c9e8ef384b19d515a7b1644a500ceb3da3baeff6d579687da1a0f62b/backports_zstd-1.3.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:27744870e38f017159b9c0241ea51562f94c7fefcfa4c5190fb3ec4a65a7fc63", size = 509806, upload-time = "2025-12-29T17:26:30.605Z" },
+    { url = "https://files.pythonhosted.org/packages/3f/7e/7ba1aeecf0b5859f1855c0e661b4559566b64000f0627698ebd9e83f2138/backports_zstd-1.3.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b099750755bb74c280827c7d68de621da0f245189082ab48ff91bda0ec2db9df", size = 586037, upload-time = "2025-12-29T17:26:32.201Z" },
+    { url = "https://files.pythonhosted.org/packages/4a/1a/18f0402b36b9cfb0aea010b5df900cfd42c214f37493561dba3abac90c4e/backports_zstd-1.3.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:5434e86f2836d453ae3e19a2711449683b7e21e107686838d12a255ad256ca99", size = 566220, upload-time = "2025-12-29T17:26:33.5Z" },
+    { url = "https://files.pythonhosted.org/packages/dc/d9/44c098ab31b948bbfd909ec4ae08e1e44c5025a2d846f62991a62ab3ebea/backports_zstd-1.3.0-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:407e451f64e2f357c9218f5be4e372bb6102d7ae88582d415262a9d0a4f9b625", size = 630847, upload-time = "2025-12-29T17:26:35.273Z" },
+    { url = "https://files.pythonhosted.org/packages/30/33/e74cb2cfb162d2e9e00dad8bcdf53118ca7786cfd467925d6864732f79cc/backports_zstd-1.3.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:58a071f3c198c781b2df801070290b7174e3ff61875454e9df93ab7ea9ea832b", size = 498665, upload-time = "2025-12-29T17:26:37.123Z" },
+    { url = "https://files.pythonhosted.org/packages/a2/a9/67a24007c333ed22736d5cd79f1aa1d7209f09be772ff82a8fd724c1978e/backports_zstd-1.3.0-cp312-cp312-win32.whl", hash = "sha256:21a9a542ccc7958ddb51ae6e46d8ed25d585b54d0d52aaa1c8da431ea158046a", size = 288809, upload-time = "2025-12-29T17:26:38.373Z" },
+    { url = "https://files.pythonhosted.org/packages/42/24/34b816118ea913debb2ea23e71ffd0fb2e2ac738064c4ac32e3fb62c18bb/backports_zstd-1.3.0-cp312-cp312-win_amd64.whl", hash = "sha256:89ea8281821123b071a06b30b80da8e4d8a2b40a4f57315a19850337a21297ac", size = 313815, upload-time = "2025-12-29T17:26:39.665Z" },
+    { url = "https://files.pythonhosted.org/packages/4e/2f/babd02c9fc4ca35376ada7c291193a208165c7be2455f0f98bc1e1243f31/backports_zstd-1.3.0-cp312-cp312-win_arm64.whl", hash = "sha256:f6843ecb181480e423b02f60fe29e393cbc31a95fb532acdf0d3a2c87bd50ce3", size = 288927, upload-time = "2025-12-29T17:26:40.923Z" },
+    { url = "https://files.pythonhosted.org/packages/0c/7d/53e8da5950cdfc5e8fe23efd5165ce2f4fed5222f9a3292e0cdb03dd8c0d/backports_zstd-1.3.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e86e03e3661900955f01afed6c59cae9baa63574e3b66896d99b7de97eaffce9", size = 435463, upload-time = "2025-12-29T17:26:42.152Z" },
+    { url = "https://files.pythonhosted.org/packages/da/78/f98e53870f7404071a41e3d04f2ff514302eeeb3279d931d02b220f437aa/backports_zstd-1.3.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:41974dcacc9824c1effe1c8d2f9d762bcf47d265ca4581a3c63321c7b06c61f0", size = 361740, upload-time = "2025-12-29T17:26:43.377Z" },
+    { url = "https://files.pythonhosted.org/packages/6d/ed/2c64706205a944c9c346d95c17f632d4e3468db3ce60efb6f5caa7c0dcae/backports_zstd-1.3.0-cp313-cp313-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:3090a97738d6ce9545d3ca5446df43370928092a962cbc0153e5445a947e98ed", size = 505651, upload-time = "2025-12-29T17:26:44.495Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/7b/22998f691dc6e0c7e6fa81d611eb4b1f6a72fb27327f322366d4a7ca8fb3/backports_zstd-1.3.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ddc874638abf03ea1ff3b0525b4a26a8d0adf7cb46a448c3449f08e4abc276b3", size = 475859, upload-time = "2025-12-29T17:26:45.722Z" },
+    { url = "https://files.pythonhosted.org/packages/0b/78/0cde898339a339530e5f932634872d2d64549969535447a48d3b98959e11/backports_zstd-1.3.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:db609e57b8ed88b3472930c87e93c08a4bbd5ffeb94608cd9c7c6f0ac0e166c6", size = 581339, upload-time = "2025-12-29T17:26:46.93Z" },
+    { url = "https://files.pythonhosted.org/packages/e2/1d/e0973e0eebe678c12c146473af2c54cda8a3e63b179785ca1a20727ad69c/backports_zstd-1.3.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5f13033a3dd95f323c067199f2e61b4589a7880188ef4ef356c7ffbdb78a9f11", size = 642182, upload-time = "2025-12-29T17:26:48.545Z" },
+    { url = "https://files.pythonhosted.org/packages/82/a2/ac67e79e137eb98aead66c7162bafe3cffcb82ef9cdeb6367ec18d88fbce/backports_zstd-1.3.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9c4c7bcda5619a754726e7f5b391827f5efbe4bed8e62e9ec7490d42bff18aa6", size = 490807, upload-time = "2025-12-29T17:26:49.789Z" },
+    { url = "https://files.pythonhosted.org/packages/0f/e9/3514b1d065801ae7dce05246e9389003ed8fb1d7c3d71f85aa07a80f41e6/backports_zstd-1.3.0-cp313-cp313-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:884a94c40f27affe986f394f219a4fd3cbbd08e1cff2e028d29d467574cd266e", size = 566103, upload-time = "2025-12-29T17:26:51.062Z" },
+    { url = "https://files.pythonhosted.org/packages/1b/03/10ddb54cbf032e5fe390c0776d3392611b1fc772d6c3cb5a9bcdff4f915f/backports_zstd-1.3.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:497f5765126f11a5b3fd8fedfdae0166d1dd867e7179b8148370a3313d047197", size = 481614, upload-time = "2025-12-29T17:26:52.255Z" },
+    { url = "https://files.pythonhosted.org/packages/5c/13/21efa7f94c41447f43aee1563b05fc540a235e61bce4597754f6c11c2e97/backports_zstd-1.3.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:a6ff6769948bb29bba07e1c2e8582d5a9765192a366108e42d6581a458475881", size = 509207, upload-time = "2025-12-29T17:26:53.496Z" },
+    { url = "https://files.pythonhosted.org/packages/de/e7/12da9256d9e49e71030f0ff75e9f7c258e76091a4eaf5b5f414409be6a57/backports_zstd-1.3.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:1623e5bff1acd9c8ef90d24fc548110f20df2d14432bfe5de59e76fc036824ef", size = 585765, upload-time = "2025-12-29T17:26:54.99Z" },
+    { url = "https://files.pythonhosted.org/packages/24/bf/59ca9cb4e7be1e59331bb792e8ef1331828efe596b1a2f8cbbc4e3f70d75/backports_zstd-1.3.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:622c28306dcc429c8f2057fc4421d5722b1f22968d299025b35d71b50cfd4e03", size = 563852, upload-time = "2025-12-29T17:26:56.371Z" },
+    { url = "https://files.pythonhosted.org/packages/7c/ee/5a3eaed9a73bdf2c35dc0c7adc0616a99588e0de28f5ab52f3e0caaaa96f/backports_zstd-1.3.0-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:09a2785e410ed2e812cb39b684ef5eb55083a5897bfd0e6f5de3bbd2c6345f70", size = 632549, upload-time = "2025-12-29T17:26:57.598Z" },
+    { url = "https://files.pythonhosted.org/packages/75/b9/c823633afc48a1ac56d6ad34289c8f51b0234685142531bfa8197ca91777/backports_zstd-1.3.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:ade1f4127fdbe36a02f8067d75aa79c1ea1c8a306bf63c7b818bb7b530e1beaa", size = 495104, upload-time = "2025-12-29T17:26:58.826Z" },
+    { url = "https://files.pythonhosted.org/packages/a3/8f/6f7030f18fa7307f87b0f57108a50a3a540b6350e2486d1739c0567629a3/backports_zstd-1.3.0-cp313-cp313-win32.whl", hash = "sha256:668e6fb1805b825cb7504c71436f7b28d4d792bb2663ee901ec9a2bb15804437", size = 288447, upload-time = "2025-12-29T17:27:00.036Z" },
+    { url = "https://files.pythonhosted.org/packages/a2/82/b1df1bbbe4e6d3ffd364d0bcffdeb6c4361115c1eccd91238dbdd0c07fec/backports_zstd-1.3.0-cp313-cp313-win_amd64.whl", hash = "sha256:385bdadf0ea8fe6ba780a95e4c7d7f018db7bafdd630932f0f9f0fad05d608ff", size = 313664, upload-time = "2025-12-29T17:27:01.267Z" },
+    { url = "https://files.pythonhosted.org/packages/45/0f/60918fe4d3f2881de8f4088d73be4837df9e4c6567594109d355a2d548b6/backports_zstd-1.3.0-cp313-cp313-win_arm64.whl", hash = "sha256:4321a8a367537224b3559fe7aeb8012b98aea2a60a737e59e51d86e2e856fe0a", size = 288678, upload-time = "2025-12-29T17:27:02.506Z" },
+    { url = "https://files.pythonhosted.org/packages/a7/b9/35f423c0bcd85020d5e7be6ab8d7517843e3e4441071beb5c3bd8c5216cb/backports_zstd-1.3.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:10057d66fa4f0a7d3f6419ffb84b4fe61088da572e3ac4446134a1c8089e4166", size = 436155, upload-time = "2025-12-29T17:27:03.859Z" },
+    { url = "https://files.pythonhosted.org/packages/f6/14/e504daea24e8916f14ecbc223c354b558d8410cfc846606668ab91d96b38/backports_zstd-1.3.0-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4abf29d706ba05f658ca0247eb55675bcc00e10f12bca15736e45b05f1f2d2dc", size = 362436, upload-time = "2025-12-29T17:27:05.076Z" },
+    { url = "https://files.pythonhosted.org/packages/c4/f7/06e178dbab7edb88c2872aebd68b54137e07a169eba1aeedf614014f7036/backports_zstd-1.3.0-cp313-cp313t-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:127b0d73c745b0684da3d95c31c0939570810dad8967dfe8231eea8f0e047b2f", size = 507600, upload-time = "2025-12-29T17:27:06.254Z" },
+    { url = "https://files.pythonhosted.org/packages/3e/f1/2ce499b81c4389d6fa1eeea7e76f6e0bad48effdbb239da7cbcdaaf24b76/backports_zstd-1.3.0-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0205ef809fb38bb5ca7f59fa03993596f918768b9378fb7fbd8a68889a6ce028", size = 475496, upload-time = "2025-12-29T17:27:07.939Z" },
+    { url = "https://files.pythonhosted.org/packages/18/1e/c82a586f2866aabf3a601a521af3c58756d83d98b724fda200016ac5e7e2/backports_zstd-1.3.0-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1c389b667b0b07915781aa28beabf2481f11a6062a1a081873c4c443b98601a7", size = 580919, upload-time = "2025-12-29T17:27:09.1Z" },
+    { url = "https://files.pythonhosted.org/packages/1b/a3/eb5d9b7c4cb69d1b8ccd011abe244ba6815693b70bed07ed4b77ddda4535/backports_zstd-1.3.0-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:8e7ac5ef693d49d6fb35cd7bbb98c4762cfea94a8bd2bf2ab112027004f70b11", size = 639913, upload-time = "2025-12-29T17:27:10.433Z" },
+    { url = "https://files.pythonhosted.org/packages/11/2c/7296b99df79d9f31174a99c81c1964a32de8996ce2b3068f5bc66b413615/backports_zstd-1.3.0-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d5543945aae2a76a850b23f283249424f535de6a622d6002957b7d971e6a36d", size = 494800, upload-time = "2025-12-29T17:27:11.59Z" },
+    { url = "https://files.pythonhosted.org/packages/f9/fc/b8ae6e104ba72d20cd5f9dfd9baee36675e89c81d432434927967114f30f/backports_zstd-1.3.0-cp313-cp313t-manylinux_2_34_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e38be15ebce82737deda2c9410c1f942f1df9da74121049243a009810432db75", size = 570396, upload-time = "2025-12-29T17:27:13.063Z" },
+    { url = "https://files.pythonhosted.org/packages/30/56/60a7a9de7a5bc951ea1106358b413c95183c93480394f3abc541313c8679/backports_zstd-1.3.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:e3e3f58c76f4730607a4e0130d629173aa114ae72a5c8d3d5ad94e1bf51f18d8", size = 481980, upload-time = "2025-12-29T17:27:14.317Z" },
+    { url = "https://files.pythonhosted.org/packages/4b/bb/93fc1e8e81b8ecba58b0e53a14f7b44375cf837db6354410998f0c4cb6ff/backports_zstd-1.3.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:b808bf889722d889b792f7894e19c1f904bb0e9092d8c0eb0787b939b08bad9a", size = 511358, upload-time = "2025-12-29T17:27:15.669Z" },
+    { url = "https://files.pythonhosted.org/packages/ae/0f/b165c2a6080d22306975cd86ce97270208493f31a298867e343110570370/backports_zstd-1.3.0-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:f7be27d56f2f715bcd252d0c65c232146d8e1e039c7e2835b8a3ad3dc88bc508", size = 585492, upload-time = "2025-12-29T17:27:16.986Z" },
+    { url = "https://files.pythonhosted.org/packages/26/76/85b4bde76e982b24a7eb57a2fb9868807887bef4d2114a3654a6530a67ef/backports_zstd-1.3.0-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:cbe341c7fcc723893663a37175ba859328b907a4e6d2d40a4c26629cc55efb67", size = 568309, upload-time = "2025-12-29T17:27:18.28Z" },
+    { url = "https://files.pythonhosted.org/packages/83/64/9490667827a320766fb883f358a7c19171fdc04f19ade156a8c341c36967/backports_zstd-1.3.0-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:b4116a9e12dfcd834dd9132cf6a94657bf0d328cba5b295f26de26ea0ae1adc8", size = 630518, upload-time = "2025-12-29T17:27:19.525Z" },
+    { url = "https://files.pythonhosted.org/packages/ea/43/258587233b728bbff457bdb0c52b3e08504c485a8642b3daeb0bdd5a76bc/backports_zstd-1.3.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:1049e804cc8754290b24dab383d4d6ed0b7f794ad8338813ddcb3907d15a89d0", size = 499429, upload-time = "2025-12-29T17:27:21.063Z" },
+    { url = "https://files.pythonhosted.org/packages/32/04/cfab76878f360f124dbb533779e1e4603c801a0f5ada72ae5c742b7c4d7d/backports_zstd-1.3.0-cp313-cp313t-win32.whl", hash = "sha256:7d3f0f2499d2049ec53d2674c605a4b3052c217cc7ee49c05258046411685adc", size = 289389, upload-time = "2025-12-29T17:27:22.287Z" },
+    { url = "https://files.pythonhosted.org/packages/cb/ff/dbcfb6c9c922ab6d98f3d321e7d0c7b34ecfa26f3ca71d930fe1ef639737/backports_zstd-1.3.0-cp313-cp313t-win_amd64.whl", hash = "sha256:eb2f8fab0b1ea05148394cb34a9e543a43477178765f2d6e7c84ed332e34935e", size = 314776, upload-time = "2025-12-29T17:27:23.458Z" },
+    { url = "https://files.pythonhosted.org/packages/01/4b/82e4baae3117806639fe1c693b1f2f7e6133a7cefd1fa2e38018c8edcd68/backports_zstd-1.3.0-cp313-cp313t-win_arm64.whl", hash = "sha256:c66ad9eb5bfbe28c2387b7fc58ddcdecfb336d6e4e60bcba1694a906c1f21a6c", size = 289315, upload-time = "2025-12-29T17:27:24.601Z" },
+    { url = "https://files.pythonhosted.org/packages/95/b7/e843d32122f25d9568e75d1e7a29c00eae5e5728015604f3f6d02259b3a5/backports_zstd-1.3.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:3ab0d5632b84eff4355c42a04668cfe6466f7d390890f718978582bd1ff36949", size = 409771, upload-time = "2025-12-29T17:27:48.869Z" },
+    { url = "https://files.pythonhosted.org/packages/fa/a5/d6a897d4b91732f54b4506858f1da65d7a5b2dc0dbe36a23992a64f09f5a/backports_zstd-1.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:6b97cea95dbb1a97c02afd718155fad93f747815069722107a429804c355e206", size = 339289, upload-time = "2025-12-29T17:27:50.055Z" },
+    { url = "https://files.pythonhosted.org/packages/3f/b0/f0ce566ec221b284508eebbf574a779ba4a8932830db6ea03b6176f336a2/backports_zstd-1.3.0-pp310-pypy310_pp73-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:477895f2642f9397aeba69618df2c91d7f336e02df83d1e623ac37c5d3a5115e", size = 420335, upload-time = "2025-12-29T17:27:51.455Z" },
+    { url = "https://files.pythonhosted.org/packages/62/6d/bf55652c84c79b2565d3087265bcb097719540a313dee16359a54d83ab4e/backports_zstd-1.3.0-pp310-pypy310_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:330172aaf5fd3bfa53f49318abc6d1d4238cb043c384cf71f7b8f0fe2fb7ce31", size = 393880, upload-time = "2025-12-29T17:27:52.869Z" },
+    { url = "https://files.pythonhosted.org/packages/be/e0/d1feebb70ffeb150e2891c6f09700079f4a60085ebc67529eb1ca72fb5c2/backports_zstd-1.3.0-pp310-pypy310_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:32974e71eff15897ed3f8b7766a753d9f3197ea4f1c9025d80f8de099a691b99", size = 413840, upload-time = "2025-12-29T17:27:54.527Z" },
+    { url = "https://files.pythonhosted.org/packages/36/28/3b7be27ae51e418d3a724bbc4cb7fea77b6bd38b5007e333a56b0cb165c8/backports_zstd-1.3.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:993e3a34eaba5928a2065545e34bf75c65b9c34ecb67e43d5ef49b16cc182077", size = 299685, upload-time = "2025-12-29T17:27:56.149Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/d9/8c9c246e5ea79a4f45d551088b11b61f2dc7efcdc5dbe6df3be84a506e0c/backports_zstd-1.3.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:968167d29f012cee7b112ad031a8925e484e97e99288e55e4d62962c3a1013e3", size = 409666, upload-time = "2025-12-29T17:27:57.37Z" },
+    { url = "https://files.pythonhosted.org/packages/a4/4f/a55b33c314ca8c9074e99daab54d04c5d212070ae7dbc435329baf1b139e/backports_zstd-1.3.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:d8f6fc7d62b71083b574193dd8fb3a60e6bb34880cc0132aad242943af301f7a", size = 339199, upload-time = "2025-12-29T17:27:58.542Z" },
+    { url = "https://files.pythonhosted.org/packages/9d/13/ce31bd048b1c88d0f65d7af60b6cf89cfbed826c7c978f0ebca9a8a71cfc/backports_zstd-1.3.0-pp311-pypy311_pp73-manylinux2010_i686.manylinux_2_12_i686.manylinux_2_28_i686.whl", hash = "sha256:e0f2eca6aac280fdb77991ad3362487ee91a7fb064ad40043fb5a0bf5a376943", size = 420332, upload-time = "2025-12-29T17:28:00.332Z" },
+    { url = "https://files.pythonhosted.org/packages/cf/80/c0cdbc533d0037b57248588403a3afb050b2a83b8c38aa608e31b3a4d600/backports_zstd-1.3.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:676eb5e177d4ef528cf3baaeea4fffe05f664e4dd985d3ac06960ef4619c81a9", size = 393879, upload-time = "2025-12-29T17:28:01.57Z" },
+    { url = "https://files.pythonhosted.org/packages/0f/38/c97428867cac058ed196ccaeddfdf82ecd43b8a65965f2950a6e7547e77a/backports_zstd-1.3.0-pp311-pypy311_pp73-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:199eb9bd8aca6a9d489c41a682fad22c587dffe57b613d0fe6d492d0d38ce7c5", size = 413842, upload-time = "2025-12-29T17:28:03.113Z" },
+    { url = "https://files.pythonhosted.org/packages/8d/ec/6247be6536668fe1c7dfae3eaa9c94b00b956b716957c0fc986ba78c3cc4/backports_zstd-1.3.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:2524bd6777a828d5e7ccd7bd1a57f9e7007ae654fc2bd1bc1a207f6428674e4a", size = 299684, upload-time = "2025-12-29T17:28:04.856Z" },
+]
+
+[[package]]
+name = "certifi"
+version = "2026.1.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/e0/2d/a891ca51311197f6ad14a7ef42e2399f36cf2f9bd44752b3dc4eab60fdc5/certifi-2026.1.4.tar.gz", hash = "sha256:ac726dd470482006e014ad384921ed6438c457018f4b3d204aea4281258b2120", size = 154268, upload-time = "2026-01-04T02:42:41.825Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/e6/ad/3cc14f097111b4de0040c83a525973216457bbeeb63739ef1ed275c1c021/certifi-2026.1.4-py3-none-any.whl", hash = "sha256:9943707519e4add1115f44c2bc244f782c0249876bf51b6599fee1ffbedd685c", size = 152900, upload-time = "2026-01-04T02:42:40.15Z" },
+]
+
+[[package]]
+name = "cffi"
+version = "2.0.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "pycparser", marker = "implementation_name != 'PyPy'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/eb/56/b1ba7935a17738ae8453301356628e8147c79dbb825bcbc73dc7401f9846/cffi-2.0.0.tar.gz", hash = "sha256:44d1b5909021139fe36001ae048dbdde8214afa20200eda0f64c068cac5d5529", size = 523588, upload-time = "2025-09-08T23:24:04.541Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/50/bd/b1a6362b80628111e6653c961f987faa55262b4002fcec42308cad1db680/cffi-2.0.0-cp310-cp310-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:53f77cbe57044e88bbd5ed26ac1d0514d2acf0591dd6bb02a3ae37f76811b80c", size = 208811, upload-time = "2025-09-08T23:22:12.267Z" },
+    { url = "https://files.pythonhosted.org/packages/4f/27/6933a8b2562d7bd1fb595074cf99cc81fc3789f6a6c05cdabb46284a3188/cffi-2.0.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:3e837e369566884707ddaf85fc1744b47575005c0a229de3327f8f9a20f4efeb", size = 216402, upload-time = "2025-09-08T23:22:13.455Z" },
+    { url = "https://files.pythonhosted.org/packages/05/eb/b86f2a2645b62adcfff53b0dd97e8dfafb5c8aa864bd0d9a2c2049a0d551/cffi-2.0.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:5eda85d6d1879e692d546a078b44251cdd08dd1cfb98dfb77b670c97cee49ea0", size = 203217, upload-time = "2025-09-08T23:22:14.596Z" },
+    { url = "https://files.pythonhosted.org/packages/9f/e0/6cbe77a53acf5acc7c08cc186c9928864bd7c005f9efd0d126884858a5fe/cffi-2.0.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9332088d75dc3241c702d852d4671613136d90fa6881da7d770a483fd05248b4", size = 203079, upload-time = "2025-09-08T23:22:15.769Z" },
+    { url = "https://files.pythonhosted.org/packages/98/29/9b366e70e243eb3d14a5cb488dfd3a0b6b2f1fb001a203f653b93ccfac88/cffi-2.0.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:fc7de24befaeae77ba923797c7c87834c73648a05a4bde34b3b7e5588973a453", size = 216475, upload-time = "2025-09-08T23:22:17.427Z" },
+    { url = "https://files.pythonhosted.org/packages/21/7a/13b24e70d2f90a322f2900c5d8e1f14fa7e2a6b3332b7309ba7b2ba51a5a/cffi-2.0.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:cf364028c016c03078a23b503f02058f1814320a56ad535686f90565636a9495", size = 218829, upload-time = "2025-09-08T23:22:19.069Z" },
+    { url = "https://files.pythonhosted.org/packages/60/99/c9dc110974c59cc981b1f5b66e1d8af8af764e00f0293266824d9c4254bc/cffi-2.0.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e11e82b744887154b182fd3e7e8512418446501191994dbf9c9fc1f32cc8efd5", size = 211211, upload-time = "2025-09-08T23:22:20.588Z" },
+    { url = "https://files.pythonhosted.org/packages/49/72/ff2d12dbf21aca1b32a40ed792ee6b40f6dc3a9cf1644bd7ef6e95e0ac5e/cffi-2.0.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:8ea985900c5c95ce9db1745f7933eeef5d314f0565b27625d9a10ec9881e1bfb", size = 218036, upload-time = "2025-09-08T23:22:22.143Z" },
+    { url = "https://files.pythonhosted.org/packages/b1/b7/1200d354378ef52ec227395d95c2576330fd22a869f7a70e88e1447eb234/cffi-2.0.0-cp311-cp311-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:baf5215e0ab74c16e2dd324e8ec067ef59e41125d3eade2b863d294fd5035c92", size = 209613, upload-time = "2025-09-08T23:22:29.475Z" },
+    { url = "https://files.pythonhosted.org/packages/b8/56/6033f5e86e8cc9bb629f0077ba71679508bdf54a9a5e112a3c0b91870332/cffi-2.0.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:730cacb21e1bdff3ce90babf007d0a0917cc3e6492f336c2f0134101e0944f93", size = 216476, upload-time = "2025-09-08T23:22:31.063Z" },
+    { url = "https://files.pythonhosted.org/packages/dc/7f/55fecd70f7ece178db2f26128ec41430d8720f2d12ca97bf8f0a628207d5/cffi-2.0.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:6824f87845e3396029f3820c206e459ccc91760e8fa24422f8b0c3d1731cbec5", size = 203374, upload-time = "2025-09-08T23:22:32.507Z" },
+    { url = "https://files.pythonhosted.org/packages/84/ef/a7b77c8bdc0f77adc3b46888f1ad54be8f3b7821697a7b89126e829e676a/cffi-2.0.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:9de40a7b0323d889cf8d23d1ef214f565ab154443c42737dfe52ff82cf857664", size = 202597, upload-time = "2025-09-08T23:22:34.132Z" },
+    { url = "https://files.pythonhosted.org/packages/d7/91/500d892b2bf36529a75b77958edfcd5ad8e2ce4064ce2ecfeab2125d72d1/cffi-2.0.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:8941aaadaf67246224cee8c3803777eed332a19d909b47e29c9842ef1e79ac26", size = 215574, upload-time = "2025-09-08T23:22:35.443Z" },
+    { url = "https://files.pythonhosted.org/packages/44/64/58f6255b62b101093d5df22dcb752596066c7e89dd725e0afaed242a61be/cffi-2.0.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a05d0c237b3349096d3981b727493e22147f934b20f6f125a3eba8f994bec4a9", size = 218971, upload-time = "2025-09-08T23:22:36.805Z" },
+    { url = "https://files.pythonhosted.org/packages/ab/49/fa72cebe2fd8a55fbe14956f9970fe8eb1ac59e5df042f603ef7c8ba0adc/cffi-2.0.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:94698a9c5f91f9d138526b48fe26a199609544591f859c870d477351dc7b2414", size = 211972, upload-time = "2025-09-08T23:22:38.436Z" },
+    { url = "https://files.pythonhosted.org/packages/0b/28/dd0967a76aab36731b6ebfe64dec4e981aff7e0608f60c2d46b46982607d/cffi-2.0.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:5fed36fccc0612a53f1d4d9a816b50a36702c28a2aa880cb8a122b3466638743", size = 217078, upload-time = "2025-09-08T23:22:39.776Z" },
+    { url = "https://files.pythonhosted.org/packages/ff/df/a4f0fbd47331ceeba3d37c2e51e9dfc9722498becbeec2bd8bc856c9538a/cffi-2.0.0-cp312-cp312-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:21d1152871b019407d8ac3985f6775c079416c282e431a4da6afe7aefd2bccbe", size = 212529, upload-time = "2025-09-08T23:22:47.349Z" },
+    { url = "https://files.pythonhosted.org/packages/d5/72/12b5f8d3865bf0f87cf1404d8c374e7487dcf097a1c91c436e72e6badd83/cffi-2.0.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:b21e08af67b8a103c71a250401c78d5e0893beff75e28c53c98f4de42f774062", size = 220097, upload-time = "2025-09-08T23:22:48.677Z" },
+    { url = "https://files.pythonhosted.org/packages/c2/95/7a135d52a50dfa7c882ab0ac17e8dc11cec9d55d2c18dda414c051c5e69e/cffi-2.0.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:1e3a615586f05fc4065a8b22b8152f0c1b00cdbc60596d187c2a74f9e3036e4e", size = 207983, upload-time = "2025-09-08T23:22:50.06Z" },
+    { url = "https://files.pythonhosted.org/packages/3a/c8/15cb9ada8895957ea171c62dc78ff3e99159ee7adb13c0123c001a2546c1/cffi-2.0.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:81afed14892743bbe14dacb9e36d9e0e504cd204e0b165062c488942b9718037", size = 206519, upload-time = "2025-09-08T23:22:51.364Z" },
+    { url = "https://files.pythonhosted.org/packages/78/2d/7fa73dfa841b5ac06c7b8855cfc18622132e365f5b81d02230333ff26e9e/cffi-2.0.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3e17ed538242334bf70832644a32a7aae3d83b57567f9fd60a26257e992b79ba", size = 219572, upload-time = "2025-09-08T23:22:52.902Z" },
+    { url = "https://files.pythonhosted.org/packages/07/e0/267e57e387b4ca276b90f0434ff88b2c2241ad72b16d31836adddfd6031b/cffi-2.0.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3925dd22fa2b7699ed2617149842d2e6adde22b262fcbfada50e3d195e4b3a94", size = 222963, upload-time = "2025-09-08T23:22:54.518Z" },
+    { url = "https://files.pythonhosted.org/packages/b6/75/1f2747525e06f53efbd878f4d03bac5b859cbc11c633d0fb81432d98a795/cffi-2.0.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:2c8f814d84194c9ea681642fd164267891702542f028a15fc97d4674b6206187", size = 221361, upload-time = "2025-09-08T23:22:55.867Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/1e/d22cc63332bd59b06481ceaac49d6c507598642e2230f201649058a7e704/cffi-2.0.0-cp313-cp313-manylinux1_i686.manylinux2014_i686.manylinux_2_17_i686.manylinux_2_5_i686.whl", hash = "sha256:07b271772c100085dd28b74fa0cd81c8fb1a3ba18b21e03d7c27f3436a10606b", size = 212446, upload-time = "2025-09-08T23:23:03.472Z" },
+    { url = "https://files.pythonhosted.org/packages/a9/f5/a2c23eb03b61a0b8747f211eb716446c826ad66818ddc7810cc2cc19b3f2/cffi-2.0.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:d48a880098c96020b02d5a1f7d9251308510ce8858940e6fa99ece33f610838b", size = 220101, upload-time = "2025-09-08T23:23:04.792Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/7f/e6647792fc5850d634695bc0e6ab4111ae88e89981d35ac269956605feba/cffi-2.0.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:f93fd8e5c8c0a4aa1f424d6173f14a892044054871c771f8566e4008eaa359d2", size = 207948, upload-time = "2025-09-08T23:23:06.127Z" },
+    { url = "https://files.pythonhosted.org/packages/cb/1e/a5a1bd6f1fb30f22573f76533de12a00bf274abcdc55c8edab639078abb6/cffi-2.0.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:dd4f05f54a52fb558f1ba9f528228066954fee3ebe629fc1660d874d040ae5a3", size = 206422, upload-time = "2025-09-08T23:23:07.753Z" },
+    { url = "https://files.pythonhosted.org/packages/98/df/0a1755e750013a2081e863e7cd37e0cdd02664372c754e5560099eb7aa44/cffi-2.0.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:c8d3b5532fc71b7a77c09192b4a5a200ea992702734a2e9279a37f2478236f26", size = 219499, upload-time = "2025-09-08T23:23:09.648Z" },
+    { url = "https://files.pythonhosted.org/packages/50/e1/a969e687fcf9ea58e6e2a928ad5e2dd88cc12f6f0ab477e9971f2309b57c/cffi-2.0.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:d9b29c1f0ae438d5ee9acb31cadee00a58c46cc9c0b2f9038c6b0b3470877a8c", size = 222928, upload-time = "2025-09-08T23:23:10.928Z" },
+    { url = "https://files.pythonhosted.org/packages/36/54/0362578dd2c9e557a28ac77698ed67323ed5b9775ca9d3fe73fe191bb5d8/cffi-2.0.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6d50360be4546678fc1b79ffe7a66265e28667840010348dd69a314145807a1b", size = 221302, upload-time = "2025-09-08T23:23:12.42Z" },
+    { url = "https://files.pythonhosted.org/packages/d6/43/0e822876f87ea8a4ef95442c3d766a06a51fc5298823f884ef87aaad168c/cffi-2.0.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:24b6f81f1983e6df8db3adc38562c83f7d4a0c36162885ec7f7b77c7dcbec97b", size = 220049, upload-time = "2025-09-08T23:23:20.853Z" },
+    { url = "https://files.pythonhosted.org/packages/b4/89/76799151d9c2d2d1ead63c2429da9ea9d7aac304603de0c6e8764e6e8e70/cffi-2.0.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:12873ca6cb9b0f0d3a0da705d6086fe911591737a59f28b7936bdfed27c0d47c", size = 207793, upload-time = "2025-09-08T23:23:22.08Z" },
+    { url = "https://files.pythonhosted.org/packages/bb/dd/3465b14bb9e24ee24cb88c9e3730f6de63111fffe513492bf8c808a3547e/cffi-2.0.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:d9b97165e8aed9272a6bb17c01e3cc5871a594a446ebedc996e2397a1c1ea8ef", size = 206300, upload-time = "2025-09-08T23:23:23.314Z" },
+    { url = "https://files.pythonhosted.org/packages/47/d9/d83e293854571c877a92da46fdec39158f8d7e68da75bf73581225d28e90/cffi-2.0.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:afb8db5439b81cf9c9d0c80404b60c3cc9c3add93e114dcae767f1477cb53775", size = 219244, upload-time = "2025-09-08T23:23:24.541Z" },
+    { url = "https://files.pythonhosted.org/packages/2b/0f/1f177e3683aead2bb00f7679a16451d302c436b5cbf2505f0ea8146ef59e/cffi-2.0.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:737fe7d37e1a1bffe70bd5754ea763a62a066dc5913ca57e957824b72a85e205", size = 222828, upload-time = "2025-09-08T23:23:26.143Z" },
+    { url = "https://files.pythonhosted.org/packages/c6/0f/cafacebd4b040e3119dcb32fed8bdef8dfe94da653155f9d0b9dc660166e/cffi-2.0.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:38100abb9d1b1435bc4cc340bb4489635dc2f0da7456590877030c9b3d40b0c1", size = 220926, upload-time = "2025-09-08T23:23:27.873Z" },
+    { url = "https://files.pythonhosted.org/packages/be/b4/c56878d0d1755cf9caa54ba71e5d049479c52f9e4afc230f06822162ab2f/cffi-2.0.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:7cc09976e8b56f8cebd752f7113ad07752461f48a58cbba644139015ac24954c", size = 221593, upload-time = "2025-09-08T23:23:31.91Z" },
+    { url = "https://files.pythonhosted.org/packages/e0/0d/eb704606dfe8033e7128df5e90fee946bbcb64a04fcdaa97321309004000/cffi-2.0.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl", hash = "sha256:92b68146a71df78564e4ef48af17551a5ddd142e5190cdf2c5624d0c3ff5b2e8", size = 209354, upload-time = "2025-09-08T23:23:33.214Z" },
+    { url = "https://files.pythonhosted.org/packages/d8/19/3c435d727b368ca475fb8742ab97c9cb13a0de600ce86f62eab7fa3eea60/cffi-2.0.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.whl", hash = "sha256:b1e74d11748e7e98e2f426ab176d4ed720a64412b6a15054378afdb71e0f37dc", size = 208480, upload-time = "2025-09-08T23:23:34.495Z" },
+    { url = "https://files.pythonhosted.org/packages/d0/44/681604464ed9541673e486521497406fadcc15b5217c3e326b061696899a/cffi-2.0.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:28a3a209b96630bca57cce802da70c266eb08c6e97e5afd61a75611ee6c64592", size = 221584, upload-time = "2025-09-08T23:23:36.096Z" },
+    { url = "https://files.pythonhosted.org/packages/25/8e/342a504ff018a2825d395d44d63a767dd8ebc927ebda557fecdaca3ac33a/cffi-2.0.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:7553fb2090d71822f02c629afe6042c299edf91ba1bf94951165613553984512", size = 224443, upload-time = "2025-09-08T23:23:37.328Z" },
+    { url = "https://files.pythonhosted.org/packages/e1/5e/b666bacbbc60fbf415ba9988324a132c9a7a0448a9a8f125074671c0f2c3/cffi-2.0.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:6c6c373cfc5c83a975506110d17457138c8c63016b563cc9ed6e056a82f13ce4", size = 223437, upload-time = "2025-09-08T23:23:38.945Z" },
+]
+
+[[package]]
+name = "charset-normalizer"
+version = "3.4.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/13/69/33ddede1939fdd074bce5434295f38fae7136463422fe4fd3e0e89b98062/charset_normalizer-3.4.4.tar.gz", hash = "sha256:94537985111c35f28720e43603b8e7b43a6ecfb2ce1d3058bbe955b73404e21a", size = 129418, upload-time = "2025-10-14T04:42:32.879Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/1f/b8/6d51fc1d52cbd52cd4ccedd5b5b2f0f6a11bbf6765c782298b0f3e808541/charset_normalizer-3.4.4-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:e824f1492727fa856dd6eda4f7cee25f8518a12f3c4a56a74e8095695089cf6d", size = 209709, upload-time = "2025-10-14T04:40:11.385Z" },
+    { url = "https://files.pythonhosted.org/packages/5c/af/1f9d7f7faafe2ddfb6f72a2e07a548a629c61ad510fe60f9630309908fef/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4bd5d4137d500351a30687c2d3971758aac9a19208fc110ccb9d7188fbe709e8", size = 148814, upload-time = "2025-10-14T04:40:13.135Z" },
+    { url = "https://files.pythonhosted.org/packages/79/3d/f2e3ac2bbc056ca0c204298ea4e3d9db9b4afe437812638759db2c976b5f/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:027f6de494925c0ab2a55eab46ae5129951638a49a34d87f4c3eda90f696b4ad", size = 144467, upload-time = "2025-10-14T04:40:14.728Z" },
+    { url = "https://files.pythonhosted.org/packages/ec/85/1bf997003815e60d57de7bd972c57dc6950446a3e4ccac43bc3070721856/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f820802628d2694cb7e56db99213f930856014862f3fd943d290ea8438d07ca8", size = 162280, upload-time = "2025-10-14T04:40:16.14Z" },
+    { url = "https://files.pythonhosted.org/packages/3e/8e/6aa1952f56b192f54921c436b87f2aaf7c7a7c3d0d1a765547d64fd83c13/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:798d75d81754988d2565bff1b97ba5a44411867c0cf32b77a7e8f8d84796b10d", size = 159454, upload-time = "2025-10-14T04:40:17.567Z" },
+    { url = "https://files.pythonhosted.org/packages/36/3b/60cbd1f8e93aa25d1c669c649b7a655b0b5fb4c571858910ea9332678558/charset_normalizer-3.4.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d1bb833febdff5c8927f922386db610b49db6e0d4f4ee29601d71e7c2694313", size = 153609, upload-time = "2025-10-14T04:40:19.08Z" },
+    { url = "https://files.pythonhosted.org/packages/64/91/6a13396948b8fd3c4b4fd5bc74d045f5637d78c9675585e8e9fbe5636554/charset_normalizer-3.4.4-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9cd98cdc06614a2f768d2b7286d66805f94c48cde050acdbbb7db2600ab3197e", size = 151849, upload-time = "2025-10-14T04:40:20.607Z" },
+    { url = "https://files.pythonhosted.org/packages/b7/7a/59482e28b9981d105691e968c544cc0df3b7d6133152fb3dcdc8f135da7a/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:077fbb858e903c73f6c9db43374fd213b0b6a778106bc7032446a8e8b5b38b93", size = 151586, upload-time = "2025-10-14T04:40:21.719Z" },
+    { url = "https://files.pythonhosted.org/packages/92/59/f64ef6a1c4bdd2baf892b04cd78792ed8684fbc48d4c2afe467d96b4df57/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:244bfb999c71b35de57821b8ea746b24e863398194a4014e4c76adc2bbdfeff0", size = 145290, upload-time = "2025-10-14T04:40:23.069Z" },
+    { url = "https://files.pythonhosted.org/packages/6b/63/3bf9f279ddfa641ffa1962b0db6a57a9c294361cc2f5fcac997049a00e9c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:64b55f9dce520635f018f907ff1b0df1fdc31f2795a922fb49dd14fbcdf48c84", size = 163663, upload-time = "2025-10-14T04:40:24.17Z" },
+    { url = "https://files.pythonhosted.org/packages/ed/09/c9e38fc8fa9e0849b172b581fd9803bdf6e694041127933934184e19f8c3/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:faa3a41b2b66b6e50f84ae4a68c64fcd0c44355741c6374813a800cd6695db9e", size = 151964, upload-time = "2025-10-14T04:40:25.368Z" },
+    { url = "https://files.pythonhosted.org/packages/d2/d1/d28b747e512d0da79d8b6a1ac18b7ab2ecfd81b2944c4c710e166d8dd09c/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:6515f3182dbe4ea06ced2d9e8666d97b46ef4c75e326b79bb624110f122551db", size = 161064, upload-time = "2025-10-14T04:40:26.806Z" },
+    { url = "https://files.pythonhosted.org/packages/bb/9a/31d62b611d901c3b9e5500c36aab0ff5eb442043fb3a1c254200d3d397d9/charset_normalizer-3.4.4-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:cc00f04ed596e9dc0da42ed17ac5e596c6ccba999ba6bd92b0e0aef2f170f2d6", size = 155015, upload-time = "2025-10-14T04:40:28.284Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/f3/107e008fa2bff0c8b9319584174418e5e5285fef32f79d8ee6a430d0039c/charset_normalizer-3.4.4-cp310-cp310-win32.whl", hash = "sha256:f34be2938726fc13801220747472850852fe6b1ea75869a048d6f896838c896f", size = 99792, upload-time = "2025-10-14T04:40:29.613Z" },
+    { url = "https://files.pythonhosted.org/packages/eb/66/e396e8a408843337d7315bab30dbf106c38966f1819f123257f5520f8a96/charset_normalizer-3.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:a61900df84c667873b292c3de315a786dd8dac506704dea57bc957bd31e22c7d", size = 107198, upload-time = "2025-10-14T04:40:30.644Z" },
+    { url = "https://files.pythonhosted.org/packages/b5/58/01b4f815bf0312704c267f2ccb6e5d42bcc7752340cd487bc9f8c3710597/charset_normalizer-3.4.4-cp310-cp310-win_arm64.whl", hash = "sha256:cead0978fc57397645f12578bfd2d5ea9138ea0fac82b2f63f7f7c6877986a69", size = 100262, upload-time = "2025-10-14T04:40:32.108Z" },
+    { url = "https://files.pythonhosted.org/packages/ed/27/c6491ff4954e58a10f69ad90aca8a1b6fe9c5d3c6f380907af3c37435b59/charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6e1fcf0720908f200cd21aa4e6750a48ff6ce4afe7ff5a79a90d5ed8a08296f8", size = 206988, upload-time = "2025-10-14T04:40:33.79Z" },
+    { url = "https://files.pythonhosted.org/packages/94/59/2e87300fe67ab820b5428580a53cad894272dbb97f38a7a814a2a1ac1011/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f819d5fe9234f9f82d75bdfa9aef3a3d72c4d24a6e57aeaebba32a704553aa0", size = 147324, upload-time = "2025-10-14T04:40:34.961Z" },
+    { url = "https://files.pythonhosted.org/packages/07/fb/0cf61dc84b2b088391830f6274cb57c82e4da8bbc2efeac8c025edb88772/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:a59cb51917aa591b1c4e6a43c132f0cdc3c76dbad6155df4e28ee626cc77a0a3", size = 142742, upload-time = "2025-10-14T04:40:36.105Z" },
+    { url = "https://files.pythonhosted.org/packages/62/8b/171935adf2312cd745d290ed93cf16cf0dfe320863ab7cbeeae1dcd6535f/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8ef3c867360f88ac904fd3f5e1f902f13307af9052646963ee08ff4f131adafc", size = 160863, upload-time = "2025-10-14T04:40:37.188Z" },
+    { url = "https://files.pythonhosted.org/packages/09/73/ad875b192bda14f2173bfc1bc9a55e009808484a4b256748d931b6948442/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d9e45d7faa48ee908174d8fe84854479ef838fc6a705c9315372eacbc2f02897", size = 157837, upload-time = "2025-10-14T04:40:38.435Z" },
+    { url = "https://files.pythonhosted.org/packages/6d/fc/de9cce525b2c5b94b47c70a4b4fb19f871b24995c728e957ee68ab1671ea/charset_normalizer-3.4.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:840c25fb618a231545cbab0564a799f101b63b9901f2569faecd6b222ac72381", size = 151550, upload-time = "2025-10-14T04:40:40.053Z" },
+    { url = "https://files.pythonhosted.org/packages/55/c2/43edd615fdfba8c6f2dfbd459b25a6b3b551f24ea21981e23fb768503ce1/charset_normalizer-3.4.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ca5862d5b3928c4940729dacc329aa9102900382fea192fc5e52eb69d6093815", size = 149162, upload-time = "2025-10-14T04:40:41.163Z" },
+    { url = "https://files.pythonhosted.org/packages/03/86/bde4ad8b4d0e9429a4e82c1e8f5c659993a9a863ad62c7df05cf7b678d75/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d9c7f57c3d666a53421049053eaacdd14bbd0a528e2186fcb2e672effd053bb0", size = 150019, upload-time = "2025-10-14T04:40:42.276Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/86/a151eb2af293a7e7bac3a739b81072585ce36ccfb4493039f49f1d3cae8c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:277e970e750505ed74c832b4bf75dac7476262ee2a013f5574dd49075879e161", size = 143310, upload-time = "2025-10-14T04:40:43.439Z" },
+    { url = "https://files.pythonhosted.org/packages/b5/fe/43dae6144a7e07b87478fdfc4dbe9efd5defb0e7ec29f5f58a55aeef7bf7/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:31fd66405eaf47bb62e8cd575dc621c56c668f27d46a61d975a249930dd5e2a4", size = 162022, upload-time = "2025-10-14T04:40:44.547Z" },
+    { url = "https://files.pythonhosted.org/packages/80/e6/7aab83774f5d2bca81f42ac58d04caf44f0cc2b65fc6db2b3b2e8a05f3b3/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:0d3d8f15c07f86e9ff82319b3d9ef6f4bf907608f53fe9d92b28ea9ae3d1fd89", size = 149383, upload-time = "2025-10-14T04:40:46.018Z" },
+    { url = "https://files.pythonhosted.org/packages/4f/e8/b289173b4edae05c0dde07f69f8db476a0b511eac556dfe0d6bda3c43384/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:9f7fcd74d410a36883701fafa2482a6af2ff5ba96b9a620e9e0721e28ead5569", size = 159098, upload-time = "2025-10-14T04:40:47.081Z" },
+    { url = "https://files.pythonhosted.org/packages/d8/df/fe699727754cae3f8478493c7f45f777b17c3ef0600e28abfec8619eb49c/charset_normalizer-3.4.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ebf3e58c7ec8a8bed6d66a75d7fb37b55e5015b03ceae72a8e7c74495551e224", size = 152991, upload-time = "2025-10-14T04:40:48.246Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/86/584869fe4ddb6ffa3bd9f491b87a01568797fb9bd8933f557dba9771beaf/charset_normalizer-3.4.4-cp311-cp311-win32.whl", hash = "sha256:eecbc200c7fd5ddb9a7f16c7decb07b566c29fa2161a16cf67b8d068bd21690a", size = 99456, upload-time = "2025-10-14T04:40:49.376Z" },
+    { url = "https://files.pythonhosted.org/packages/65/f6/62fdd5feb60530f50f7e38b4f6a1d5203f4d16ff4f9f0952962c044e919a/charset_normalizer-3.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:5ae497466c7901d54b639cf42d5b8c1b6a4fead55215500d2f486d34db48d016", size = 106978, upload-time = "2025-10-14T04:40:50.844Z" },
+    { url = "https://files.pythonhosted.org/packages/7a/9d/0710916e6c82948b3be62d9d398cb4fcf4e97b56d6a6aeccd66c4b2f2bd5/charset_normalizer-3.4.4-cp311-cp311-win_arm64.whl", hash = "sha256:65e2befcd84bc6f37095f5961e68a6f077bf44946771354a28ad434c2cce0ae1", size = 99969, upload-time = "2025-10-14T04:40:52.272Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/85/1637cd4af66fa687396e757dec650f28025f2a2f5a5531a3208dc0ec43f2/charset_normalizer-3.4.4-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:0a98e6759f854bd25a58a73fa88833fba3b7c491169f86ce1180c948ab3fd394", size = 208425, upload-time = "2025-10-14T04:40:53.353Z" },
+    { url = "https://files.pythonhosted.org/packages/9d/6a/04130023fef2a0d9c62d0bae2649b69f7b7d8d24ea5536feef50551029df/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b5b290ccc2a263e8d185130284f8501e3e36c5e02750fc6b6bdeb2e9e96f1e25", size = 148162, upload-time = "2025-10-14T04:40:54.558Z" },
+    { url = "https://files.pythonhosted.org/packages/78/29/62328d79aa60da22c9e0b9a66539feae06ca0f5a4171ac4f7dc285b83688/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74bb723680f9f7a6234dcf67aea57e708ec1fbdf5699fb91dfd6f511b0a320ef", size = 144558, upload-time = "2025-10-14T04:40:55.677Z" },
+    { url = "https://files.pythonhosted.org/packages/86/bb/b32194a4bf15b88403537c2e120b817c61cd4ecffa9b6876e941c3ee38fe/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f1e34719c6ed0b92f418c7c780480b26b5d9c50349e9a9af7d76bf757530350d", size = 161497, upload-time = "2025-10-14T04:40:57.217Z" },
+    { url = "https://files.pythonhosted.org/packages/19/89/a54c82b253d5b9b111dc74aca196ba5ccfcca8242d0fb64146d4d3183ff1/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:2437418e20515acec67d86e12bf70056a33abdacb5cb1655042f6538d6b085a8", size = 159240, upload-time = "2025-10-14T04:40:58.358Z" },
+    { url = "https://files.pythonhosted.org/packages/c0/10/d20b513afe03acc89ec33948320a5544d31f21b05368436d580dec4e234d/charset_normalizer-3.4.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:11d694519d7f29d6cd09f6ac70028dba10f92f6cdd059096db198c283794ac86", size = 153471, upload-time = "2025-10-14T04:40:59.468Z" },
+    { url = "https://files.pythonhosted.org/packages/61/fa/fbf177b55bdd727010f9c0a3c49eefa1d10f960e5f09d1d887bf93c2e698/charset_normalizer-3.4.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac1c4a689edcc530fc9d9aa11f5774b9e2f33f9a0c6a57864e90908f5208d30a", size = 150864, upload-time = "2025-10-14T04:41:00.623Z" },
+    { url = "https://files.pythonhosted.org/packages/05/12/9fbc6a4d39c0198adeebbde20b619790e9236557ca59fc40e0e3cebe6f40/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:21d142cc6c0ec30d2efee5068ca36c128a30b0f2c53c1c07bd78cb6bc1d3be5f", size = 150647, upload-time = "2025-10-14T04:41:01.754Z" },
+    { url = "https://files.pythonhosted.org/packages/ad/1f/6a9a593d52e3e8c5d2b167daf8c6b968808efb57ef4c210acb907c365bc4/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:5dbe56a36425d26d6cfb40ce79c314a2e4dd6211d51d6d2191c00bed34f354cc", size = 145110, upload-time = "2025-10-14T04:41:03.231Z" },
+    { url = "https://files.pythonhosted.org/packages/30/42/9a52c609e72471b0fc54386dc63c3781a387bb4fe61c20231a4ebcd58bdd/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:5bfbb1b9acf3334612667b61bd3002196fe2a1eb4dd74d247e0f2a4d50ec9bbf", size = 162839, upload-time = "2025-10-14T04:41:04.715Z" },
+    { url = "https://files.pythonhosted.org/packages/c4/5b/c0682bbf9f11597073052628ddd38344a3d673fda35a36773f7d19344b23/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:d055ec1e26e441f6187acf818b73564e6e6282709e9bcb5b63f5b23068356a15", size = 150667, upload-time = "2025-10-14T04:41:05.827Z" },
+    { url = "https://files.pythonhosted.org/packages/e4/24/a41afeab6f990cf2daf6cb8c67419b63b48cf518e4f56022230840c9bfb2/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:af2d8c67d8e573d6de5bc30cdb27e9b95e49115cd9baad5ddbd1a6207aaa82a9", size = 160535, upload-time = "2025-10-14T04:41:06.938Z" },
+    { url = "https://files.pythonhosted.org/packages/2a/e5/6a4ce77ed243c4a50a1fecca6aaaab419628c818a49434be428fe24c9957/charset_normalizer-3.4.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:780236ac706e66881f3b7f2f32dfe90507a09e67d1d454c762cf642e6e1586e0", size = 154816, upload-time = "2025-10-14T04:41:08.101Z" },
+    { url = "https://files.pythonhosted.org/packages/a8/ef/89297262b8092b312d29cdb2517cb1237e51db8ecef2e9af5edbe7b683b1/charset_normalizer-3.4.4-cp312-cp312-win32.whl", hash = "sha256:5833d2c39d8896e4e19b689ffc198f08ea58116bee26dea51e362ecc7cd3ed26", size = 99694, upload-time = "2025-10-14T04:41:09.23Z" },
+    { url = "https://files.pythonhosted.org/packages/3d/2d/1e5ed9dd3b3803994c155cd9aacb60c82c331bad84daf75bcb9c91b3295e/charset_normalizer-3.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:a79cfe37875f822425b89a82333404539ae63dbdddf97f84dcbc3d339aae9525", size = 107131, upload-time = "2025-10-14T04:41:10.467Z" },
+    { url = "https://files.pythonhosted.org/packages/d0/d9/0ed4c7098a861482a7b6a95603edce4c0d9db2311af23da1fb2b75ec26fc/charset_normalizer-3.4.4-cp312-cp312-win_arm64.whl", hash = "sha256:376bec83a63b8021bb5c8ea75e21c4ccb86e7e45ca4eb81146091b56599b80c3", size = 100390, upload-time = "2025-10-14T04:41:11.915Z" },
+    { url = "https://files.pythonhosted.org/packages/97/45/4b3a1239bbacd321068ea6e7ac28875b03ab8bc0aa0966452db17cd36714/charset_normalizer-3.4.4-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:e1f185f86a6f3403aa2420e815904c67b2f9ebc443f045edd0de921108345794", size = 208091, upload-time = "2025-10-14T04:41:13.346Z" },
+    { url = "https://files.pythonhosted.org/packages/7d/62/73a6d7450829655a35bb88a88fca7d736f9882a27eacdca2c6d505b57e2e/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b39f987ae8ccdf0d2642338faf2abb1862340facc796048b604ef14919e55ed", size = 147936, upload-time = "2025-10-14T04:41:14.461Z" },
+    { url = "https://files.pythonhosted.org/packages/89/c5/adb8c8b3d6625bef6d88b251bbb0d95f8205831b987631ab0c8bb5d937c2/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:3162d5d8ce1bb98dd51af660f2121c55d0fa541b46dff7bb9b9f86ea1d87de72", size = 144180, upload-time = "2025-10-14T04:41:15.588Z" },
+    { url = "https://files.pythonhosted.org/packages/91/ed/9706e4070682d1cc219050b6048bfd293ccf67b3d4f5a4f39207453d4b99/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:81d5eb2a312700f4ecaa977a8235b634ce853200e828fbadf3a9c50bab278328", size = 161346, upload-time = "2025-10-14T04:41:16.738Z" },
+    { url = "https://files.pythonhosted.org/packages/d5/0d/031f0d95e4972901a2f6f09ef055751805ff541511dc1252ba3ca1f80cf5/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5bd2293095d766545ec1a8f612559f6b40abc0eb18bb2f5d1171872d34036ede", size = 158874, upload-time = "2025-10-14T04:41:17.923Z" },
+    { url = "https://files.pythonhosted.org/packages/f5/83/6ab5883f57c9c801ce5e5677242328aa45592be8a00644310a008d04f922/charset_normalizer-3.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a8a8b89589086a25749f471e6a900d3f662d1d3b6e2e59dcecf787b1cc3a1894", size = 153076, upload-time = "2025-10-14T04:41:19.106Z" },
+    { url = "https://files.pythonhosted.org/packages/75/1e/5ff781ddf5260e387d6419959ee89ef13878229732732ee73cdae01800f2/charset_normalizer-3.4.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc7637e2f80d8530ee4a78e878bce464f70087ce73cf7c1caf142416923b98f1", size = 150601, upload-time = "2025-10-14T04:41:20.245Z" },
+    { url = "https://files.pythonhosted.org/packages/d7/57/71be810965493d3510a6ca79b90c19e48696fb1ff964da319334b12677f0/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f8bf04158c6b607d747e93949aa60618b61312fe647a6369f88ce2ff16043490", size = 150376, upload-time = "2025-10-14T04:41:21.398Z" },
+    { url = "https://files.pythonhosted.org/packages/e5/d5/c3d057a78c181d007014feb7e9f2e65905a6c4ef182c0ddf0de2924edd65/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:554af85e960429cf30784dd47447d5125aaa3b99a6f0683589dbd27e2f45da44", size = 144825, upload-time = "2025-10-14T04:41:22.583Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/8c/d0406294828d4976f275ffbe66f00266c4b3136b7506941d87c00cab5272/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:74018750915ee7ad843a774364e13a3db91682f26142baddf775342c3f5b1133", size = 162583, upload-time = "2025-10-14T04:41:23.754Z" },
+    { url = "https://files.pythonhosted.org/packages/d7/24/e2aa1f18c8f15c4c0e932d9287b8609dd30ad56dbe41d926bd846e22fb8d/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:c0463276121fdee9c49b98908b3a89c39be45d86d1dbaa22957e38f6321d4ce3", size = 150366, upload-time = "2025-10-14T04:41:25.27Z" },
+    { url = "https://files.pythonhosted.org/packages/e4/5b/1e6160c7739aad1e2df054300cc618b06bf784a7a164b0f238360721ab86/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:362d61fd13843997c1c446760ef36f240cf81d3ebf74ac62652aebaf7838561e", size = 160300, upload-time = "2025-10-14T04:41:26.725Z" },
+    { url = "https://files.pythonhosted.org/packages/7a/10/f882167cd207fbdd743e55534d5d9620e095089d176d55cb22d5322f2afd/charset_normalizer-3.4.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9a26f18905b8dd5d685d6d07b0cdf98a79f3c7a918906af7cc143ea2e164c8bc", size = 154465, upload-time = "2025-10-14T04:41:28.322Z" },
+    { url = "https://files.pythonhosted.org/packages/89/66/c7a9e1b7429be72123441bfdbaf2bc13faab3f90b933f664db506dea5915/charset_normalizer-3.4.4-cp313-cp313-win32.whl", hash = "sha256:9b35f4c90079ff2e2edc5b26c0c77925e5d2d255c42c74fdb70fb49b172726ac", size = 99404, upload-time = "2025-10-14T04:41:29.95Z" },
+    { url = "https://files.pythonhosted.org/packages/c4/26/b9924fa27db384bdcd97ab83b4f0a8058d96ad9626ead570674d5e737d90/charset_normalizer-3.4.4-cp313-cp313-win_amd64.whl", hash = "sha256:b435cba5f4f750aa6c0a0d92c541fb79f69a387c91e61f1795227e4ed9cece14", size = 107092, upload-time = "2025-10-14T04:41:31.188Z" },
+    { url = "https://files.pythonhosted.org/packages/af/8f/3ed4bfa0c0c72a7ca17f0380cd9e4dd842b09f664e780c13cff1dcf2ef1b/charset_normalizer-3.4.4-cp313-cp313-win_arm64.whl", hash = "sha256:542d2cee80be6f80247095cc36c418f7bddd14f4a6de45af91dfad36d817bba2", size = 100408, upload-time = "2025-10-14T04:41:32.624Z" },
+    { url = "https://files.pythonhosted.org/packages/2a/35/7051599bd493e62411d6ede36fd5af83a38f37c4767b92884df7301db25d/charset_normalizer-3.4.4-cp314-cp314-macosx_10_13_universal2.whl", hash = "sha256:da3326d9e65ef63a817ecbcc0df6e94463713b754fe293eaa03da99befb9a5bd", size = 207746, upload-time = "2025-10-14T04:41:33.773Z" },
+    { url = "https://files.pythonhosted.org/packages/10/9a/97c8d48ef10d6cd4fcead2415523221624bf58bcf68a802721a6bc807c8f/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:8af65f14dc14a79b924524b1e7fffe304517b2bff5a58bf64f30b98bbc5079eb", size = 147889, upload-time = "2025-10-14T04:41:34.897Z" },
+    { url = "https://files.pythonhosted.org/packages/10/bf/979224a919a1b606c82bd2c5fa49b5c6d5727aa47b4312bb27b1734f53cd/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl", hash = "sha256:74664978bb272435107de04e36db5a9735e78232b85b77d45cfb38f758efd33e", size = 143641, upload-time = "2025-10-14T04:41:36.116Z" },
+    { url = "https://files.pythonhosted.org/packages/ba/33/0ad65587441fc730dc7bd90e9716b30b4702dc7b617e6ba4997dc8651495/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:752944c7ffbfdd10c074dc58ec2d5a8a4cd9493b314d367c14d24c17684ddd14", size = 160779, upload-time = "2025-10-14T04:41:37.229Z" },
+    { url = "https://files.pythonhosted.org/packages/67/ed/331d6b249259ee71ddea93f6f2f0a56cfebd46938bde6fcc6f7b9a3d0e09/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d1f13550535ad8cff21b8d757a3257963e951d96e20ec82ab44bc64aeb62a191", size = 159035, upload-time = "2025-10-14T04:41:38.368Z" },
+    { url = "https://files.pythonhosted.org/packages/67/ff/f6b948ca32e4f2a4576aa129d8bed61f2e0543bf9f5f2b7fc3758ed005c9/charset_normalizer-3.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecaae4149d99b1c9e7b88bb03e3221956f68fd6d50be2ef061b2381b61d20838", size = 152542, upload-time = "2025-10-14T04:41:39.862Z" },
+    { url = "https://files.pythonhosted.org/packages/16/85/276033dcbcc369eb176594de22728541a925b2632f9716428c851b149e83/charset_normalizer-3.4.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cb6254dc36b47a990e59e1068afacdcd02958bdcce30bb50cc1700a8b9d624a6", size = 149524, upload-time = "2025-10-14T04:41:41.319Z" },
+    { url = "https://files.pythonhosted.org/packages/9e/f2/6a2a1f722b6aba37050e626530a46a68f74e63683947a8acff92569f979a/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:c8ae8a0f02f57a6e61203a31428fa1d677cbe50c93622b4149d5c0f319c1d19e", size = 150395, upload-time = "2025-10-14T04:41:42.539Z" },
+    { url = "https://files.pythonhosted.org/packages/60/bb/2186cb2f2bbaea6338cad15ce23a67f9b0672929744381e28b0592676824/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:47cc91b2f4dd2833fddaedd2893006b0106129d4b94fdb6af1f4ce5a9965577c", size = 143680, upload-time = "2025-10-14T04:41:43.661Z" },
+    { url = "https://files.pythonhosted.org/packages/7d/a5/bf6f13b772fbb2a90360eb620d52ed8f796f3c5caee8398c3b2eb7b1c60d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:82004af6c302b5d3ab2cfc4cc5f29db16123b1a8417f2e25f9066f91d4411090", size = 162045, upload-time = "2025-10-14T04:41:44.821Z" },
+    { url = "https://files.pythonhosted.org/packages/df/c5/d1be898bf0dc3ef9030c3825e5d3b83f2c528d207d246cbabe245966808d/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:2b7d8f6c26245217bd2ad053761201e9f9680f8ce52f0fcd8d0755aeae5b2152", size = 149687, upload-time = "2025-10-14T04:41:46.442Z" },
+    { url = "https://files.pythonhosted.org/packages/a5/42/90c1f7b9341eef50c8a1cb3f098ac43b0508413f33affd762855f67a410e/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:799a7a5e4fb2d5898c60b640fd4981d6a25f1c11790935a44ce38c54e985f828", size = 160014, upload-time = "2025-10-14T04:41:47.631Z" },
+    { url = "https://files.pythonhosted.org/packages/76/be/4d3ee471e8145d12795ab655ece37baed0929462a86e72372fd25859047c/charset_normalizer-3.4.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:99ae2cffebb06e6c22bdc25801d7b30f503cc87dbd283479e7b606f70aff57ec", size = 154044, upload-time = "2025-10-14T04:41:48.81Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/6f/8f7af07237c34a1defe7defc565a9bc1807762f672c0fde711a4b22bf9c0/charset_normalizer-3.4.4-cp314-cp314-win32.whl", hash = "sha256:f9d332f8c2a2fcbffe1378594431458ddbef721c1769d78e2cbc06280d8155f9", size = 99940, upload-time = "2025-10-14T04:41:49.946Z" },
+    { url = "https://files.pythonhosted.org/packages/4b/51/8ade005e5ca5b0d80fb4aff72a3775b325bdc3d27408c8113811a7cbe640/charset_normalizer-3.4.4-cp314-cp314-win_amd64.whl", hash = "sha256:8a6562c3700cce886c5be75ade4a5db4214fda19fede41d9792d100288d8f94c", size = 107104, upload-time = "2025-10-14T04:41:51.051Z" },
+    { url = "https://files.pythonhosted.org/packages/da/5f/6b8f83a55bb8278772c5ae54a577f3099025f9ade59d0136ac24a0df4bde/charset_normalizer-3.4.4-cp314-cp314-win_arm64.whl", hash = "sha256:de00632ca48df9daf77a2c65a484531649261ec9f25489917f09e455cb09ddb2", size = 100743, upload-time = "2025-10-14T04:41:52.122Z" },
+    { url = "https://files.pythonhosted.org/packages/0a/4c/925909008ed5a988ccbb72dcc897407e5d6d3bd72410d69e051fc0c14647/charset_normalizer-3.4.4-py3-none-any.whl", hash = "sha256:7a32c560861a02ff789ad905a2fe94e3f840803362c84fecf1851cb4cf3dc37f", size = 53402, upload-time = "2025-10-14T04:42:31.76Z" },
+]
+
+[[package]]
+name = "click"
+version = "8.3.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "colorama", marker = "sys_platform == 'win32'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" },
+]
+
+[[package]]
+name = "colorama"
+version = "0.4.6"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" },
+]
+
+[[package]]
+name = "coverage"
+version = "7.13.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/11/43/3e4ac666cc35f231fa70c94e9f38459299de1a152813f9d2f60fc5f3ecaf/coverage-7.13.3.tar.gz", hash = "sha256:f7f6182d3dfb8802c1747eacbfe611b669455b69b7c037484bb1efbbb56711ac", size = 826832, upload-time = "2026-02-03T14:02:30.944Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ab/07/1c8099563a8a6c389a31c2d0aa1497cee86d6248bb4b9ba5e779215db9f9/coverage-7.13.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0b4f345f7265cdbdb5ec2521ffff15fa49de6d6c39abf89fc7ad68aa9e3a55f0", size = 219143, upload-time = "2026-02-03T13:59:40.459Z" },
+    { url = "https://files.pythonhosted.org/packages/69/39/a892d44af7aa092cab70e0cc5cdbba18eeccfe1d6930695dab1742eef9e9/coverage-7.13.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:96c3be8bae9d0333e403cc1a8eb078a7f928b5650bae94a18fb4820cc993fb9b", size = 219663, upload-time = "2026-02-03T13:59:41.951Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/25/9669dcf4c2bb4c3861469e6db20e52e8c11908cf53c14ec9b12e9fd4d602/coverage-7.13.3-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d6f4a21328ea49d38565b55599e1c02834e76583a6953e5586d65cb1efebd8f8", size = 246424, upload-time = "2026-02-03T13:59:43.418Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/68/d9766c4e298aca62ea5d9543e1dd1e4e1439d7284815244d8b7db1840bfb/coverage-7.13.3-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fc970575799a9d17d5c3fafd83a0f6ccf5d5117cdc9ad6fbd791e9ead82418b0", size = 248228, upload-time = "2026-02-03T13:59:44.816Z" },
+    { url = "https://files.pythonhosted.org/packages/f0/e2/eea6cb4a4bd443741adf008d4cccec83a1f75401df59b6559aca2bdd9710/coverage-7.13.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:87ff33b652b3556b05e204ae20793d1f872161b0fa5ec8a9ac76f8430e152ed6", size = 250103, upload-time = "2026-02-03T13:59:46.271Z" },
+    { url = "https://files.pythonhosted.org/packages/db/77/664280ecd666c2191610842177e2fab9e5dbdeef97178e2078fed46a3d2c/coverage-7.13.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7df8759ee57b9f3f7b66799b7660c282f4375bef620ade1686d6a7b03699e75f", size = 247107, upload-time = "2026-02-03T13:59:48.53Z" },
+    { url = "https://files.pythonhosted.org/packages/2b/df/2a672eab99e0d0eba52d8a63e47dc92245eee26954d1b2d3c8f7d372151f/coverage-7.13.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f45c9bcb16bee25a798ccba8a2f6a1251b19de6a0d617bb365d7d2f386c4e20e", size = 248143, upload-time = "2026-02-03T13:59:50.027Z" },
+    { url = "https://files.pythonhosted.org/packages/a5/dc/a104e7a87c13e57a358b8b9199a8955676e1703bb372d79722b54978ae45/coverage-7.13.3-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:318b2e4753cbf611061e01b6cc81477e1cdfeb69c36c4a14e6595e674caadb56", size = 246148, upload-time = "2026-02-03T13:59:52.025Z" },
+    { url = "https://files.pythonhosted.org/packages/2b/89/e113d3a58dc20b03b7e59aed1e53ebc9ca6167f961876443e002b10e3ae9/coverage-7.13.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:24db3959de8ee394eeeca89ccb8ba25305c2da9a668dd44173394cbd5aa0777f", size = 246414, upload-time = "2026-02-03T13:59:53.859Z" },
+    { url = "https://files.pythonhosted.org/packages/3f/60/a3fd0a6e8d89b488396019a2268b6a1f25ab56d6d18f3be50f35d77b47dc/coverage-7.13.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:be14d0622125edef21b3a4d8cd2d138c4872bf6e38adc90fd92385e3312f406a", size = 247023, upload-time = "2026-02-03T13:59:55.454Z" },
+    { url = "https://files.pythonhosted.org/packages/19/fa/de4840bb939dbb22ba0648a6d8069fa91c9cf3b3fca8b0d1df461e885b3d/coverage-7.13.3-cp310-cp310-win32.whl", hash = "sha256:53be4aab8ddef18beb6188f3a3fdbf4d1af2277d098d4e618be3a8e6c88e74be", size = 221751, upload-time = "2026-02-03T13:59:57.383Z" },
+    { url = "https://files.pythonhosted.org/packages/de/87/233ff8b7ef62fb63f58c78623b50bef69681111e0c4d43504f422d88cda4/coverage-7.13.3-cp310-cp310-win_amd64.whl", hash = "sha256:bfeee64ad8b4aae3233abb77eb6b52b51b05fa89da9645518671b9939a78732b", size = 222686, upload-time = "2026-02-03T13:59:58.825Z" },
+    { url = "https://files.pythonhosted.org/packages/ec/09/1ac74e37cf45f17eb41e11a21854f7f92a4c2d6c6098ef4a1becb0c6d8d3/coverage-7.13.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:5907605ee20e126eeee2abe14aae137043c2c8af2fa9b38d2ab3b7a6b8137f73", size = 219276, upload-time = "2026-02-03T14:00:00.296Z" },
+    { url = "https://files.pythonhosted.org/packages/2e/cb/71908b08b21beb2c437d0d5870c4ec129c570ca1b386a8427fcdb11cf89c/coverage-7.13.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a88705500988c8acad8b8fd86c2a933d3aa96bec1ddc4bc5cb256360db7bbd00", size = 219776, upload-time = "2026-02-03T14:00:02.414Z" },
+    { url = "https://files.pythonhosted.org/packages/09/85/c4f3dd69232887666a2c0394d4be21c60ea934d404db068e6c96aa59cd87/coverage-7.13.3-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7bbb5aa9016c4c29e3432e087aa29ebee3f8fda089cfbfb4e6d64bd292dcd1c2", size = 250196, upload-time = "2026-02-03T14:00:04.197Z" },
+    { url = "https://files.pythonhosted.org/packages/9c/cc/560ad6f12010344d0778e268df5ba9aa990aacccc310d478bf82bf3d302c/coverage-7.13.3-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0c2be202a83dde768937a61cdc5d06bf9fb204048ca199d93479488e6247656c", size = 252111, upload-time = "2026-02-03T14:00:05.639Z" },
+    { url = "https://files.pythonhosted.org/packages/f0/66/3193985fb2c58e91f94cfbe9e21a6fdf941e9301fe2be9e92c072e9c8f8c/coverage-7.13.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f45e32ef383ce56e0ca099b2e02fcdf7950be4b1b56afaab27b4ad790befe5b", size = 254217, upload-time = "2026-02-03T14:00:07.738Z" },
+    { url = "https://files.pythonhosted.org/packages/c5/78/f0f91556bf1faa416792e537c523c5ef9db9b1d32a50572c102b3d7c45b3/coverage-7.13.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:6ed2e787249b922a93cd95c671cc9f4c9797a106e81b455c83a9ddb9d34590c0", size = 250318, upload-time = "2026-02-03T14:00:09.224Z" },
+    { url = "https://files.pythonhosted.org/packages/6f/aa/fc654e45e837d137b2c1f3a2cc09b4aea1e8b015acd2f774fa0f3d2ddeba/coverage-7.13.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:05dd25b21afffe545e808265897c35f32d3e4437663923e0d256d9ab5031fb14", size = 251909, upload-time = "2026-02-03T14:00:10.712Z" },
+    { url = "https://files.pythonhosted.org/packages/73/4d/ab53063992add8a9ca0463c9d92cce5994a29e17affd1c2daa091b922a93/coverage-7.13.3-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:46d29926349b5c4f1ea4fca95e8c892835515f3600995a383fa9a923b5739ea4", size = 249971, upload-time = "2026-02-03T14:00:12.402Z" },
+    { url = "https://files.pythonhosted.org/packages/29/25/83694b81e46fcff9899694a1b6f57573429cdd82b57932f09a698f03eea5/coverage-7.13.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:fae6a21537519c2af00245e834e5bf2884699cc7c1055738fd0f9dc37a3644ad", size = 249692, upload-time = "2026-02-03T14:00:13.868Z" },
+    { url = "https://files.pythonhosted.org/packages/d4/ef/d68fc304301f4cb4bf6aefa0045310520789ca38dabdfba9dbecd3f37919/coverage-7.13.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:c672d4e2f0575a4ca2bf2aa0c5ced5188220ab806c1bb6d7179f70a11a017222", size = 250597, upload-time = "2026-02-03T14:00:15.461Z" },
+    { url = "https://files.pythonhosted.org/packages/8d/85/240ad396f914df361d0f71e912ddcedb48130c71b88dc4193fe3c0306f00/coverage-7.13.3-cp311-cp311-win32.whl", hash = "sha256:fcda51c918c7a13ad93b5f89a58d56e3a072c9e0ba5c231b0ed81404bf2648fb", size = 221773, upload-time = "2026-02-03T14:00:17.462Z" },
+    { url = "https://files.pythonhosted.org/packages/2f/71/165b3a6d3d052704a9ab52d11ea64ef3426745de517dda44d872716213a7/coverage-7.13.3-cp311-cp311-win_amd64.whl", hash = "sha256:d1a049b5c51b3b679928dd35e47c4a2235e0b6128b479a7596d0ef5b42fa6301", size = 222711, upload-time = "2026-02-03T14:00:19.449Z" },
+    { url = "https://files.pythonhosted.org/packages/51/d0/0ddc9c5934cdd52639c5df1f1eb0fdab51bb52348f3a8d1c7db9c600d93a/coverage-7.13.3-cp311-cp311-win_arm64.whl", hash = "sha256:79f2670c7e772f4917895c3d89aad59e01f3dbe68a4ed2d0373b431fad1dcfba", size = 221377, upload-time = "2026-02-03T14:00:20.968Z" },
+    { url = "https://files.pythonhosted.org/packages/94/44/330f8e83b143f6668778ed61d17ece9dc48459e9e74669177de02f45fec5/coverage-7.13.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:ed48b4170caa2c4420e0cd27dc977caaffc7eecc317355751df8373dddcef595", size = 219441, upload-time = "2026-02-03T14:00:22.585Z" },
+    { url = "https://files.pythonhosted.org/packages/08/e7/29db05693562c2e65bdf6910c0af2fd6f9325b8f43caf7a258413f369e30/coverage-7.13.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:8f2adf4bcffbbec41f366f2e6dffb9d24e8172d16e91da5799c9b7ed6b5716e6", size = 219801, upload-time = "2026-02-03T14:00:24.186Z" },
+    { url = "https://files.pythonhosted.org/packages/90/ae/7f8a78249b02b0818db46220795f8ac8312ea4abd1d37d79ea81db5cae81/coverage-7.13.3-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:01119735c690786b6966a1e9f098da4cd7ca9174c4cfe076d04e653105488395", size = 251306, upload-time = "2026-02-03T14:00:25.798Z" },
+    { url = "https://files.pythonhosted.org/packages/62/71/a18a53d1808e09b2e9ebd6b47dad5e92daf4c38b0686b4c4d1b2f3e42b7f/coverage-7.13.3-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:8bb09e83c603f152d855f666d70a71765ca8e67332e5829e62cb9466c176af23", size = 254051, upload-time = "2026-02-03T14:00:27.474Z" },
+    { url = "https://files.pythonhosted.org/packages/4a/0a/eb30f6455d04c5a3396d0696cad2df0269ae7444bb322f86ffe3376f7bf9/coverage-7.13.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:b607a40cba795cfac6d130220d25962931ce101f2f478a29822b19755377fb34", size = 255160, upload-time = "2026-02-03T14:00:29.024Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/7e/a45baac86274ce3ed842dbb84f14560c673ad30535f397d89164ec56c5df/coverage-7.13.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:44f14a62f5da2e9aedf9080e01d2cda61df39197d48e323538ec037336d68da8", size = 251709, upload-time = "2026-02-03T14:00:30.641Z" },
+    { url = "https://files.pythonhosted.org/packages/c0/df/dd0dc12f30da11349993f3e218901fdf82f45ee44773596050c8f5a1fb25/coverage-7.13.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:debf29e0b157769843dff0981cc76f79e0ed04e36bb773c6cac5f6029054bd8a", size = 253083, upload-time = "2026-02-03T14:00:32.14Z" },
+    { url = "https://files.pythonhosted.org/packages/ab/32/fc764c8389a8ce95cb90eb97af4c32f392ab0ac23ec57cadeefb887188d3/coverage-7.13.3-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:824bb95cd71604031ae9a48edb91fd6effde669522f960375668ed21b36e3ec4", size = 251227, upload-time = "2026-02-03T14:00:34.721Z" },
+    { url = "https://files.pythonhosted.org/packages/dd/ca/d025e9da8f06f24c34d2da9873957cfc5f7e0d67802c3e34d0caa8452130/coverage-7.13.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:8f1010029a5b52dc427c8e2a8dbddb2303ddd180b806687d1acd1bb1d06649e7", size = 250794, upload-time = "2026-02-03T14:00:36.278Z" },
+    { url = "https://files.pythonhosted.org/packages/45/c7/76bf35d5d488ec8f68682eb8e7671acc50a6d2d1c1182de1d2b6d4ffad3b/coverage-7.13.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cd5dee4fd7659d8306ffa79eeaaafd91fa30a302dac3af723b9b469e549247e0", size = 252671, upload-time = "2026-02-03T14:00:38.368Z" },
+    { url = "https://files.pythonhosted.org/packages/bf/10/1921f1a03a7c209e1cb374f81a6b9b68b03cdb3ecc3433c189bc90e2a3d5/coverage-7.13.3-cp312-cp312-win32.whl", hash = "sha256:f7f153d0184d45f3873b3ad3ad22694fd73aadcb8cdbc4337ab4b41ea6b4dff1", size = 221986, upload-time = "2026-02-03T14:00:40.442Z" },
+    { url = "https://files.pythonhosted.org/packages/3c/7c/f5d93297f8e125a80c15545edc754d93e0ed8ba255b65e609b185296af01/coverage-7.13.3-cp312-cp312-win_amd64.whl", hash = "sha256:03a6e5e1e50819d6d7436f5bc40c92ded7e484e400716886ac921e35c133149d", size = 222793, upload-time = "2026-02-03T14:00:42.106Z" },
+    { url = "https://files.pythonhosted.org/packages/43/59/c86b84170015b4555ebabca8649bdf9f4a1f737a73168088385ed0f947c4/coverage-7.13.3-cp312-cp312-win_arm64.whl", hash = "sha256:51c4c42c0e7d09a822b08b6cf79b3c4db8333fffde7450da946719ba0d45730f", size = 221410, upload-time = "2026-02-03T14:00:43.726Z" },
+    { url = "https://files.pythonhosted.org/packages/81/f3/4c333da7b373e8c8bfb62517e8174a01dcc373d7a9083698e3b39d50d59c/coverage-7.13.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:853c3d3c79ff0db65797aad79dee6be020efd218ac4510f15a205f1e8d13ce25", size = 219468, upload-time = "2026-02-03T14:00:45.829Z" },
+    { url = "https://files.pythonhosted.org/packages/d6/31/0714337b7d23630c8de2f4d56acf43c65f8728a45ed529b34410683f7217/coverage-7.13.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:f75695e157c83d374f88dcc646a60cb94173304a9258b2e74ba5a66b7614a51a", size = 219839, upload-time = "2026-02-03T14:00:47.407Z" },
+    { url = "https://files.pythonhosted.org/packages/12/99/bd6f2a2738144c98945666f90cae446ed870cecf0421c767475fcf42cdbe/coverage-7.13.3-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2d098709621d0819039f3f1e471ee554f55a0b2ac0d816883c765b14129b5627", size = 250828, upload-time = "2026-02-03T14:00:49.029Z" },
+    { url = "https://files.pythonhosted.org/packages/6f/99/97b600225fbf631e6f5bfd3ad5bcaf87fbb9e34ff87492e5a572ff01bbe2/coverage-7.13.3-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:16d23d6579cf80a474ad160ca14d8b319abaa6db62759d6eef53b2fc979b58c8", size = 253432, upload-time = "2026-02-03T14:00:50.655Z" },
+    { url = "https://files.pythonhosted.org/packages/5f/5c/abe2b3490bda26bd4f5e3e799be0bdf00bd81edebedc2c9da8d3ef288fa8/coverage-7.13.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:00d34b29a59d2076e6f318b30a00a69bf63687e30cd882984ed444e753990cc1", size = 254672, upload-time = "2026-02-03T14:00:52.757Z" },
+    { url = "https://files.pythonhosted.org/packages/31/ba/5d1957c76b40daff53971fe0adb84d9c2162b614280031d1d0653dd010c1/coverage-7.13.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ab6d72bffac9deb6e6cb0f61042e748de3f9f8e98afb0375a8e64b0b6e11746b", size = 251050, upload-time = "2026-02-03T14:00:54.332Z" },
+    { url = "https://files.pythonhosted.org/packages/69/dc/dffdf3bfe9d32090f047d3c3085378558cb4eb6778cda7de414ad74581ed/coverage-7.13.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e129328ad1258e49cae0123a3b5fcb93d6c2fa90d540f0b4c7cdcdc019aaa3dc", size = 252801, upload-time = "2026-02-03T14:00:56.121Z" },
+    { url = "https://files.pythonhosted.org/packages/87/51/cdf6198b0f2746e04511a30dc9185d7b8cdd895276c07bdb538e37f1cd50/coverage-7.13.3-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2213a8d88ed35459bda71597599d4eec7c2ebad201c88f0bfc2c26fd9b0dd2ea", size = 250763, upload-time = "2026-02-03T14:00:58.719Z" },
+    { url = "https://files.pythonhosted.org/packages/d7/1a/596b7d62218c1d69f2475b69cc6b211e33c83c902f38ee6ae9766dd422da/coverage-7.13.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:00dd3f02de6d5f5c9c3d95e3e036c3c2e2a669f8bf2d3ceb92505c4ce7838f67", size = 250587, upload-time = "2026-02-03T14:01:01.197Z" },
+    { url = "https://files.pythonhosted.org/packages/f7/46/52330d5841ff660f22c130b75f5e1dd3e352c8e7baef5e5fef6b14e3e991/coverage-7.13.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f9bada7bc660d20b23d7d312ebe29e927b655cf414dadcdb6335a2075695bd86", size = 252358, upload-time = "2026-02-03T14:01:02.824Z" },
+    { url = "https://files.pythonhosted.org/packages/36/8a/e69a5be51923097ba7d5cff9724466e74fe486e9232020ba97c809a8b42b/coverage-7.13.3-cp313-cp313-win32.whl", hash = "sha256:75b3c0300f3fa15809bd62d9ca8b170eb21fcf0100eb4b4154d6dc8b3a5bbd43", size = 222007, upload-time = "2026-02-03T14:01:04.876Z" },
+    { url = "https://files.pythonhosted.org/packages/0a/09/a5a069bcee0d613bdd48ee7637fa73bc09e7ed4342b26890f2df97cc9682/coverage-7.13.3-cp313-cp313-win_amd64.whl", hash = "sha256:a2f7589c6132c44c53f6e705e1a6677e2b7821378c22f7703b2cf5388d0d4587", size = 222812, upload-time = "2026-02-03T14:01:07.296Z" },
+    { url = "https://files.pythonhosted.org/packages/3d/4f/d62ad7dfe32f9e3d4a10c178bb6f98b10b083d6e0530ca202b399371f6c1/coverage-7.13.3-cp313-cp313-win_arm64.whl", hash = "sha256:123ceaf2b9d8c614f01110f908a341e05b1b305d6b2ada98763b9a5a59756051", size = 221433, upload-time = "2026-02-03T14:01:09.156Z" },
+    { url = "https://files.pythonhosted.org/packages/04/b2/4876c46d723d80b9c5b695f1a11bf5f7c3dabf540ec00d6edc076ff025e6/coverage-7.13.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:cc7fd0f726795420f3678ac82ff882c7fc33770bd0074463b5aef7293285ace9", size = 220162, upload-time = "2026-02-03T14:01:11.409Z" },
+    { url = "https://files.pythonhosted.org/packages/fc/04/9942b64a0e0bdda2c109f56bda42b2a59d9d3df4c94b85a323c1cae9fc77/coverage-7.13.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:d358dc408edc28730aed5477a69338e444e62fba0b7e9e4a131c505fadad691e", size = 220510, upload-time = "2026-02-03T14:01:13.038Z" },
+    { url = "https://files.pythonhosted.org/packages/5a/82/5cfe1e81eae525b74669f9795f37eb3edd4679b873d79d1e6c1c14ee6c1c/coverage-7.13.3-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:5d67b9ed6f7b5527b209b24b3df9f2e5bf0198c1bbf99c6971b0e2dcb7e2a107", size = 261801, upload-time = "2026-02-03T14:01:14.674Z" },
+    { url = "https://files.pythonhosted.org/packages/0b/ec/a553d7f742fd2cd12e36a16a7b4b3582d5934b496ef2b5ea8abeb10903d4/coverage-7.13.3-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:59224bfb2e9b37c1335ae35d00daa3a5b4e0b1a20f530be208fff1ecfa436f43", size = 263882, upload-time = "2026-02-03T14:01:16.343Z" },
+    { url = "https://files.pythonhosted.org/packages/e1/58/8f54a2a93e3d675635bc406de1c9ac8d551312142ff52c9d71b5e533ad45/coverage-7.13.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ae9306b5299e31e31e0d3b908c66bcb6e7e3ddca143dea0266e9ce6c667346d3", size = 266306, upload-time = "2026-02-03T14:01:18.02Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/be/e593399fd6ea1f00aee79ebd7cc401021f218d34e96682a92e1bae092ff6/coverage-7.13.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:343aaeb5f8bb7bcd38620fd7bc56e6ee8207847d8c6103a1e7b72322d381ba4a", size = 261051, upload-time = "2026-02-03T14:01:19.757Z" },
+    { url = "https://files.pythonhosted.org/packages/5c/e5/e9e0f6138b21bcdebccac36fbfde9cf15eb1bbcea9f5b1f35cd1f465fb91/coverage-7.13.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b2182129f4c101272ff5f2f18038d7b698db1bf8e7aa9e615cb48440899ad32e", size = 263868, upload-time = "2026-02-03T14:01:21.487Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/bf/de72cfebb69756f2d4a2dde35efcc33c47d85cd3ebdf844b3914aac2ef28/coverage-7.13.3-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:94d2ac94bd0cc57c5626f52f8c2fffed1444b5ae8c9fc68320306cc2b255e155", size = 261498, upload-time = "2026-02-03T14:01:23.097Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/91/4a2d313a70fc2e98ca53afd1c8ce67a89b1944cd996589a5b1fe7fbb3e5c/coverage-7.13.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:65436cde5ecabe26fb2f0bf598962f0a054d3f23ad529361326ac002c61a2a1e", size = 260394, upload-time = "2026-02-03T14:01:24.949Z" },
+    { url = "https://files.pythonhosted.org/packages/40/83/25113af7cf6941e779eb7ed8de2a677865b859a07ccee9146d4cc06a03e3/coverage-7.13.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:db83b77f97129813dbd463a67e5335adc6a6a91db652cc085d60c2d512746f96", size = 262579, upload-time = "2026-02-03T14:01:26.703Z" },
+    { url = "https://files.pythonhosted.org/packages/1e/19/a5f2b96262977e82fb9aabbe19b4d83561f5d063f18dde3e72f34ffc3b2f/coverage-7.13.3-cp313-cp313t-win32.whl", hash = "sha256:dfb428e41377e6b9ba1b0a32df6db5409cb089a0ed1d0a672dc4953ec110d84f", size = 222679, upload-time = "2026-02-03T14:01:28.553Z" },
+    { url = "https://files.pythonhosted.org/packages/81/82/ef1747b88c87a5c7d7edc3704799ebd650189a9158e680a063308b6125ef/coverage-7.13.3-cp313-cp313t-win_amd64.whl", hash = "sha256:5badd7e596e6b0c89aa8ec6d37f4473e4357f982ce57f9a2942b0221cd9cf60c", size = 223740, upload-time = "2026-02-03T14:01:30.776Z" },
+    { url = "https://files.pythonhosted.org/packages/1c/4c/a67c7bb5b560241c22736a9cb2f14c5034149ffae18630323fde787339e4/coverage-7.13.3-cp313-cp313t-win_arm64.whl", hash = "sha256:989aa158c0eb19d83c76c26f4ba00dbb272485c56e452010a3450bdbc9daafd9", size = 221996, upload-time = "2026-02-03T14:01:32.495Z" },
+    { url = "https://files.pythonhosted.org/packages/5e/b3/677bb43427fed9298905106f39c6520ac75f746f81b8f01104526a8026e4/coverage-7.13.3-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:c6f6169bbdbdb85aab8ac0392d776948907267fcc91deeacf6f9d55f7a83ae3b", size = 219513, upload-time = "2026-02-03T14:01:34.29Z" },
+    { url = "https://files.pythonhosted.org/packages/42/53/290046e3bbf8986cdb7366a42dab3440b9983711eaff044a51b11006c67b/coverage-7.13.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:2f5e731627a3d5ef11a2a35aa0c6f7c435867c7ccbc391268eb4f2ca5dbdcc10", size = 219850, upload-time = "2026-02-03T14:01:35.984Z" },
+    { url = "https://files.pythonhosted.org/packages/ea/2b/ab41f10345ba2e49d5e299be8663be2b7db33e77ac1b85cd0af985ea6406/coverage-7.13.3-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:9db3a3285d91c0b70fab9f39f0a4aa37d375873677efe4e71e58d8321e8c5d39", size = 250886, upload-time = "2026-02-03T14:01:38.287Z" },
+    { url = "https://files.pythonhosted.org/packages/72/2d/b3f6913ee5a1d5cdd04106f257e5fac5d048992ffc2d9995d07b0f17739f/coverage-7.13.3-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:06e49c5897cb12e3f7ecdc111d44e97c4f6d0557b81a7a0204ed70a8b038f86f", size = 253393, upload-time = "2026-02-03T14:01:40.118Z" },
+    { url = "https://files.pythonhosted.org/packages/f0/f6/b1f48810ffc6accf49a35b9943636560768f0812330f7456aa87dc39aff5/coverage-7.13.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:fb25061a66802df9fc13a9ba1967d25faa4dae0418db469264fd9860a921dde4", size = 254740, upload-time = "2026-02-03T14:01:42.413Z" },
+    { url = "https://files.pythonhosted.org/packages/57/d0/e59c54f9be0b61808f6bc4c8c4346bd79f02dd6bbc3f476ef26124661f20/coverage-7.13.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:99fee45adbb1caeb914da16f70e557fb7ff6ddc9e4b14de665bd41af631367ef", size = 250905, upload-time = "2026-02-03T14:01:44.163Z" },
+    { url = "https://files.pythonhosted.org/packages/d5/f7/5291bcdf498bafbee3796bb32ef6966e9915aebd4d0954123c8eae921c32/coverage-7.13.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:318002f1fd819bdc1651c619268aa5bc853c35fa5cc6d1e8c96bd9cd6c828b75", size = 252753, upload-time = "2026-02-03T14:01:45.974Z" },
+    { url = "https://files.pythonhosted.org/packages/a0/a9/1dcafa918c281554dae6e10ece88c1add82db685be123e1b05c2056ff3fb/coverage-7.13.3-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:71295f2d1d170b9977dc386d46a7a1b7cbb30e5405492529b4c930113a33f895", size = 250716, upload-time = "2026-02-03T14:01:48.844Z" },
+    { url = "https://files.pythonhosted.org/packages/44/bb/4ea4eabcce8c4f6235df6e059fbc5db49107b24c4bdffc44aee81aeca5a8/coverage-7.13.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:5b1ad2e0dc672625c44bc4fe34514602a9fd8b10d52ddc414dc585f74453516c", size = 250530, upload-time = "2026-02-03T14:01:50.793Z" },
+    { url = "https://files.pythonhosted.org/packages/6d/31/4a6c9e6a71367e6f923b27b528448c37f4e959b7e4029330523014691007/coverage-7.13.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:b2beb64c145593a50d90db5c7178f55daeae129123b0d265bdb3cbec83e5194a", size = 252186, upload-time = "2026-02-03T14:01:52.607Z" },
+    { url = "https://files.pythonhosted.org/packages/27/92/e1451ef6390a4f655dc42da35d9971212f7abbbcad0bdb7af4407897eb76/coverage-7.13.3-cp314-cp314-win32.whl", hash = "sha256:3d1aed4f4e837a832df2f3b4f68a690eede0de4560a2dbc214ea0bc55aabcdb4", size = 222253, upload-time = "2026-02-03T14:01:55.071Z" },
+    { url = "https://files.pythonhosted.org/packages/8a/98/78885a861a88de020c32a2693487c37d15a9873372953f0c3c159d575a43/coverage-7.13.3-cp314-cp314-win_amd64.whl", hash = "sha256:9f9efbbaf79f935d5fbe3ad814825cbce4f6cdb3054384cb49f0c0f496125fa0", size = 223069, upload-time = "2026-02-03T14:01:56.95Z" },
+    { url = "https://files.pythonhosted.org/packages/eb/fb/3784753a48da58a5337972abf7ca58b1fb0f1bda21bc7b4fae992fd28e47/coverage-7.13.3-cp314-cp314-win_arm64.whl", hash = "sha256:31b6e889c53d4e6687ca63706148049494aace140cffece1c4dc6acadb70a7b3", size = 221633, upload-time = "2026-02-03T14:01:58.758Z" },
+    { url = "https://files.pythonhosted.org/packages/40/f9/75b732d9674d32cdbffe801ed5f770786dd1c97eecedef2125b0d25102dc/coverage-7.13.3-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:c5e9787cec750793a19a28df7edd85ac4e49d3fb91721afcdc3b86f6c08d9aa8", size = 220243, upload-time = "2026-02-03T14:02:01.109Z" },
+    { url = "https://files.pythonhosted.org/packages/cf/7e/2868ec95de5a65703e6f0c87407ea822d1feb3619600fbc3c1c4fa986090/coverage-7.13.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:e5b86db331c682fd0e4be7098e6acee5e8a293f824d41487c667a93705d415ca", size = 220515, upload-time = "2026-02-03T14:02:02.862Z" },
+    { url = "https://files.pythonhosted.org/packages/7d/eb/9f0d349652fced20bcaea0f67fc5777bd097c92369f267975732f3dc5f45/coverage-7.13.3-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:edc7754932682d52cf6e7a71806e529ecd5ce660e630e8bd1d37109a2e5f63ba", size = 261874, upload-time = "2026-02-03T14:02:04.727Z" },
+    { url = "https://files.pythonhosted.org/packages/ee/a5/6619bc4a6c7b139b16818149a3e74ab2e21599ff9a7b6811b6afde99f8ec/coverage-7.13.3-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d3a16d6398666510a6886f67f43d9537bfd0e13aca299688a19daa84f543122f", size = 264004, upload-time = "2026-02-03T14:02:06.634Z" },
+    { url = "https://files.pythonhosted.org/packages/29/b7/90aa3fc645a50c6f07881fca4fd0ba21e3bfb6ce3a7078424ea3a35c74c9/coverage-7.13.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:303d38b19626c1981e1bb067a9928236d88eb0e4479b18a74812f05a82071508", size = 266408, upload-time = "2026-02-03T14:02:09.037Z" },
+    { url = "https://files.pythonhosted.org/packages/62/55/08bb2a1e4dcbae384e638f0effef486ba5987b06700e481691891427d879/coverage-7.13.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:284e06eadfe15ddfee2f4ee56631f164ef897a7d7d5a15bca5f0bb88889fc5ba", size = 260977, upload-time = "2026-02-03T14:02:11.755Z" },
+    { url = "https://files.pythonhosted.org/packages/9b/76/8bd4ae055a42d8fb5dd2230e5cf36ff2e05f85f2427e91b11a27fea52ed7/coverage-7.13.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:d401f0864a1d3198422816878e4e84ca89ec1c1bf166ecc0ae01380a39b888cd", size = 263868, upload-time = "2026-02-03T14:02:13.565Z" },
+    { url = "https://files.pythonhosted.org/packages/e3/f9/ba000560f11e9e32ec03df5aa8477242c2d95b379c99ac9a7b2e7fbacb1a/coverage-7.13.3-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:3f379b02c18a64de78c4ccdddf1c81c2c5ae1956c72dacb9133d7dd7809794ab", size = 261474, upload-time = "2026-02-03T14:02:16.069Z" },
+    { url = "https://files.pythonhosted.org/packages/90/4b/4de4de8f9ca7af4733bfcf4baa440121b7dbb3856daf8428ce91481ff63b/coverage-7.13.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:7a482f2da9086971efb12daca1d6547007ede3674ea06e16d7663414445c683e", size = 260317, upload-time = "2026-02-03T14:02:17.996Z" },
+    { url = "https://files.pythonhosted.org/packages/05/71/5cd8436e2c21410ff70be81f738c0dddea91bcc3189b1517d26e0102ccb3/coverage-7.13.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:562136b0d401992118d9b49fbee5454e16f95f85b120a4226a04d816e33fe024", size = 262635, upload-time = "2026-02-03T14:02:20.405Z" },
+    { url = "https://files.pythonhosted.org/packages/e7/f8/2834bb45bdd70b55a33ec354b8b5f6062fc90e5bb787e14385903a979503/coverage-7.13.3-cp314-cp314t-win32.whl", hash = "sha256:ca46e5c3be3b195098dd88711890b8011a9fa4feca942292bb84714ce5eab5d3", size = 223035, upload-time = "2026-02-03T14:02:22.323Z" },
+    { url = "https://files.pythonhosted.org/packages/26/75/f8290f0073c00d9ae14056d2b84ab92dff21d5370e464cb6cb06f52bf580/coverage-7.13.3-cp314-cp314t-win_amd64.whl", hash = "sha256:06d316dbb3d9fd44cca05b2dbcfbef22948493d63a1f28e828d43e6cc505fed8", size = 224142, upload-time = "2026-02-03T14:02:24.143Z" },
+    { url = "https://files.pythonhosted.org/packages/03/01/43ac78dfea8946c4a9161bbc034b5549115cb2b56781a4b574927f0d141a/coverage-7.13.3-cp314-cp314t-win_arm64.whl", hash = "sha256:299d66e9218193f9dc6e4880629ed7c4cd23486005166247c283fb98531656c3", size = 222166, upload-time = "2026-02-03T14:02:26.005Z" },
+    { url = "https://files.pythonhosted.org/packages/7d/fb/70af542d2d938c778c9373ce253aa4116dbe7c0a5672f78b2b2ae0e1b94b/coverage-7.13.3-py3-none-any.whl", hash = "sha256:90a8af9dba6429b2573199622d72e0ebf024d6276f16abce394ad4d181bb0910", size = 211237, upload-time = "2026-02-03T14:02:27.986Z" },
+]
+
+[package.optional-dependencies]
+toml = [
+    { name = "tomli", marker = "python_full_version <= '3.11'" },
+]
+
+[[package]]
+name = "cryptography"
+version = "46.0.4"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "cffi", marker = "platform_python_implementation != 'PyPy'" },
+    { name = "typing-extensions", marker = "python_full_version < '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/78/19/f748958276519adf6a0c1e79e7b8860b4830dda55ccdf29f2719b5fc499c/cryptography-46.0.4.tar.gz", hash = "sha256:bfd019f60f8abc2ed1b9be4ddc21cfef059c841d86d710bb69909a688cbb8f59", size = 749301, upload-time = "2026-01-28T00:24:37.379Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/87/91/874b8910903159043b5c6a123b7e79c4559ddd1896e38967567942635778/cryptography-46.0.4-cp311-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:5f14fba5bf6f4390d7ff8f086c566454bff0411f6d8aa7af79c88b6f9267aecc", size = 4275871, upload-time = "2026-01-28T00:23:09.439Z" },
+    { url = "https://files.pythonhosted.org/packages/c0/35/690e809be77896111f5b195ede56e4b4ed0435b428c2f2b6d35046fbb5e8/cryptography-46.0.4-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:47bcd19517e6389132f76e2d5303ded6cf3f78903da2158a671be8de024f4cd0", size = 4423124, upload-time = "2026-01-28T00:23:11.529Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/5b/a26407d4f79d61ca4bebaa9213feafdd8806dc69d3d290ce24996d3cfe43/cryptography-46.0.4-cp311-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:01df4f50f314fbe7009f54046e908d1754f19d0c6d3070df1e6268c5a4af09fa", size = 4277090, upload-time = "2026-01-28T00:23:13.123Z" },
+    { url = "https://files.pythonhosted.org/packages/0c/d8/4bb7aec442a9049827aa34cee1aa83803e528fa55da9a9d45d01d1bb933e/cryptography-46.0.4-cp311-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:5aa3e463596b0087b3da0dbe2b2487e9fc261d25da85754e30e3b40637d61f81", size = 4947652, upload-time = "2026-01-28T00:23:14.554Z" },
+    { url = "https://files.pythonhosted.org/packages/2b/08/f83e2e0814248b844265802d081f2fac2f1cbe6cd258e72ba14ff006823a/cryptography-46.0.4-cp311-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:0a9ad24359fee86f131836a9ac3bffc9329e956624a2d379b613f8f8abaf5255", size = 4455157, upload-time = "2026-01-28T00:23:16.443Z" },
+    { url = "https://files.pythonhosted.org/packages/0a/05/19d849cf4096448779d2dcc9bb27d097457dac36f7273ffa875a93b5884c/cryptography-46.0.4-cp311-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:dc1272e25ef673efe72f2096e92ae39dea1a1a450dd44918b15351f72c5a168e", size = 3981078, upload-time = "2026-01-28T00:23:17.838Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/89/f7bac81d66ba7cde867a743ea5b37537b32b5c633c473002b26a226f703f/cryptography-46.0.4-cp311-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:de0f5f4ec8711ebc555f54735d4c673fc34b65c44283895f1a08c2b49d2fd99c", size = 4276213, upload-time = "2026-01-28T00:23:19.257Z" },
+    { url = "https://files.pythonhosted.org/packages/da/9f/7133e41f24edd827020ad21b068736e792bc68eecf66d93c924ad4719fb3/cryptography-46.0.4-cp311-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:eeeb2e33d8dbcccc34d64651f00a98cb41b2dc69cef866771a5717e6734dfa32", size = 4912190, upload-time = "2026-01-28T00:23:21.244Z" },
+    { url = "https://files.pythonhosted.org/packages/a6/f7/6d43cbaddf6f65b24816e4af187d211f0bc536a29961f69faedc48501d8e/cryptography-46.0.4-cp311-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:3d425eacbc9aceafd2cb429e42f4e5d5633c6f873f5e567077043ef1b9bbf616", size = 4454641, upload-time = "2026-01-28T00:23:22.866Z" },
+    { url = "https://files.pythonhosted.org/packages/9e/4f/ebd0473ad656a0ac912a16bd07db0f5d85184924e14fc88feecae2492834/cryptography-46.0.4-cp311-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:91627ebf691d1ea3976a031b61fb7bac1ccd745afa03602275dda443e11c8de0", size = 4405159, upload-time = "2026-01-28T00:23:25.278Z" },
+    { url = "https://files.pythonhosted.org/packages/d1/f7/7923886f32dc47e27adeff8246e976d77258fd2aa3efdd1754e4e323bf49/cryptography-46.0.4-cp311-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:2d08bc22efd73e8854b0b7caff402d735b354862f1145d7be3b9c0f740fef6a0", size = 4666059, upload-time = "2026-01-28T00:23:26.766Z" },
+    { url = "https://files.pythonhosted.org/packages/f8/f5/559c25b77f40b6bf828eabaf988efb8b0e17b573545edb503368ca0a2a03/cryptography-46.0.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:078e5f06bd2fa5aea5a324f2a09f914b1484f1d0c2a4d6a8a28c74e72f65f2da", size = 4264508, upload-time = "2026-01-28T00:23:34.264Z" },
+    { url = "https://files.pythonhosted.org/packages/49/a1/551fa162d33074b660dc35c9bc3616fefa21a0e8c1edd27b92559902e408/cryptography-46.0.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:dce1e4f068f03008da7fa51cc7abc6ddc5e5de3e3d1550334eaf8393982a5829", size = 4409080, upload-time = "2026-01-28T00:23:35.793Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/6a/4d8d129a755f5d6df1bbee69ea2f35ebfa954fa1847690d1db2e8bca46a5/cryptography-46.0.4-cp314-cp314t-manylinux_2_28_aarch64.whl", hash = "sha256:2067461c80271f422ee7bdbe79b9b4be54a5162e90345f86a23445a0cf3fd8a2", size = 4270039, upload-time = "2026-01-28T00:23:37.263Z" },
+    { url = "https://files.pythonhosted.org/packages/4c/f5/ed3fcddd0a5e39321e595e144615399e47e7c153a1fb8c4862aec3151ff9/cryptography-46.0.4-cp314-cp314t-manylinux_2_28_ppc64le.whl", hash = "sha256:c92010b58a51196a5f41c3795190203ac52edfd5dc3ff99149b4659eba9d2085", size = 4926748, upload-time = "2026-01-28T00:23:38.884Z" },
+    { url = "https://files.pythonhosted.org/packages/43/ae/9f03d5f0c0c00e85ecb34f06d3b79599f20630e4db91b8a6e56e8f83d410/cryptography-46.0.4-cp314-cp314t-manylinux_2_28_x86_64.whl", hash = "sha256:829c2b12bbc5428ab02d6b7f7e9bbfd53e33efd6672d21341f2177470171ad8b", size = 4442307, upload-time = "2026-01-28T00:23:40.56Z" },
+    { url = "https://files.pythonhosted.org/packages/8b/22/e0f9f2dae8040695103369cf2283ef9ac8abe4d51f68710bec2afd232609/cryptography-46.0.4-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:62217ba44bf81b30abaeda1488686a04a702a261e26f87db51ff61d9d3510abd", size = 3959253, upload-time = "2026-01-28T00:23:42.827Z" },
+    { url = "https://files.pythonhosted.org/packages/01/5b/6a43fcccc51dae4d101ac7d378a8724d1ba3de628a24e11bf2f4f43cba4d/cryptography-46.0.4-cp314-cp314t-manylinux_2_34_aarch64.whl", hash = "sha256:9c2da296c8d3415b93e6053f5a728649a87a48ce084a9aaf51d6e46c87c7f2d2", size = 4269372, upload-time = "2026-01-28T00:23:44.655Z" },
+    { url = "https://files.pythonhosted.org/packages/17/b7/0f6b8c1dd0779df2b526e78978ff00462355e31c0a6f6cff8a3e99889c90/cryptography-46.0.4-cp314-cp314t-manylinux_2_34_ppc64le.whl", hash = "sha256:9b34d8ba84454641a6bf4d6762d15847ecbd85c1316c0a7984e6e4e9f748ec2e", size = 4891908, upload-time = "2026-01-28T00:23:46.48Z" },
+    { url = "https://files.pythonhosted.org/packages/83/17/259409b8349aa10535358807a472c6a695cf84f106022268d31cea2b6c97/cryptography-46.0.4-cp314-cp314t-manylinux_2_34_x86_64.whl", hash = "sha256:df4a817fa7138dd0c96c8c8c20f04b8aaa1fac3bbf610913dcad8ea82e1bfd3f", size = 4441254, upload-time = "2026-01-28T00:23:48.403Z" },
+    { url = "https://files.pythonhosted.org/packages/9c/fe/e4a1b0c989b00cee5ffa0764401767e2d1cf59f45530963b894129fd5dce/cryptography-46.0.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:b1de0ebf7587f28f9190b9cb526e901bf448c9e6a99655d2b07fff60e8212a82", size = 4396520, upload-time = "2026-01-28T00:23:50.26Z" },
+    { url = "https://files.pythonhosted.org/packages/b3/81/ba8fd9657d27076eb40d6a2f941b23429a3c3d2f56f5a921d6b936a27bc9/cryptography-46.0.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:9b4d17bc7bd7cdd98e3af40b441feaea4c68225e2eb2341026c84511ad246c0c", size = 4651479, upload-time = "2026-01-28T00:23:51.674Z" },
+    { url = "https://files.pythonhosted.org/packages/d8/cc/8f3224cbb2a928de7298d6ed4790f5ebc48114e02bdc9559196bfb12435d/cryptography-46.0.4-cp38-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:8bf75b0259e87fa70bddc0b8b4078b76e7fd512fd9afae6c1193bcf440a4dbef", size = 4275419, upload-time = "2026-01-28T00:23:58.364Z" },
+    { url = "https://files.pythonhosted.org/packages/17/43/4a18faa7a872d00e4264855134ba82d23546c850a70ff209e04ee200e76f/cryptography-46.0.4-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:3c268a3490df22270955966ba236d6bc4a8f9b6e4ffddb78aac535f1a5ea471d", size = 4419058, upload-time = "2026-01-28T00:23:59.867Z" },
+    { url = "https://files.pythonhosted.org/packages/ee/64/6651969409821d791ba12346a124f55e1b76f66a819254ae840a965d4b9c/cryptography-46.0.4-cp38-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:812815182f6a0c1d49a37893a303b44eaac827d7f0d582cecfc81b6427f22973", size = 4278151, upload-time = "2026-01-28T00:24:01.731Z" },
+    { url = "https://files.pythonhosted.org/packages/20/0b/a7fce65ee08c3c02f7a8310cc090a732344066b990ac63a9dfd0a655d321/cryptography-46.0.4-cp38-abi3-manylinux_2_28_ppc64le.whl", hash = "sha256:a90e43e3ef65e6dcf969dfe3bb40cbf5aef0d523dff95bfa24256be172a845f4", size = 4939441, upload-time = "2026-01-28T00:24:03.175Z" },
+    { url = "https://files.pythonhosted.org/packages/db/a7/20c5701e2cd3e1dfd7a19d2290c522a5f435dd30957d431dcb531d0f1413/cryptography-46.0.4-cp38-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a05177ff6296644ef2876fce50518dffb5bcdf903c85250974fc8bc85d54c0af", size = 4451617, upload-time = "2026-01-28T00:24:05.403Z" },
+    { url = "https://files.pythonhosted.org/packages/00/dc/3e16030ea9aa47b63af6524c354933b4fb0e352257c792c4deeb0edae367/cryptography-46.0.4-cp38-abi3-manylinux_2_31_armv7l.whl", hash = "sha256:daa392191f626d50f1b136c9b4cf08af69ca8279d110ea24f5c2700054d2e263", size = 3977774, upload-time = "2026-01-28T00:24:06.851Z" },
+    { url = "https://files.pythonhosted.org/packages/42/c8/ad93f14118252717b465880368721c963975ac4b941b7ef88f3c56bf2897/cryptography-46.0.4-cp38-abi3-manylinux_2_34_aarch64.whl", hash = "sha256:e07ea39c5b048e085f15923511d8121e4a9dc45cee4e3b970ca4f0d338f23095", size = 4277008, upload-time = "2026-01-28T00:24:08.926Z" },
+    { url = "https://files.pythonhosted.org/packages/00/cf/89c99698151c00a4631fbfcfcf459d308213ac29e321b0ff44ceeeac82f1/cryptography-46.0.4-cp38-abi3-manylinux_2_34_ppc64le.whl", hash = "sha256:d5a45ddc256f492ce42a4e35879c5e5528c09cd9ad12420828c972951d8e016b", size = 4903339, upload-time = "2026-01-28T00:24:12.009Z" },
+    { url = "https://files.pythonhosted.org/packages/03/c3/c90a2cb358de4ac9309b26acf49b2a100957e1ff5cc1e98e6c4996576710/cryptography-46.0.4-cp38-abi3-manylinux_2_34_x86_64.whl", hash = "sha256:6bb5157bf6a350e5b28aee23beb2d84ae6f5be390b2f8ee7ea179cda077e1019", size = 4451216, upload-time = "2026-01-28T00:24:13.975Z" },
+    { url = "https://files.pythonhosted.org/packages/96/2c/8d7f4171388a10208671e181ca43cdc0e596d8259ebacbbcfbd16de593da/cryptography-46.0.4-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:dd5aba870a2c40f87a3af043e0dee7d9eb02d4aff88a797b48f2b43eff8c3ab4", size = 4404299, upload-time = "2026-01-28T00:24:16.169Z" },
+    { url = "https://files.pythonhosted.org/packages/e9/23/cbb2036e450980f65c6e0a173b73a56ff3bccd8998965dea5cc9ddd424a5/cryptography-46.0.4-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:93d8291da8d71024379ab2cb0b5c57915300155ad42e07f76bea6ad838d7e59b", size = 4664837, upload-time = "2026-01-28T00:24:17.629Z" },
+    { url = "https://files.pythonhosted.org/packages/27/7a/f8d2d13227a9a1a9fe9c7442b057efecffa41f1e3c51d8622f26b9edbe8f/cryptography-46.0.4-pp311-pypy311_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c236a44acfb610e70f6b3e1c3ca20ff24459659231ef2f8c48e879e2d32b73da", size = 4216693, upload-time = "2026-01-28T00:24:25.758Z" },
+    { url = "https://files.pythonhosted.org/packages/c5/de/3787054e8f7972658370198753835d9d680f6cd4a39df9f877b57f0dd69c/cryptography-46.0.4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8a15fb869670efa8f83cbffbc8753c1abf236883225aed74cd179b720ac9ec80", size = 4382765, upload-time = "2026-01-28T00:24:27.577Z" },
+    { url = "https://files.pythonhosted.org/packages/8a/5f/60e0afb019973ba6a0b322e86b3d61edf487a4f5597618a430a2a15f2d22/cryptography-46.0.4-pp311-pypy311_pp73-manylinux_2_34_aarch64.whl", hash = "sha256:fdc3daab53b212472f1524d070735b2f0c214239df131903bae1d598016fa822", size = 4216066, upload-time = "2026-01-28T00:24:29.056Z" },
+    { url = "https://files.pythonhosted.org/packages/81/8e/bf4a0de294f147fee66f879d9bae6f8e8d61515558e3d12785dd90eca0be/cryptography-46.0.4-pp311-pypy311_pp73-manylinux_2_34_x86_64.whl", hash = "sha256:44cc0675b27cadb71bdbb96099cca1fa051cd11d2ade09e5cd3a2edb929ed947", size = 4382025, upload-time = "2026-01-28T00:24:30.681Z" },
+]
+
+[[package]]
+name = "distlib"
+version = "0.4.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/96/8e/709914eb2b5749865801041647dc7f4e6d00b549cfe88b65ca192995f07c/distlib-0.4.0.tar.gz", hash = "sha256:feec40075be03a04501a973d81f633735b4b69f98b05450592310c0f401a4e0d", size = 614605, upload-time = "2025-07-17T16:52:00.465Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/33/6b/e0547afaf41bf2c42e52430072fa5658766e3d65bd4b03a563d1b6336f57/distlib-0.4.0-py2.py3-none-any.whl", hash = "sha256:9659f7d87e46584a30b5780e43ac7a2143098441670ff0a49d5f9034c54a6c16", size = 469047, upload-time = "2025-07-17T16:51:58.613Z" },
+]
+
+[[package]]
+name = "dnspython"
+version = "2.8.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/8c/8b/57666417c0f90f08bcafa776861060426765fdb422eb10212086fb811d26/dnspython-2.8.0.tar.gz", hash = "sha256:181d3c6996452cb1189c4046c61599b84a5a86e099562ffde77d26984ff26d0f", size = 368251, upload-time = "2025-09-07T18:58:00.022Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ba/5a/18ad964b0086c6e62e2e7500f7edc89e3faa45033c71c1893d34eed2b2de/dnspython-2.8.0-py3-none-any.whl", hash = "sha256:01d9bbc4a2d76bf0db7c1f729812ded6d912bd318d3b1cf81d30c0f845dbf3af", size = 331094, upload-time = "2025-09-07T18:57:58.071Z" },
+]
+
+[[package]]
+name = "docutils"
+version = "0.21.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ae/ed/aefcc8cd0ba62a0560c3c18c33925362d46c6075480bfa4df87b28e169a9/docutils-0.21.2.tar.gz", hash = "sha256:3a6b18732edf182daa3cd12775bbb338cf5691468f91eeeb109deff6ebfa986f", size = 2204444, upload-time = "2024-04-23T18:57:18.24Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/8f/d7/9322c609343d929e75e7e5e6255e614fcc67572cfd083959cdef3b7aad79/docutils-0.21.2-py3-none-any.whl", hash = "sha256:dafca5b9e384f0e419294eb4d2ff9fa826435bf15f15b7bd45723e8ad76811b2", size = 587408, upload-time = "2024-04-23T18:57:14.835Z" },
+]
+
+[[package]]
+name = "electrocrypto"
+version = "2.0.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/e8/cc/7e792b8bc2d23d8ddb463906cc5d97740180569996644f42168bcdfcfb57/electrocrypto-2.0.2.tar.gz", hash = "sha256:0d4f1be3a91fbd2973f4de20cbc16c157bd5069fa8bebf28511d23e51b7800e2", size = 16303, upload-time = "2025-11-26T06:35:05.627Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/be/67/51a785a58527e78d2fc174e32481b0a5de0f5013a54f458e86f426309155/electrocrypto-2.0.2-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:6650164aea4dd69d7d1dfb5f51b3ad58946eb4984390a278424a2b59b5e843b4", size = 49806, upload-time = "2025-11-26T06:38:54.89Z" },
+    { url = "https://files.pythonhosted.org/packages/9b/91/cb58bfcc72361d7b7ce59badf23ef78530747b062774550dacb8bb774b68/electrocrypto-2.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fd68085fc4bb70bad76a1bd87c7d5dee1ac5ab7568ea931b3fddaf6468afbdf9", size = 34141, upload-time = "2025-11-26T06:38:57.804Z" },
+    { url = "https://files.pythonhosted.org/packages/83/fb/9fbd622f9d1d942dbf8c64ee3e9c02df98f09f1815726b04cec750312307/electrocrypto-2.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a6a71a69fe12b014f2030cdf7403718d309a3167a7ef87bca3cf186684feff9a", size = 34270, upload-time = "2025-11-26T06:38:58.881Z" },
+    { url = "https://files.pythonhosted.org/packages/29/15/3ece7068afac2f5963b090eba2e85836594a10ce5c2d865b62b9f421f397/electrocrypto-2.0.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7bc4c3c0857e4785d25b2c99371254e0c418ec91941c3967f0df1c825207596e", size = 51820, upload-time = "2025-11-26T06:37:31.382Z" },
+    { url = "https://files.pythonhosted.org/packages/46/a7/dda67da65a656c726deca53cbba028d9085583513d281f307d3f75dc4f32/electrocrypto-2.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:af7f35b5a524104ee0360d58c16eae8d34039cfff11d03da142ecf249de3ad77", size = 49941, upload-time = "2025-11-26T06:37:22.999Z" },
+    { url = "https://files.pythonhosted.org/packages/0f/1d/0a6c53d734a5b5332f7d1e7689833ffb009aab8b8791a15bf24bcbd7b409/electrocrypto-2.0.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:f525297b7dd4cb68f3ef085ff668063ced138e729b478088fd7fd346c27322eb", size = 51279, upload-time = "2025-11-26T06:37:32.893Z" },
+    { url = "https://files.pythonhosted.org/packages/bc/04/89cfb94f70ebbb6eb02997deda18fdacee431ea14c9cad1422b985b7d563/electrocrypto-2.0.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:7dc9520d902ed0091967ad5ab6d86be6eb88a51d7473e3c4145654fb5b451682", size = 50036, upload-time = "2025-11-26T06:37:24.147Z" },
+    { url = "https://files.pythonhosted.org/packages/84/6d/382a0cc677d5ba0867af7b6a113fa800861cd52860b37094c325ea023cba/electrocrypto-2.0.2-cp310-cp310-win32.whl", hash = "sha256:eb67995cee37fbf1044e33792ed6d2fa990818c6cb70a909a1bd24ace506b764", size = 35471, upload-time = "2025-11-26T06:41:56.424Z" },
+    { url = "https://files.pythonhosted.org/packages/25/04/cd3bff163b4427e6b11a86d92ba8955b35af54564c3228df658cd7d072ec/electrocrypto-2.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:6c8bc0107403b15a3fef210debec1ce82240c0226d4be742a4f3ed237aa83ee2", size = 36231, upload-time = "2025-11-26T06:41:57.463Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/76/ca59055cc0b534f7f5c65277f82303eb6e37fc314683d84184d22837a0cb/electrocrypto-2.0.2-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:e0f49268beaf30d354949e441130bab3f2f0df4ced090760e6a403f993befafc", size = 49806, upload-time = "2025-11-26T06:38:59.684Z" },
+    { url = "https://files.pythonhosted.org/packages/86/0c/b1aad52498ef21775e8d715578fd962c1f1bbe4b5ad87027fe5140c0111b/electrocrypto-2.0.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0b6efb3436133b60fc734a05c373efffb6106eef733afcc81247d01e041ae607", size = 34141, upload-time = "2025-11-26T06:39:00.542Z" },
+    { url = "https://files.pythonhosted.org/packages/47/e2/23e34d2f5760cfec80c08d70e57c0a0e320651cb439a71f83e53eedf8eeb/electrocrypto-2.0.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:603817e90a1c89881894bbad0aa987dbb4571f7925ae55929d41afe6068c3c8c", size = 34272, upload-time = "2025-11-26T06:39:01.312Z" },
+    { url = "https://files.pythonhosted.org/packages/00/24/5d391b3ae388bbd9fc5ea5b0f37dfaee17ade335d421328015d362fed5a8/electrocrypto-2.0.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5fca5dd03f78d79adc13f1e8dd57dbea1e16bcfd6628c862a2fa127b69ffa50", size = 52588, upload-time = "2025-11-26T06:37:34.468Z" },
+    { url = "https://files.pythonhosted.org/packages/ea/d3/21eb8794ae63db872303b6ebdbedb618a200e8a53f5858aea3fe9ad2082d/electrocrypto-2.0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:eae9ac15e22ce48a0aa080453ec18c2d6187f8414686342be655c6f032f527bb", size = 50685, upload-time = "2025-11-26T06:37:25.046Z" },
+    { url = "https://files.pythonhosted.org/packages/9d/57/032b453e1cabbf746aac816fabc2e6bb1a33140b6ecc773f1afff85495a3/electrocrypto-2.0.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c526f7d0eca3b597c73111ed4c50942f3093cf4216e15ca32098835f12eb3418", size = 52064, upload-time = "2025-11-26T06:37:35.984Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/07/2b904c53984871a2c4af5778c1ee4f86f24c822ffcf41c3d1f1949c87141/electrocrypto-2.0.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:ac72eee483fc38b0b07e713332383093b802e31f28c654d36e47ef3d1700e316", size = 50829, upload-time = "2025-11-26T06:37:26.225Z" },
+    { url = "https://files.pythonhosted.org/packages/4e/a1/e3f48268f93826e2418061eb84b8d08fd5c211788005bd29bc3195ecfcf9/electrocrypto-2.0.2-cp311-cp311-win32.whl", hash = "sha256:6c76c49d0cc70781a619ce0608b7aff338ccf95e4c2e50aa19b2fcebfc86e766", size = 35475, upload-time = "2025-11-26T06:41:58.187Z" },
+    { url = "https://files.pythonhosted.org/packages/94/bb/967efce9eb4d26b81d0e815c7488a8ef693b863360c15f878e9f03c0a0be/electrocrypto-2.0.2-cp311-cp311-win_amd64.whl", hash = "sha256:ff8bbeeb35ac9b0728a9c444f1938e3c73301d2fbc5e9d4dfd8e03f4a2beb092", size = 36229, upload-time = "2025-11-26T06:41:59.729Z" },
+    { url = "https://files.pythonhosted.org/packages/e8/8b/821cb5fb512c8955befa60d521763ba597953598bbbbacdfbe4dc9c0ef06/electrocrypto-2.0.2-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:43c69cb6242920b5f724ad99f480ad4277a22d063a63574cc03c9ab7241f8d55", size = 49807, upload-time = "2025-11-26T06:39:02.337Z" },
+    { url = "https://files.pythonhosted.org/packages/9e/60/f34632d00f816870e1d766b13c2bfb765c38cefd14bc93d05bb9cb482910/electrocrypto-2.0.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:183f804a9f32e44dd5b1a435e1c7de0b2d87930e5ec6957973fb999dbcf4bc35", size = 34141, upload-time = "2025-11-26T06:39:03.443Z" },
+    { url = "https://files.pythonhosted.org/packages/6d/38/8f1069551eced32ec051a86ebef1503ffb10fe651182689e8202f921285a/electrocrypto-2.0.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3dba52e6d3330818729e230c07d0f302dd3f10aff2d1f1d0a252ff346596c0eb", size = 34271, upload-time = "2025-11-26T06:39:04.198Z" },
+    { url = "https://files.pythonhosted.org/packages/b7/0a/5cf2c5fb9d9f4e3b17813cd1e9a31cbf4b7be9eeb28db2be5f5c44417b04/electrocrypto-2.0.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3e25abc571e7ea110a3c940c24930aaa21363667a1d00cfb877ff1b604125a6", size = 52243, upload-time = "2025-11-26T06:37:37.486Z" },
+    { url = "https://files.pythonhosted.org/packages/85/80/98a38dc75fec1acad4ba9726c1c3567afa74146fcd61919eda5b0e7ba460/electrocrypto-2.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:12f941c416658c1c73c5ac8a4bdb822b69ee20aaf9390a5af5ed549e8d7801ed", size = 50351, upload-time = "2025-11-26T06:37:27.842Z" },
+    { url = "https://files.pythonhosted.org/packages/cd/c2/8a619f3c44cb87cfb59000d93aec031dc1ee093b90c611e655870a9015b3/electrocrypto-2.0.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:fa92068abee9c7afde1e9c67253fb6a547d7f981ea7da5dc45f688e056b57499", size = 51714, upload-time = "2025-11-26T06:37:38.983Z" },
+    { url = "https://files.pythonhosted.org/packages/67/ff/dfbba23cb85e9b2ff9ec11e9ef3fcd6356122550fd443fee7201fbf90059/electrocrypto-2.0.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:08ec03075f328706501cd232d097978e27fafcab342e8c6a361a35d40d3851b8", size = 50504, upload-time = "2025-11-26T06:37:29.036Z" },
+    { url = "https://files.pythonhosted.org/packages/15/fd/6e5216399474f14e32b423d2cf9df32b006ef2c74fa2aef2eea2d392f2ee/electrocrypto-2.0.2-cp312-cp312-win32.whl", hash = "sha256:123617e74468b29d3870e0bfc77027357da35533b6a51bf2fbdd32a8fa831988", size = 35471, upload-time = "2025-11-26T06:42:00.452Z" },
+    { url = "https://files.pythonhosted.org/packages/07/6c/2ae3b892d41f3988f79ae5ecdee391d7f2432a8d14e3595c3d2aea790dea/electrocrypto-2.0.2-cp312-cp312-win_amd64.whl", hash = "sha256:2a34c98a7a3d620ef428600fdb7a23ce0b44c459a125beb93af69c8d6fe60891", size = 36231, upload-time = "2025-11-26T06:42:01.636Z" },
+    { url = "https://files.pythonhosted.org/packages/80/f4/2c1f61aadb8907a9f47e74211175691a8f83b2864680c27e005753c05018/electrocrypto-2.0.2-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:a1353c09b2af29466a29906c41b8c496f5bb0c3c9b4c9424f88b56f6fca113ec", size = 49815, upload-time = "2025-11-26T06:39:04.918Z" },
+    { url = "https://files.pythonhosted.org/packages/6c/79/da671b9107d33d03911bad1f7b5562ea19f16e8c1950ce8665a527aa8f84/electrocrypto-2.0.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e3ea09bac7d00fec443da1d465073c629b7b6a0247c1fbf886d33dc5bf0ea96e", size = 34149, upload-time = "2025-11-26T06:39:06.038Z" },
+    { url = "https://files.pythonhosted.org/packages/09/a5/1760425c3ca295802873558504a4abfd44a3d3c7705fc52f8600bff53669/electrocrypto-2.0.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:d5b0b634768f4a7cdc8a299256956057ba702dd4ef337012b29c37cad0ff4ddd", size = 34276, upload-time = "2025-11-26T06:39:07.128Z" },
+    { url = "https://files.pythonhosted.org/packages/7a/af/4fa952bc9555a8ffee7b7c7090fb67d4e4393b5832b377944e95c3875662/electrocrypto-2.0.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a38b888664b95d8d26386ccc9f4db28e2b34cd1946509aa6ed86147f31cf0937", size = 52233, upload-time = "2025-11-26T06:37:40.374Z" },
+    { url = "https://files.pythonhosted.org/packages/6b/01/b6e29e0b92d0526737779d1a23a942b161463bddaf0fd3473e8a9de3a025/electrocrypto-2.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4691f2e40542c0b202bfa76baf74a6d402d7fa0fe16496ba640a8a97a5f02141", size = 50352, upload-time = "2025-11-26T06:37:29.902Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/2e/da6c146b42042282d7fbec25ee3108443980a8a42322af02bb654bff4219/electrocrypto-2.0.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:1a87d5df3986f715316507a508968632a3b893f73596cacca0054245e37ff3ed", size = 51749, upload-time = "2025-11-26T06:37:41.859Z" },
+    { url = "https://files.pythonhosted.org/packages/2c/31/003729cda166006bd4d6ea084966abb5bcb500a8536fe4ac17efa78628a1/electrocrypto-2.0.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:d7c98aa1b1f5b8101d91ab6dff7d0c2f094e2c048b69bda5345a6caa7e2056c6", size = 50563, upload-time = "2025-11-26T06:37:31.071Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/f7/2feb7ab3306029e9e46ebf1dcdf7e77a862d8d2b545984c07c4d0d1b9574/electrocrypto-2.0.2-cp313-cp313-win32.whl", hash = "sha256:70776cd464f1abcb0528d29c64a34a885699919dd4de0c684410cffe9364f673", size = 35470, upload-time = "2025-11-26T06:42:02.347Z" },
+    { url = "https://files.pythonhosted.org/packages/99/6d/bb0f7a681c5779f46499e9752593d39da7a7769955b25af4a67985433902/electrocrypto-2.0.2-cp313-cp313-win_amd64.whl", hash = "sha256:649bedf010707e248b31e3bb78151b879aa8d1eeffd58443c8cbc1b260865c3d", size = 36230, upload-time = "2025-11-26T06:42:03.815Z" },
+    { url = "https://files.pythonhosted.org/packages/05/dd/91c287c1ccc35debb6d81e014273848f46e629be931eeddc25b16c1f11c0/electrocrypto-2.0.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:94b2b804e11ddb15f33b48bc98b10dd0c5f70e0cb6fe3cb839f9ed1f10e9a499", size = 49824, upload-time = "2025-11-26T06:39:07.912Z" },
+    { url = "https://files.pythonhosted.org/packages/59/51/4225abe9f1a2288f546a7fc6ce8fdbb53fc72af85d47b1317e811044a3b2/electrocrypto-2.0.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:cf9286771ec14c957031aea17e89c48b1c24ffff37573fc37d36b9746c2a81cf", size = 34149, upload-time = "2025-11-26T06:39:08.683Z" },
+    { url = "https://files.pythonhosted.org/packages/c5/b9/e20e2cc06780ac2a0eedbf6216e73645f3b18e81c5ed2fa603ad077df77e/electrocrypto-2.0.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:40aac38a55ccaca24fb0f451dfcbb3feda4be81d6792c1c8281027a743b6f4fb", size = 34274, upload-time = "2025-11-26T06:39:09.547Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/26/22a9c9687aef24008bf749eb3618f2d11d1ebaab67566ff501e814fbf939/electrocrypto-2.0.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6a54f8e754c5a7234257df9af4788a9ab9c7038c855e4aa5ad91600ac72c2ffc", size = 52299, upload-time = "2025-11-26T06:37:43.366Z" },
+    { url = "https://files.pythonhosted.org/packages/90/e0/013050e729172210ccd61b51124ea7bc5965c162b3440c5ef5046cfa07c4/electrocrypto-2.0.2-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:2080a848f27233905d85dbd0e2c01ee608a5e6470189cb6230bb72d7da226f01", size = 50424, upload-time = "2025-11-26T06:37:31.953Z" },
+    { url = "https://files.pythonhosted.org/packages/d8/4f/a9007e97aecf5399b6bbdd8166d5a82ba26a5db66b25075ca607df750a78/electrocrypto-2.0.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:111421aeaa889b58c2da13a404e92e8563bb2138f93cb1defa8ced4eaf6f8224", size = 51827, upload-time = "2025-11-26T06:37:44.916Z" },
+    { url = "https://files.pythonhosted.org/packages/f6/3e/9ef94725cf3edb3c639466ad0a448619c94d6d566819e129d36e11925401/electrocrypto-2.0.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:83e2dd8380336775bb7160344866d31f8787d1d5165df070a5954caa77846a64", size = 50624, upload-time = "2025-11-26T06:37:33.682Z" },
+    { url = "https://files.pythonhosted.org/packages/88/68/9a3c6bfec7f976a58d3ca95499fcba5ba2f749c465538492c6ffd019acf5/electrocrypto-2.0.2-cp313-cp313t-win32.whl", hash = "sha256:b9539c50113340f3c2a374cacd8beda85d27b16c2139e6fb1a4209a7c0d59c90", size = 35478, upload-time = "2025-11-26T06:42:04.863Z" },
+    { url = "https://files.pythonhosted.org/packages/25/d9/b6d399007ebcd0f342e6263f5f74c6086ba510237023b2331f68aadc2a7c/electrocrypto-2.0.2-cp313-cp313t-win_amd64.whl", hash = "sha256:87ed1b9016d605d48d03f67c47e9365a53d8c3884a18618deb19c2b29a82f969", size = 36242, upload-time = "2025-11-26T06:42:05.595Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/bd/90ea38244e88f4436664455325a14d1477c891d9aa5b1ba5b3aeb4aabf97/electrocrypto-2.0.2-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:68141ba4ba34f9c4e7eb399a37c06e61db2196d71522610d4a2349d4c723564e", size = 49849, upload-time = "2025-11-26T06:39:10.577Z" },
+    { url = "https://files.pythonhosted.org/packages/96/a0/384b8f68267b49db59dbb24206f6d95054664727d2d6c331cf6b34f8053c/electrocrypto-2.0.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:547840c158442f3b2dcfdc43edb894643167354a2be0a7e1a091b38a2d266a33", size = 34217, upload-time = "2025-11-26T06:39:11.359Z" },
+    { url = "https://files.pythonhosted.org/packages/84/25/1fc7eed75241f17b4454b2f070e8e88fd5ebccee7dec753bfb271f19fe36/electrocrypto-2.0.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a64e8c6545c54ced10bd2ef7987e3c800b29f045aad48a251ccf3ecc504e1bdf", size = 34279, upload-time = "2025-11-26T06:39:12.139Z" },
+    { url = "https://files.pythonhosted.org/packages/d1/88/bdfbafbd6d04908e6d98d6b57780998bf7d5c192c2a7c9532e9263914e27/electrocrypto-2.0.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a9c9ad57db80925e392d7924017b6e85487b185c57fab29684282022d2b635b", size = 52424, upload-time = "2025-11-26T06:37:45.783Z" },
+    { url = "https://files.pythonhosted.org/packages/0d/69/55c6b8fafd9e4db973521f17fef30ab09f8d1c4c97d57e93edd69f4a216e/electrocrypto-2.0.2-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fb7b4b6a371dc249c32e54be36920b7c2052a4d09a0d63291c405990cbd4f55", size = 50524, upload-time = "2025-11-26T06:37:35.059Z" },
+    { url = "https://files.pythonhosted.org/packages/c3/dd/ef8d8ad5e0bc3570ffadc532d6e44ac43674d51eb21c463d1b0abef91ec4/electrocrypto-2.0.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:364fa6fe5c0313226825a0644f0891629a43f5a36c2658e1015f59051bcf8ead", size = 51898, upload-time = "2025-11-26T06:37:46.696Z" },
+    { url = "https://files.pythonhosted.org/packages/41/61/ba74d6b43af249bab2403f8ece4c4db4fc3c943c284edfdf54aeb82b9c3f/electrocrypto-2.0.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:816183a2cf3fe48d6837f814df8ea660dbe652a86a7d263f481b05ffa1c625eb", size = 50695, upload-time = "2025-11-26T06:37:36.52Z" },
+    { url = "https://files.pythonhosted.org/packages/cc/9a/f5af18302823640753a85818bc399023c5a8345af0f8e6e9d4d5190e9195/electrocrypto-2.0.2-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:46f5c348ddeb9d22d697dad605aea69e472a22bb41ed13ace4fa553a9e27de25", size = 49863, upload-time = "2025-11-26T06:39:12.882Z" },
+    { url = "https://files.pythonhosted.org/packages/21/20/93b1ccd770b437bef9cd120df73785056743fc89c48c52e2fea47ff0ae25/electrocrypto-2.0.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:e43db41749aa0e301249fc948a4bcbadd84c1833b6b045b686b4e54bbf106568", size = 34226, upload-time = "2025-11-26T06:39:13.941Z" },
+    { url = "https://files.pythonhosted.org/packages/55/66/3338a2cd3fcb89e306d3c26723daeb2e1845812d426c9ff2f4662cc53b1d/electrocrypto-2.0.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:01bf402d59adee8e26974772258445c83641cf4d208d4a32855051293b43aa28", size = 34278, upload-time = "2025-11-26T06:39:14.692Z" },
+    { url = "https://files.pythonhosted.org/packages/68/45/6d513342eb28d56fd8b4fca8b93042bb00108ec7f1ee292b2423d165501a/electrocrypto-2.0.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7155808a720909ae543f01afdd7267ec9ad0bd53191e2f124c8bacee4c8004c4", size = 52429, upload-time = "2025-11-26T06:37:47.613Z" },
+    { url = "https://files.pythonhosted.org/packages/2c/36/71bbb3f29178201de1cfdcd8fd7da3b68107d174747aee98bcb544feb808/electrocrypto-2.0.2-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:669d5fd03560ee524903093e06c753c66182eaed5f2ac3cf1ee83abc72863327", size = 50537, upload-time = "2025-11-26T06:37:38.048Z" },
+    { url = "https://files.pythonhosted.org/packages/48/7f/0ca5e1bfa63043c5fe0570ee56b8424255095a5b9051f7c0633e2a94b2a1/electrocrypto-2.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:6089d76c6e6498ee010639e2f2238aebee85a3fc2b32200416dc02cd3416b208", size = 51932, upload-time = "2025-11-26T06:37:48.872Z" },
+    { url = "https://files.pythonhosted.org/packages/b6/5b/b0bc56cd603990110887518023ba22ab751158088d26bea18952d752964d/electrocrypto-2.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:30c18e25b360c0825d5b372d12325242b51bc781f8163194df8db8504cb01ca2", size = 50732, upload-time = "2025-11-26T06:37:39.722Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/6f/b8a4cdd5427b1850118d9e12ed44691c5c1a2fce3c1c428b195f7179d059/electrocrypto-2.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:1b22b0d88ffe8936f135359aeb2e5441705d1a69d41587d449b0e1812f204d51", size = 36357, upload-time = "2025-11-26T06:42:08.845Z" },
+    { url = "https://files.pythonhosted.org/packages/6a/5e/20aa370d9871d8f51e8bfd54c4947fd8e61cee66d9f9b37e24ae0add75b8/electrocrypto-2.0.2-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:0f0194b44927aef240cebb298789d69415f0c35dbd0c3236efc09e6ca9a45e99", size = 36458, upload-time = "2025-11-26T06:42:09.87Z" },
+]
+
+[[package]]
+name = "electrogram"
+source = { editable = "." }
+dependencies = [
+    { name = "aiosqlite" },
+    { name = "electrocrypto" },
+    { name = "pymediainfo" },
+    { name = "pymongo" },
+    { name = "pysocks" },
+]
+
+[package.optional-dependencies]
+dev = [
+    { name = "hatch" },
+    { name = "pytest" },
+    { name = "pytest-asyncio" },
+    { name = "pytest-cov" },
+    { name = "twine" },
+]
+docs = [
+    { name = "sphinx" },
+    { name = "sphinx-autobuild", version = "2024.10.3", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },
+    { name = "sphinx-autobuild", version = "2025.8.25", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.11'" },
+    { name = "sphinx-copybutton" },
+    { name = "sphinx-immaterial" },
+    { name = "tornado" },
+]
+
+[package.metadata]
+requires-dist = [
+    { name = "aiosqlite" },
+    { name = "electrocrypto" },
+    { name = "hatch", marker = "extra == 'dev'" },
+    { name = "pymediainfo" },
+    { name = "pymongo" },
+    { name = "pysocks" },
+    { name = "pytest", marker = "extra == 'dev'" },
+    { name = "pytest-asyncio", marker = "extra == 'dev'" },
+    { name = "pytest-cov", marker = "extra == 'dev'" },
+    { name = "sphinx", marker = "extra == 'docs'", specifier = "<8.0.0" },
+    { name = "sphinx-autobuild", marker = "extra == 'docs'" },
+    { name = "sphinx-copybutton", marker = "extra == 'docs'" },
+    { name = "sphinx-immaterial", marker = "extra == 'docs'" },
+    { name = "tornado", marker = "extra == 'docs'" },
+    { name = "twine", marker = "extra == 'dev'" },
+]
+provides-extras = ["dev", "docs"]
+
+[[package]]
+name = "exceptiongroup"
+version = "1.3.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" },
+]
+
+[[package]]
+name = "filelock"
+version = "3.20.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/1d/65/ce7f1b70157833bf3cb851b556a37d4547ceafc158aa9b34b36782f23696/filelock-3.20.3.tar.gz", hash = "sha256:18c57ee915c7ec61cff0ecf7f0f869936c7c30191bb0cf406f1341778d0834e1", size = 19485, upload-time = "2026-01-09T17:55:05.421Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b5/36/7fb70f04bf00bc646cd5bb45aa9eddb15e19437a28b8fb2b4a5249fac770/filelock-3.20.3-py3-none-any.whl", hash = "sha256:4b0dda527ee31078689fc205ec4f1c1bf7d56cf88b6dc9426c4f230e46c2dce1", size = 16701, upload-time = "2026-01-09T17:55:04.334Z" },
+]
+
+[[package]]
+name = "h11"
+version = "0.16.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" },
+]
+
+[[package]]
+name = "hatch"
+version = "1.16.3"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "backports-zstd", marker = "python_full_version < '3.14'" },
+    { name = "click" },
+    { name = "hatchling" },
+    { name = "httpx" },
+    { name = "hyperlink" },
+    { name = "keyring" },
+    { name = "packaging" },
+    { name = "pexpect" },
+    { name = "platformdirs" },
+    { name = "pyproject-hooks" },
+    { name = "rich" },
+    { name = "shellingham" },
+    { name = "tomli-w" },
+    { name = "tomlkit" },
+    { name = "userpath" },
+    { name = "uv" },
+    { name = "virtualenv" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/41/c1/976b807478878d31d467dd17b9fe642962f292e16ed13c34b593c0453fde/hatch-1.16.3.tar.gz", hash = "sha256:2a50ecc912adfc8122cd2ccdcc15254cdef829e5d158be9014180cd7f0fb7ea9", size = 5219621, upload-time = "2026-01-21T01:36:19.822Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b8/b4/5c5fa4ca8c59e7ef0a224ff10e6336e73ca61c5e0eff09ee691441c9275f/hatch-1.16.3-py3-none-any.whl", hash = "sha256:f5169025cf1cdfe981366eb96127cab1d1bc59f5f2acb87c4cc308c25d95a4b1", size = 141305, upload-time = "2026-01-21T01:36:18.13Z" },
+]
+
+[[package]]
+name = "hatchling"
+version = "1.28.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "packaging" },
+    { name = "pathspec" },
+    { name = "pluggy" },
+    { name = "tomli", marker = "python_full_version < '3.11'" },
+    { name = "trove-classifiers" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/0b/8e/e480359492affde4119a131da729dd26da742c2c9b604dff74836e47eef9/hatchling-1.28.0.tar.gz", hash = "sha256:4d50b02aece6892b8cd0b3ce6c82cb218594d3ec5836dbde75bf41a21ab004c8", size = 55365, upload-time = "2025-11-27T00:31:13.766Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/0d/a5/48cb7efb8b4718b1a4c0c331e3364a3a33f614ff0d6afd2b93ee883d3c47/hatchling-1.28.0-py3-none-any.whl", hash = "sha256:dc48722b68b3f4bbfa3ff618ca07cdea6750e7d03481289ffa8be1521d18a961", size = 76075, upload-time = "2025-11-27T00:31:12.544Z" },
+]
+
+[[package]]
+name = "httpcore"
+version = "1.0.9"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "certifi" },
+    { name = "h11" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" },
+]
+
+[[package]]
+name = "httpx"
+version = "0.28.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "anyio" },
+    { name = "certifi" },
+    { name = "httpcore" },
+    { name = "idna" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" },
+]
+
+[[package]]
+name = "hyperlink"
+version = "21.0.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "idna" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/3a/51/1947bd81d75af87e3bb9e34593a4cf118115a8feb451ce7a69044ef1412e/hyperlink-21.0.0.tar.gz", hash = "sha256:427af957daa58bc909471c6c40f74c5450fa123dd093fc53efd2e91d2705a56b", size = 140743, upload-time = "2021-01-08T05:51:20.972Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/6e/aa/8caf6a0a3e62863cbb9dab27135660acba46903b703e224f14f447e57934/hyperlink-21.0.0-py2.py3-none-any.whl", hash = "sha256:e6b14c37ecb73e89c77d78cdb4c2cc8f3fb59a885c5b3f819ff4ed80f25af1b4", size = 74638, upload-time = "2021-01-08T05:51:22.906Z" },
+]
+
+[[package]]
+name = "id"
+version = "1.6.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "urllib3" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/6d/04/c2156091427636080787aac190019dc64096e56a23b7364d3c1764ee3a06/id-1.6.1.tar.gz", hash = "sha256:d0732d624fb46fd4e7bc4e5152f00214450953b9e772c182c1c22964def1a069", size = 18088, upload-time = "2026-02-04T16:19:41.26Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/42/77/de194443bf38daed9452139e960c632b0ef9f9a5dd9ce605fdf18ca9f1b1/id-1.6.1-py3-none-any.whl", hash = "sha256:f5ec41ed2629a508f5d0988eda142e190c9c6da971100612c4de9ad9f9b237ca", size = 14689, upload-time = "2026-02-04T16:19:40.051Z" },
+]
+
+[[package]]
+name = "idna"
+version = "3.11"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" },
+]
+
+[[package]]
+name = "imagesize"
+version = "1.4.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/a7/84/62473fb57d61e31fef6e36d64a179c8781605429fd927b5dd608c997be31/imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a", size = 1280026, upload-time = "2022-07-01T12:21:05.687Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ff/62/85c4c919272577931d407be5ba5d71c20f0b616d31a0befe0ae45bb79abd/imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b", size = 8769, upload-time = "2022-07-01T12:21:02.467Z" },
+]
+
+[[package]]
+name = "importlib-metadata"
+version = "8.7.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "zipp" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/f3/49/3b30cad09e7771a4982d9975a8cbf64f00d4a1ececb53297f1d9a7be1b10/importlib_metadata-8.7.1.tar.gz", hash = "sha256:49fef1ae6440c182052f407c8d34a68f72efc36db9ca90dc0113398f2fdde8bb", size = 57107, upload-time = "2025-12-21T10:00:19.278Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/fa/5e/f8e9a1d23b9c20a551a8a02ea3637b4642e22c2626e3a13a9a29cdea99eb/importlib_metadata-8.7.1-py3-none-any.whl", hash = "sha256:5a1f80bf1daa489495071efbb095d75a634cf28a8bc299581244063b53176151", size = 27865, upload-time = "2025-12-21T10:00:18.329Z" },
+]
+
+[[package]]
+name = "iniconfig"
+version = "2.3.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" },
+]
+
+[[package]]
+name = "jaraco-classes"
+version = "3.4.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "more-itertools" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/06/c0/ed4a27bc5571b99e3cff68f8a9fa5b56ff7df1c2251cc715a652ddd26402/jaraco.classes-3.4.0.tar.gz", hash = "sha256:47a024b51d0239c0dd8c8540c6c7f484be3b8fcf0b2d85c13825780d3b3f3acd", size = 11780, upload-time = "2024-03-31T07:27:36.643Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/7f/66/b15ce62552d84bbfcec9a4873ab79d993a1dd4edb922cbfccae192bd5b5f/jaraco.classes-3.4.0-py3-none-any.whl", hash = "sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", size = 6777, upload-time = "2024-03-31T07:27:34.792Z" },
+]
+
+[[package]]
+name = "jaraco-context"
+version = "6.1.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "backports-tarfile", marker = "python_full_version < '3.12'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/cb/9c/a788f5bb29c61e456b8ee52ce76dbdd32fd72cd73dd67bc95f42c7a8d13c/jaraco_context-6.1.0.tar.gz", hash = "sha256:129a341b0a85a7db7879e22acd66902fda67882db771754574338898b2d5d86f", size = 15850, upload-time = "2026-01-13T02:53:53.847Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/8d/48/aa685dbf1024c7bd82bede569e3a85f82c32fd3d79ba5fea578f0159571a/jaraco_context-6.1.0-py3-none-any.whl", hash = "sha256:a43b5ed85815223d0d3cfdb6d7ca0d2bc8946f28f30b6f3216bda070f68badda", size = 7065, upload-time = "2026-01-13T02:53:53.031Z" },
+]
+
+[[package]]
+name = "jaraco-functools"
+version = "4.4.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "more-itertools" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/0f/27/056e0638a86749374d6f57d0b0db39f29509cce9313cf91bdc0ac4d91084/jaraco_functools-4.4.0.tar.gz", hash = "sha256:da21933b0417b89515562656547a77b4931f98176eb173644c0d35032a33d6bb", size = 19943, upload-time = "2025-12-21T09:29:43.6Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/fd/c4/813bb09f0985cb21e959f21f2464169eca882656849adf727ac7bb7e1767/jaraco_functools-4.4.0-py3-none-any.whl", hash = "sha256:9eec1e36f45c818d9bf307c8948eb03b2b56cd44087b3cdc989abca1f20b9176", size = 10481, upload-time = "2025-12-21T09:29:42.27Z" },
+]
+
+[[package]]
+name = "jeepney"
+version = "0.9.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/7b/6f/357efd7602486741aa73ffc0617fb310a29b588ed0fd69c2399acbb85b0c/jeepney-0.9.0.tar.gz", hash = "sha256:cf0e9e845622b81e4a28df94c40345400256ec608d0e55bb8a3feaa9163f5732", size = 106758, upload-time = "2025-02-27T18:51:01.684Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl", hash = "sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", size = 49010, upload-time = "2025-02-27T18:51:00.104Z" },
+]
+
+[[package]]
+name = "jinja2"
+version = "3.1.6"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "markupsafe" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" },
+]
+
+[[package]]
+name = "keyring"
+version = "25.7.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "importlib-metadata", marker = "python_full_version < '3.12'" },
+    { name = "jaraco-classes" },
+    { name = "jaraco-context" },
+    { name = "jaraco-functools" },
+    { name = "jeepney", marker = "sys_platform == 'linux'" },
+    { name = "pywin32-ctypes", marker = "sys_platform == 'win32'" },
+    { name = "secretstorage", marker = "sys_platform == 'linux'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/43/4b/674af6ef2f97d56f0ab5153bf0bfa28ccb6c3ed4d1babf4305449668807b/keyring-25.7.0.tar.gz", hash = "sha256:fe01bd85eb3f8fb3dd0405defdeac9a5b4f6f0439edbb3149577f244a2e8245b", size = 63516, upload-time = "2025-11-16T16:26:09.482Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", hash = "sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", size = 39160, upload-time = "2025-11-16T16:26:08.402Z" },
+]
+
+[[package]]
+name = "markdown-it-py"
+version = "4.0.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "mdurl" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/94/54/e7d793b573f298e1c9013b8c4dade17d481164aa517d1d7148619c2cedbf/markdown_it_py-4.0.0-py3-none-any.whl", hash = "sha256:87327c59b172c5011896038353a81343b6754500a08cd7a4973bb48c6d578147", size = 87321, upload-time = "2025-08-11T12:57:51.923Z" },
+]
+
+[[package]]
+name = "markupsafe"
+version = "3.0.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/e8/4b/3541d44f3937ba468b75da9eebcae497dcf67adb65caa16760b0a6807ebb/markupsafe-3.0.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:2f981d352f04553a7171b8e44369f2af4055f888dfb147d55e42d29e29e74559", size = 11631, upload-time = "2025-09-27T18:36:05.558Z" },
+    { url = "https://files.pythonhosted.org/packages/98/1b/fbd8eed11021cabd9226c37342fa6ca4e8a98d8188a8d9b66740494960e4/markupsafe-3.0.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e1c1493fb6e50ab01d20a22826e57520f1284df32f2d8601fdd90b6304601419", size = 12057, upload-time = "2025-09-27T18:36:07.165Z" },
+    { url = "https://files.pythonhosted.org/packages/40/01/e560d658dc0bb8ab762670ece35281dec7b6c1b33f5fbc09ebb57a185519/markupsafe-3.0.3-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1ba88449deb3de88bd40044603fafffb7bc2b055d626a330323a9ed736661695", size = 22050, upload-time = "2025-09-27T18:36:08.005Z" },
+    { url = "https://files.pythonhosted.org/packages/af/cd/ce6e848bbf2c32314c9b237839119c5a564a59725b53157c856e90937b7a/markupsafe-3.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f42d0984e947b8adf7dd6dde396e720934d12c506ce84eea8476409563607591", size = 20681, upload-time = "2025-09-27T18:36:08.881Z" },
+    { url = "https://files.pythonhosted.org/packages/c9/2a/b5c12c809f1c3045c4d580b035a743d12fcde53cf685dbc44660826308da/markupsafe-3.0.3-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c0c0b3ade1c0b13b936d7970b1d37a57acde9199dc2aecc4c336773e1d86049c", size = 20705, upload-time = "2025-09-27T18:36:10.131Z" },
+    { url = "https://files.pythonhosted.org/packages/cf/e3/9427a68c82728d0a88c50f890d0fc072a1484de2f3ac1ad0bfc1a7214fd5/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:0303439a41979d9e74d18ff5e2dd8c43ed6c6001fd40e5bf2e43f7bd9bbc523f", size = 21524, upload-time = "2025-09-27T18:36:11.324Z" },
+    { url = "https://files.pythonhosted.org/packages/bc/36/23578f29e9e582a4d0278e009b38081dbe363c5e7165113fad546918a232/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:d2ee202e79d8ed691ceebae8e0486bd9a2cd4794cec4824e1c99b6f5009502f6", size = 20282, upload-time = "2025-09-27T18:36:12.573Z" },
+    { url = "https://files.pythonhosted.org/packages/56/21/dca11354e756ebd03e036bd8ad58d6d7168c80ce1fe5e75218e4945cbab7/markupsafe-3.0.3-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:177b5253b2834fe3678cb4a5f0059808258584c559193998be2601324fdeafb1", size = 20745, upload-time = "2025-09-27T18:36:13.504Z" },
+    { url = "https://files.pythonhosted.org/packages/87/99/faba9369a7ad6e4d10b6a5fbf71fa2a188fe4a593b15f0963b73859a1bbd/markupsafe-3.0.3-cp310-cp310-win32.whl", hash = "sha256:2a15a08b17dd94c53a1da0438822d70ebcd13f8c3a95abe3a9ef9f11a94830aa", size = 14571, upload-time = "2025-09-27T18:36:14.779Z" },
+    { url = "https://files.pythonhosted.org/packages/d6/25/55dc3ab959917602c96985cb1253efaa4ff42f71194bddeb61eb7278b8be/markupsafe-3.0.3-cp310-cp310-win_amd64.whl", hash = "sha256:c4ffb7ebf07cfe8931028e3e4c85f0357459a3f9f9490886198848f4fa002ec8", size = 15056, upload-time = "2025-09-27T18:36:16.125Z" },
+    { url = "https://files.pythonhosted.org/packages/d0/9e/0a02226640c255d1da0b8d12e24ac2aa6734da68bff14c05dd53b94a0fc3/markupsafe-3.0.3-cp310-cp310-win_arm64.whl", hash = "sha256:e2103a929dfa2fcaf9bb4e7c091983a49c9ac3b19c9061b6d5427dd7d14d81a1", size = 13932, upload-time = "2025-09-27T18:36:17.311Z" },
+    { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" },
+    { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" },
+    { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" },
+    { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" },
+    { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" },
+    { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" },
+    { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" },
+    { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" },
+    { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" },
+    { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" },
+    { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" },
+    { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" },
+    { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" },
+    { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" },
+    { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" },
+    { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" },
+    { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" },
+    { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" },
+    { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" },
+    { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" },
+    { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" },
+    { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" },
+    { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" },
+    { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" },
+    { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" },
+    { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" },
+    { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" },
+    { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" },
+    { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" },
+    { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" },
+    { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" },
+    { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" },
+    { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" },
+    { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" },
+    { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" },
+    { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" },
+    { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" },
+    { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" },
+    { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" },
+    { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" },
+    { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" },
+    { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" },
+    { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" },
+    { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" },
+    { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" },
+    { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" },
+    { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" },
+    { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" },
+    { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" },
+    { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" },
+    { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" },
+    { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" },
+    { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" },
+    { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" },
+    { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" },
+    { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" },
+    { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" },
+    { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" },
+    { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" },
+    { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" },
+    { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" },
+    { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" },
+]
+
+[[package]]
+name = "mdurl"
+version = "0.1.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/d6/54/cfe61301667036ec958cb99bd3efefba235e65cdeb9c84d24a8293ba1d90/mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba", size = 8729, upload-time = "2022-08-14T12:40:10.846Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" },
+]
+
+[[package]]
+name = "more-itertools"
+version = "10.8.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ea/5d/38b681d3fce7a266dd9ab73c66959406d565b3e85f21d5e66e1181d93721/more_itertools-10.8.0.tar.gz", hash = "sha256:f638ddf8a1a0d134181275fb5d58b086ead7c6a72429ad725c67503f13ba30bd", size = 137431, upload-time = "2025-09-02T15:23:11.018Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/a4/8e/469e5a4a2f5855992e425f3cb33804cc07bf18d48f2db061aec61ce50270/more_itertools-10.8.0-py3-none-any.whl", hash = "sha256:52d4362373dcf7c52546bc4af9a86ee7c4579df9a8dc268be0a2f949d376cc9b", size = 69667, upload-time = "2025-09-02T15:23:09.635Z" },
+]
+
+[[package]]
+name = "nh3"
+version = "0.3.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ca/a5/34c26015d3a434409f4d2a1cd8821a06c05238703f49283ffeb937bef093/nh3-0.3.2.tar.gz", hash = "sha256:f394759a06df8b685a4ebfb1874fb67a9cbfd58c64fc5ed587a663c0e63ec376", size = 19288, upload-time = "2025-10-30T11:17:45.948Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/5b/01/a1eda067c0ba823e5e2bb033864ae4854549e49fb6f3407d2da949106bfb/nh3-0.3.2-cp314-cp314t-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:d18957a90806d943d141cc5e4a0fefa1d77cf0d7a156878bf9a66eed52c9cc7d", size = 1419839, upload-time = "2025-10-30T11:17:09.956Z" },
+    { url = "https://files.pythonhosted.org/packages/30/57/07826ff65d59e7e9cc789ef1dc405f660cabd7458a1864ab58aefa17411b/nh3-0.3.2-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:45c953e57028c31d473d6b648552d9cab1efe20a42ad139d78e11d8f42a36130", size = 791183, upload-time = "2025-10-30T11:17:11.99Z" },
+    { url = "https://files.pythonhosted.org/packages/af/2f/e8a86f861ad83f3bb5455f596d5c802e34fcdb8c53a489083a70fd301333/nh3-0.3.2-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2c9850041b77a9147d6bbd6dbbf13eeec7009eb60b44e83f07fcb2910075bf9b", size = 829127, upload-time = "2025-10-30T11:17:13.192Z" },
+    { url = "https://files.pythonhosted.org/packages/d8/97/77aef4daf0479754e8e90c7f8f48f3b7b8725a3b8c0df45f2258017a6895/nh3-0.3.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:403c11563e50b915d0efdb622866d1d9e4506bce590ef7da57789bf71dd148b5", size = 997131, upload-time = "2025-10-30T11:17:14.677Z" },
+    { url = "https://files.pythonhosted.org/packages/41/ee/fd8140e4df9d52143e89951dd0d797f5546004c6043285289fbbe3112293/nh3-0.3.2-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:0dca4365db62b2d71ff1620ee4f800c4729849906c5dd504ee1a7b2389558e31", size = 1068783, upload-time = "2025-10-30T11:17:15.861Z" },
+    { url = "https://files.pythonhosted.org/packages/87/64/bdd9631779e2d588b08391f7555828f352e7f6427889daf2fa424bfc90c9/nh3-0.3.2-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0fe7ee035dd7b2290715baf29cb27167dddd2ff70ea7d052c958dbd80d323c99", size = 994732, upload-time = "2025-10-30T11:17:17.155Z" },
+    { url = "https://files.pythonhosted.org/packages/79/66/90190033654f1f28ca98e3d76b8be1194505583f9426b0dcde782a3970a2/nh3-0.3.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:a40202fd58e49129764f025bbaae77028e420f1d5b3c8e6f6fd3a6490d513868", size = 975997, upload-time = "2025-10-30T11:17:18.77Z" },
+    { url = "https://files.pythonhosted.org/packages/34/30/ebf8e2e8d71fdb5a5d5d8836207177aed1682df819cbde7f42f16898946c/nh3-0.3.2-cp314-cp314t-win32.whl", hash = "sha256:1f9ba555a797dbdcd844b89523f29cdc90973d8bd2e836ea6b962cf567cadd93", size = 583364, upload-time = "2025-10-30T11:17:20.286Z" },
+    { url = "https://files.pythonhosted.org/packages/94/ae/95c52b5a75da429f11ca8902c2128f64daafdc77758d370e4cc310ecda55/nh3-0.3.2-cp314-cp314t-win_amd64.whl", hash = "sha256:dce4248edc427c9b79261f3e6e2b3ecbdd9b88c267012168b4a7b3fc6fd41d13", size = 589982, upload-time = "2025-10-30T11:17:21.384Z" },
+    { url = "https://files.pythonhosted.org/packages/b4/bd/c7d862a4381b95f2469704de32c0ad419def0f4a84b7a138a79532238114/nh3-0.3.2-cp314-cp314t-win_arm64.whl", hash = "sha256:019ecbd007536b67fdf76fab411b648fb64e2257ca3262ec80c3425c24028c80", size = 577126, upload-time = "2025-10-30T11:17:22.755Z" },
+    { url = "https://files.pythonhosted.org/packages/b6/3e/f5a5cc2885c24be13e9b937441bd16a012ac34a657fe05e58927e8af8b7a/nh3-0.3.2-cp38-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:7064ccf5ace75825bd7bf57859daaaf16ed28660c1c6b306b649a9eda4b54b1e", size = 1431980, upload-time = "2025-10-30T11:17:25.457Z" },
+    { url = "https://files.pythonhosted.org/packages/7f/f7/529a99324d7ef055de88b690858f4189379708abae92ace799365a797b7f/nh3-0.3.2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c8745454cdd28bbbc90861b80a0111a195b0e3961b9fa2e672be89eb199fa5d8", size = 820805, upload-time = "2025-10-30T11:17:26.98Z" },
+    { url = "https://files.pythonhosted.org/packages/3d/62/19b7c50ccd1fa7d0764822d2cea8f2a320f2fd77474c7a1805cb22cf69b0/nh3-0.3.2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72d67c25a84579f4a432c065e8b4274e53b7cf1df8f792cf846abfe2c3090866", size = 803527, upload-time = "2025-10-30T11:17:28.284Z" },
+    { url = "https://files.pythonhosted.org/packages/4a/ca/f022273bab5440abff6302731a49410c5ef66b1a9502ba3fbb2df998d9ff/nh3-0.3.2-cp38-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:13398e676a14d6233f372c75f52d5ae74f98210172991f7a3142a736bd92b131", size = 1051674, upload-time = "2025-10-30T11:17:29.909Z" },
+    { url = "https://files.pythonhosted.org/packages/fa/f7/5728e3b32a11daf5bd21cf71d91c463f74305938bc3eb9e0ac1ce141646e/nh3-0.3.2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:03d617e5c8aa7331bd2659c654e021caf9bba704b109e7b2b28b039a00949fe5", size = 1004737, upload-time = "2025-10-30T11:17:31.205Z" },
+    { url = "https://files.pythonhosted.org/packages/53/7f/f17e0dba0a99cee29e6cee6d4d52340ef9cb1f8a06946d3a01eb7ec2fb01/nh3-0.3.2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f2f55c4d2d5a207e74eefe4d828067bbb01300e06e2a7436142f915c5928de07", size = 911745, upload-time = "2025-10-30T11:17:32.945Z" },
+    { url = "https://files.pythonhosted.org/packages/42/0f/c76bf3dba22c73c38e9b1113b017cf163f7696f50e003404ec5ecdb1e8a6/nh3-0.3.2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7bb18403f02b655a1bbe4e3a4696c2ae1d6ae8f5991f7cacb684b1ae27e6c9f7", size = 797184, upload-time = "2025-10-30T11:17:34.226Z" },
+    { url = "https://files.pythonhosted.org/packages/08/a1/73d8250f888fb0ddf1b119b139c382f8903d8bb0c5bd1f64afc7e38dad1d/nh3-0.3.2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:6d66f41672eb4060cf87c037f760bdbc6847852ca9ef8e9c5a5da18f090abf87", size = 838556, upload-time = "2025-10-30T11:17:35.875Z" },
+    { url = "https://files.pythonhosted.org/packages/d1/09/deb57f1fb656a7a5192497f4a287b0ade5a2ff6b5d5de4736d13ef6d2c1f/nh3-0.3.2-cp38-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f97f8b25cb2681d25e2338148159447e4d689aafdccfcf19e61ff7db3905768a", size = 1006695, upload-time = "2025-10-30T11:17:37.071Z" },
+    { url = "https://files.pythonhosted.org/packages/b6/61/8f4d41c4ccdac30e4b1a4fa7be4b0f9914d8314a5058472f84c8e101a418/nh3-0.3.2-cp38-abi3-musllinux_1_2_armv7l.whl", hash = "sha256:2ab70e8c6c7d2ce953d2a58102eefa90c2d0a5ed7aa40c7e29a487bc5e613131", size = 1075471, upload-time = "2025-10-30T11:17:38.225Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/c6/966aec0cb4705e69f6c3580422c239205d5d4d0e50fac380b21e87b6cf1b/nh3-0.3.2-cp38-abi3-musllinux_1_2_i686.whl", hash = "sha256:1710f3901cd6440ca92494ba2eb6dc260f829fa8d9196b659fa10de825610ce0", size = 1002439, upload-time = "2025-10-30T11:17:39.553Z" },
+    { url = "https://files.pythonhosted.org/packages/e2/c8/97a2d5f7a314cce2c5c49f30c6f161b7f3617960ade4bfc2fd1ee092cb20/nh3-0.3.2-cp38-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:91e9b001101fb4500a2aafe3e7c92928d85242d38bf5ac0aba0b7480da0a4cd6", size = 987439, upload-time = "2025-10-30T11:17:40.81Z" },
+    { url = "https://files.pythonhosted.org/packages/0d/95/2d6fc6461687d7a171f087995247dec33e8749a562bfadd85fb5dbf37a11/nh3-0.3.2-cp38-abi3-win32.whl", hash = "sha256:169db03df90da63286e0560ea0efa9b6f3b59844a9735514a1d47e6bb2c8c61b", size = 589826, upload-time = "2025-10-30T11:17:42.239Z" },
+    { url = "https://files.pythonhosted.org/packages/64/9a/1a1c154f10a575d20dd634e5697805e589bbdb7673a0ad00e8da90044ba7/nh3-0.3.2-cp38-abi3-win_amd64.whl", hash = "sha256:562da3dca7a17f9077593214a9781a94b8d76de4f158f8c895e62f09573945fe", size = 596406, upload-time = "2025-10-30T11:17:43.773Z" },
+    { url = "https://files.pythonhosted.org/packages/9e/7e/a96255f63b7aef032cbee8fc4d6e37def72e3aaedc1f72759235e8f13cb1/nh3-0.3.2-cp38-abi3-win_arm64.whl", hash = "sha256:cf5964d54edd405e68583114a7cba929468bcd7db5e676ae38ee954de1cfc104", size = 584162, upload-time = "2025-10-30T11:17:44.96Z" },
+]
+
+[[package]]
+name = "packaging"
+version = "26.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" },
+]
+
+[[package]]
+name = "pathspec"
+version = "1.0.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" },
+]
+
+[[package]]
+name = "pexpect"
+version = "4.9.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "ptyprocess" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/42/92/cc564bf6381ff43ce1f4d06852fc19a2f11d180f23dc32d9588bee2f149d/pexpect-4.9.0.tar.gz", hash = "sha256:ee7d41123f3c9911050ea2c2dac107568dc43b2d3b0c7557a33212c398ead30f", size = 166450, upload-time = "2023-11-25T09:07:26.339Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/9e/c3/059298687310d527a58bb01f3b1965787ee3b40dce76752eda8b44e9a2c5/pexpect-4.9.0-py2.py3-none-any.whl", hash = "sha256:7236d1e080e4936be2dc3e326cec0af72acf9212a7e1d060210e70a47e253523", size = 63772, upload-time = "2023-11-25T06:56:14.81Z" },
+]
+
+[[package]]
+name = "platformdirs"
+version = "4.5.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/cf/86/0248f086a84f01b37aaec0fa567b397df1a119f73c16f6c7a9aac73ea309/platformdirs-4.5.1.tar.gz", hash = "sha256:61d5cdcc6065745cdd94f0f878977f8de9437be93de97c1c12f853c9c0cdcbda", size = 21715, upload-time = "2025-12-05T13:52:58.638Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/cb/28/3bfe2fa5a7b9c46fe7e13c97bda14c895fb10fa2ebf1d0abb90e0cea7ee1/platformdirs-4.5.1-py3-none-any.whl", hash = "sha256:d03afa3963c806a9bed9d5125c8f4cb2fdaf74a55ab60e5d59b3fde758104d31", size = 18731, upload-time = "2025-12-05T13:52:56.823Z" },
+]
+
+[[package]]
+name = "pluggy"
+version = "1.6.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
+]
+
+[[package]]
+name = "ptyprocess"
+version = "0.7.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/20/e5/16ff212c1e452235a90aeb09066144d0c5a6a8c0834397e03f5224495c4e/ptyprocess-0.7.0.tar.gz", hash = "sha256:5c5d0a3b48ceee0b48485e0c26037c0acd7d29765ca3fbb5cb3831d347423220", size = 70762, upload-time = "2020-12-28T15:15:30.155Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8db3/ptyprocess-0.7.0-py2.py3-none-any.whl", hash = "sha256:4b41f3967fce3af57cc7e94b888626c18bf37a083e3651ca8feeb66d492fef35", size = 13993, upload-time = "2020-12-28T15:15:28.35Z" },
+]
+
+[[package]]
+name = "pycparser"
+version = "3.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/1b/7d/92392ff7815c21062bea51aa7b87d45576f649f16458d78b7cf94b9ab2e6/pycparser-3.0.tar.gz", hash = "sha256:600f49d217304a5902ac3c37e1281c9fe94e4d0489de643a9504c5cdfdfc6b29", size = 103492, upload-time = "2026-01-21T14:26:51.89Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/0c/c3/44f3fbbfa403ea2a7c779186dc20772604442dde72947e7d01069cbe98e3/pycparser-3.0-py3-none-any.whl", hash = "sha256:b727414169a36b7d524c1c3e31839a521725078d7b2ff038656844266160a992", size = 48172, upload-time = "2026-01-21T14:26:50.693Z" },
+]
+
+[[package]]
+name = "pydantic"
+version = "2.12.5"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "annotated-types" },
+    { name = "pydantic-core" },
+    { name = "typing-extensions" },
+    { name = "typing-inspection" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/69/44/36f1a6e523abc58ae5f928898e4aca2e0ea509b5aa6f6f392a5d882be928/pydantic-2.12.5.tar.gz", hash = "sha256:4d351024c75c0f085a9febbb665ce8c0c6ec5d30e903bdb6394b7ede26aebb49", size = 821591, upload-time = "2025-11-26T15:11:46.471Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/5a/87/b70ad306ebb6f9b585f114d0ac2137d792b48be34d732d60e597c2f8465a/pydantic-2.12.5-py3-none-any.whl", hash = "sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d", size = 463580, upload-time = "2025-11-26T15:11:44.605Z" },
+]
+
+[[package]]
+name = "pydantic-core"
+version = "2.41.5"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "typing-extensions" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/71/70/23b021c950c2addd24ec408e9ab05d59b035b39d97cdc1130e1bce647bb6/pydantic_core-2.41.5.tar.gz", hash = "sha256:08daa51ea16ad373ffd5e7606252cc32f07bc72b28284b6bc9c6df804816476e", size = 460952, upload-time = "2025-11-04T13:43:49.098Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/c6/90/32c9941e728d564b411d574d8ee0cf09b12ec978cb22b294995bae5549a5/pydantic_core-2.41.5-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:77b63866ca88d804225eaa4af3e664c5faf3568cea95360d21f4725ab6e07146", size = 2107298, upload-time = "2025-11-04T13:39:04.116Z" },
+    { url = "https://files.pythonhosted.org/packages/fb/a8/61c96a77fe28993d9a6fb0f4127e05430a267b235a124545d79fea46dd65/pydantic_core-2.41.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:dfa8a0c812ac681395907e71e1274819dec685fec28273a28905df579ef137e2", size = 1901475, upload-time = "2025-11-04T13:39:06.055Z" },
+    { url = "https://files.pythonhosted.org/packages/5d/b6/338abf60225acc18cdc08b4faef592d0310923d19a87fba1faf05af5346e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5921a4d3ca3aee735d9fd163808f5e8dd6c6972101e4adbda9a4667908849b97", size = 1918815, upload-time = "2025-11-04T13:39:10.41Z" },
+    { url = "https://files.pythonhosted.org/packages/d1/1c/2ed0433e682983d8e8cba9c8d8ef274d4791ec6a6f24c58935b90e780e0a/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e25c479382d26a2a41b7ebea1043564a937db462816ea07afa8a44c0866d52f9", size = 2065567, upload-time = "2025-11-04T13:39:12.244Z" },
+    { url = "https://files.pythonhosted.org/packages/b3/24/cf84974ee7d6eae06b9e63289b7b8f6549d416b5c199ca2d7ce13bbcf619/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f547144f2966e1e16ae626d8ce72b4cfa0caedc7fa28052001c94fb2fcaa1c52", size = 2230442, upload-time = "2025-11-04T13:39:13.962Z" },
+    { url = "https://files.pythonhosted.org/packages/fd/21/4e287865504b3edc0136c89c9c09431be326168b1eb7841911cbc877a995/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:6f52298fbd394f9ed112d56f3d11aabd0d5bd27beb3084cc3d8ad069483b8941", size = 2350956, upload-time = "2025-11-04T13:39:15.889Z" },
+    { url = "https://files.pythonhosted.org/packages/a8/76/7727ef2ffa4b62fcab916686a68a0426b9b790139720e1934e8ba797e238/pydantic_core-2.41.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:100baa204bb412b74fe285fb0f3a385256dad1d1879f0a5cb1499ed2e83d132a", size = 2068253, upload-time = "2025-11-04T13:39:17.403Z" },
+    { url = "https://files.pythonhosted.org/packages/d5/8c/a4abfc79604bcb4c748e18975c44f94f756f08fb04218d5cb87eb0d3a63e/pydantic_core-2.41.5-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:05a2c8852530ad2812cb7914dc61a1125dc4e06252ee98e5638a12da6cc6fb6c", size = 2177050, upload-time = "2025-11-04T13:39:19.351Z" },
+    { url = "https://files.pythonhosted.org/packages/67/b1/de2e9a9a79b480f9cb0b6e8b6ba4c50b18d4e89852426364c66aa82bb7b3/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:29452c56df2ed968d18d7e21f4ab0ac55e71dc59524872f6fc57dcf4a3249ed2", size = 2147178, upload-time = "2025-11-04T13:39:21Z" },
+    { url = "https://files.pythonhosted.org/packages/16/c1/dfb33f837a47b20417500efaa0378adc6635b3c79e8369ff7a03c494b4ac/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_armv7l.whl", hash = "sha256:d5160812ea7a8a2ffbe233d8da666880cad0cbaf5d4de74ae15c313213d62556", size = 2341833, upload-time = "2025-11-04T13:39:22.606Z" },
+    { url = "https://files.pythonhosted.org/packages/47/36/00f398642a0f4b815a9a558c4f1dca1b4020a7d49562807d7bc9ff279a6c/pydantic_core-2.41.5-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:df3959765b553b9440adfd3c795617c352154e497a4eaf3752555cfb5da8fc49", size = 2321156, upload-time = "2025-11-04T13:39:25.843Z" },
+    { url = "https://files.pythonhosted.org/packages/7e/70/cad3acd89fde2010807354d978725ae111ddf6d0ea46d1ea1775b5c1bd0c/pydantic_core-2.41.5-cp310-cp310-win32.whl", hash = "sha256:1f8d33a7f4d5a7889e60dc39856d76d09333d8a6ed0f5f1190635cbec70ec4ba", size = 1989378, upload-time = "2025-11-04T13:39:27.92Z" },
+    { url = "https://files.pythonhosted.org/packages/76/92/d338652464c6c367e5608e4488201702cd1cbb0f33f7b6a85a60fe5f3720/pydantic_core-2.41.5-cp310-cp310-win_amd64.whl", hash = "sha256:62de39db01b8d593e45871af2af9e497295db8d73b085f6bfd0b18c83c70a8f9", size = 2013622, upload-time = "2025-11-04T13:39:29.848Z" },
+    { url = "https://files.pythonhosted.org/packages/e8/72/74a989dd9f2084b3d9530b0915fdda64ac48831c30dbf7c72a41a5232db8/pydantic_core-2.41.5-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:a3a52f6156e73e7ccb0f8cced536adccb7042be67cb45f9562e12b319c119da6", size = 2105873, upload-time = "2025-11-04T13:39:31.373Z" },
+    { url = "https://files.pythonhosted.org/packages/12/44/37e403fd9455708b3b942949e1d7febc02167662bf1a7da5b78ee1ea2842/pydantic_core-2.41.5-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7f3bf998340c6d4b0c9a2f02d6a400e51f123b59565d74dc60d252ce888c260b", size = 1899826, upload-time = "2025-11-04T13:39:32.897Z" },
+    { url = "https://files.pythonhosted.org/packages/33/7f/1d5cab3ccf44c1935a359d51a8a2a9e1a654b744b5e7f80d41b88d501eec/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:378bec5c66998815d224c9ca994f1e14c0c21cb95d2f52b6021cc0b2a58f2a5a", size = 1917869, upload-time = "2025-11-04T13:39:34.469Z" },
+    { url = "https://files.pythonhosted.org/packages/6e/6a/30d94a9674a7fe4f4744052ed6c5e083424510be1e93da5bc47569d11810/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:e7b576130c69225432866fe2f4a469a85a54ade141d96fd396dffcf607b558f8", size = 2063890, upload-time = "2025-11-04T13:39:36.053Z" },
+    { url = "https://files.pythonhosted.org/packages/50/be/76e5d46203fcb2750e542f32e6c371ffa9b8ad17364cf94bb0818dbfb50c/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6cb58b9c66f7e4179a2d5e0f849c48eff5c1fca560994d6eb6543abf955a149e", size = 2229740, upload-time = "2025-11-04T13:39:37.753Z" },
+    { url = "https://files.pythonhosted.org/packages/d3/ee/fed784df0144793489f87db310a6bbf8118d7b630ed07aa180d6067e653a/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:88942d3a3dff3afc8288c21e565e476fc278902ae4d6d134f1eeda118cc830b1", size = 2350021, upload-time = "2025-11-04T13:39:40.94Z" },
+    { url = "https://files.pythonhosted.org/packages/c8/be/8fed28dd0a180dca19e72c233cbf58efa36df055e5b9d90d64fd1740b828/pydantic_core-2.41.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f31d95a179f8d64d90f6831d71fa93290893a33148d890ba15de25642c5d075b", size = 2066378, upload-time = "2025-11-04T13:39:42.523Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/3b/698cf8ae1d536a010e05121b4958b1257f0b5522085e335360e53a6b1c8b/pydantic_core-2.41.5-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:c1df3d34aced70add6f867a8cf413e299177e0c22660cc767218373d0779487b", size = 2175761, upload-time = "2025-11-04T13:39:44.553Z" },
+    { url = "https://files.pythonhosted.org/packages/b8/ba/15d537423939553116dea94ce02f9c31be0fa9d0b806d427e0308ec17145/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:4009935984bd36bd2c774e13f9a09563ce8de4abaa7226f5108262fa3e637284", size = 2146303, upload-time = "2025-11-04T13:39:46.238Z" },
+    { url = "https://files.pythonhosted.org/packages/58/7f/0de669bf37d206723795f9c90c82966726a2ab06c336deba4735b55af431/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_armv7l.whl", hash = "sha256:34a64bc3441dc1213096a20fe27e8e128bd3ff89921706e83c0b1ac971276594", size = 2340355, upload-time = "2025-11-04T13:39:48.002Z" },
+    { url = "https://files.pythonhosted.org/packages/e5/de/e7482c435b83d7e3c3ee5ee4451f6e8973cff0eb6007d2872ce6383f6398/pydantic_core-2.41.5-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:c9e19dd6e28fdcaa5a1de679aec4141f691023916427ef9bae8584f9c2fb3b0e", size = 2319875, upload-time = "2025-11-04T13:39:49.705Z" },
+    { url = "https://files.pythonhosted.org/packages/fe/e6/8c9e81bb6dd7560e33b9053351c29f30c8194b72f2d6932888581f503482/pydantic_core-2.41.5-cp311-cp311-win32.whl", hash = "sha256:2c010c6ded393148374c0f6f0bf89d206bf3217f201faa0635dcd56bd1520f6b", size = 1987549, upload-time = "2025-11-04T13:39:51.842Z" },
+    { url = "https://files.pythonhosted.org/packages/11/66/f14d1d978ea94d1bc21fc98fcf570f9542fe55bfcc40269d4e1a21c19bf7/pydantic_core-2.41.5-cp311-cp311-win_amd64.whl", hash = "sha256:76ee27c6e9c7f16f47db7a94157112a2f3a00e958bc626e2f4ee8bec5c328fbe", size = 2011305, upload-time = "2025-11-04T13:39:53.485Z" },
+    { url = "https://files.pythonhosted.org/packages/56/d8/0e271434e8efd03186c5386671328154ee349ff0354d83c74f5caaf096ed/pydantic_core-2.41.5-cp311-cp311-win_arm64.whl", hash = "sha256:4bc36bbc0b7584de96561184ad7f012478987882ebf9f9c389b23f432ea3d90f", size = 1972902, upload-time = "2025-11-04T13:39:56.488Z" },
+    { url = "https://files.pythonhosted.org/packages/5f/5d/5f6c63eebb5afee93bcaae4ce9a898f3373ca23df3ccaef086d0233a35a7/pydantic_core-2.41.5-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:f41a7489d32336dbf2199c8c0a215390a751c5b014c2c1c5366e817202e9cdf7", size = 2110990, upload-time = "2025-11-04T13:39:58.079Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/32/9c2e8ccb57c01111e0fd091f236c7b371c1bccea0fa85247ac55b1e2b6b6/pydantic_core-2.41.5-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:070259a8818988b9a84a449a2a7337c7f430a22acc0859c6b110aa7212a6d9c0", size = 1896003, upload-time = "2025-11-04T13:39:59.956Z" },
+    { url = "https://files.pythonhosted.org/packages/68/b8/a01b53cb0e59139fbc9e4fda3e9724ede8de279097179be4ff31f1abb65a/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e96cea19e34778f8d59fe40775a7a574d95816eb150850a85a7a4c8f4b94ac69", size = 1919200, upload-time = "2025-11-04T13:40:02.241Z" },
+    { url = "https://files.pythonhosted.org/packages/38/de/8c36b5198a29bdaade07b5985e80a233a5ac27137846f3bc2d3b40a47360/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ed2e99c456e3fadd05c991f8f437ef902e00eedf34320ba2b0842bd1c3ca3a75", size = 2052578, upload-time = "2025-11-04T13:40:04.401Z" },
+    { url = "https://files.pythonhosted.org/packages/00/b5/0e8e4b5b081eac6cb3dbb7e60a65907549a1ce035a724368c330112adfdd/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:65840751b72fbfd82c3c640cff9284545342a4f1eb1586ad0636955b261b0b05", size = 2208504, upload-time = "2025-11-04T13:40:06.072Z" },
+    { url = "https://files.pythonhosted.org/packages/77/56/87a61aad59c7c5b9dc8caad5a41a5545cba3810c3e828708b3d7404f6cef/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:e536c98a7626a98feb2d3eaf75944ef6f3dbee447e1f841eae16f2f0a72d8ddc", size = 2335816, upload-time = "2025-11-04T13:40:07.835Z" },
+    { url = "https://files.pythonhosted.org/packages/0d/76/941cc9f73529988688a665a5c0ecff1112b3d95ab48f81db5f7606f522d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c", size = 2075366, upload-time = "2025-11-04T13:40:09.804Z" },
+    { url = "https://files.pythonhosted.org/packages/d3/43/ebef01f69baa07a482844faaa0a591bad1ef129253ffd0cdaa9d8a7f72d3/pydantic_core-2.41.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d38548150c39b74aeeb0ce8ee1d8e82696f4a4e16ddc6de7b1d8823f7de4b9b5", size = 2171698, upload-time = "2025-11-04T13:40:12.004Z" },
+    { url = "https://files.pythonhosted.org/packages/b1/87/41f3202e4193e3bacfc2c065fab7706ebe81af46a83d3e27605029c1f5a6/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:c23e27686783f60290e36827f9c626e63154b82b116d7fe9adba1fda36da706c", size = 2132603, upload-time = "2025-11-04T13:40:13.868Z" },
+    { url = "https://files.pythonhosted.org/packages/49/7d/4c00df99cb12070b6bccdef4a195255e6020a550d572768d92cc54dba91a/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_armv7l.whl", hash = "sha256:482c982f814460eabe1d3bb0adfdc583387bd4691ef00b90575ca0d2b6fe2294", size = 2329591, upload-time = "2025-11-04T13:40:15.672Z" },
+    { url = "https://files.pythonhosted.org/packages/cc/6a/ebf4b1d65d458f3cda6a7335d141305dfa19bdc61140a884d165a8a1bbc7/pydantic_core-2.41.5-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:bfea2a5f0b4d8d43adf9d7b8bf019fb46fdd10a2e5cde477fbcb9d1fa08c68e1", size = 2319068, upload-time = "2025-11-04T13:40:17.532Z" },
+    { url = "https://files.pythonhosted.org/packages/49/3b/774f2b5cd4192d5ab75870ce4381fd89cf218af999515baf07e7206753f0/pydantic_core-2.41.5-cp312-cp312-win32.whl", hash = "sha256:b74557b16e390ec12dca509bce9264c3bbd128f8a2c376eaa68003d7f327276d", size = 1985908, upload-time = "2025-11-04T13:40:19.309Z" },
+    { url = "https://files.pythonhosted.org/packages/86/45/00173a033c801cacf67c190fef088789394feaf88a98a7035b0e40d53dc9/pydantic_core-2.41.5-cp312-cp312-win_amd64.whl", hash = "sha256:1962293292865bca8e54702b08a4f26da73adc83dd1fcf26fbc875b35d81c815", size = 2020145, upload-time = "2025-11-04T13:40:21.548Z" },
+    { url = "https://files.pythonhosted.org/packages/f9/22/91fbc821fa6d261b376a3f73809f907cec5ca6025642c463d3488aad22fb/pydantic_core-2.41.5-cp312-cp312-win_arm64.whl", hash = "sha256:1746d4a3d9a794cacae06a5eaaccb4b8643a131d45fbc9af23e353dc0a5ba5c3", size = 1976179, upload-time = "2025-11-04T13:40:23.393Z" },
+    { url = "https://files.pythonhosted.org/packages/87/06/8806241ff1f70d9939f9af039c6c35f2360cf16e93c2ca76f184e76b1564/pydantic_core-2.41.5-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:941103c9be18ac8daf7b7adca8228f8ed6bb7a1849020f643b3a14d15b1924d9", size = 2120403, upload-time = "2025-11-04T13:40:25.248Z" },
+    { url = "https://files.pythonhosted.org/packages/94/02/abfa0e0bda67faa65fef1c84971c7e45928e108fe24333c81f3bfe35d5f5/pydantic_core-2.41.5-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:112e305c3314f40c93998e567879e887a3160bb8689ef3d2c04b6cc62c33ac34", size = 1896206, upload-time = "2025-11-04T13:40:27.099Z" },
+    { url = "https://files.pythonhosted.org/packages/15/df/a4c740c0943e93e6500f9eb23f4ca7ec9bf71b19e608ae5b579678c8d02f/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbaad15cb0c90aa221d43c00e77bb33c93e8d36e0bf74760cd00e732d10a6a0", size = 1919307, upload-time = "2025-11-04T13:40:29.806Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/e3/6324802931ae1d123528988e0e86587c2072ac2e5394b4bc2bc34b61ff6e/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:03ca43e12fab6023fc79d28ca6b39b05f794ad08ec2feccc59a339b02f2b3d33", size = 2063258, upload-time = "2025-11-04T13:40:33.544Z" },
+    { url = "https://files.pythonhosted.org/packages/c9/d4/2230d7151d4957dd79c3044ea26346c148c98fbf0ee6ebd41056f2d62ab5/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:dc799088c08fa04e43144b164feb0c13f9a0bc40503f8df3e9fde58a3c0c101e", size = 2214917, upload-time = "2025-11-04T13:40:35.479Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/9f/eaac5df17a3672fef0081b6c1bb0b82b33ee89aa5cec0d7b05f52fd4a1fa/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:97aeba56665b4c3235a0e52b2c2f5ae9cd071b8a8310ad27bddb3f7fb30e9aa2", size = 2332186, upload-time = "2025-11-04T13:40:37.436Z" },
+    { url = "https://files.pythonhosted.org/packages/cf/4e/35a80cae583a37cf15604b44240e45c05e04e86f9cfd766623149297e971/pydantic_core-2.41.5-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:406bf18d345822d6c21366031003612b9c77b3e29ffdb0f612367352aab7d586", size = 2073164, upload-time = "2025-11-04T13:40:40.289Z" },
+    { url = "https://files.pythonhosted.org/packages/bf/e3/f6e262673c6140dd3305d144d032f7bd5f7497d3871c1428521f19f9efa2/pydantic_core-2.41.5-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b93590ae81f7010dbe380cdeab6f515902ebcbefe0b9327cc4804d74e93ae69d", size = 2179146, upload-time = "2025-11-04T13:40:42.809Z" },
+    { url = "https://files.pythonhosted.org/packages/75/c7/20bd7fc05f0c6ea2056a4565c6f36f8968c0924f19b7d97bbfea55780e73/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:01a3d0ab748ee531f4ea6c3e48ad9dac84ddba4b0d82291f87248f2f9de8d740", size = 2137788, upload-time = "2025-11-04T13:40:44.752Z" },
+    { url = "https://files.pythonhosted.org/packages/3a/8d/34318ef985c45196e004bc46c6eab2eda437e744c124ef0dbe1ff2c9d06b/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_armv7l.whl", hash = "sha256:6561e94ba9dacc9c61bce40e2d6bdc3bfaa0259d3ff36ace3b1e6901936d2e3e", size = 2340133, upload-time = "2025-11-04T13:40:46.66Z" },
+    { url = "https://files.pythonhosted.org/packages/9c/59/013626bf8c78a5a5d9350d12e7697d3d4de951a75565496abd40ccd46bee/pydantic_core-2.41.5-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:915c3d10f81bec3a74fbd4faebe8391013ba61e5a1a8d48c4455b923bdda7858", size = 2324852, upload-time = "2025-11-04T13:40:48.575Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/d9/c248c103856f807ef70c18a4f986693a46a8ffe1602e5d361485da502d20/pydantic_core-2.41.5-cp313-cp313-win32.whl", hash = "sha256:650ae77860b45cfa6e2cdafc42618ceafab3a2d9a3811fcfbd3bbf8ac3c40d36", size = 1994679, upload-time = "2025-11-04T13:40:50.619Z" },
+    { url = "https://files.pythonhosted.org/packages/9e/8b/341991b158ddab181cff136acd2552c9f35bd30380422a639c0671e99a91/pydantic_core-2.41.5-cp313-cp313-win_amd64.whl", hash = "sha256:79ec52ec461e99e13791ec6508c722742ad745571f234ea6255bed38c6480f11", size = 2019766, upload-time = "2025-11-04T13:40:52.631Z" },
+    { url = "https://files.pythonhosted.org/packages/73/7d/f2f9db34af103bea3e09735bb40b021788a5e834c81eedb541991badf8f5/pydantic_core-2.41.5-cp313-cp313-win_arm64.whl", hash = "sha256:3f84d5c1b4ab906093bdc1ff10484838aca54ef08de4afa9de0f5f14d69639cd", size = 1981005, upload-time = "2025-11-04T13:40:54.734Z" },
+    { url = "https://files.pythonhosted.org/packages/ea/28/46b7c5c9635ae96ea0fbb779e271a38129df2550f763937659ee6c5dbc65/pydantic_core-2.41.5-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:3f37a19d7ebcdd20b96485056ba9e8b304e27d9904d233d7b1015db320e51f0a", size = 2119622, upload-time = "2025-11-04T13:40:56.68Z" },
+    { url = "https://files.pythonhosted.org/packages/74/1a/145646e5687e8d9a1e8d09acb278c8535ebe9e972e1f162ed338a622f193/pydantic_core-2.41.5-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1d1d9764366c73f996edd17abb6d9d7649a7eb690006ab6adbda117717099b14", size = 1891725, upload-time = "2025-11-04T13:40:58.807Z" },
+    { url = "https://files.pythonhosted.org/packages/23/04/e89c29e267b8060b40dca97bfc64a19b2a3cf99018167ea1677d96368273/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:25e1c2af0fce638d5f1988b686f3b3ea8cd7de5f244ca147c777769e798a9cd1", size = 1915040, upload-time = "2025-11-04T13:41:00.853Z" },
+    { url = "https://files.pythonhosted.org/packages/84/a3/15a82ac7bd97992a82257f777b3583d3e84bdb06ba6858f745daa2ec8a85/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:506d766a8727beef16b7adaeb8ee6217c64fc813646b424d0804d67c16eddb66", size = 2063691, upload-time = "2025-11-04T13:41:03.504Z" },
+    { url = "https://files.pythonhosted.org/packages/74/9b/0046701313c6ef08c0c1cf0e028c67c770a4e1275ca73131563c5f2a310a/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:4819fa52133c9aa3c387b3328f25c1facc356491e6135b459f1de698ff64d869", size = 2213897, upload-time = "2025-11-04T13:41:05.804Z" },
+    { url = "https://files.pythonhosted.org/packages/8a/cd/6bac76ecd1b27e75a95ca3a9a559c643b3afcd2dd62086d4b7a32a18b169/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2b761d210c9ea91feda40d25b4efe82a1707da2ef62901466a42492c028553a2", size = 2333302, upload-time = "2025-11-04T13:41:07.809Z" },
+    { url = "https://files.pythonhosted.org/packages/4c/d2/ef2074dc020dd6e109611a8be4449b98cd25e1b9b8a303c2f0fca2f2bcf7/pydantic_core-2.41.5-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:22f0fb8c1c583a3b6f24df2470833b40207e907b90c928cc8d3594b76f874375", size = 2064877, upload-time = "2025-11-04T13:41:09.827Z" },
+    { url = "https://files.pythonhosted.org/packages/18/66/e9db17a9a763d72f03de903883c057b2592c09509ccfe468187f2a2eef29/pydantic_core-2.41.5-cp314-cp314-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:2782c870e99878c634505236d81e5443092fba820f0373997ff75f90f68cd553", size = 2180680, upload-time = "2025-11-04T13:41:12.379Z" },
+    { url = "https://files.pythonhosted.org/packages/d3/9e/3ce66cebb929f3ced22be85d4c2399b8e85b622db77dad36b73c5387f8f8/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:0177272f88ab8312479336e1d777f6b124537d47f2123f89cb37e0accea97f90", size = 2138960, upload-time = "2025-11-04T13:41:14.627Z" },
+    { url = "https://files.pythonhosted.org/packages/a6/62/205a998f4327d2079326b01abee48e502ea739d174f0a89295c481a2272e/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_armv7l.whl", hash = "sha256:63510af5e38f8955b8ee5687740d6ebf7c2a0886d15a6d65c32814613681bc07", size = 2339102, upload-time = "2025-11-04T13:41:16.868Z" },
+    { url = "https://files.pythonhosted.org/packages/3c/0d/f05e79471e889d74d3d88f5bd20d0ed189ad94c2423d81ff8d0000aab4ff/pydantic_core-2.41.5-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:e56ba91f47764cc14f1daacd723e3e82d1a89d783f0f5afe9c364b8bb491ccdb", size = 2326039, upload-time = "2025-11-04T13:41:18.934Z" },
+    { url = "https://files.pythonhosted.org/packages/ec/e1/e08a6208bb100da7e0c4b288eed624a703f4d129bde2da475721a80cab32/pydantic_core-2.41.5-cp314-cp314-win32.whl", hash = "sha256:aec5cf2fd867b4ff45b9959f8b20ea3993fc93e63c7363fe6851424c8a7e7c23", size = 1995126, upload-time = "2025-11-04T13:41:21.418Z" },
+    { url = "https://files.pythonhosted.org/packages/48/5d/56ba7b24e9557f99c9237e29f5c09913c81eeb2f3217e40e922353668092/pydantic_core-2.41.5-cp314-cp314-win_amd64.whl", hash = "sha256:8e7c86f27c585ef37c35e56a96363ab8de4e549a95512445b85c96d3e2f7c1bf", size = 2015489, upload-time = "2025-11-04T13:41:24.076Z" },
+    { url = "https://files.pythonhosted.org/packages/4e/bb/f7a190991ec9e3e0ba22e4993d8755bbc4a32925c0b5b42775c03e8148f9/pydantic_core-2.41.5-cp314-cp314-win_arm64.whl", hash = "sha256:e672ba74fbc2dc8eea59fb6d4aed6845e6905fc2a8afe93175d94a83ba2a01a0", size = 1977288, upload-time = "2025-11-04T13:41:26.33Z" },
+    { url = "https://files.pythonhosted.org/packages/92/ed/77542d0c51538e32e15afe7899d79efce4b81eee631d99850edc2f5e9349/pydantic_core-2.41.5-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:8566def80554c3faa0e65ac30ab0932b9e3a5cd7f8323764303d468e5c37595a", size = 2120255, upload-time = "2025-11-04T13:41:28.569Z" },
+    { url = "https://files.pythonhosted.org/packages/bb/3d/6913dde84d5be21e284439676168b28d8bbba5600d838b9dca99de0fad71/pydantic_core-2.41.5-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:b80aa5095cd3109962a298ce14110ae16b8c1aece8b72f9dafe81cf597ad80b3", size = 1863760, upload-time = "2025-11-04T13:41:31.055Z" },
+    { url = "https://files.pythonhosted.org/packages/5a/f0/e5e6b99d4191da102f2b0eb9687aaa7f5bea5d9964071a84effc3e40f997/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3006c3dd9ba34b0c094c544c6006cc79e87d8612999f1a5d43b769b89181f23c", size = 1878092, upload-time = "2025-11-04T13:41:33.21Z" },
+    { url = "https://files.pythonhosted.org/packages/71/48/36fb760642d568925953bcc8116455513d6e34c4beaa37544118c36aba6d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:72f6c8b11857a856bcfa48c86f5368439f74453563f951e473514579d44aa612", size = 2053385, upload-time = "2025-11-04T13:41:35.508Z" },
+    { url = "https://files.pythonhosted.org/packages/20/25/92dc684dd8eb75a234bc1c764b4210cf2646479d54b47bf46061657292a8/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5cb1b2f9742240e4bb26b652a5aeb840aa4b417c7748b6f8387927bc6e45e40d", size = 2218832, upload-time = "2025-11-04T13:41:37.732Z" },
+    { url = "https://files.pythonhosted.org/packages/e2/09/f53e0b05023d3e30357d82eb35835d0f6340ca344720a4599cd663dca599/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:bd3d54f38609ff308209bd43acea66061494157703364ae40c951f83ba99a1a9", size = 2327585, upload-time = "2025-11-04T13:41:40Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/4e/2ae1aa85d6af35a39b236b1b1641de73f5a6ac4d5a7509f77b814885760c/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2ff4321e56e879ee8d2a879501c8e469414d948f4aba74a2d4593184eb326660", size = 2041078, upload-time = "2025-11-04T13:41:42.323Z" },
+    { url = "https://files.pythonhosted.org/packages/cd/13/2e215f17f0ef326fc72afe94776edb77525142c693767fc347ed6288728d/pydantic_core-2.41.5-cp314-cp314t-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:d0d2568a8c11bf8225044aa94409e21da0cb09dcdafe9ecd10250b2baad531a9", size = 2173914, upload-time = "2025-11-04T13:41:45.221Z" },
+    { url = "https://files.pythonhosted.org/packages/02/7a/f999a6dcbcd0e5660bc348a3991c8915ce6599f4f2c6ac22f01d7a10816c/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:a39455728aabd58ceabb03c90e12f71fd30fa69615760a075b9fec596456ccc3", size = 2129560, upload-time = "2025-11-04T13:41:47.474Z" },
+    { url = "https://files.pythonhosted.org/packages/3a/b1/6c990ac65e3b4c079a4fb9f5b05f5b013afa0f4ed6780a3dd236d2cbdc64/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_armv7l.whl", hash = "sha256:239edca560d05757817c13dc17c50766136d21f7cd0fac50295499ae24f90fdf", size = 2329244, upload-time = "2025-11-04T13:41:49.992Z" },
+    { url = "https://files.pythonhosted.org/packages/d9/02/3c562f3a51afd4d88fff8dffb1771b30cfdfd79befd9883ee094f5b6c0d8/pydantic_core-2.41.5-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:2a5e06546e19f24c6a96a129142a75cee553cc018ffee48a460059b1185f4470", size = 2331955, upload-time = "2025-11-04T13:41:54.079Z" },
+    { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" },
+    { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" },
+    { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" },
+    { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" },
+    { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" },
+    { url = "https://files.pythonhosted.org/packages/2e/1b/687711069de7efa6af934e74f601e2a4307365e8fdc404703afc453eab26/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f15489ba13d61f670dcc96772e733aad1a6f9c429cc27574c6cdaed82d0146ad", size = 2138905, upload-time = "2025-11-04T13:42:47.156Z" },
+    { url = "https://files.pythonhosted.org/packages/09/32/59b0c7e63e277fa7911c2fc70ccfb45ce4b98991e7ef37110663437005af/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_10_12_x86_64.whl", hash = "sha256:7da7087d756b19037bc2c06edc6c170eeef3c3bafcb8f532ff17d64dc427adfd", size = 2110495, upload-time = "2025-11-04T13:42:49.689Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/81/05e400037eaf55ad400bcd318c05bb345b57e708887f07ddb2d20e3f0e98/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-macosx_11_0_arm64.whl", hash = "sha256:aabf5777b5c8ca26f7824cb4a120a740c9588ed58df9b2d196ce92fba42ff8dc", size = 1915388, upload-time = "2025-11-04T13:42:52.215Z" },
+    { url = "https://files.pythonhosted.org/packages/6e/0d/e3549b2399f71d56476b77dbf3cf8937cec5cd70536bdc0e374a421d0599/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c007fe8a43d43b3969e8469004e9845944f1a80e6acd47c150856bb87f230c56", size = 1942879, upload-time = "2025-11-04T13:42:56.483Z" },
+    { url = "https://files.pythonhosted.org/packages/f7/07/34573da085946b6a313d7c42f82f16e8920bfd730665de2d11c0c37a74b5/pydantic_core-2.41.5-graalpy312-graalpy250_312_native-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:76d0819de158cd855d1cbb8fcafdf6f5cf1eb8e470abe056d5d161106e38062b", size = 2139017, upload-time = "2025-11-04T13:42:59.471Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/b0/1a2aa41e3b5a4ba11420aba2d091b2d17959c8d1519ece3627c371951e73/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b5819cd790dbf0c5eb9f82c73c16b39a65dd6dd4d1439dcdea7816ec9adddab8", size = 2103351, upload-time = "2025-11-04T13:43:02.058Z" },
+    { url = "https://files.pythonhosted.org/packages/a4/ee/31b1f0020baaf6d091c87900ae05c6aeae101fa4e188e1613c80e4f1ea31/pydantic_core-2.41.5-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:5a4e67afbc95fa5c34cf27d9089bca7fcab4e51e57278d710320a70b956d1b9a", size = 1925363, upload-time = "2025-11-04T13:43:05.159Z" },
+    { url = "https://files.pythonhosted.org/packages/e1/89/ab8e86208467e467a80deaca4e434adac37b10a9d134cd2f99b28a01e483/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ece5c59f0ce7d001e017643d8d24da587ea1f74f6993467d85ae8a5ef9d4f42b", size = 2135615, upload-time = "2025-11-04T13:43:08.116Z" },
+    { url = "https://files.pythonhosted.org/packages/99/0a/99a53d06dd0348b2008f2f30884b34719c323f16c3be4e6cc1203b74a91d/pydantic_core-2.41.5-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:16f80f7abe3351f8ea6858914ddc8c77e02578544a0ebc15b4c2e1a0e813b0b2", size = 2175369, upload-time = "2025-11-04T13:43:12.49Z" },
+    { url = "https://files.pythonhosted.org/packages/6d/94/30ca3b73c6d485b9bb0bc66e611cff4a7138ff9736b7e66bcf0852151636/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:33cb885e759a705b426baada1fe68cbb0a2e68e34c5d0d0289a364cf01709093", size = 2144218, upload-time = "2025-11-04T13:43:15.431Z" },
+    { url = "https://files.pythonhosted.org/packages/87/57/31b4f8e12680b739a91f472b5671294236b82586889ef764b5fbc6669238/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:c8d8b4eb992936023be7dee581270af5c6e0697a8559895f527f5b7105ecd36a", size = 2329951, upload-time = "2025-11-04T13:43:18.062Z" },
+    { url = "https://files.pythonhosted.org/packages/7d/73/3c2c8edef77b8f7310e6fb012dbc4b8551386ed575b9eb6fb2506e28a7eb/pydantic_core-2.41.5-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:242a206cd0318f95cd21bdacff3fcc3aab23e79bba5cac3db5a841c9ef9c6963", size = 2318428, upload-time = "2025-11-04T13:43:20.679Z" },
+    { url = "https://files.pythonhosted.org/packages/2f/02/8559b1f26ee0d502c74f9cca5c0d2fd97e967e083e006bbbb4e97f3a043a/pydantic_core-2.41.5-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d3a978c4f57a597908b7e697229d996d77a6d3c94901e9edee593adada95ce1a", size = 2147009, upload-time = "2025-11-04T13:43:23.286Z" },
+    { url = "https://files.pythonhosted.org/packages/5f/9b/1b3f0e9f9305839d7e84912f9e8bfbd191ed1b1ef48083609f0dabde978c/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:b2379fa7ed44ddecb5bfe4e48577d752db9fc10be00a6b7446e9663ba143de26", size = 2101980, upload-time = "2025-11-04T13:43:25.97Z" },
+    { url = "https://files.pythonhosted.org/packages/a4/ed/d71fefcb4263df0da6a85b5d8a7508360f2f2e9b3bf5814be9c8bccdccc1/pydantic_core-2.41.5-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:266fb4cbf5e3cbd0b53669a6d1b039c45e3ce651fd5442eff4d07c2cc8d66808", size = 1923865, upload-time = "2025-11-04T13:43:28.763Z" },
+    { url = "https://files.pythonhosted.org/packages/ce/3a/626b38db460d675f873e4444b4bb030453bbe7b4ba55df821d026a0493c4/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58133647260ea01e4d0500089a8c4f07bd7aa6ce109682b1426394988d8aaacc", size = 2134256, upload-time = "2025-11-04T13:43:31.71Z" },
+    { url = "https://files.pythonhosted.org/packages/83/d9/8412d7f06f616bbc053d30cb4e5f76786af3221462ad5eee1f202021eb4e/pydantic_core-2.41.5-pp311-pypy311_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:287dad91cfb551c363dc62899a80e9e14da1f0e2b6ebde82c806612ca2a13ef1", size = 2174762, upload-time = "2025-11-04T13:43:34.744Z" },
+    { url = "https://files.pythonhosted.org/packages/55/4c/162d906b8e3ba3a99354e20faa1b49a85206c47de97a639510a0e673f5da/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:03b77d184b9eb40240ae9fd676ca364ce1085f203e1b1256f8ab9984dca80a84", size = 2143141, upload-time = "2025-11-04T13:43:37.701Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/f2/f11dd73284122713f5f89fc940f370d035fa8e1e078d446b3313955157fe/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_armv7l.whl", hash = "sha256:a668ce24de96165bb239160b3d854943128f4334822900534f2fe947930e5770", size = 2330317, upload-time = "2025-11-04T13:43:40.406Z" },
+    { url = "https://files.pythonhosted.org/packages/88/9d/b06ca6acfe4abb296110fb1273a4d848a0bfb2ff65f3ee92127b3244e16b/pydantic_core-2.41.5-pp311-pypy311_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:f14f8f046c14563f8eb3f45f499cc658ab8d10072961e07225e507adb700e93f", size = 2316992, upload-time = "2025-11-04T13:43:43.602Z" },
+    { url = "https://files.pythonhosted.org/packages/36/c7/cfc8e811f061c841d7990b0201912c3556bfeb99cdcb7ed24adc8d6f8704/pydantic_core-2.41.5-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:56121965f7a4dc965bff783d70b907ddf3d57f6eba29b6d2e5dabfaf07799c51", size = 2145302, upload-time = "2025-11-04T13:43:46.64Z" },
+]
+
+[[package]]
+name = "pydantic-extra-types"
+version = "2.11.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "pydantic" },
+    { name = "typing-extensions" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/fd/35/2fee58b1316a73e025728583d3b1447218a97e621933fc776fb8c0f2ebdd/pydantic_extra_types-2.11.0.tar.gz", hash = "sha256:4e9991959d045b75feb775683437a97991d02c138e00b59176571db9ce634f0e", size = 157226, upload-time = "2025-12-31T16:18:27.944Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/fe/17/fabd56da47096d240dd45ba627bead0333b0cf0ee8ada9bec579287dadf3/pydantic_extra_types-2.11.0-py3-none-any.whl", hash = "sha256:84b864d250a0fc62535b7ec591e36f2c5b4d1325fa0017eb8cda9aeb63b374a6", size = 74296, upload-time = "2025-12-31T16:18:26.38Z" },
+]
+
+[[package]]
+name = "pygments"
+version = "2.19.2"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" },
+]
+
+[[package]]
+name = "pymediainfo"
+version = "7.0.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/4d/80/80a6fb21005b81e30f6193d45cba13857df09f5d483e0551fa6fbb3aaeed/pymediainfo-7.0.1.tar.gz", hash = "sha256:0d5df59ecc615e24c56f303b8f651579c6accab7265715e5d429186d7ba21514", size = 441563, upload-time = "2025-02-12T14:33:15.038Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/a6/4a/d895646df3d3ff617b54d7f06a02ed9d6f5b86673030a543927310e0f7ed/pymediainfo-7.0.1-py3-none-macosx_10_10_universal2.whl", hash = "sha256:286f3bf6299be0997093254e0f371855bc5cf2aaf8641d19455a011e3ee3a84d", size = 6983332, upload-time = "2025-02-12T14:42:47.412Z" },
+    { url = "https://files.pythonhosted.org/packages/77/df/bc6b5a08e908c64a81f6ff169716d408ce7380ceff44e1eceb095f49e0dc/pymediainfo-7.0.1-py3-none-manylinux_2_27_aarch64.whl", hash = "sha256:3648e2379fa67bd02433d1e28c707df3a53834dd480680615a9fefd2266f1182", size = 5768082, upload-time = "2025-02-12T14:33:10.543Z" },
+    { url = "https://files.pythonhosted.org/packages/02/10/a9bc1446a48d3a15940eb1af79a71978f368f27e2cc86f9ec3ec2d206a20/pymediainfo-7.0.1-py3-none-manylinux_2_27_x86_64.whl", hash = "sha256:cde98112f1ce486589b17a12e5da42085faea996224f7c67fa45b8c1dca719c6", size = 6001553, upload-time = "2025-02-12T14:33:12.663Z" },
+    { url = "https://files.pythonhosted.org/packages/ed/7f/c48f8514cb60c9ff9be81b6f383e73e66c7461ef854a1b62628e3c823f13/pymediainfo-7.0.1-py3-none-win32.whl", hash = "sha256:01bcaf82b72cefbf4b96f13b2547e1b2e0e734bab7173d7c33f7f01acc07c98b", size = 3125046, upload-time = "2025-02-12T15:04:39.89Z" },
+    { url = "https://files.pythonhosted.org/packages/e7/26/9d50c2a330541bc36c0ea7ce29eeff5b0c35c2624139660df8bcfa9ae3ce/pymediainfo-7.0.1-py3-none-win_amd64.whl", hash = "sha256:13224fa7590e198763b8baf072e704ea81d334e71aa32a469091460e243893c7", size = 3271232, upload-time = "2025-02-12T15:07:13.672Z" },
+]
+
+[[package]]
+name = "pymongo"
+version = "4.16.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "dnspython" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/65/9c/a4895c4b785fc9865a84a56e14b5bd21ca75aadc3dab79c14187cdca189b/pymongo-4.16.0.tar.gz", hash = "sha256:8ba8405065f6e258a6f872fe62d797a28f383a12178c7153c01ed04e845c600c", size = 2495323, upload-time = "2026-01-07T18:05:48.107Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/4d/93/c36c0998dd91ad8b5031d2e77a903d5cd705b5ba05ca92bcc8731a2c3a8d/pymongo-4.16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ed162b2227f98d5b270ecbe1d53be56c8c81db08a1a8f5f02d89c7bb4d19591d", size = 807993, upload-time = "2026-01-07T18:03:40.302Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/96/d2117d792fa9fedb2f6ccf0608db31f851e8382706d7c3c88c6ac92cc958/pymongo-4.16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4a9390dce61d705a88218f0d7b54d7e1fa1b421da8129fc7c009e029a9a6b81e", size = 808355, upload-time = "2026-01-07T18:03:42.13Z" },
+    { url = "https://files.pythonhosted.org/packages/ae/2e/e79b7b86c0dd6323d0985c201583c7921d67b842b502aae3f3327cbe3935/pymongo-4.16.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:92a232af9927710de08a6c16a9710cc1b175fb9179c0d946cd4e213b92b2a69a", size = 1182337, upload-time = "2026-01-07T18:03:44.126Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/82/07ec9966381c57d941fddc52637e9c9653e63773be410bd8605f74683084/pymongo-4.16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4d79aa147ce86aef03079096d83239580006ffb684eead593917186aee407767", size = 1200928, upload-time = "2026-01-07T18:03:45.52Z" },
+    { url = "https://files.pythonhosted.org/packages/44/15/9d45e3cc6fa428b0a3600b0c1c86b310f28c91251c41493460695ab40b6b/pymongo-4.16.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:19a1c96e7f39c7a59a9cfd4d17920cf9382f6f684faeff4649bf587dc59f8edc", size = 1239418, upload-time = "2026-01-07T18:03:47.03Z" },
+    { url = "https://files.pythonhosted.org/packages/c8/b3/f35ee51e2a3f05f673ad4f5e803ae1284c42f4413e8d121c4958f1af4eb9/pymongo-4.16.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:efe020c46ce3c3a89af6baec6569635812129df6fb6cf76d4943af3ba6ee2069", size = 1229045, upload-time = "2026-01-07T18:03:48.377Z" },
+    { url = "https://files.pythonhosted.org/packages/18/2d/1688b88d7c0a5c01da8c703dea831419435d9ce67c6ddbb0ac629c9c72d2/pymongo-4.16.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9dc2c00bed568732b89e211b6adca389053d5e6d2d5a8979e80b813c3ec4d1f9", size = 1196517, upload-time = "2026-01-07T18:03:50.205Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/c6/e89db0f23bd20757b627a5d8c73a609ffd6741887b9004ab229208a79764/pymongo-4.16.0-cp310-cp310-win32.whl", hash = "sha256:5b9c6d689bbe5beb156374508133218610e14f8c81e35bc17d7a14e30ab593e6", size = 794911, upload-time = "2026-01-07T18:03:52.701Z" },
+    { url = "https://files.pythonhosted.org/packages/37/54/e00a5e517153f310a33132375159e42dceb12bee45b51b35aa0df14f1866/pymongo-4.16.0-cp310-cp310-win_amd64.whl", hash = "sha256:2290909275c9b8f637b0a92eb9b89281e18a72922749ebb903403ab6cc7da914", size = 804801, upload-time = "2026-01-07T18:03:57.671Z" },
+    { url = "https://files.pythonhosted.org/packages/e5/0a/2572faf89195a944c99c6d756227019c8c5f4b5658ecc261c303645dfe69/pymongo-4.16.0-cp310-cp310-win_arm64.whl", hash = "sha256:6af1aaa26f0835175d2200e62205b78e7ec3ffa430682e322cc91aaa1a0dbf28", size = 797579, upload-time = "2026-01-07T18:03:59.1Z" },
+    { url = "https://files.pythonhosted.org/packages/e6/3a/907414a763c4270b581ad6d960d0c6221b74a70eda216a1fdd8fa82ba89f/pymongo-4.16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:6f2077ec24e2f1248f9cac7b9a2dfb894e50cc7939fcebfb1759f99304caabef", size = 862561, upload-time = "2026-01-07T18:04:00.628Z" },
+    { url = "https://files.pythonhosted.org/packages/8c/58/787d8225dd65cb2383c447346ea5e200ecfde89962d531111521e3b53018/pymongo-4.16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4d4f7ba040f72a9f43a44059872af5a8c8c660aa5d7f90d5344f2ed1c3c02721", size = 862923, upload-time = "2026-01-07T18:04:02.213Z" },
+    { url = "https://files.pythonhosted.org/packages/5d/a7/cc2865aae32bc77ade7b35f957a58df52680d7f8506f93c6edbf458e5738/pymongo-4.16.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8a0f73af1ea56c422b2dcfc0437459148a799ef4231c6aee189d2d4c59d6728f", size = 1426779, upload-time = "2026-01-07T18:04:03.942Z" },
+    { url = "https://files.pythonhosted.org/packages/81/25/3e96eb7998eec05382174da2fefc58d28613f46bbdf821045539d0ed60ab/pymongo-4.16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:aa30cd16ddd2f216d07ba01d9635c873e97ddb041c61cf0847254edc37d1c60e", size = 1454207, upload-time = "2026-01-07T18:04:05.387Z" },
+    { url = "https://files.pythonhosted.org/packages/86/7b/8e817a7df8c5d565d39dd4ca417a5e0ef46cc5cc19aea9405f403fec6449/pymongo-4.16.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:1d638b0b1b294d95d0fdc73688a3b61e05cc4188872818cd240d51460ccabcb5", size = 1511654, upload-time = "2026-01-07T18:04:08.458Z" },
+    { url = "https://files.pythonhosted.org/packages/39/7a/50c4d075ccefcd281cdcfccc5494caa5665b096b85e65a5d6afabb80e09e/pymongo-4.16.0-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:21d02cc10a158daa20cb040985e280e7e439832fc6b7857bff3d53ef6914ad50", size = 1496794, upload-time = "2026-01-07T18:04:10.355Z" },
+    { url = "https://files.pythonhosted.org/packages/0f/cd/ebdc1aaca5deeaf47310c369ef4083e8550e04e7bf7e3752cfb7d95fcdb8/pymongo-4.16.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:4fbb8d3552c2ad99d9e236003c0b5f96d5f05e29386ba7abae73949bfebc13dd", size = 1448371, upload-time = "2026-01-07T18:04:11.76Z" },
+    { url = "https://files.pythonhosted.org/packages/3d/c9/50fdd78c37f68ea49d590c027c96919fbccfd98f3a4cb39f84f79970bd37/pymongo-4.16.0-cp311-cp311-win32.whl", hash = "sha256:be1099a8295b1a722d03fb7b48be895d30f4301419a583dcf50e9045968a041c", size = 841024, upload-time = "2026-01-07T18:04:13.522Z" },
+    { url = "https://files.pythonhosted.org/packages/4a/dd/a3aa1ade0cf9980744db703570afac70a62c85b432c391dea0577f6da7bb/pymongo-4.16.0-cp311-cp311-win_amd64.whl", hash = "sha256:61567f712bda04c7545a037e3284b4367cad8d29b3dec84b4bf3b2147020a75b", size = 855838, upload-time = "2026-01-07T18:04:14.923Z" },
+    { url = "https://files.pythonhosted.org/packages/bf/10/9ad82593ccb895e8722e4884bad4c5ce5e8ff6683b740d7823a6c2bcfacf/pymongo-4.16.0-cp311-cp311-win_arm64.whl", hash = "sha256:c53338613043038005bf2e41a2fafa08d29cdbc0ce80891b5366c819456c1ae9", size = 845007, upload-time = "2026-01-07T18:04:17.099Z" },
+    { url = "https://files.pythonhosted.org/packages/6a/03/6dd7c53cbde98de469a3e6fb893af896dca644c476beb0f0c6342bcc368b/pymongo-4.16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:bd4911c40a43a821dfd93038ac824b756b6e703e26e951718522d29f6eb166a8", size = 917619, upload-time = "2026-01-07T18:04:19.173Z" },
+    { url = "https://files.pythonhosted.org/packages/73/e1/328915f2734ea1f355dc9b0e98505ff670f5fab8be5e951d6ed70971c6aa/pymongo-4.16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:25a6b03a68f9907ea6ec8bc7cf4c58a1b51a18e23394f962a6402f8e46d41211", size = 917364, upload-time = "2026-01-07T18:04:20.861Z" },
+    { url = "https://files.pythonhosted.org/packages/41/fe/4769874dd9812a1bc2880a9785e61eba5340da966af888dd430392790ae0/pymongo-4.16.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:91ac0cb0fe2bf17616c2039dac88d7c9a5088f5cb5829b27c9d250e053664d31", size = 1686901, upload-time = "2026-01-07T18:04:22.219Z" },
+    { url = "https://files.pythonhosted.org/packages/fa/8d/15707b9669fdc517bbc552ac60da7124dafe7ac1552819b51e97ed4038b4/pymongo-4.16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf0ec79e8ca7077f455d14d915d629385153b6a11abc0b93283ed73a8013e376", size = 1723034, upload-time = "2026-01-07T18:04:24.055Z" },
+    { url = "https://files.pythonhosted.org/packages/5b/af/3d5d16ff11d447d40c1472da1b366a31c7380d7ea2922a449c7f7f495567/pymongo-4.16.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2d0082631a7510318befc2b4fdab140481eb4b9dd62d9245e042157085da2a70", size = 1797161, upload-time = "2026-01-07T18:04:25.964Z" },
+    { url = "https://files.pythonhosted.org/packages/fb/04/725ab8664eeec73ec125b5a873448d80f5d8cf2750aaaf804cbc538a50a5/pymongo-4.16.0-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:85dc2f3444c346ea019a371e321ac868a4fab513b7a55fe368f0cc78de8177cc", size = 1780938, upload-time = "2026-01-07T18:04:28.745Z" },
+    { url = "https://files.pythonhosted.org/packages/22/50/dd7e9095e1ca35f93c3c844c92eb6eb0bc491caeb2c9bff3b32fe3c9b18f/pymongo-4.16.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dabbf3c14de75a20cc3c30bf0c6527157224a93dfb605838eabb1a2ee3be008d", size = 1714342, upload-time = "2026-01-07T18:04:30.331Z" },
+    { url = "https://files.pythonhosted.org/packages/03/c9/542776987d5c31ae8e93e92680ea2b6e5a2295f398b25756234cabf38a39/pymongo-4.16.0-cp312-cp312-win32.whl", hash = "sha256:60307bb91e0ab44e560fe3a211087748b2b5f3e31f403baf41f5b7b0a70bd104", size = 887868, upload-time = "2026-01-07T18:04:32.124Z" },
+    { url = "https://files.pythonhosted.org/packages/2e/d4/b4045a7ccc5680fb496d01edf749c7a9367cc8762fbdf7516cf807ef679b/pymongo-4.16.0-cp312-cp312-win_amd64.whl", hash = "sha256:f513b2c6c0d5c491f478422f6b5b5c27ac1af06a54c93ef8631806f7231bd92e", size = 907554, upload-time = "2026-01-07T18:04:33.685Z" },
+    { url = "https://files.pythonhosted.org/packages/60/4c/33f75713d50d5247f2258405142c0318ff32c6f8976171c4fcae87a9dbdf/pymongo-4.16.0-cp312-cp312-win_arm64.whl", hash = "sha256:dfc320f08ea9a7ec5b2403dc4e8150636f0d6150f4b9792faaae539c88e7db3b", size = 892971, upload-time = "2026-01-07T18:04:35.594Z" },
+    { url = "https://files.pythonhosted.org/packages/47/84/148d8b5da8260f4679d6665196ae04ab14ffdf06f5fe670b0ab11942951f/pymongo-4.16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d15f060bc6d0964a8bb70aba8f0cb6d11ae99715438f640cff11bbcf172eb0e8", size = 972009, upload-time = "2026-01-07T18:04:38.303Z" },
+    { url = "https://files.pythonhosted.org/packages/1e/5e/9f3a8daf583d0adaaa033a3e3e58194d2282737dc164014ff33c7a081103/pymongo-4.16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:4a19ea46a0fe71248965305a020bc076a163311aefbaa1d83e47d06fa30ac747", size = 971784, upload-time = "2026-01-07T18:04:39.669Z" },
+    { url = "https://files.pythonhosted.org/packages/ad/f2/b6c24361fcde24946198573c0176406bfd5f7b8538335f3d939487055322/pymongo-4.16.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:311d4549d6bf1f8c61d025965aebb5ba29d1481dc6471693ab91610aaffbc0eb", size = 1947174, upload-time = "2026-01-07T18:04:41.368Z" },
+    { url = "https://files.pythonhosted.org/packages/47/1a/8634192f98cf740b3d174e1018dd0350018607d5bd8ac35a666dc49c732b/pymongo-4.16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:46ffb728d92dd5b09fc034ed91acf5595657c7ca17d4cf3751322cd554153c17", size = 1991727, upload-time = "2026-01-07T18:04:42.965Z" },
+    { url = "https://files.pythonhosted.org/packages/5a/2f/0c47ac84572b28e23028a23a3798a1f725e1c23b0cf1c1424678d16aff42/pymongo-4.16.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:acda193f440dd88c2023cb00aa8bd7b93a9df59978306d14d87a8b12fe426b05", size = 2082497, upload-time = "2026-01-07T18:04:44.652Z" },
+    { url = "https://files.pythonhosted.org/packages/ba/57/9f46ef9c862b2f0cf5ce798f3541c201c574128d31ded407ba4b3918d7b6/pymongo-4.16.0-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5d9fdb386cf958e6ef6ff537d6149be7edb76c3268cd6833e6c36aa447e4443f", size = 2064947, upload-time = "2026-01-07T18:04:46.228Z" },
+    { url = "https://files.pythonhosted.org/packages/b8/56/5421c0998f38e32288100a07f6cb2f5f9f352522157c901910cb2927e211/pymongo-4.16.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:91899dd7fb9a8c50f09c3c1cf0cb73bfbe2737f511f641f19b9650deb61c00ca", size = 1980478, upload-time = "2026-01-07T18:04:48.017Z" },
+    { url = "https://files.pythonhosted.org/packages/92/93/bfc448d025e12313a937d6e1e0101b50cc9751636b4b170e600fe3203063/pymongo-4.16.0-cp313-cp313-win32.whl", hash = "sha256:2cd60cd1e05de7f01927f8e25ca26b3ea2c09de8723241e5d3bcfdc70eaff76b", size = 934672, upload-time = "2026-01-07T18:04:49.538Z" },
+    { url = "https://files.pythonhosted.org/packages/96/10/12710a5e01218d50c3dd165fd72c5ed2699285f77348a3b1a119a191d826/pymongo-4.16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3ead8a0050c53eaa55935895d6919d393d0328ec24b2b9115bdbe881aa222673", size = 959237, upload-time = "2026-01-07T18:04:51.382Z" },
+    { url = "https://files.pythonhosted.org/packages/0c/56/d288bcd1d05bc17ec69df1d0b1d67bc710c7c5dbef86033a5a4d2e2b08e6/pymongo-4.16.0-cp313-cp313-win_arm64.whl", hash = "sha256:dbbc5b254c36c37d10abb50e899bc3939bbb7ab1e7c659614409af99bd3e7675", size = 940909, upload-time = "2026-01-07T18:04:52.904Z" },
+    { url = "https://files.pythonhosted.org/packages/30/9e/4d343f8d0512002fce17915a89477b9f916bda1205729e042d8f23acf194/pymongo-4.16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:8a254d49a9ffe9d7f888e3c677eed3729b14ce85abb08cd74732cead6ccc3c66", size = 1026634, upload-time = "2026-01-07T18:04:54.359Z" },
+    { url = "https://files.pythonhosted.org/packages/c3/e3/341f88c5535df40c0450fda915f582757bb7d988cdfc92990a5e27c4c324/pymongo-4.16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:a1bf44e13cf2d44d2ea2e928a8140d5d667304abe1a61c4d55b4906f389fbe64", size = 1026252, upload-time = "2026-01-07T18:04:56.642Z" },
+    { url = "https://files.pythonhosted.org/packages/af/64/9471b22eb98f0a2ca0b8e09393de048502111b2b5b14ab1bd9e39708aab5/pymongo-4.16.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f1c5f1f818b669875d191323a48912d3fcd2e4906410e8297bb09ac50c4d5ccc", size = 2207399, upload-time = "2026-01-07T18:04:58.255Z" },
+    { url = "https://files.pythonhosted.org/packages/87/ac/47c4d50b25a02f21764f140295a2efaa583ee7f17992a5e5fa542b3a690f/pymongo-4.16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:77cfd37a43a53b02b7bd930457c7994c924ad8bbe8dff91817904bcbf291b371", size = 2260595, upload-time = "2026-01-07T18:04:59.788Z" },
+    { url = "https://files.pythonhosted.org/packages/ee/1b/0ce1ce9dd036417646b2fe6f63b58127acff3cf96eeb630c34ec9cd675ff/pymongo-4.16.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:36ef2fee50eee669587d742fb456e349634b4fcf8926208766078b089054b24b", size = 2366958, upload-time = "2026-01-07T18:05:01.942Z" },
+    { url = "https://files.pythonhosted.org/packages/3e/3c/a5a17c0d413aa9d6c17bc35c2b472e9e79cda8068ba8e93433b5f43028e9/pymongo-4.16.0-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:55f8d5a6fe2fa0b823674db2293f92d74cd5f970bc0360f409a1fc21003862d3", size = 2346081, upload-time = "2026-01-07T18:05:03.576Z" },
+    { url = "https://files.pythonhosted.org/packages/65/19/f815533d1a88fb8a3b6c6e895bb085ffdae68ccb1e6ed7102202a307f8e2/pymongo-4.16.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9caacac0dd105e2555521002e2d17afc08665187017b466b5753e84c016628e6", size = 2246053, upload-time = "2026-01-07T18:05:05.459Z" },
+    { url = "https://files.pythonhosted.org/packages/c6/88/4be3ec78828dc64b212c123114bd6ae8db5b7676085a7b43cc75d0131bd2/pymongo-4.16.0-cp314-cp314-win32.whl", hash = "sha256:c789236366525c3ee3cd6e4e450a9ff629a7d1f4d88b8e18a0aea0615fd7ecf8", size = 989461, upload-time = "2026-01-07T18:05:07.018Z" },
+    { url = "https://files.pythonhosted.org/packages/af/5a/ab8d5af76421b34db483c9c8ebc3a2199fb80ae63dc7e18f4cf1df46306a/pymongo-4.16.0-cp314-cp314-win_amd64.whl", hash = "sha256:2b0714d7764efb29bf9d3c51c964aed7c4c7237b341f9346f15ceaf8321fdb35", size = 1017803, upload-time = "2026-01-07T18:05:08.499Z" },
+    { url = "https://files.pythonhosted.org/packages/f6/f4/98d68020728ac6423cf02d17cfd8226bf6cce5690b163d30d3f705e8297e/pymongo-4.16.0-cp314-cp314-win_arm64.whl", hash = "sha256:12762e7cc0f8374a8cae3b9f9ed8dabb5d438c7b33329232dd9b7de783454033", size = 997184, upload-time = "2026-01-07T18:05:09.944Z" },
+    { url = "https://files.pythonhosted.org/packages/50/00/dc3a271daf06401825b9c1f4f76f018182c7738281ea54b9762aea0560c1/pymongo-4.16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:1c01e8a7cd0ea66baf64a118005535ab5bf9f9eb63a1b50ac3935dccf9a54abe", size = 1083303, upload-time = "2026-01-07T18:05:11.702Z" },
+    { url = "https://files.pythonhosted.org/packages/b8/4b/b5375ee21d12eababe46215011ebc63801c0d2c5ffdf203849d0d79f9852/pymongo-4.16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:4c4872299ebe315a79f7f922051061634a64fda95b6b17677ba57ef00b2ba2a4", size = 1083233, upload-time = "2026-01-07T18:05:13.182Z" },
+    { url = "https://files.pythonhosted.org/packages/ee/e3/52efa3ca900622c7dcb56c5e70f15c906816d98905c22d2ee1f84d9a7b60/pymongo-4.16.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:78037d02389745e247fe5ab0bcad5d1ab30726eaac3ad79219c7d6bbb07eec53", size = 2527438, upload-time = "2026-01-07T18:05:14.981Z" },
+    { url = "https://files.pythonhosted.org/packages/cb/96/43b1be151c734e7766c725444bcbfa1de6b60cc66bfb406203746839dd25/pymongo-4.16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c126fb72be2518395cc0465d4bae03125119136462e1945aea19840e45d89cfc", size = 2600399, upload-time = "2026-01-07T18:05:16.794Z" },
+    { url = "https://files.pythonhosted.org/packages/e7/62/fa64a5045dfe3a1cd9217232c848256e7bc0136cffb7da4735c5e0d30e40/pymongo-4.16.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f3867dc225d9423c245a51eaac2cfcd53dde8e0a8d8090bb6aed6e31bd6c2d4f", size = 2720960, upload-time = "2026-01-07T18:05:18.498Z" },
+    { url = "https://files.pythonhosted.org/packages/54/7b/01577eb97e605502821273a5bc16ce0fb0be5c978fe03acdbff471471202/pymongo-4.16.0-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f25001a955073b80510c0c3db0e043dbbc36904fd69e511c74e3d8640b8a5111", size = 2699344, upload-time = "2026-01-07T18:05:20.073Z" },
+    { url = "https://files.pythonhosted.org/packages/55/68/6ef6372d516f703479c3b6cbbc45a5afd307173b1cbaccd724e23919bb1a/pymongo-4.16.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d9885aad05f82fd7ea0c9ca505d60939746b39263fa273d0125170da8f59098", size = 2577133, upload-time = "2026-01-07T18:05:22.052Z" },
+    { url = "https://files.pythonhosted.org/packages/15/c7/b5337093bb01da852f945802328665f85f8109dbe91d81ea2afe5ff059b9/pymongo-4.16.0-cp314-cp314t-win32.whl", hash = "sha256:948152b30eddeae8355495f9943a3bf66b708295c0b9b6f467de1c620f215487", size = 1040560, upload-time = "2026-01-07T18:05:23.888Z" },
+    { url = "https://files.pythonhosted.org/packages/96/8c/5b448cd1b103f3889d5713dda37304c81020ff88e38a826e8a75ddff4610/pymongo-4.16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:f6e42c1bc985d9beee884780ae6048790eb4cd565c46251932906bdb1630034a", size = 1075081, upload-time = "2026-01-07T18:05:26.874Z" },
+    { url = "https://files.pythonhosted.org/packages/32/cd/ddc794cdc8500f6f28c119c624252fb6dfb19481c6d7ed150f13cf468a6d/pymongo-4.16.0-cp314-cp314t-win_arm64.whl", hash = "sha256:6b2a20edb5452ac8daa395890eeb076c570790dfce6b7a44d788af74c2f8cf96", size = 1047725, upload-time = "2026-01-07T18:05:28.47Z" },
+]
+
+[[package]]
+name = "pyproject-hooks"
+version = "1.2.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/e7/82/28175b2414effca1cdac8dc99f76d660e7a4fb0ceefa4b4ab8f5f6742925/pyproject_hooks-1.2.0.tar.gz", hash = "sha256:1e859bd5c40fae9448642dd871adf459e5e2084186e8d2c2a79a824c970da1f8", size = 19228, upload-time = "2024-09-29T09:24:13.293Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/bd/24/12818598c362d7f300f18e74db45963dbcb85150324092410c8b49405e42/pyproject_hooks-1.2.0-py3-none-any.whl", hash = "sha256:9e5c6bfa8dcc30091c74b0cf803c81fdd29d94f01992a7707bc97babb1141913", size = 10216, upload-time = "2024-09-29T09:24:11.978Z" },
+]
+
+[[package]]
+name = "pysocks"
+version = "1.7.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/bd/11/293dd436aea955d45fc4e8a35b6ae7270f5b8e00b53cf6c024c83b657a11/PySocks-1.7.1.tar.gz", hash = "sha256:3f8804571ebe159c380ac6de37643bb4685970655d3bba243530d6558b799aa0", size = 284429, upload-time = "2019-09-20T02:07:35.714Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/8d/59/b4572118e098ac8e46e399a1dd0f2d85403ce8bbaad9ec79373ed6badaf9/PySocks-1.7.1-py3-none-any.whl", hash = "sha256:2725bd0a9925919b9b51739eea5f9e2bae91e83288108a9ad338b2e3a4435ee5", size = 16725, upload-time = "2019-09-20T02:06:22.938Z" },
+]
+
+[[package]]
+name = "pytest"
+version = "9.0.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "colorama", marker = "sys_platform == 'win32'" },
+    { name = "exceptiongroup", marker = "python_full_version < '3.11'" },
+    { name = "iniconfig" },
+    { name = "packaging" },
+    { name = "pluggy" },
+    { name = "pygments" },
+    { name = "tomli", marker = "python_full_version < '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3b/ab/b3226f0bd7cdcf710fbede2b3548584366da3b19b5021e74f5bde2a8fa3f/pytest-9.0.2-py3-none-any.whl", hash = "sha256:711ffd45bf766d5264d487b917733b453d917afd2b0ad65223959f59089f875b", size = 374801, upload-time = "2025-12-06T21:30:49.154Z" },
+]
+
+[[package]]
+name = "pytest-asyncio"
+version = "1.3.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "backports-asyncio-runner", marker = "python_full_version < '3.11'" },
+    { name = "pytest" },
+    { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/90/2c/8af215c0f776415f3590cac4f9086ccefd6fd463befeae41cd4d3f193e5a/pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5", size = 50087, upload-time = "2025-11-10T16:07:47.256Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/e5/35/f8b19922b6a25bc0880171a2f1a003eaeb93657475193ab516fd87cac9da/pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5", size = 15075, upload-time = "2025-11-10T16:07:45.537Z" },
+]
+
+[[package]]
+name = "pytest-cov"
+version = "7.0.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "coverage", extra = ["toml"] },
+    { name = "pluggy" },
+    { name = "pytest" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/5e/f7/c933acc76f5208b3b00089573cf6a2bc26dc80a8aece8f52bb7d6b1855ca/pytest_cov-7.0.0.tar.gz", hash = "sha256:33c97eda2e049a0c5298e91f519302a1334c26ac65c1a483d6206fd458361af1", size = 54328, upload-time = "2025-09-09T10:57:02.113Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ee/49/1377b49de7d0c1ce41292161ea0f721913fa8722c19fb9c1e3aa0367eecb/pytest_cov-7.0.0-py3-none-any.whl", hash = "sha256:3b8e9558b16cc1479da72058bdecf8073661c7f57f7d3c5f22a1c23507f2d861", size = 22424, upload-time = "2025-09-09T10:57:00.695Z" },
+]
+
+[[package]]
+name = "pywin32-ctypes"
+version = "0.2.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/85/9f/01a1a99704853cb63f253eea009390c88e7131c67e66a0a02099a8c917cb/pywin32-ctypes-0.2.3.tar.gz", hash = "sha256:d162dc04946d704503b2edc4d55f3dba5c1d539ead017afa00142c38b9885755", size = 29471, upload-time = "2024-08-14T10:15:34.626Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/de/3d/8161f7711c017e01ac9f008dfddd9410dff3674334c233bde66e7ba65bbf/pywin32_ctypes-0.2.3-py3-none-any.whl", hash = "sha256:8a1513379d709975552d202d942d9837758905c8d01eb82b8bcc30918929e7b8", size = 30756, upload-time = "2024-08-14T10:15:33.187Z" },
+]
+
+[[package]]
+name = "readme-renderer"
+version = "44.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "docutils" },
+    { name = "nh3" },
+    { name = "pygments" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/5a/a9/104ec9234c8448c4379768221ea6df01260cd6c2ce13182d4eac531c8342/readme_renderer-44.0.tar.gz", hash = "sha256:8712034eabbfa6805cacf1402b4eeb2a73028f72d1166d6f5cb7f9c047c5d1e1", size = 32056, upload-time = "2024-07-08T15:00:57.805Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/e1/67/921ec3024056483db83953ae8e48079ad62b92db7880013ca77632921dd0/readme_renderer-44.0-py3-none-any.whl", hash = "sha256:2fbca89b81a08526aadf1357a8c2ae889ec05fb03f5da67f9769c9a592166151", size = 13310, upload-time = "2024-07-08T15:00:56.577Z" },
+]
+
+[[package]]
+name = "requests"
+version = "2.32.5"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "certifi" },
+    { name = "charset-normalizer" },
+    { name = "idna" },
+    { name = "urllib3" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" },
+]
+
+[[package]]
+name = "requests-toolbelt"
+version = "1.0.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "requests" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", size = 206888, upload-time = "2023-05-01T04:11:33.229Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06", size = 54481, upload-time = "2023-05-01T04:11:28.427Z" },
+]
+
+[[package]]
+name = "rfc3986"
+version = "2.0.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/85/40/1520d68bfa07ab5a6f065a186815fb6610c86fe957bc065754e47f7b0840/rfc3986-2.0.0.tar.gz", hash = "sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c", size = 49026, upload-time = "2022-01-10T00:52:30.832Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ff/9a/9afaade874b2fa6c752c36f1548f718b5b83af81ed9b76628329dab81c1b/rfc3986-2.0.0-py2.py3-none-any.whl", hash = "sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd", size = 31326, upload-time = "2022-01-10T00:52:29.594Z" },
+]
+
+[[package]]
+name = "rich"
+version = "14.3.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "markdown-it-py" },
+    { name = "pygments" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/74/99/a4cab2acbb884f80e558b0771e97e21e939c5dfb460f488d19df485e8298/rich-14.3.2.tar.gz", hash = "sha256:e712f11c1a562a11843306f5ed999475f09ac31ffb64281f73ab29ffdda8b3b8", size = 230143, upload-time = "2026-02-01T16:20:47.908Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ef/45/615f5babd880b4bd7d405cc0dc348234c5ffb6ed1ea33e152ede08b2072d/rich-14.3.2-py3-none-any.whl", hash = "sha256:08e67c3e90884651da3239ea668222d19bea7b589149d8014a21c633420dbb69", size = 309963, upload-time = "2026-02-01T16:20:46.078Z" },
+]
+
+[[package]]
+name = "secretstorage"
+version = "3.5.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "cryptography" },
+    { name = "jeepney" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/1c/03/e834bcd866f2f8a49a85eaff47340affa3bfa391ee9912a952a1faa68c7b/secretstorage-3.5.0.tar.gz", hash = "sha256:f04b8e4689cbce351744d5537bf6b1329c6fc68f91fa666f60a380edddcd11be", size = 19884, upload-time = "2025-11-23T19:02:53.191Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", hash = "sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", size = 15554, upload-time = "2025-11-23T19:02:51.545Z" },
+]
+
+[[package]]
+name = "shellingham"
+version = "1.5.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/58/15/8b3609fd3830ef7b27b655beb4b4e9c62313a4e8da8c676e142cc210d58e/shellingham-1.5.4.tar.gz", hash = "sha256:8dbca0739d487e5bd35ab3ca4b36e11c4078f3a234bfce294b0a0291363404de", size = 10310, upload-time = "2023-10-24T04:13:40.426Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", hash = "sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", size = 9755, upload-time = "2023-10-24T04:13:38.866Z" },
+]
+
+[[package]]
+name = "snowballstemmer"
+version = "3.0.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/75/a7/9810d872919697c9d01295633f5d574fb416d47e535f258272ca1f01f447/snowballstemmer-3.0.1.tar.gz", hash = "sha256:6d5eeeec8e9f84d4d56b847692bacf79bc2c8e90c7f80ca4444ff8b6f2e52895", size = 105575, upload-time = "2025-05-09T16:34:51.843Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/c8/78/3565d011c61f5a43488987ee32b6f3f656e7f107ac2782dd57bdd7d91d9a/snowballstemmer-3.0.1-py3-none-any.whl", hash = "sha256:6cd7b3897da8d6c9ffb968a6781fa6532dce9c3618a4b127d920dab764a19064", size = 103274, upload-time = "2025-05-09T16:34:50.371Z" },
+]
+
+[[package]]
+name = "sphinx"
+version = "7.4.7"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "alabaster" },
+    { name = "babel" },
+    { name = "colorama", marker = "sys_platform == 'win32'" },
+    { name = "docutils" },
+    { name = "imagesize" },
+    { name = "jinja2" },
+    { name = "packaging" },
+    { name = "pygments" },
+    { name = "requests" },
+    { name = "snowballstemmer" },
+    { name = "sphinxcontrib-applehelp" },
+    { name = "sphinxcontrib-devhelp" },
+    { name = "sphinxcontrib-htmlhelp" },
+    { name = "sphinxcontrib-jsmath" },
+    { name = "sphinxcontrib-qthelp" },
+    { name = "sphinxcontrib-serializinghtml" },
+    { name = "tomli", marker = "python_full_version < '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/5b/be/50e50cb4f2eff47df05673d361095cafd95521d2a22521b920c67a372dcb/sphinx-7.4.7.tar.gz", hash = "sha256:242f92a7ea7e6c5b406fdc2615413890ba9f699114a9c09192d7dfead2ee9cfe", size = 8067911, upload-time = "2024-07-20T14:46:56.059Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/0d/ef/153f6803c5d5f8917dbb7f7fcf6d34a871ede3296fa89c2c703f5f8a6c8e/sphinx-7.4.7-py3-none-any.whl", hash = "sha256:c2419e2135d11f1951cd994d6eb18a1835bd8fdd8429f9ca375dc1f3281bd239", size = 3401624, upload-time = "2024-07-20T14:46:52.142Z" },
+]
+
+[[package]]
+name = "sphinx-autobuild"
+version = "2024.10.3"
+source = { registry = "https://pypi.org/simple" }
+resolution-markers = [
+    "python_full_version < '3.11'",
+]
+dependencies = [
+    { name = "colorama", marker = "python_full_version < '3.11'" },
+    { name = "sphinx", marker = "python_full_version < '3.11'" },
+    { name = "starlette", marker = "python_full_version < '3.11'" },
+    { name = "uvicorn", marker = "python_full_version < '3.11'" },
+    { name = "watchfiles", marker = "python_full_version < '3.11'" },
+    { name = "websockets", marker = "python_full_version < '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/a5/2c/155e1de2c1ba96a72e5dba152c509a8b41e047ee5c2def9e9f0d812f8be7/sphinx_autobuild-2024.10.3.tar.gz", hash = "sha256:248150f8f333e825107b6d4b86113ab28fa51750e5f9ae63b59dc339be951fb1", size = 14023, upload-time = "2024-10-02T23:15:30.172Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/18/c0/eba125db38c84d3c74717008fd3cb5000b68cd7e2cbafd1349c6a38c3d3b/sphinx_autobuild-2024.10.3-py3-none-any.whl", hash = "sha256:158e16c36f9d633e613c9aaf81c19b0fc458ca78b112533b20dafcda430d60fa", size = 11908, upload-time = "2024-10-02T23:15:28.739Z" },
+]
+
+[[package]]
+name = "sphinx-autobuild"
+version = "2025.8.25"
+source = { registry = "https://pypi.org/simple" }
+resolution-markers = [
+    "python_full_version >= '3.11'",
+]
+dependencies = [
+    { name = "colorama", marker = "python_full_version >= '3.11'" },
+    { name = "sphinx", marker = "python_full_version >= '3.11'" },
+    { name = "starlette", marker = "python_full_version >= '3.11'" },
+    { name = "uvicorn", marker = "python_full_version >= '3.11'" },
+    { name = "watchfiles", marker = "python_full_version >= '3.11'" },
+    { name = "websockets", marker = "python_full_version >= '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/e0/3c/a59a3a453d4133777f7ed2e83c80b7dc817d43c74b74298ca0af869662ad/sphinx_autobuild-2025.8.25.tar.gz", hash = "sha256:9cf5aab32853c8c31af572e4fecdc09c997e2b8be5a07daf2a389e270e85b213", size = 15200, upload-time = "2025-08-25T18:44:55.436Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/d7/20/56411b52f917696995f5ad27d2ea7e9492c84a043c5b49a3a3173573cd93/sphinx_autobuild-2025.8.25-py3-none-any.whl", hash = "sha256:b750ac7d5a18603e4665294323fd20f6dcc0a984117026d1986704fa68f0379a", size = 12535, upload-time = "2025-08-25T18:44:54.164Z" },
+]
+
+[[package]]
+name = "sphinx-copybutton"
+version = "0.5.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "sphinx" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/fc/2b/a964715e7f5295f77509e59309959f4125122d648f86b4fe7d70ca1d882c/sphinx-copybutton-0.5.2.tar.gz", hash = "sha256:4cf17c82fb9646d1bc9ca92ac280813a3b605d8c421225fd9913154103ee1fbd", size = 23039, upload-time = "2023-04-14T08:10:22.998Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/9e/48/1ea60e74949eecb12cdd6ac43987f9fd331156388dcc2319b45e2ebb81bf/sphinx_copybutton-0.5.2-py3-none-any.whl", hash = "sha256:fb543fd386d917746c9a2c50360c7905b605726b9355cd26e9974857afeae06e", size = 13343, upload-time = "2023-04-14T08:10:20.844Z" },
+]
+
+[[package]]
+name = "sphinx-immaterial"
+version = "0.13.9"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "appdirs" },
+    { name = "markupsafe" },
+    { name = "pydantic" },
+    { name = "pydantic-extra-types" },
+    { name = "requests" },
+    { name = "sphinx" },
+    { name = "typing-extensions" },
+]
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3d/42/6e958fc5d80ccd18c87d1b7d7c0e17fed04c0ed8a72933dd41c8643622d4/sphinx_immaterial-0.13.9-py3-none-any.whl", hash = "sha256:5ea92d2ddc6befcd0fedbd3e6766ea4746e94d9a8a5cc0ab092a946e1fde4254", size = 13742592, upload-time = "2026-02-06T16:53:11.262Z" },
+]
+
+[[package]]
+name = "sphinxcontrib-applehelp"
+version = "2.0.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/ba/6e/b837e84a1a704953c62ef8776d45c3e8d759876b4a84fe14eba2859106fe/sphinxcontrib_applehelp-2.0.0.tar.gz", hash = "sha256:2f29ef331735ce958efa4734873f084941970894c6090408b079c61b2e1c06d1", size = 20053, upload-time = "2024-07-29T01:09:00.465Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/5d/85/9ebeae2f76e9e77b952f4b274c27238156eae7979c5421fba91a28f4970d/sphinxcontrib_applehelp-2.0.0-py3-none-any.whl", hash = "sha256:4cd3f0ec4ac5dd9c17ec65e9ab272c9b867ea77425228e68ecf08d6b28ddbdb5", size = 119300, upload-time = "2024-07-29T01:08:58.99Z" },
+]
+
+[[package]]
+name = "sphinxcontrib-devhelp"
+version = "2.0.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/f6/d2/5beee64d3e4e747f316bae86b55943f51e82bb86ecd325883ef65741e7da/sphinxcontrib_devhelp-2.0.0.tar.gz", hash = "sha256:411f5d96d445d1d73bb5d52133377b4248ec79db5c793ce7dbe59e074b4dd1ad", size = 12967, upload-time = "2024-07-29T01:09:23.417Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/35/7a/987e583882f985fe4d7323774889ec58049171828b58c2217e7f79cdf44e/sphinxcontrib_devhelp-2.0.0-py3-none-any.whl", hash = "sha256:aefb8b83854e4b0998877524d1029fd3e6879210422ee3780459e28a1f03a8a2", size = 82530, upload-time = "2024-07-29T01:09:21.945Z" },
+]
+
+[[package]]
+name = "sphinxcontrib-htmlhelp"
+version = "2.1.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/43/93/983afd9aa001e5201eab16b5a444ed5b9b0a7a010541e0ddfbbfd0b2470c/sphinxcontrib_htmlhelp-2.1.0.tar.gz", hash = "sha256:c9e2916ace8aad64cc13a0d233ee22317f2b9025b9cf3295249fa985cc7082e9", size = 22617, upload-time = "2024-07-29T01:09:37.889Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/0a/7b/18a8c0bcec9182c05a0b3ec2a776bba4ead82750a55ff798e8d406dae604/sphinxcontrib_htmlhelp-2.1.0-py3-none-any.whl", hash = "sha256:166759820b47002d22914d64a075ce08f4c46818e17cfc9470a9786b759b19f8", size = 98705, upload-time = "2024-07-29T01:09:36.407Z" },
+]
+
+[[package]]
+name = "sphinxcontrib-jsmath"
+version = "1.0.1"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/b2/e8/9ed3830aeed71f17c026a07a5097edcf44b692850ef215b161b8ad875729/sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8", size = 5787, upload-time = "2019-01-21T16:10:16.347Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178", size = 5071, upload-time = "2019-01-21T16:10:14.333Z" },
+]
+
+[[package]]
+name = "sphinxcontrib-qthelp"
+version = "2.0.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/68/bc/9104308fc285eb3e0b31b67688235db556cd5b0ef31d96f30e45f2e51cae/sphinxcontrib_qthelp-2.0.0.tar.gz", hash = "sha256:4fe7d0ac8fc171045be623aba3e2a8f613f8682731f9153bb2e40ece16b9bbab", size = 17165, upload-time = "2024-07-29T01:09:56.435Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/27/83/859ecdd180cacc13b1f7e857abf8582a64552ea7a061057a6c716e790fce/sphinxcontrib_qthelp-2.0.0-py3-none-any.whl", hash = "sha256:b18a828cdba941ccd6ee8445dbe72ffa3ef8cbe7505d8cd1fa0d42d3f2d5f3eb", size = 88743, upload-time = "2024-07-29T01:09:54.885Z" },
+]
+
+[[package]]
+name = "sphinxcontrib-serializinghtml"
+version = "2.0.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/3b/44/6716b257b0aa6bfd51a1b31665d1c205fb12cb5ad56de752dfa15657de2f/sphinxcontrib_serializinghtml-2.0.0.tar.gz", hash = "sha256:e9d912827f872c029017a53f0ef2180b327c3f7fd23c87229f7a8e8b70031d4d", size = 16080, upload-time = "2024-07-29T01:10:09.332Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/52/a7/d2782e4e3f77c8450f727ba74a8f12756d5ba823d81b941f1b04da9d033a/sphinxcontrib_serializinghtml-2.0.0-py3-none-any.whl", hash = "sha256:6e2cb0eef194e10c27ec0023bfeb25badbbb5868244cf5bc5bdc04e4464bf331", size = 92072, upload-time = "2024-07-29T01:10:08.203Z" },
+]
+
+[[package]]
+name = "starlette"
+version = "0.52.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "anyio" },
+    { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/c4/68/79977123bb7be889ad680d79a40f339082c1978b5cfcf62c2d8d196873ac/starlette-0.52.1.tar.gz", hash = "sha256:834edd1b0a23167694292e94f597773bc3f89f362be6effee198165a35d62933", size = 2653702, upload-time = "2026-01-18T13:34:11.062Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/81/0d/13d1d239a25cbfb19e740db83143e95c772a1fe10202dda4b76792b114dd/starlette-0.52.1-py3-none-any.whl", hash = "sha256:0029d43eb3d273bc4f83a08720b4912ea4b071087a3b48db01b7c839f7954d74", size = 74272, upload-time = "2026-01-18T13:34:09.188Z" },
+]
+
+[[package]]
+name = "tomli"
+version = "2.4.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/82/30/31573e9457673ab10aa432461bee537ce6cef177667deca369efb79df071/tomli-2.4.0.tar.gz", hash = "sha256:aa89c3f6c277dd275d8e243ad24f3b5e701491a860d5121f2cdd399fbb31fc9c", size = 17477, upload-time = "2026-01-11T11:22:38.165Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3c/d9/3dc2289e1f3b32eb19b9785b6a006b28ee99acb37d1d47f78d4c10e28bf8/tomli-2.4.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b5ef256a3fd497d4973c11bf142e9ed78b150d36f5773f1ca6088c230ffc5867", size = 153663, upload-time = "2026-01-11T11:21:45.27Z" },
+    { url = "https://files.pythonhosted.org/packages/51/32/ef9f6845e6b9ca392cd3f64f9ec185cc6f09f0a2df3db08cbe8809d1d435/tomli-2.4.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5572e41282d5268eb09a697c89a7bee84fae66511f87533a6f88bd2f7b652da9", size = 148469, upload-time = "2026-01-11T11:21:46.873Z" },
+    { url = "https://files.pythonhosted.org/packages/d6/c2/506e44cce89a8b1b1e047d64bd495c22c9f71f21e05f380f1a950dd9c217/tomli-2.4.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:551e321c6ba03b55676970b47cb1b73f14a0a4dce6a3e1a9458fd6d921d72e95", size = 236039, upload-time = "2026-01-11T11:21:48.503Z" },
+    { url = "https://files.pythonhosted.org/packages/b3/40/e1b65986dbc861b7e986e8ec394598187fa8aee85b1650b01dd925ca0be8/tomli-2.4.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e3f639a7a8f10069d0e15408c0b96a2a828cfdec6fca05296ebcdcc28ca7c76", size = 243007, upload-time = "2026-01-11T11:21:49.456Z" },
+    { url = "https://files.pythonhosted.org/packages/9c/6f/6e39ce66b58a5b7ae572a0f4352ff40c71e8573633deda43f6a379d56b3e/tomli-2.4.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1b168f2731796b045128c45982d3a4874057626da0e2ef1fdd722848b741361d", size = 240875, upload-time = "2026-01-11T11:21:50.755Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/ad/cb089cb190487caa80204d503c7fd0f4d443f90b95cf4ef5cf5aa0f439b0/tomli-2.4.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:133e93646ec4300d651839d382d63edff11d8978be23da4cc106f5a18b7d0576", size = 246271, upload-time = "2026-01-11T11:21:51.81Z" },
+    { url = "https://files.pythonhosted.org/packages/0b/63/69125220e47fd7a3a27fd0de0c6398c89432fec41bc739823bcc66506af6/tomli-2.4.0-cp311-cp311-win32.whl", hash = "sha256:b6c78bdf37764092d369722d9946cb65b8767bfa4110f902a1b2542d8d173c8a", size = 96770, upload-time = "2026-01-11T11:21:52.647Z" },
+    { url = "https://files.pythonhosted.org/packages/1e/0d/a22bb6c83f83386b0008425a6cd1fa1c14b5f3dd4bad05e98cf3dbbf4a64/tomli-2.4.0-cp311-cp311-win_amd64.whl", hash = "sha256:d3d1654e11d724760cdb37a3d7691f0be9db5fbdaef59c9f532aabf87006dbaa", size = 107626, upload-time = "2026-01-11T11:21:53.459Z" },
+    { url = "https://files.pythonhosted.org/packages/2f/6d/77be674a3485e75cacbf2ddba2b146911477bd887dda9d8c9dfb2f15e871/tomli-2.4.0-cp311-cp311-win_arm64.whl", hash = "sha256:cae9c19ed12d4e8f3ebf46d1a75090e4c0dc16271c5bce1c833ac168f08fb614", size = 94842, upload-time = "2026-01-11T11:21:54.831Z" },
+    { url = "https://files.pythonhosted.org/packages/3c/43/7389a1869f2f26dba52404e1ef13b4784b6b37dac93bac53457e3ff24ca3/tomli-2.4.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:920b1de295e72887bafa3ad9f7a792f811847d57ea6b1215154030cf131f16b1", size = 154894, upload-time = "2026-01-11T11:21:56.07Z" },
+    { url = "https://files.pythonhosted.org/packages/e9/05/2f9bf110b5294132b2edf13fe6ca6ae456204f3d749f623307cbb7a946f2/tomli-2.4.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:7d6d9a4aee98fac3eab4952ad1d73aee87359452d1c086b5ceb43ed02ddb16b8", size = 149053, upload-time = "2026-01-11T11:21:57.467Z" },
+    { url = "https://files.pythonhosted.org/packages/e8/41/1eda3ca1abc6f6154a8db4d714a4d35c4ad90adc0bcf700657291593fbf3/tomli-2.4.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:36b9d05b51e65b254ea6c2585b59d2c4cb91c8a3d91d0ed0f17591a29aaea54a", size = 243481, upload-time = "2026-01-11T11:21:58.661Z" },
+    { url = "https://files.pythonhosted.org/packages/d2/6d/02ff5ab6c8868b41e7d4b987ce2b5f6a51d3335a70aa144edd999e055a01/tomli-2.4.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1c8a885b370751837c029ef9bc014f27d80840e48bac415f3412e6593bbc18c1", size = 251720, upload-time = "2026-01-11T11:22:00.178Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/57/0405c59a909c45d5b6f146107c6d997825aa87568b042042f7a9c0afed34/tomli-2.4.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8768715ffc41f0008abe25d808c20c3d990f42b6e2e58305d5da280ae7d1fa3b", size = 247014, upload-time = "2026-01-11T11:22:01.238Z" },
+    { url = "https://files.pythonhosted.org/packages/2c/0e/2e37568edd944b4165735687cbaf2fe3648129e440c26d02223672ee0630/tomli-2.4.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:7b438885858efd5be02a9a133caf5812b8776ee0c969fea02c45e8e3f296ba51", size = 251820, upload-time = "2026-01-11T11:22:02.727Z" },
+    { url = "https://files.pythonhosted.org/packages/5a/1c/ee3b707fdac82aeeb92d1a113f803cf6d0f37bdca0849cb489553e1f417a/tomli-2.4.0-cp312-cp312-win32.whl", hash = "sha256:0408e3de5ec77cc7f81960c362543cbbd91ef883e3138e81b729fc3eea5b9729", size = 97712, upload-time = "2026-01-11T11:22:03.777Z" },
+    { url = "https://files.pythonhosted.org/packages/69/13/c07a9177d0b3bab7913299b9278845fc6eaaca14a02667c6be0b0a2270c8/tomli-2.4.0-cp312-cp312-win_amd64.whl", hash = "sha256:685306e2cc7da35be4ee914fd34ab801a6acacb061b6a7abca922aaf9ad368da", size = 108296, upload-time = "2026-01-11T11:22:04.86Z" },
+    { url = "https://files.pythonhosted.org/packages/18/27/e267a60bbeeee343bcc279bb9e8fbed0cbe224bc7b2a3dc2975f22809a09/tomli-2.4.0-cp312-cp312-win_arm64.whl", hash = "sha256:5aa48d7c2356055feef06a43611fc401a07337d5b006be13a30f6c58f869e3c3", size = 94553, upload-time = "2026-01-11T11:22:05.854Z" },
+    { url = "https://files.pythonhosted.org/packages/34/91/7f65f9809f2936e1f4ce6268ae1903074563603b2a2bd969ebbda802744f/tomli-2.4.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:84d081fbc252d1b6a982e1870660e7330fb8f90f676f6e78b052ad4e64714bf0", size = 154915, upload-time = "2026-01-11T11:22:06.703Z" },
+    { url = "https://files.pythonhosted.org/packages/20/aa/64dd73a5a849c2e8f216b755599c511badde80e91e9bc2271baa7b2cdbb1/tomli-2.4.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9a08144fa4cba33db5255f9b74f0b89888622109bd2776148f2597447f92a94e", size = 149038, upload-time = "2026-01-11T11:22:07.56Z" },
+    { url = "https://files.pythonhosted.org/packages/9e/8a/6d38870bd3d52c8d1505ce054469a73f73a0fe62c0eaf5dddf61447e32fa/tomli-2.4.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c73add4bb52a206fd0c0723432db123c0c75c280cbd67174dd9d2db228ebb1b4", size = 242245, upload-time = "2026-01-11T11:22:08.344Z" },
+    { url = "https://files.pythonhosted.org/packages/59/bb/8002fadefb64ab2669e5b977df3f5e444febea60e717e755b38bb7c41029/tomli-2.4.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:1fb2945cbe303b1419e2706e711b7113da57b7db31ee378d08712d678a34e51e", size = 250335, upload-time = "2026-01-11T11:22:09.951Z" },
+    { url = "https://files.pythonhosted.org/packages/a5/3d/4cdb6f791682b2ea916af2de96121b3cb1284d7c203d97d92d6003e91c8d/tomli-2.4.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:bbb1b10aa643d973366dc2cb1ad94f99c1726a02343d43cbc011edbfac579e7c", size = 245962, upload-time = "2026-01-11T11:22:11.27Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/4a/5f25789f9a460bd858ba9756ff52d0830d825b458e13f754952dd15fb7bb/tomli-2.4.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:4cbcb367d44a1f0c2be408758b43e1ffb5308abe0ea222897d6bfc8e8281ef2f", size = 250396, upload-time = "2026-01-11T11:22:12.325Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/2f/b73a36fea58dfa08e8b3a268750e6853a6aac2a349241a905ebd86f3047a/tomli-2.4.0-cp313-cp313-win32.whl", hash = "sha256:7d49c66a7d5e56ac959cb6fc583aff0651094ec071ba9ad43df785abc2320d86", size = 97530, upload-time = "2026-01-11T11:22:13.865Z" },
+    { url = "https://files.pythonhosted.org/packages/3b/af/ca18c134b5d75de7e8dc551c5234eaba2e8e951f6b30139599b53de9c187/tomli-2.4.0-cp313-cp313-win_amd64.whl", hash = "sha256:3cf226acb51d8f1c394c1b310e0e0e61fecdd7adcb78d01e294ac297dd2e7f87", size = 108227, upload-time = "2026-01-11T11:22:15.224Z" },
+    { url = "https://files.pythonhosted.org/packages/22/c3/b386b832f209fee8073c8138ec50f27b4460db2fdae9ffe022df89a57f9b/tomli-2.4.0-cp313-cp313-win_arm64.whl", hash = "sha256:d20b797a5c1ad80c516e41bc1fb0443ddb5006e9aaa7bda2d71978346aeb9132", size = 94748, upload-time = "2026-01-11T11:22:16.009Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/c4/84047a97eb1004418bc10bdbcfebda209fca6338002eba2dc27cc6d13563/tomli-2.4.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:26ab906a1eb794cd4e103691daa23d95c6919cc2fa9160000ac02370cc9dd3f6", size = 154725, upload-time = "2026-01-11T11:22:17.269Z" },
+    { url = "https://files.pythonhosted.org/packages/a8/5d/d39038e646060b9d76274078cddf146ced86dc2b9e8bbf737ad5983609a0/tomli-2.4.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:20cedb4ee43278bc4f2fee6cb50daec836959aadaf948db5172e776dd3d993fc", size = 148901, upload-time = "2026-01-11T11:22:18.287Z" },
+    { url = "https://files.pythonhosted.org/packages/73/e5/383be1724cb30f4ce44983d249645684a48c435e1cd4f8b5cded8a816d3c/tomli-2.4.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:39b0b5d1b6dd03684b3fb276407ebed7090bbec989fa55838c98560c01113b66", size = 243375, upload-time = "2026-01-11T11:22:19.154Z" },
+    { url = "https://files.pythonhosted.org/packages/31/f0/bea80c17971c8d16d3cc109dc3585b0f2ce1036b5f4a8a183789023574f2/tomli-2.4.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a26d7ff68dfdb9f87a016ecfd1e1c2bacbe3108f4e0f8bcd2228ef9a766c787d", size = 250639, upload-time = "2026-01-11T11:22:20.168Z" },
+    { url = "https://files.pythonhosted.org/packages/2c/8f/2853c36abbb7608e3f945d8a74e32ed3a74ee3a1f468f1ffc7d1cb3abba6/tomli-2.4.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:20ffd184fb1df76a66e34bd1b36b4a4641bd2b82954befa32fe8163e79f1a702", size = 246897, upload-time = "2026-01-11T11:22:21.544Z" },
+    { url = "https://files.pythonhosted.org/packages/49/f0/6c05e3196ed5337b9fe7ea003e95fd3819a840b7a0f2bf5a408ef1dad8ed/tomli-2.4.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:75c2f8bbddf170e8effc98f5e9084a8751f8174ea6ccf4fca5398436e0320bc8", size = 254697, upload-time = "2026-01-11T11:22:23.058Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/f5/2922ef29c9f2951883525def7429967fc4d8208494e5ab524234f06b688b/tomli-2.4.0-cp314-cp314-win32.whl", hash = "sha256:31d556d079d72db7c584c0627ff3a24c5d3fb4f730221d3444f3efb1b2514776", size = 98567, upload-time = "2026-01-11T11:22:24.033Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/31/22b52e2e06dd2a5fdbc3ee73226d763b184ff21fc24e20316a44ccc4d96b/tomli-2.4.0-cp314-cp314-win_amd64.whl", hash = "sha256:43e685b9b2341681907759cf3a04e14d7104b3580f808cfde1dfdb60ada85475", size = 108556, upload-time = "2026-01-11T11:22:25.378Z" },
+    { url = "https://files.pythonhosted.org/packages/48/3d/5058dff3255a3d01b705413f64f4306a141a8fd7a251e5a495e3f192a998/tomli-2.4.0-cp314-cp314-win_arm64.whl", hash = "sha256:3d895d56bd3f82ddd6faaff993c275efc2ff38e52322ea264122d72729dca2b2", size = 96014, upload-time = "2026-01-11T11:22:26.138Z" },
+    { url = "https://files.pythonhosted.org/packages/b8/4e/75dab8586e268424202d3a1997ef6014919c941b50642a1682df43204c22/tomli-2.4.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:5b5807f3999fb66776dbce568cc9a828544244a8eb84b84b9bafc080c99597b9", size = 163339, upload-time = "2026-01-11T11:22:27.143Z" },
+    { url = "https://files.pythonhosted.org/packages/06/e3/b904d9ab1016829a776d97f163f183a48be6a4deb87304d1e0116a349519/tomli-2.4.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c084ad935abe686bd9c898e62a02a19abfc9760b5a79bc29644463eaf2840cb0", size = 159490, upload-time = "2026-01-11T11:22:28.399Z" },
+    { url = "https://files.pythonhosted.org/packages/e3/5a/fc3622c8b1ad823e8ea98a35e3c632ee316d48f66f80f9708ceb4f2a0322/tomli-2.4.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0f2e3955efea4d1cfbcb87bc321e00dc08d2bcb737fd1d5e398af111d86db5df", size = 269398, upload-time = "2026-01-11T11:22:29.345Z" },
+    { url = "https://files.pythonhosted.org/packages/fd/33/62bd6152c8bdd4c305ad9faca48f51d3acb2df1f8791b1477d46ff86e7f8/tomli-2.4.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e0fe8a0b8312acf3a88077a0802565cb09ee34107813bba1c7cd591fa6cfc8d", size = 276515, upload-time = "2026-01-11T11:22:30.327Z" },
+    { url = "https://files.pythonhosted.org/packages/4b/ff/ae53619499f5235ee4211e62a8d7982ba9e439a0fb4f2f351a93d67c1dd2/tomli-2.4.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:413540dce94673591859c4c6f794dfeaa845e98bf35d72ed59636f869ef9f86f", size = 273806, upload-time = "2026-01-11T11:22:32.56Z" },
+    { url = "https://files.pythonhosted.org/packages/47/71/cbca7787fa68d4d0a9f7072821980b39fbb1b6faeb5f5cf02f4a5559fa28/tomli-2.4.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0dc56fef0e2c1c470aeac5b6ca8cc7b640bb93e92d9803ddaf9ea03e198f5b0b", size = 281340, upload-time = "2026-01-11T11:22:33.505Z" },
+    { url = "https://files.pythonhosted.org/packages/f5/00/d595c120963ad42474cf6ee7771ad0d0e8a49d0f01e29576ee9195d9ecdf/tomli-2.4.0-cp314-cp314t-win32.whl", hash = "sha256:d878f2a6707cc9d53a1be1414bbb419e629c3d6e67f69230217bb663e76b5087", size = 108106, upload-time = "2026-01-11T11:22:34.451Z" },
+    { url = "https://files.pythonhosted.org/packages/de/69/9aa0c6a505c2f80e519b43764f8b4ba93b5a0bbd2d9a9de6e2b24271b9a5/tomli-2.4.0-cp314-cp314t-win_amd64.whl", hash = "sha256:2add28aacc7425117ff6364fe9e06a183bb0251b03f986df0e78e974047571fd", size = 120504, upload-time = "2026-01-11T11:22:35.764Z" },
+    { url = "https://files.pythonhosted.org/packages/b3/9f/f1668c281c58cfae01482f7114a4b88d345e4c140386241a1a24dcc9e7bc/tomli-2.4.0-cp314-cp314t-win_arm64.whl", hash = "sha256:2b1e3b80e1d5e52e40e9b924ec43d81570f0e7d09d11081b797bc4692765a3d4", size = 99561, upload-time = "2026-01-11T11:22:36.624Z" },
+    { url = "https://files.pythonhosted.org/packages/23/d1/136eb2cb77520a31e1f64cbae9d33ec6df0d78bdf4160398e86eec8a8754/tomli-2.4.0-py3-none-any.whl", hash = "sha256:1f776e7d669ebceb01dee46484485f43a4048746235e683bcdffacdf1fb4785a", size = 14477, upload-time = "2026-01-11T11:22:37.446Z" },
+]
+
+[[package]]
+name = "tomli-w"
+version = "1.2.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/19/75/241269d1da26b624c0d5e110e8149093c759b7a286138f4efd61a60e75fe/tomli_w-1.2.0.tar.gz", hash = "sha256:2dd14fac5a47c27be9cd4c976af5a12d87fb1f0b4512f81d69cce3b35ae25021", size = 7184, upload-time = "2025-01-15T12:07:24.262Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", hash = "sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", size = 6675, upload-time = "2025-01-15T12:07:22.074Z" },
+]
+
+[[package]]
+name = "tomlkit"
+version = "0.14.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/c3/af/14b24e41977adb296d6bd1fb59402cf7d60ce364f90c890bd2ec65c43b5a/tomlkit-0.14.0.tar.gz", hash = "sha256:cf00efca415dbd57575befb1f6634c4f42d2d87dbba376128adb42c121b87064", size = 187167, upload-time = "2026-01-13T01:14:53.304Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl", hash = "sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", size = 39310, upload-time = "2026-01-13T01:14:51.965Z" },
+]
+
+[[package]]
+name = "tornado"
+version = "6.5.4"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/37/1d/0a336abf618272d53f62ebe274f712e213f5a03c0b2339575430b8362ef2/tornado-6.5.4.tar.gz", hash = "sha256:a22fa9047405d03260b483980635f0b041989d8bcc9a313f8fe18b411d84b1d7", size = 513632, upload-time = "2025-12-15T19:21:03.836Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/ab/a9/e94a9d5224107d7ce3cc1fab8d5dc97f5ea351ccc6322ee4fb661da94e35/tornado-6.5.4-cp39-abi3-macosx_10_9_universal2.whl", hash = "sha256:d6241c1a16b1c9e4cc28148b1cda97dd1c6cb4fb7068ac1bedc610768dff0ba9", size = 443909, upload-time = "2025-12-15T19:20:48.382Z" },
+    { url = "https://files.pythonhosted.org/packages/db/7e/f7b8d8c4453f305a51f80dbb49014257bb7d28ccb4bbb8dd328ea995ecad/tornado-6.5.4-cp39-abi3-macosx_10_9_x86_64.whl", hash = "sha256:2d50f63dda1d2cac3ae1fa23d254e16b5e38153758470e9956cbc3d813d40843", size = 442163, upload-time = "2025-12-15T19:20:49.791Z" },
+    { url = "https://files.pythonhosted.org/packages/ba/b5/206f82d51e1bfa940ba366a8d2f83904b15942c45a78dd978b599870ab44/tornado-6.5.4-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d1cf66105dc6acb5af613c054955b8137e34a03698aa53272dbda4afe252be17", size = 445746, upload-time = "2025-12-15T19:20:51.491Z" },
+    { url = "https://files.pythonhosted.org/packages/8e/9d/1a3338e0bd30ada6ad4356c13a0a6c35fbc859063fa7eddb309183364ac1/tornado-6.5.4-cp39-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50ff0a58b0dc97939d29da29cd624da010e7f804746621c78d14b80238669335", size = 445083, upload-time = "2025-12-15T19:20:52.778Z" },
+    { url = "https://files.pythonhosted.org/packages/50/d4/e51d52047e7eb9a582da59f32125d17c0482d065afd5d3bc435ff2120dc5/tornado-6.5.4-cp39-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fb5e04efa54cf0baabdd10061eb4148e0be137166146fff835745f59ab9f7f", size = 445315, upload-time = "2025-12-15T19:20:53.996Z" },
+    { url = "https://files.pythonhosted.org/packages/27/07/2273972f69ca63dbc139694a3fc4684edec3ea3f9efabf77ed32483b875c/tornado-6.5.4-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:9c86b1643b33a4cd415f8d0fe53045f913bf07b4a3ef646b735a6a86047dda84", size = 446003, upload-time = "2025-12-15T19:20:56.101Z" },
+    { url = "https://files.pythonhosted.org/packages/d1/83/41c52e47502bf7260044413b6770d1a48dda2f0246f95ee1384a3cd9c44a/tornado-6.5.4-cp39-abi3-musllinux_1_2_i686.whl", hash = "sha256:6eb82872335a53dd063a4f10917b3efd28270b56a33db69009606a0312660a6f", size = 445412, upload-time = "2025-12-15T19:20:57.398Z" },
+    { url = "https://files.pythonhosted.org/packages/10/c7/bc96917f06cbee182d44735d4ecde9c432e25b84f4c2086143013e7b9e52/tornado-6.5.4-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6076d5dda368c9328ff41ab5d9dd3608e695e8225d1cd0fd1e006f05da3635a8", size = 445392, upload-time = "2025-12-15T19:20:58.692Z" },
+    { url = "https://files.pythonhosted.org/packages/0c/1a/d7592328d037d36f2d2462f4bc1fbb383eec9278bc786c1b111cbbd44cfa/tornado-6.5.4-cp39-abi3-win32.whl", hash = "sha256:1768110f2411d5cd281bac0a090f707223ce77fd110424361092859e089b38d1", size = 446481, upload-time = "2025-12-15T19:21:00.008Z" },
+    { url = "https://files.pythonhosted.org/packages/d6/6d/c69be695a0a64fd37a97db12355a035a6d90f79067a3cf936ec2b1dc38cd/tornado-6.5.4-cp39-abi3-win_amd64.whl", hash = "sha256:fa07d31e0cd85c60713f2b995da613588aa03e1303d75705dca6af8babc18ddc", size = 446886, upload-time = "2025-12-15T19:21:01.287Z" },
+    { url = "https://files.pythonhosted.org/packages/50/49/8dc3fd90902f70084bd2cd059d576ddb4f8bb44c2c7c0e33a11422acb17e/tornado-6.5.4-cp39-abi3-win_arm64.whl", hash = "sha256:053e6e16701eb6cbe641f308f4c1a9541f91b6261991160391bfc342e8a551a1", size = 445910, upload-time = "2025-12-15T19:21:02.571Z" },
+]
+
+[[package]]
+name = "trove-classifiers"
+version = "2026.1.14.14"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/d8/43/7935f8ea93fcb6680bc10a6fdbf534075c198eeead59150dd5ed68449642/trove_classifiers-2026.1.14.14.tar.gz", hash = "sha256:00492545a1402b09d4858605ba190ea33243d361e2b01c9c296ce06b5c3325f3", size = 16997, upload-time = "2026-01-14T14:54:50.526Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/bb/4a/2e5583e544bc437d5e8e54b47db87430df9031b29b48d17f26d129fa60c0/trove_classifiers-2026.1.14.14-py3-none-any.whl", hash = "sha256:1f9553927f18d0513d8e5ff80ab8980b8202ce37ecae0e3274ed2ef11880e74d", size = 14197, upload-time = "2026-01-14T14:54:49.067Z" },
+]
+
+[[package]]
+name = "twine"
+version = "6.2.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "id" },
+    { name = "keyring", marker = "platform_machine != 'ppc64le' and platform_machine != 's390x'" },
+    { name = "packaging" },
+    { name = "readme-renderer" },
+    { name = "requests" },
+    { name = "requests-toolbelt" },
+    { name = "rfc3986" },
+    { name = "rich" },
+    { name = "urllib3" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/e0/a8/949edebe3a82774c1ec34f637f5dd82d1cf22c25e963b7d63771083bbee5/twine-6.2.0.tar.gz", hash = "sha256:e5ed0d2fd70c9959770dce51c8f39c8945c574e18173a7b81802dab51b4b75cf", size = 172262, upload-time = "2025-09-04T15:43:17.255Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3a/7a/882d99539b19b1490cac5d77c67338d126e4122c8276bf640e411650c830/twine-6.2.0-py3-none-any.whl", hash = "sha256:418ebf08ccda9a8caaebe414433b0ba5e25eb5e4a927667122fbe8f829f985d8", size = 42727, upload-time = "2025-09-04T15:43:15.994Z" },
+]
+
+[[package]]
+name = "typing-extensions"
+version = "4.15.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/72/94/1a15dd82efb362ac84269196e94cf00f187f7ed21c242792a923cdb1c61f/typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466", size = 109391, upload-time = "2025-08-25T13:49:26.313Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/18/67/36e9267722cc04a6b9f15c7f3441c2363321a3ea07da7ae0c0707beb2a9c/typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548", size = 44614, upload-time = "2025-08-25T13:49:24.86Z" },
+]
+
+[[package]]
+name = "typing-inspection"
+version = "0.4.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "typing-extensions" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/55/e3/70399cb7dd41c10ac53367ae42139cf4b1ca5f36bb3dc6c9d33acdb43655/typing_inspection-0.4.2.tar.gz", hash = "sha256:ba561c48a67c5958007083d386c3295464928b01faa735ab8547c5692e87f464", size = 75949, upload-time = "2025-10-01T02:14:41.687Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611, upload-time = "2025-10-01T02:14:40.154Z" },
+]
+
+[[package]]
+name = "urllib3"
+version = "2.6.3"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" },
+]
+
+[[package]]
+name = "userpath"
+version = "1.9.2"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "click" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/d5/b7/30753098208505d7ff9be5b3a32112fb8a4cb3ddfccbbb7ba9973f2e29ff/userpath-1.9.2.tar.gz", hash = "sha256:6c52288dab069257cc831846d15d48133522455d4677ee69a9781f11dbefd815", size = 11140, upload-time = "2024-02-29T21:39:08.742Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/43/99/3ec6335ded5b88c2f7ed25c56ffd952546f7ed007ffb1e1539dc3b57015a/userpath-1.9.2-py3-none-any.whl", hash = "sha256:2cbf01a23d655a1ff8fc166dfb78da1b641d1ceabf0fe5f970767d380b14e89d", size = 9065, upload-time = "2024-02-29T21:39:07.551Z" },
+]
+
+[[package]]
+name = "uv"
+version = "0.10.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/09/36/f7fe4de0ad81234ac43938fe39c6ba84595c6b3a1868d786a4d7ad19e670/uv-0.10.0.tar.gz", hash = "sha256:ad01dd614a4bb8eb732da31ade41447026427397c5ad171cc98bd59579ef57ea", size = 3854103, upload-time = "2026-02-05T20:57:55.248Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/f4/69/33fb64aee6ba138b1aaf957e20778e94a8c23732e41cdf68e6176aa2cf4e/uv-0.10.0-py3-none-linux_armv6l.whl", hash = "sha256:38dc0ccbda6377eb94095688c38e5001b8b40dfce14b9654949c1f0b6aa889df", size = 21984662, upload-time = "2026-02-05T20:57:19.076Z" },
+    { url = "https://files.pythonhosted.org/packages/1a/5a/e3ff8a98cfbabc5c2d09bf304d2d9d2d7b2e7d60744241ac5ed762015e5c/uv-0.10.0-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:a165582c1447691109d49d09dccb065d2a23852ff42bf77824ff169909aa85da", size = 21057249, upload-time = "2026-02-05T20:56:48.921Z" },
+    { url = "https://files.pythonhosted.org/packages/ee/77/ec8f24f8d0f19c4fda0718d917bb78b9e6f02a4e1963b401f1c4f4614a54/uv-0.10.0-py3-none-macosx_11_0_arm64.whl", hash = "sha256:aefea608971f4f23ac3dac2006afb8eb2b2c1a2514f5fee1fac18e6c45fd70c4", size = 19827174, upload-time = "2026-02-05T20:57:10.581Z" },
+    { url = "https://files.pythonhosted.org/packages/c6/7e/09b38b93208906728f591f66185a425be3acdb97c448460137d0e6ecb30a/uv-0.10.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_1_aarch64.whl", hash = "sha256:d4b621bcc5d0139502789dc299bae8bf55356d07b95cb4e57e50e2afcc5f43e1", size = 21629522, upload-time = "2026-02-05T20:57:29.959Z" },
+    { url = "https://files.pythonhosted.org/packages/89/f3/48d92c90e869331306979efaa29a44c3e7e8376ae343edc729df0d534dfb/uv-0.10.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_1_armv7l.whl", hash = "sha256:b4bea728a6b64826d0091f95f28de06dd2dc786384b3d336a90297f123b4da0e", size = 21614812, upload-time = "2026-02-05T20:56:58.103Z" },
+    { url = "https://files.pythonhosted.org/packages/ff/43/d0dedfcd4fe6e36cabdbeeb43425cd788604db9d48425e7b659d0f7ba112/uv-0.10.0-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bc0cc2a4bcf9efbff9a57e2aed21c2d4b5a7ec2cc0096e0c33d7b53da17f6a3b", size = 21577072, upload-time = "2026-02-05T20:57:45.455Z" },
+    { url = "https://files.pythonhosted.org/packages/c5/90/b8c9320fd8d86f356e37505a02aa2978ed28f9c63b59f15933e98bce97e5/uv-0.10.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:070ca2f0e8c67ca9a8f70ce403c956b7ed9d51e0c2e9dbbcc4efa5e0a2483f79", size = 22829664, upload-time = "2026-02-05T20:57:22.689Z" },
+    { url = "https://files.pythonhosted.org/packages/56/9c/2c36b30b05c74b2af0e663e0e68f1d10b91a02a145e19b6774c121120c0b/uv-0.10.0-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8070c66149c06f9b39092a06f593a2241345ea2b1d42badc6f884c2cc089a1b1", size = 23705815, upload-time = "2026-02-05T20:57:37.604Z" },
+    { url = "https://files.pythonhosted.org/packages/6c/a1/8c7fdb14ab72e26ca872e07306e496a6b8cf42353f9bf6251b015be7f535/uv-0.10.0-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:3db1d5390b3a624de672d7b0f9c9d8197693f3b2d3d9c4d9e34686dcbc34197a", size = 22890313, upload-time = "2026-02-05T20:57:26.35Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/f8/5c152350b1a6d0af019801f91a1bdeac854c33deb36275f6c934f0113cb5/uv-0.10.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:82b46db718763bf742e986ebbc7a30ca33648957a0dcad34382970b992f5e900", size = 22769440, upload-time = "2026-02-05T20:56:53.859Z" },
+    { url = "https://files.pythonhosted.org/packages/87/44/980e5399c6f4943b81754be9b7deb87bd56430e035c507984e17267d6a97/uv-0.10.0-py3-none-manylinux_2_28_aarch64.whl", hash = "sha256:eb95d28590edd73b8fdd80c27d699c45c52f8305170c6a90b830caf7f36670a4", size = 21695296, upload-time = "2026-02-05T20:57:06.732Z" },
+    { url = "https://files.pythonhosted.org/packages/ae/e7/f44ad40275be2087b3910df4678ed62cf0c82eeb3375c4a35037a79747db/uv-0.10.0-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:5871eef5046a81df3f1636a3d2b4ccac749c23c7f4d3a4bae5496cb2876a1814", size = 22424291, upload-time = "2026-02-05T20:57:49.067Z" },
+    { url = "https://files.pythonhosted.org/packages/c2/81/31c0c0a8673140756e71a1112bf8f0fcbb48a4cf4587a7937f5bd55256b6/uv-0.10.0-py3-none-musllinux_1_1_i686.whl", hash = "sha256:1af0ec125a07edb434dfaa98969f6184c1313dbec2860c3c5ce2d533b257132a", size = 22109479, upload-time = "2026-02-05T20:57:02.258Z" },
+    { url = "https://files.pythonhosted.org/packages/d7/d1/2eb51bc233bad3d13ad64a0c280fd4d1ebebf5c2939b3900a46670fa2b91/uv-0.10.0-py3-none-musllinux_1_1_x86_64.whl", hash = "sha256:45909b9a734250da05b10101e0a067e01ffa2d94bbb07de4b501e3cee4ae0ff3", size = 22972087, upload-time = "2026-02-05T20:57:52.847Z" },
+    { url = "https://files.pythonhosted.org/packages/d2/f7/49987207b87b5c21e1f0e81c52892813e8cdf7e318b6373d6585773ebcdd/uv-0.10.0-py3-none-win32.whl", hash = "sha256:d5498851b1f07aa9c9af75578b2029a11743cb933d741f84dcbb43109a968c29", size = 20896746, upload-time = "2026-02-05T20:57:33.426Z" },
+    { url = "https://files.pythonhosted.org/packages/80/b2/1370049596c6ff7fa1fe22fccf86a093982eac81017b8c8aff541d7263b2/uv-0.10.0-py3-none-win_amd64.whl", hash = "sha256:edd469425cd62bcd8c8cc0226c5f9043a94e37ed869da8268c80fdbfd3e5015e", size = 23433041, upload-time = "2026-02-05T20:57:41.41Z" },
+    { url = "https://files.pythonhosted.org/packages/e3/76/1034c46244feafec2c274ac52b094f35d47c94cdb11461c24cf4be8a0c0c/uv-0.10.0-py3-none-win_arm64.whl", hash = "sha256:e90c509749b3422eebb54057434b7119892330d133b9690a88f8a6b0f3116be3", size = 21880261, upload-time = "2026-02-05T20:57:14.724Z" },
+]
+
+[[package]]
+name = "uvicorn"
+version = "0.40.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "click" },
+    { name = "h11" },
+    { name = "typing-extensions", marker = "python_full_version < '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/c3/d1/8f3c683c9561a4e6689dd3b1d345c815f10f86acd044ee1fb9a4dcd0b8c5/uvicorn-0.40.0.tar.gz", hash = "sha256:839676675e87e73694518b5574fd0f24c9d97b46bea16df7b8c05ea1a51071ea", size = 81761, upload-time = "2025-12-21T14:16:22.45Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/3d/d8/2083a1daa7439a66f3a48589a57d576aa117726762618f6bb09fe3798796/uvicorn-0.40.0-py3-none-any.whl", hash = "sha256:c6c8f55bc8bf13eb6fa9ff87ad62308bbbc33d0b67f84293151efe87e0d5f2ee", size = 68502, upload-time = "2025-12-21T14:16:21.041Z" },
+]
+
+[[package]]
+name = "virtualenv"
+version = "20.36.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "distlib" },
+    { name = "filelock" },
+    { name = "platformdirs" },
+    { name = "typing-extensions", marker = "python_full_version < '3.11'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/aa/a3/4d310fa5f00863544e1d0f4de93bddec248499ccf97d4791bc3122c9d4f3/virtualenv-20.36.1.tar.gz", hash = "sha256:8befb5c81842c641f8ee658481e42641c68b5eab3521d8e092d18320902466ba", size = 6032239, upload-time = "2026-01-09T18:21:01.296Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/6a/2a/dc2228b2888f51192c7dc766106cd475f1b768c10caaf9727659726f7391/virtualenv-20.36.1-py3-none-any.whl", hash = "sha256:575a8d6b124ef88f6f51d56d656132389f961062a9177016a50e4f507bbcc19f", size = 6008258, upload-time = "2026-01-09T18:20:59.425Z" },
+]
+
+[[package]]
+name = "watchfiles"
+version = "1.1.1"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+    { name = "anyio" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/c2/c9/8869df9b2a2d6c59d79220a4db37679e74f807c559ffe5265e08b227a210/watchfiles-1.1.1.tar.gz", hash = "sha256:a173cb5c16c4f40ab19cecf48a534c409f7ea983ab8fed0741304a1c0a31b3f2", size = 94440, upload-time = "2025-10-14T15:06:21.08Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/a7/1a/206e8cf2dd86fddf939165a57b4df61607a1e0add2785f170a3f616b7d9f/watchfiles-1.1.1-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:eef58232d32daf2ac67f42dea51a2c80f0d03379075d44a587051e63cc2e368c", size = 407318, upload-time = "2025-10-14T15:04:18.753Z" },
+    { url = "https://files.pythonhosted.org/packages/b3/0f/abaf5262b9c496b5dad4ed3c0e799cbecb1f8ea512ecb6ddd46646a9fca3/watchfiles-1.1.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:03fa0f5237118a0c5e496185cafa92878568b652a2e9a9382a5151b1a0380a43", size = 394478, upload-time = "2025-10-14T15:04:20.297Z" },
+    { url = "https://files.pythonhosted.org/packages/b1/04/9cc0ba88697b34b755371f5ace8d3a4d9a15719c07bdc7bd13d7d8c6a341/watchfiles-1.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8ca65483439f9c791897f7db49202301deb6e15fe9f8fe2fed555bf986d10c31", size = 449894, upload-time = "2025-10-14T15:04:21.527Z" },
+    { url = "https://files.pythonhosted.org/packages/d2/9c/eda4615863cd8621e89aed4df680d8c3ec3da6a4cf1da113c17decd87c7f/watchfiles-1.1.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f0ab1c1af0cb38e3f598244c17919fb1a84d1629cc08355b0074b6d7f53138ac", size = 459065, upload-time = "2025-10-14T15:04:22.795Z" },
+    { url = "https://files.pythonhosted.org/packages/84/13/f28b3f340157d03cbc8197629bc109d1098764abe1e60874622a0be5c112/watchfiles-1.1.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3bc570d6c01c206c46deb6e935a260be44f186a2f05179f52f7fcd2be086a94d", size = 488377, upload-time = "2025-10-14T15:04:24.138Z" },
+    { url = "https://files.pythonhosted.org/packages/86/93/cfa597fa9389e122488f7ffdbd6db505b3b915ca7435ecd7542e855898c2/watchfiles-1.1.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e84087b432b6ac94778de547e08611266f1f8ffad28c0ee4c82e028b0fc5966d", size = 595837, upload-time = "2025-10-14T15:04:25.057Z" },
+    { url = "https://files.pythonhosted.org/packages/57/1e/68c1ed5652b48d89fc24d6af905d88ee4f82fa8bc491e2666004e307ded1/watchfiles-1.1.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:620bae625f4cb18427b1bb1a2d9426dc0dd5a5ba74c7c2cdb9de405f7b129863", size = 473456, upload-time = "2025-10-14T15:04:26.497Z" },
+    { url = "https://files.pythonhosted.org/packages/d5/dc/1a680b7458ffa3b14bb64878112aefc8f2e4f73c5af763cbf0bd43100658/watchfiles-1.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:544364b2b51a9b0c7000a4b4b02f90e9423d97fbbf7e06689236443ebcad81ab", size = 455614, upload-time = "2025-10-14T15:04:27.539Z" },
+    { url = "https://files.pythonhosted.org/packages/61/a5/3d782a666512e01eaa6541a72ebac1d3aae191ff4a31274a66b8dd85760c/watchfiles-1.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:bbe1ef33d45bc71cf21364df962af171f96ecaeca06bd9e3d0b583efb12aec82", size = 630690, upload-time = "2025-10-14T15:04:28.495Z" },
+    { url = "https://files.pythonhosted.org/packages/9b/73/bb5f38590e34687b2a9c47a244aa4dd50c56a825969c92c9c5fc7387cea1/watchfiles-1.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:1a0bb430adb19ef49389e1ad368450193a90038b5b752f4ac089ec6942c4dff4", size = 622459, upload-time = "2025-10-14T15:04:29.491Z" },
+    { url = "https://files.pythonhosted.org/packages/f1/ac/c9bb0ec696e07a20bd58af5399aeadaef195fb2c73d26baf55180fe4a942/watchfiles-1.1.1-cp310-cp310-win32.whl", hash = "sha256:3f6d37644155fb5beca5378feb8c1708d5783145f2a0f1c4d5a061a210254844", size = 272663, upload-time = "2025-10-14T15:04:30.435Z" },
+    { url = "https://files.pythonhosted.org/packages/11/a0/a60c5a7c2ec59fa062d9a9c61d02e3b6abd94d32aac2d8344c4bdd033326/watchfiles-1.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:a36d8efe0f290835fd0f33da35042a1bb5dc0e83cbc092dcf69bce442579e88e", size = 287453, upload-time = "2025-10-14T15:04:31.53Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/f8/2c5f479fb531ce2f0564eda479faecf253d886b1ab3630a39b7bf7362d46/watchfiles-1.1.1-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:f57b396167a2565a4e8b5e56a5a1c537571733992b226f4f1197d79e94cf0ae5", size = 406529, upload-time = "2025-10-14T15:04:32.899Z" },
+    { url = "https://files.pythonhosted.org/packages/fe/cd/f515660b1f32f65df671ddf6f85bfaca621aee177712874dc30a97397977/watchfiles-1.1.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:421e29339983e1bebc281fab40d812742268ad057db4aee8c4d2bce0af43b741", size = 394384, upload-time = "2025-10-14T15:04:33.761Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/c3/28b7dc99733eab43fca2d10f55c86e03bd6ab11ca31b802abac26b23d161/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6e43d39a741e972bab5d8100b5cdacf69db64e34eb19b6e9af162bccf63c5cc6", size = 448789, upload-time = "2025-10-14T15:04:34.679Z" },
+    { url = "https://files.pythonhosted.org/packages/4a/24/33e71113b320030011c8e4316ccca04194bf0cbbaeee207f00cbc7d6b9f5/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f537afb3276d12814082a2e9b242bdcf416c2e8fd9f799a737990a1dbe906e5b", size = 460521, upload-time = "2025-10-14T15:04:35.963Z" },
+    { url = "https://files.pythonhosted.org/packages/f4/c3/3c9a55f255aa57b91579ae9e98c88704955fa9dac3e5614fb378291155df/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b2cd9e04277e756a2e2d2543d65d1e2166d6fd4c9b183f8808634fda23f17b14", size = 488722, upload-time = "2025-10-14T15:04:37.091Z" },
+    { url = "https://files.pythonhosted.org/packages/49/36/506447b73eb46c120169dc1717fe2eff07c234bb3232a7200b5f5bd816e9/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:5f3f58818dc0b07f7d9aa7fe9eb1037aecb9700e63e1f6acfed13e9fef648f5d", size = 596088, upload-time = "2025-10-14T15:04:38.39Z" },
+    { url = "https://files.pythonhosted.org/packages/82/ab/5f39e752a9838ec4d52e9b87c1e80f1ee3ccdbe92e183c15b6577ab9de16/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9bb9f66367023ae783551042d31b1d7fd422e8289eedd91f26754a66f44d5cff", size = 472923, upload-time = "2025-10-14T15:04:39.666Z" },
+    { url = "https://files.pythonhosted.org/packages/af/b9/a419292f05e302dea372fa7e6fda5178a92998411f8581b9830d28fb9edb/watchfiles-1.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:aebfd0861a83e6c3d1110b78ad54704486555246e542be3e2bb94195eabb2606", size = 456080, upload-time = "2025-10-14T15:04:40.643Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/c3/d5932fd62bde1a30c36e10c409dc5d54506726f08cb3e1d8d0ba5e2bc8db/watchfiles-1.1.1-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:5fac835b4ab3c6487b5dbad78c4b3724e26bcc468e886f8ba8cc4306f68f6701", size = 629432, upload-time = "2025-10-14T15:04:41.789Z" },
+    { url = "https://files.pythonhosted.org/packages/f7/77/16bddd9779fafb795f1a94319dc965209c5641db5bf1edbbccace6d1b3c0/watchfiles-1.1.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:399600947b170270e80134ac854e21b3ccdefa11a9529a3decc1327088180f10", size = 623046, upload-time = "2025-10-14T15:04:42.718Z" },
+    { url = "https://files.pythonhosted.org/packages/46/ef/f2ecb9a0f342b4bfad13a2787155c6ee7ce792140eac63a34676a2feeef2/watchfiles-1.1.1-cp311-cp311-win32.whl", hash = "sha256:de6da501c883f58ad50db3a32ad397b09ad29865b5f26f64c24d3e3281685849", size = 271473, upload-time = "2025-10-14T15:04:43.624Z" },
+    { url = "https://files.pythonhosted.org/packages/94/bc/f42d71125f19731ea435c3948cad148d31a64fccde3867e5ba4edee901f9/watchfiles-1.1.1-cp311-cp311-win_amd64.whl", hash = "sha256:35c53bd62a0b885bf653ebf6b700d1bf05debb78ad9292cf2a942b23513dc4c4", size = 287598, upload-time = "2025-10-14T15:04:44.516Z" },
+    { url = "https://files.pythonhosted.org/packages/57/c9/a30f897351f95bbbfb6abcadafbaca711ce1162f4db95fc908c98a9165f3/watchfiles-1.1.1-cp311-cp311-win_arm64.whl", hash = "sha256:57ca5281a8b5e27593cb7d82c2ac927ad88a96ed406aa446f6344e4328208e9e", size = 277210, upload-time = "2025-10-14T15:04:45.883Z" },
+    { url = "https://files.pythonhosted.org/packages/74/d5/f039e7e3c639d9b1d09b07ea412a6806d38123f0508e5f9b48a87b0a76cc/watchfiles-1.1.1-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:8c89f9f2f740a6b7dcc753140dd5e1ab9215966f7a3530d0c0705c83b401bd7d", size = 404745, upload-time = "2025-10-14T15:04:46.731Z" },
+    { url = "https://files.pythonhosted.org/packages/a5/96/a881a13aa1349827490dab2d363c8039527060cfcc2c92cc6d13d1b1049e/watchfiles-1.1.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bd404be08018c37350f0d6e34676bd1e2889990117a2b90070b3007f172d0610", size = 391769, upload-time = "2025-10-14T15:04:48.003Z" },
+    { url = "https://files.pythonhosted.org/packages/4b/5b/d3b460364aeb8da471c1989238ea0e56bec24b6042a68046adf3d9ddb01c/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8526e8f916bb5b9a0a777c8317c23ce65de259422bba5b31325a6fa6029d33af", size = 449374, upload-time = "2025-10-14T15:04:49.179Z" },
+    { url = "https://files.pythonhosted.org/packages/b9/44/5769cb62d4ed055cb17417c0a109a92f007114a4e07f30812a73a4efdb11/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:2edc3553362b1c38d9f06242416a5d8e9fe235c204a4072e988ce2e5bb1f69f6", size = 459485, upload-time = "2025-10-14T15:04:50.155Z" },
+    { url = "https://files.pythonhosted.org/packages/19/0c/286b6301ded2eccd4ffd0041a1b726afda999926cf720aab63adb68a1e36/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:30f7da3fb3f2844259cba4720c3fc7138eb0f7b659c38f3bfa65084c7fc7abce", size = 488813, upload-time = "2025-10-14T15:04:51.059Z" },
+    { url = "https://files.pythonhosted.org/packages/c7/2b/8530ed41112dd4a22f4dcfdb5ccf6a1baad1ff6eed8dc5a5f09e7e8c41c7/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f8979280bdafff686ba5e4d8f97840f929a87ed9cdf133cbbd42f7766774d2aa", size = 594816, upload-time = "2025-10-14T15:04:52.031Z" },
+    { url = "https://files.pythonhosted.org/packages/ce/d2/f5f9fb49489f184f18470d4f99f4e862a4b3e9ac2865688eb2099e3d837a/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dcc5c24523771db3a294c77d94771abcfcb82a0e0ee8efd910c37c59ec1b31bb", size = 475186, upload-time = "2025-10-14T15:04:53.064Z" },
+    { url = "https://files.pythonhosted.org/packages/cf/68/5707da262a119fb06fbe214d82dd1fe4a6f4af32d2d14de368d0349eb52a/watchfiles-1.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db5d7ae38ff20153d542460752ff397fcf5c96090c1230803713cf3147a6803", size = 456812, upload-time = "2025-10-14T15:04:55.174Z" },
+    { url = "https://files.pythonhosted.org/packages/66/ab/3cbb8756323e8f9b6f9acb9ef4ec26d42b2109bce830cc1f3468df20511d/watchfiles-1.1.1-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:28475ddbde92df1874b6c5c8aaeb24ad5be47a11f87cde5a28ef3835932e3e94", size = 630196, upload-time = "2025-10-14T15:04:56.22Z" },
+    { url = "https://files.pythonhosted.org/packages/78/46/7152ec29b8335f80167928944a94955015a345440f524d2dfe63fc2f437b/watchfiles-1.1.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:36193ed342f5b9842edd3532729a2ad55c4160ffcfa3700e0d54be496b70dd43", size = 622657, upload-time = "2025-10-14T15:04:57.521Z" },
+    { url = "https://files.pythonhosted.org/packages/0a/bf/95895e78dd75efe9a7f31733607f384b42eb5feb54bd2eb6ed57cc2e94f4/watchfiles-1.1.1-cp312-cp312-win32.whl", hash = "sha256:859e43a1951717cc8de7f4c77674a6d389b106361585951d9e69572823f311d9", size = 272042, upload-time = "2025-10-14T15:04:59.046Z" },
+    { url = "https://files.pythonhosted.org/packages/87/0a/90eb755f568de2688cb220171c4191df932232c20946966c27a59c400850/watchfiles-1.1.1-cp312-cp312-win_amd64.whl", hash = "sha256:91d4c9a823a8c987cce8fa2690923b069966dabb196dd8d137ea2cede885fde9", size = 288410, upload-time = "2025-10-14T15:05:00.081Z" },
+    { url = "https://files.pythonhosted.org/packages/36/76/f322701530586922fbd6723c4f91ace21364924822a8772c549483abed13/watchfiles-1.1.1-cp312-cp312-win_arm64.whl", hash = "sha256:a625815d4a2bdca61953dbba5a39d60164451ef34c88d751f6c368c3ea73d404", size = 278209, upload-time = "2025-10-14T15:05:01.168Z" },
+    { url = "https://files.pythonhosted.org/packages/bb/f4/f750b29225fe77139f7ae5de89d4949f5a99f934c65a1f1c0b248f26f747/watchfiles-1.1.1-cp313-cp313-macosx_10_12_x86_64.whl", hash = "sha256:130e4876309e8686a5e37dba7d5e9bc77e6ed908266996ca26572437a5271e18", size = 404321, upload-time = "2025-10-14T15:05:02.063Z" },
+    { url = "https://files.pythonhosted.org/packages/2b/f9/f07a295cde762644aa4c4bb0f88921d2d141af45e735b965fb2e87858328/watchfiles-1.1.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:5f3bde70f157f84ece3765b42b4a52c6ac1a50334903c6eaf765362f6ccca88a", size = 391783, upload-time = "2025-10-14T15:05:03.052Z" },
+    { url = "https://files.pythonhosted.org/packages/bc/11/fc2502457e0bea39a5c958d86d2cb69e407a4d00b85735ca724bfa6e0d1a/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:14e0b1fe858430fc0251737ef3824c54027bedb8c37c38114488b8e131cf8219", size = 449279, upload-time = "2025-10-14T15:05:04.004Z" },
+    { url = "https://files.pythonhosted.org/packages/e3/1f/d66bc15ea0b728df3ed96a539c777acfcad0eb78555ad9efcaa1274688f0/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f27db948078f3823a6bb3b465180db8ebecf26dd5dae6f6180bd87383b6b4428", size = 459405, upload-time = "2025-10-14T15:05:04.942Z" },
+    { url = "https://files.pythonhosted.org/packages/be/90/9f4a65c0aec3ccf032703e6db02d89a157462fbb2cf20dd415128251cac0/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:059098c3a429f62fc98e8ec62b982230ef2c8df68c79e826e37b895bc359a9c0", size = 488976, upload-time = "2025-10-14T15:05:05.905Z" },
+    { url = "https://files.pythonhosted.org/packages/37/57/ee347af605d867f712be7029bb94c8c071732a4b44792e3176fa3c612d39/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:bfb5862016acc9b869bb57284e6cb35fdf8e22fe59f7548858e2f971d045f150", size = 595506, upload-time = "2025-10-14T15:05:06.906Z" },
+    { url = "https://files.pythonhosted.org/packages/a8/78/cc5ab0b86c122047f75e8fc471c67a04dee395daf847d3e59381996c8707/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:319b27255aacd9923b8a276bb14d21a5f7ff82564c744235fc5eae58d95422ae", size = 474936, upload-time = "2025-10-14T15:05:07.906Z" },
+    { url = "https://files.pythonhosted.org/packages/62/da/def65b170a3815af7bd40a3e7010bf6ab53089ef1b75d05dd5385b87cf08/watchfiles-1.1.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c755367e51db90e75b19454b680903631d41f9e3607fbd941d296a020c2d752d", size = 456147, upload-time = "2025-10-14T15:05:09.138Z" },
+    { url = "https://files.pythonhosted.org/packages/57/99/da6573ba71166e82d288d4df0839128004c67d2778d3b566c138695f5c0b/watchfiles-1.1.1-cp313-cp313-musllinux_1_1_aarch64.whl", hash = "sha256:c22c776292a23bfc7237a98f791b9ad3144b02116ff10d820829ce62dff46d0b", size = 630007, upload-time = "2025-10-14T15:05:10.117Z" },
+    { url = "https://files.pythonhosted.org/packages/a8/51/7439c4dd39511368849eb1e53279cd3454b4a4dbace80bab88feeb83c6b5/watchfiles-1.1.1-cp313-cp313-musllinux_1_1_x86_64.whl", hash = "sha256:3a476189be23c3686bc2f4321dd501cb329c0a0469e77b7b534ee10129ae6374", size = 622280, upload-time = "2025-10-14T15:05:11.146Z" },
+    { url = "https://files.pythonhosted.org/packages/95/9c/8ed97d4bba5db6fdcdb2b298d3898f2dd5c20f6b73aee04eabe56c59677e/watchfiles-1.1.1-cp313-cp313-win32.whl", hash = "sha256:bf0a91bfb5574a2f7fc223cf95eeea79abfefa404bf1ea5e339c0c1560ae99a0", size = 272056, upload-time = "2025-10-14T15:05:12.156Z" },
+    { url = "https://files.pythonhosted.org/packages/1f/f3/c14e28429f744a260d8ceae18bf58c1d5fa56b50d006a7a9f80e1882cb0d/watchfiles-1.1.1-cp313-cp313-win_amd64.whl", hash = "sha256:52e06553899e11e8074503c8e716d574adeeb7e68913115c4b3653c53f9bae42", size = 288162, upload-time = "2025-10-14T15:05:13.208Z" },
+    { url = "https://files.pythonhosted.org/packages/dc/61/fe0e56c40d5cd29523e398d31153218718c5786b5e636d9ae8ae79453d27/watchfiles-1.1.1-cp313-cp313-win_arm64.whl", hash = "sha256:ac3cc5759570cd02662b15fbcd9d917f7ecd47efe0d6b40474eafd246f91ea18", size = 277909, upload-time = "2025-10-14T15:05:14.49Z" },
+    { url = "https://files.pythonhosted.org/packages/79/42/e0a7d749626f1e28c7108a99fb9bf524b501bbbeb9b261ceecde644d5a07/watchfiles-1.1.1-cp313-cp313t-macosx_10_12_x86_64.whl", hash = "sha256:563b116874a9a7ce6f96f87cd0b94f7faf92d08d0021e837796f0a14318ef8da", size = 403389, upload-time = "2025-10-14T15:05:15.777Z" },
+    { url = "https://files.pythonhosted.org/packages/15/49/08732f90ce0fbbc13913f9f215c689cfc9ced345fb1bcd8829a50007cc8d/watchfiles-1.1.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3ad9fe1dae4ab4212d8c91e80b832425e24f421703b5a42ef2e4a1e215aff051", size = 389964, upload-time = "2025-10-14T15:05:16.85Z" },
+    { url = "https://files.pythonhosted.org/packages/27/0d/7c315d4bd5f2538910491a0393c56bf70d333d51bc5b34bee8e68e8cea19/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce70f96a46b894b36eba678f153f052967a0d06d5b5a19b336ab0dbbd029f73e", size = 448114, upload-time = "2025-10-14T15:05:17.876Z" },
+    { url = "https://files.pythonhosted.org/packages/c3/24/9e096de47a4d11bc4df41e9d1e61776393eac4cb6eb11b3e23315b78b2cc/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cb467c999c2eff23a6417e58d75e5828716f42ed8289fe6b77a7e5a91036ca70", size = 460264, upload-time = "2025-10-14T15:05:18.962Z" },
+    { url = "https://files.pythonhosted.org/packages/cc/0f/e8dea6375f1d3ba5fcb0b3583e2b493e77379834c74fd5a22d66d85d6540/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:836398932192dae4146c8f6f737d74baeac8b70ce14831a239bdb1ca882fc261", size = 487877, upload-time = "2025-10-14T15:05:20.094Z" },
+    { url = "https://files.pythonhosted.org/packages/ac/5b/df24cfc6424a12deb41503b64d42fbea6b8cb357ec62ca84a5a3476f654a/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:743185e7372b7bc7c389e1badcc606931a827112fbbd37f14c537320fca08620", size = 595176, upload-time = "2025-10-14T15:05:21.134Z" },
+    { url = "https://files.pythonhosted.org/packages/8f/b5/853b6757f7347de4e9b37e8cc3289283fb983cba1ab4d2d7144694871d9c/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:afaeff7696e0ad9f02cbb8f56365ff4686ab205fcf9c4c5b6fdfaaa16549dd04", size = 473577, upload-time = "2025-10-14T15:05:22.306Z" },
+    { url = "https://files.pythonhosted.org/packages/e1/f7/0a4467be0a56e80447c8529c9fce5b38eab4f513cb3d9bf82e7392a5696b/watchfiles-1.1.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7eb7da0eb23aa2ba036d4f616d46906013a68caf61b7fdbe42fc8b25132e77", size = 455425, upload-time = "2025-10-14T15:05:23.348Z" },
+    { url = "https://files.pythonhosted.org/packages/8e/e0/82583485ea00137ddf69bc84a2db88bd92ab4a6e3c405e5fb878ead8d0e7/watchfiles-1.1.1-cp313-cp313t-musllinux_1_1_aarch64.whl", hash = "sha256:831a62658609f0e5c64178211c942ace999517f5770fe9436be4c2faeba0c0ef", size = 628826, upload-time = "2025-10-14T15:05:24.398Z" },
+    { url = "https://files.pythonhosted.org/packages/28/9a/a785356fccf9fae84c0cc90570f11702ae9571036fb25932f1242c82191c/watchfiles-1.1.1-cp313-cp313t-musllinux_1_1_x86_64.whl", hash = "sha256:f9a2ae5c91cecc9edd47e041a930490c31c3afb1f5e6d71de3dc671bfaca02bf", size = 622208, upload-time = "2025-10-14T15:05:25.45Z" },
+    { url = "https://files.pythonhosted.org/packages/c3/f4/0872229324ef69b2c3edec35e84bd57a1289e7d3fe74588048ed8947a323/watchfiles-1.1.1-cp314-cp314-macosx_10_12_x86_64.whl", hash = "sha256:d1715143123baeeaeadec0528bb7441103979a1d5f6fd0e1f915383fea7ea6d5", size = 404315, upload-time = "2025-10-14T15:05:26.501Z" },
+    { url = "https://files.pythonhosted.org/packages/7b/22/16d5331eaed1cb107b873f6ae1b69e9ced582fcf0c59a50cd84f403b1c32/watchfiles-1.1.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:39574d6370c4579d7f5d0ad940ce5b20db0e4117444e39b6d8f99db5676c52fd", size = 390869, upload-time = "2025-10-14T15:05:27.649Z" },
+    { url = "https://files.pythonhosted.org/packages/b2/7e/5643bfff5acb6539b18483128fdc0ef2cccc94a5b8fbda130c823e8ed636/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7365b92c2e69ee952902e8f70f3ba6360d0d596d9299d55d7d386df84b6941fb", size = 449919, upload-time = "2025-10-14T15:05:28.701Z" },
+    { url = "https://files.pythonhosted.org/packages/51/2e/c410993ba5025a9f9357c376f48976ef0e1b1aefb73b97a5ae01a5972755/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bfff9740c69c0e4ed32416f013f3c45e2ae42ccedd1167ef2d805c000b6c71a5", size = 460845, upload-time = "2025-10-14T15:05:30.064Z" },
+    { url = "https://files.pythonhosted.org/packages/8e/a4/2df3b404469122e8680f0fcd06079317e48db58a2da2950fb45020947734/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b27cf2eb1dda37b2089e3907d8ea92922b673c0c427886d4edc6b94d8dfe5db3", size = 489027, upload-time = "2025-10-14T15:05:31.064Z" },
+    { url = "https://files.pythonhosted.org/packages/ea/84/4587ba5b1f267167ee715b7f66e6382cca6938e0a4b870adad93e44747e6/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:526e86aced14a65a5b0ec50827c745597c782ff46b571dbfe46192ab9e0b3c33", size = 595615, upload-time = "2025-10-14T15:05:32.074Z" },
+    { url = "https://files.pythonhosted.org/packages/6a/0f/c6988c91d06e93cd0bb3d4a808bcf32375ca1904609835c3031799e3ecae/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:04e78dd0b6352db95507fd8cb46f39d185cf8c74e4cf1e4fbad1d3df96faf510", size = 474836, upload-time = "2025-10-14T15:05:33.209Z" },
+    { url = "https://files.pythonhosted.org/packages/b4/36/ded8aebea91919485b7bbabbd14f5f359326cb5ec218cd67074d1e426d74/watchfiles-1.1.1-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5c85794a4cfa094714fb9c08d4a218375b2b95b8ed1666e8677c349906246c05", size = 455099, upload-time = "2025-10-14T15:05:34.189Z" },
+    { url = "https://files.pythonhosted.org/packages/98/e0/8c9bdba88af756a2fce230dd365fab2baf927ba42cd47521ee7498fd5211/watchfiles-1.1.1-cp314-cp314-musllinux_1_1_aarch64.whl", hash = "sha256:74d5012b7630714b66be7b7b7a78855ef7ad58e8650c73afc4c076a1f480a8d6", size = 630626, upload-time = "2025-10-14T15:05:35.216Z" },
+    { url = "https://files.pythonhosted.org/packages/2a/84/a95db05354bf2d19e438520d92a8ca475e578c647f78f53197f5a2f17aaf/watchfiles-1.1.1-cp314-cp314-musllinux_1_1_x86_64.whl", hash = "sha256:8fbe85cb3201c7d380d3d0b90e63d520f15d6afe217165d7f98c9c649654db81", size = 622519, upload-time = "2025-10-14T15:05:36.259Z" },
+    { url = "https://files.pythonhosted.org/packages/1d/ce/d8acdc8de545de995c339be67711e474c77d643555a9bb74a9334252bd55/watchfiles-1.1.1-cp314-cp314-win32.whl", hash = "sha256:3fa0b59c92278b5a7800d3ee7733da9d096d4aabcfabb9a928918bd276ef9b9b", size = 272078, upload-time = "2025-10-14T15:05:37.63Z" },
+    { url = "https://files.pythonhosted.org/packages/c4/c9/a74487f72d0451524be827e8edec251da0cc1fcf111646a511ae752e1a3d/watchfiles-1.1.1-cp314-cp314-win_amd64.whl", hash = "sha256:c2047d0b6cea13b3316bdbafbfa0c4228ae593d995030fda39089d36e64fc03a", size = 287664, upload-time = "2025-10-14T15:05:38.95Z" },
+    { url = "https://files.pythonhosted.org/packages/df/b8/8ac000702cdd496cdce998c6f4ee0ca1f15977bba51bdf07d872ebdfc34c/watchfiles-1.1.1-cp314-cp314-win_arm64.whl", hash = "sha256:842178b126593addc05acf6fce960d28bc5fae7afbaa2c6c1b3a7b9460e5be02", size = 277154, upload-time = "2025-10-14T15:05:39.954Z" },
+    { url = "https://files.pythonhosted.org/packages/47/a8/e3af2184707c29f0f14b1963c0aace6529f9d1b8582d5b99f31bbf42f59e/watchfiles-1.1.1-cp314-cp314t-macosx_10_12_x86_64.whl", hash = "sha256:88863fbbc1a7312972f1c511f202eb30866370ebb8493aef2812b9ff28156a21", size = 403820, upload-time = "2025-10-14T15:05:40.932Z" },
+    { url = "https://files.pythonhosted.org/packages/c0/ec/e47e307c2f4bd75f9f9e8afbe3876679b18e1bcec449beca132a1c5ffb2d/watchfiles-1.1.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:55c7475190662e202c08c6c0f4d9e345a29367438cf8e8037f3155e10a88d5a5", size = 390510, upload-time = "2025-10-14T15:05:41.945Z" },
+    { url = "https://files.pythonhosted.org/packages/d5/a0/ad235642118090f66e7b2f18fd5c42082418404a79205cdfca50b6309c13/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3f53fa183d53a1d7a8852277c92b967ae99c2d4dcee2bfacff8868e6e30b15f7", size = 448408, upload-time = "2025-10-14T15:05:43.385Z" },
+    { url = "https://files.pythonhosted.org/packages/df/85/97fa10fd5ff3332ae17e7e40e20784e419e28521549780869f1413742e9d/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:6aae418a8b323732fa89721d86f39ec8f092fc2af67f4217a2b07fd3e93c6101", size = 458968, upload-time = "2025-10-14T15:05:44.404Z" },
+    { url = "https://files.pythonhosted.org/packages/47/c2/9059c2e8966ea5ce678166617a7f75ecba6164375f3b288e50a40dc6d489/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f096076119da54a6080e8920cbdaac3dbee667eb91dcc5e5b78840b87415bd44", size = 488096, upload-time = "2025-10-14T15:05:45.398Z" },
+    { url = "https://files.pythonhosted.org/packages/94/44/d90a9ec8ac309bc26db808a13e7bfc0e4e78b6fc051078a554e132e80160/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:00485f441d183717038ed2e887a7c868154f216877653121068107b227a2f64c", size = 596040, upload-time = "2025-10-14T15:05:46.502Z" },
+    { url = "https://files.pythonhosted.org/packages/95/68/4e3479b20ca305cfc561db3ed207a8a1c745ee32bf24f2026a129d0ddb6e/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a55f3e9e493158d7bfdb60a1165035f1cf7d320914e7b7ea83fe22c6023b58fc", size = 473847, upload-time = "2025-10-14T15:05:47.484Z" },
+    { url = "https://files.pythonhosted.org/packages/4f/55/2af26693fd15165c4ff7857e38330e1b61ab8c37d15dc79118cdba115b7a/watchfiles-1.1.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c91ed27800188c2ae96d16e3149f199d62f86c7af5f5f4d2c61a3ed8cd3666c", size = 455072, upload-time = "2025-10-14T15:05:48.928Z" },
+    { url = "https://files.pythonhosted.org/packages/66/1d/d0d200b10c9311ec25d2273f8aad8c3ef7cc7ea11808022501811208a750/watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_aarch64.whl", hash = "sha256:311ff15a0bae3714ffb603e6ba6dbfba4065ab60865d15a6ec544133bdb21099", size = 629104, upload-time = "2025-10-14T15:05:49.908Z" },
+    { url = "https://files.pythonhosted.org/packages/e3/bd/fa9bb053192491b3867ba07d2343d9f2252e00811567d30ae8d0f78136fe/watchfiles-1.1.1-cp314-cp314t-musllinux_1_1_x86_64.whl", hash = "sha256:a916a2932da8f8ab582f242c065f5c81bed3462849ca79ee357dd9551b0e9b01", size = 622112, upload-time = "2025-10-14T15:05:50.941Z" },
+    { url = "https://files.pythonhosted.org/packages/ba/4c/a888c91e2e326872fa4705095d64acd8aa2fb9c1f7b9bd0588f33850516c/watchfiles-1.1.1-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:17ef139237dfced9da49fb7f2232c86ca9421f666d78c264c7ffca6601d154c3", size = 409611, upload-time = "2025-10-14T15:06:05.809Z" },
+    { url = "https://files.pythonhosted.org/packages/1e/c7/5420d1943c8e3ce1a21c0a9330bcf7edafb6aa65d26b21dbb3267c9e8112/watchfiles-1.1.1-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:672b8adf25b1a0d35c96b5888b7b18699d27d4194bac8beeae75be4b7a3fc9b2", size = 396889, upload-time = "2025-10-14T15:06:07.035Z" },
+    { url = "https://files.pythonhosted.org/packages/0c/e5/0072cef3804ce8d3aaddbfe7788aadff6b3d3f98a286fdbee9fd74ca59a7/watchfiles-1.1.1-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77a13aea58bc2b90173bc69f2a90de8e282648939a00a602e1dc4ee23e26b66d", size = 451616, upload-time = "2025-10-14T15:06:08.072Z" },
+    { url = "https://files.pythonhosted.org/packages/83/4e/b87b71cbdfad81ad7e83358b3e447fedd281b880a03d64a760fe0a11fc2e/watchfiles-1.1.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0b495de0bb386df6a12b18335a0285dda90260f51bdb505503c02bcd1ce27a8b", size = 458413, upload-time = "2025-10-14T15:06:09.209Z" },
+    { url = "https://files.pythonhosted.org/packages/d3/8e/e500f8b0b77be4ff753ac94dc06b33d8f0d839377fee1b78e8c8d8f031bf/watchfiles-1.1.1-pp311-pypy311_pp73-macosx_10_12_x86_64.whl", hash = "sha256:db476ab59b6765134de1d4fe96a1a9c96ddf091683599be0f26147ea1b2e4b88", size = 408250, upload-time = "2025-10-14T15:06:10.264Z" },
+    { url = "https://files.pythonhosted.org/packages/bd/95/615e72cd27b85b61eec764a5ca51bd94d40b5adea5ff47567d9ebc4d275a/watchfiles-1.1.1-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:89eef07eee5e9d1fda06e38822ad167a044153457e6fd997f8a858ab7564a336", size = 396117, upload-time = "2025-10-14T15:06:11.28Z" },
+    { url = "https://files.pythonhosted.org/packages/c9/81/e7fe958ce8a7fb5c73cc9fb07f5aeaf755e6aa72498c57d760af760c91f8/watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ce19e06cbda693e9e7686358af9cd6f5d61312ab8b00488bc36f5aabbaf77e24", size = 450493, upload-time = "2025-10-14T15:06:12.321Z" },
+    { url = "https://files.pythonhosted.org/packages/6e/d4/ed38dd3b1767193de971e694aa544356e63353c33a85d948166b5ff58b9e/watchfiles-1.1.1-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e6f39af2eab0118338902798b5aa6664f46ff66bc0280de76fca67a7f262a49", size = 457546, upload-time = "2025-10-14T15:06:13.372Z" },
+]
+
+[[package]]
+name = "websockets"
+version = "16.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/04/24/4b2031d72e840ce4c1ccb255f693b15c334757fc50023e4db9537080b8c4/websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5", size = 179346, upload-time = "2026-01-10T09:23:47.181Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/20/74/221f58decd852f4b59cc3354cccaf87e8ef695fede361d03dc9a7396573b/websockets-16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:04cdd5d2d1dacbad0a7bf36ccbcd3ccd5a30ee188f2560b7a62a30d14107b31a", size = 177343, upload-time = "2026-01-10T09:22:21.28Z" },
+    { url = "https://files.pythonhosted.org/packages/19/0f/22ef6107ee52ab7f0b710d55d36f5a5d3ef19e8a205541a6d7ffa7994e5a/websockets-16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8ff32bb86522a9e5e31439a58addbb0166f0204d64066fb955265c4e214160f0", size = 175021, upload-time = "2026-01-10T09:22:22.696Z" },
+    { url = "https://files.pythonhosted.org/packages/10/40/904a4cb30d9b61c0e278899bf36342e9b0208eb3c470324a9ecbaac2a30f/websockets-16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:583b7c42688636f930688d712885cf1531326ee05effd982028212ccc13e5957", size = 175320, upload-time = "2026-01-10T09:22:23.94Z" },
+    { url = "https://files.pythonhosted.org/packages/9d/2f/4b3ca7e106bc608744b1cdae041e005e446124bebb037b18799c2d356864/websockets-16.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7d837379b647c0c4c2355c2499723f82f1635fd2c26510e1f587d89bc2199e72", size = 183815, upload-time = "2026-01-10T09:22:25.469Z" },
+    { url = "https://files.pythonhosted.org/packages/86/26/d40eaa2a46d4302becec8d15b0fc5e45bdde05191e7628405a19cf491ccd/websockets-16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df57afc692e517a85e65b72e165356ed1df12386ecb879ad5693be08fac65dde", size = 185054, upload-time = "2026-01-10T09:22:27.101Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/ba/6500a0efc94f7373ee8fefa8c271acdfd4dca8bd49a90d4be7ccabfc397e/websockets-16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2b9f1e0d69bc60a4a87349d50c09a037a2607918746f07de04df9e43252c77a3", size = 184565, upload-time = "2026-01-10T09:22:28.293Z" },
+    { url = "https://files.pythonhosted.org/packages/04/b4/96bf2cee7c8d8102389374a2616200574f5f01128d1082f44102140344cc/websockets-16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:335c23addf3d5e6a8633f9f8eda77efad001671e80b95c491dd0924587ece0b3", size = 183848, upload-time = "2026-01-10T09:22:30.394Z" },
+    { url = "https://files.pythonhosted.org/packages/02/8e/81f40fb00fd125357814e8c3025738fc4ffc3da4b6b4a4472a82ba304b41/websockets-16.0-cp310-cp310-win32.whl", hash = "sha256:37b31c1623c6605e4c00d466c9d633f9b812ea430c11c8a278774a1fde1acfa9", size = 178249, upload-time = "2026-01-10T09:22:32.083Z" },
+    { url = "https://files.pythonhosted.org/packages/b4/5f/7e40efe8df57db9b91c88a43690ac66f7b7aa73a11aa6a66b927e44f26fa/websockets-16.0-cp310-cp310-win_amd64.whl", hash = "sha256:8e1dab317b6e77424356e11e99a432b7cb2f3ec8c5ab4dabbcee6add48f72b35", size = 178685, upload-time = "2026-01-10T09:22:33.345Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/db/de907251b4ff46ae804ad0409809504153b3f30984daf82a1d84a9875830/websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8", size = 177340, upload-time = "2026-01-10T09:22:34.539Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/fa/abe89019d8d8815c8781e90d697dec52523fb8ebe308bf11664e8de1877e/websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad", size = 175022, upload-time = "2026-01-10T09:22:36.332Z" },
+    { url = "https://files.pythonhosted.org/packages/58/5d/88ea17ed1ded2079358b40d31d48abe90a73c9e5819dbcde1606e991e2ad/websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d", size = 175319, upload-time = "2026-01-10T09:22:37.602Z" },
+    { url = "https://files.pythonhosted.org/packages/d2/ae/0ee92b33087a33632f37a635e11e1d99d429d3d323329675a6022312aac2/websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe", size = 184631, upload-time = "2026-01-10T09:22:38.789Z" },
+    { url = "https://files.pythonhosted.org/packages/c8/c5/27178df583b6c5b31b29f526ba2da5e2f864ecc79c99dae630a85d68c304/websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b", size = 185870, upload-time = "2026-01-10T09:22:39.893Z" },
+    { url = "https://files.pythonhosted.org/packages/87/05/536652aa84ddc1c018dbb7e2c4cbcd0db884580bf8e95aece7593fde526f/websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5", size = 185361, upload-time = "2026-01-10T09:22:41.016Z" },
+    { url = "https://files.pythonhosted.org/packages/6d/e2/d5332c90da12b1e01f06fb1b85c50cfc489783076547415bf9f0a659ec19/websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64", size = 184615, upload-time = "2026-01-10T09:22:42.442Z" },
+    { url = "https://files.pythonhosted.org/packages/77/fb/d3f9576691cae9253b51555f841bc6600bf0a983a461c79500ace5a5b364/websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6", size = 178246, upload-time = "2026-01-10T09:22:43.654Z" },
+    { url = "https://files.pythonhosted.org/packages/54/67/eaff76b3dbaf18dcddabc3b8c1dba50b483761cccff67793897945b37408/websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac", size = 178684, upload-time = "2026-01-10T09:22:44.941Z" },
+    { url = "https://files.pythonhosted.org/packages/84/7b/bac442e6b96c9d25092695578dda82403c77936104b5682307bd4deb1ad4/websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00", size = 177365, upload-time = "2026-01-10T09:22:46.787Z" },
+    { url = "https://files.pythonhosted.org/packages/b0/fe/136ccece61bd690d9c1f715baaeefd953bb2360134de73519d5df19d29ca/websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79", size = 175038, upload-time = "2026-01-10T09:22:47.999Z" },
+    { url = "https://files.pythonhosted.org/packages/40/1e/9771421ac2286eaab95b8575b0cb701ae3663abf8b5e1f64f1fd90d0a673/websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39", size = 175328, upload-time = "2026-01-10T09:22:49.809Z" },
+    { url = "https://files.pythonhosted.org/packages/18/29/71729b4671f21e1eaa5d6573031ab810ad2936c8175f03f97f3ff164c802/websockets-16.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9b5aca38b67492ef518a8ab76851862488a478602229112c4b0d58d63a7a4d5c", size = 184915, upload-time = "2026-01-10T09:22:51.071Z" },
+    { url = "https://files.pythonhosted.org/packages/97/bb/21c36b7dbbafc85d2d480cd65df02a1dc93bf76d97147605a8e27ff9409d/websockets-16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e0334872c0a37b606418ac52f6ab9cfd17317ac26365f7f65e203e2d0d0d359f", size = 186152, upload-time = "2026-01-10T09:22:52.224Z" },
+    { url = "https://files.pythonhosted.org/packages/4a/34/9bf8df0c0cf88fa7bfe36678dc7b02970c9a7d5e065a3099292db87b1be2/websockets-16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a0b31e0b424cc6b5a04b8838bbaec1688834b2383256688cf47eb97412531da1", size = 185583, upload-time = "2026-01-10T09:22:53.443Z" },
+    { url = "https://files.pythonhosted.org/packages/47/88/4dd516068e1a3d6ab3c7c183288404cd424a9a02d585efbac226cb61ff2d/websockets-16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:485c49116d0af10ac698623c513c1cc01c9446c058a4e61e3bf6c19dff7335a2", size = 184880, upload-time = "2026-01-10T09:22:55.033Z" },
+    { url = "https://files.pythonhosted.org/packages/91/d6/7d4553ad4bf1c0421e1ebd4b18de5d9098383b5caa1d937b63df8d04b565/websockets-16.0-cp312-cp312-win32.whl", hash = "sha256:eaded469f5e5b7294e2bdca0ab06becb6756ea86894a47806456089298813c89", size = 178261, upload-time = "2026-01-10T09:22:56.251Z" },
+    { url = "https://files.pythonhosted.org/packages/c3/f0/f3a17365441ed1c27f850a80b2bc680a0fa9505d733fe152fdf5e98c1c0b/websockets-16.0-cp312-cp312-win_amd64.whl", hash = "sha256:5569417dc80977fc8c2d43a86f78e0a5a22fee17565d78621b6bb264a115d4ea", size = 178693, upload-time = "2026-01-10T09:22:57.478Z" },
+    { url = "https://files.pythonhosted.org/packages/cc/9c/baa8456050d1c1b08dd0ec7346026668cbc6f145ab4e314d707bb845bf0d/websockets-16.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:878b336ac47938b474c8f982ac2f7266a540adc3fa4ad74ae96fea9823a02cc9", size = 177364, upload-time = "2026-01-10T09:22:59.333Z" },
+    { url = "https://files.pythonhosted.org/packages/7e/0c/8811fc53e9bcff68fe7de2bcbe75116a8d959ac699a3200f4847a8925210/websockets-16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:52a0fec0e6c8d9a784c2c78276a48a2bdf099e4ccc2a4cad53b27718dbfd0230", size = 175039, upload-time = "2026-01-10T09:23:01.171Z" },
+    { url = "https://files.pythonhosted.org/packages/aa/82/39a5f910cb99ec0b59e482971238c845af9220d3ab9fa76dd9162cda9d62/websockets-16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6578ed5b6981005df1860a56e3617f14a6c307e6a71b4fff8c48fdc50f3ed2c", size = 175323, upload-time = "2026-01-10T09:23:02.341Z" },
+    { url = "https://files.pythonhosted.org/packages/bd/28/0a25ee5342eb5d5f297d992a77e56892ecb65e7854c7898fb7d35e9b33bd/websockets-16.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95724e638f0f9c350bb1c2b0a7ad0e83d9cc0c9259f3ea94e40d7b02a2179ae5", size = 184975, upload-time = "2026-01-10T09:23:03.756Z" },
+    { url = "https://files.pythonhosted.org/packages/f9/66/27ea52741752f5107c2e41fda05e8395a682a1e11c4e592a809a90c6a506/websockets-16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0204dc62a89dc9d50d682412c10b3542d748260d743500a85c13cd1ee4bde82", size = 186203, upload-time = "2026-01-10T09:23:05.01Z" },
+    { url = "https://files.pythonhosted.org/packages/37/e5/8e32857371406a757816a2b471939d51c463509be73fa538216ea52b792a/websockets-16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:52ac480f44d32970d66763115edea932f1c5b1312de36df06d6b219f6741eed8", size = 185653, upload-time = "2026-01-10T09:23:06.301Z" },
+    { url = "https://files.pythonhosted.org/packages/9b/67/f926bac29882894669368dc73f4da900fcdf47955d0a0185d60103df5737/websockets-16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6e5a82b677f8f6f59e8dfc34ec06ca6b5b48bc4fcda346acd093694cc2c24d8f", size = 184920, upload-time = "2026-01-10T09:23:07.492Z" },
+    { url = "https://files.pythonhosted.org/packages/3c/a1/3d6ccdcd125b0a42a311bcd15a7f705d688f73b2a22d8cf1c0875d35d34a/websockets-16.0-cp313-cp313-win32.whl", hash = "sha256:abf050a199613f64c886ea10f38b47770a65154dc37181bfaff70c160f45315a", size = 178255, upload-time = "2026-01-10T09:23:09.245Z" },
+    { url = "https://files.pythonhosted.org/packages/6b/ae/90366304d7c2ce80f9b826096a9e9048b4bb760e44d3b873bb272cba696b/websockets-16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3425ac5cf448801335d6fdc7ae1eb22072055417a96cc6b31b3861f455fbc156", size = 178689, upload-time = "2026-01-10T09:23:10.483Z" },
+    { url = "https://files.pythonhosted.org/packages/f3/1d/e88022630271f5bd349ed82417136281931e558d628dd52c4d8621b4a0b2/websockets-16.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8cc451a50f2aee53042ac52d2d053d08bf89bcb31ae799cb4487587661c038a0", size = 177406, upload-time = "2026-01-10T09:23:12.178Z" },
+    { url = "https://files.pythonhosted.org/packages/f2/78/e63be1bf0724eeb4616efb1ae1c9044f7c3953b7957799abb5915bffd38e/websockets-16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:daa3b6ff70a9241cf6c7fc9e949d41232d9d7d26fd3522b1ad2b4d62487e9904", size = 175085, upload-time = "2026-01-10T09:23:13.511Z" },
+    { url = "https://files.pythonhosted.org/packages/bb/f4/d3c9220d818ee955ae390cf319a7c7a467beceb24f05ee7aaaa2414345ba/websockets-16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fd3cb4adb94a2a6e2b7c0d8d05cb94e6f1c81a0cf9dc2694fb65c7e8d94c42e4", size = 175328, upload-time = "2026-01-10T09:23:14.727Z" },
+    { url = "https://files.pythonhosted.org/packages/63/bc/d3e208028de777087e6fb2b122051a6ff7bbcca0d6df9d9c2bf1dd869ae9/websockets-16.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:781caf5e8eee67f663126490c2f96f40906594cb86b408a703630f95550a8c3e", size = 185044, upload-time = "2026-01-10T09:23:15.939Z" },
+    { url = "https://files.pythonhosted.org/packages/ad/6e/9a0927ac24bd33a0a9af834d89e0abc7cfd8e13bed17a86407a66773cc0e/websockets-16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:caab51a72c51973ca21fa8a18bd8165e1a0183f1ac7066a182ff27107b71e1a4", size = 186279, upload-time = "2026-01-10T09:23:17.148Z" },
+    { url = "https://files.pythonhosted.org/packages/b9/ca/bf1c68440d7a868180e11be653c85959502efd3a709323230314fda6e0b3/websockets-16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:19c4dc84098e523fd63711e563077d39e90ec6702aff4b5d9e344a60cb3c0cb1", size = 185711, upload-time = "2026-01-10T09:23:18.372Z" },
+    { url = "https://files.pythonhosted.org/packages/c4/f8/fdc34643a989561f217bb477cbc47a3a07212cbda91c0e4389c43c296ebf/websockets-16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5e18a238a2b2249c9a9235466b90e96ae4795672598a58772dd806edc7ac6d3", size = 184982, upload-time = "2026-01-10T09:23:19.652Z" },
+    { url = "https://files.pythonhosted.org/packages/dd/d1/574fa27e233764dbac9c52730d63fcf2823b16f0856b3329fc6268d6ae4f/websockets-16.0-cp314-cp314-win32.whl", hash = "sha256:a069d734c4a043182729edd3e9f247c3b2a4035415a9172fd0f1b71658a320a8", size = 177915, upload-time = "2026-01-10T09:23:21.458Z" },
+    { url = "https://files.pythonhosted.org/packages/8a/f1/ae6b937bf3126b5134ce1f482365fde31a357c784ac51852978768b5eff4/websockets-16.0-cp314-cp314-win_amd64.whl", hash = "sha256:c0ee0e63f23914732c6d7e0cce24915c48f3f1512ec1d079ed01fc629dab269d", size = 178381, upload-time = "2026-01-10T09:23:22.715Z" },
+    { url = "https://files.pythonhosted.org/packages/06/9b/f791d1db48403e1f0a27577a6beb37afae94254a8c6f08be4a23e4930bc0/websockets-16.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a35539cacc3febb22b8f4d4a99cc79b104226a756aa7400adc722e83b0d03244", size = 177737, upload-time = "2026-01-10T09:23:24.523Z" },
+    { url = "https://files.pythonhosted.org/packages/bd/40/53ad02341fa33b3ce489023f635367a4ac98b73570102ad2cdd770dacc9a/websockets-16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b784ca5de850f4ce93ec85d3269d24d4c82f22b7212023c974c401d4980ebc5e", size = 175268, upload-time = "2026-01-10T09:23:25.781Z" },
+    { url = "https://files.pythonhosted.org/packages/74/9b/6158d4e459b984f949dcbbb0c5d270154c7618e11c01029b9bbd1bb4c4f9/websockets-16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:569d01a4e7fba956c5ae4fc988f0d4e187900f5497ce46339c996dbf24f17641", size = 175486, upload-time = "2026-01-10T09:23:27.033Z" },
+    { url = "https://files.pythonhosted.org/packages/e5/2d/7583b30208b639c8090206f95073646c2c9ffd66f44df967981a64f849ad/websockets-16.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50f23cdd8343b984957e4077839841146f67a3d31ab0d00e6b824e74c5b2f6e8", size = 185331, upload-time = "2026-01-10T09:23:28.259Z" },
+    { url = "https://files.pythonhosted.org/packages/45/b0/cce3784eb519b7b5ad680d14b9673a31ab8dcb7aad8b64d81709d2430aa8/websockets-16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:152284a83a00c59b759697b7f9e9cddf4e3c7861dd0d964b472b70f78f89e80e", size = 186501, upload-time = "2026-01-10T09:23:29.449Z" },
+    { url = "https://files.pythonhosted.org/packages/19/60/b8ebe4c7e89fb5f6cdf080623c9d92789a53636950f7abacfc33fe2b3135/websockets-16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bc59589ab64b0022385f429b94697348a6a234e8ce22544e3681b2e9331b5944", size = 186062, upload-time = "2026-01-10T09:23:31.368Z" },
+    { url = "https://files.pythonhosted.org/packages/88/a8/a080593f89b0138b6cba1b28f8df5673b5506f72879322288b031337c0b8/websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206", size = 185356, upload-time = "2026-01-10T09:23:32.627Z" },
+    { url = "https://files.pythonhosted.org/packages/c2/b6/b9afed2afadddaf5ebb2afa801abf4b0868f42f8539bfe4b071b5266c9fe/websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6", size = 178085, upload-time = "2026-01-10T09:23:33.816Z" },
+    { url = "https://files.pythonhosted.org/packages/9f/3e/28135a24e384493fa804216b79a6a6759a38cc4ff59118787b9fb693df93/websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd", size = 178531, upload-time = "2026-01-10T09:23:35.016Z" },
+    { url = "https://files.pythonhosted.org/packages/72/07/c98a68571dcf256e74f1f816b8cc5eae6eb2d3d5cfa44d37f801619d9166/websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d", size = 174947, upload-time = "2026-01-10T09:23:36.166Z" },
+    { url = "https://files.pythonhosted.org/packages/7e/52/93e166a81e0305b33fe416338be92ae863563fe7bce446b0f687b9df5aea/websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03", size = 175260, upload-time = "2026-01-10T09:23:37.409Z" },
+    { url = "https://files.pythonhosted.org/packages/56/0c/2dbf513bafd24889d33de2ff0368190a0e69f37bcfa19009ef819fe4d507/websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da", size = 176071, upload-time = "2026-01-10T09:23:39.158Z" },
+    { url = "https://files.pythonhosted.org/packages/a5/8f/aea9c71cc92bf9b6cc0f7f70df8f0b420636b6c96ef4feee1e16f80f75dd/websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c", size = 176968, upload-time = "2026-01-10T09:23:41.031Z" },
+    { url = "https://files.pythonhosted.org/packages/9a/3f/f70e03f40ffc9a30d817eef7da1be72ee4956ba8d7255c399a01b135902a/websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767", size = 178735, upload-time = "2026-01-10T09:23:42.259Z" },
+    { url = "https://files.pythonhosted.org/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598, upload-time = "2026-01-10T09:23:45.395Z" },
+]
+
+[[package]]
+name = "zipp"
+version = "3.23.0"
+source = { registry = "https://pypi.org/simple" }
+sdist = { url = "https://files.pythonhosted.org/packages/e3/02/0f2892c661036d50ede074e376733dca2ae7c6eb617489437771209d4180/zipp-3.23.0.tar.gz", hash = "sha256:a07157588a12518c9d4034df3fbbee09c814741a33ff63c05fa29d26a2404166", size = 25547, upload-time = "2025-06-08T17:06:39.4Z" }
+wheels = [
+    { url = "https://files.pythonhosted.org/packages/2e/54/647ade08bf0db230bfea292f893923872fd20be6ac6f53b2b936ba839d75/zipp-3.23.0-py3-none-any.whl", hash = "sha256:071652d6115ed432f5ce1d34c336c0adfd6a884660d1e9712a256d3d3bd4b14e", size = 10276, upload-time = "2025-06-08T17:06:38.034Z" },
+]